Prove that $\lim_{n\to\infty}\frac1{n}\int_0^{n}xf(x)dx=0$.

Let $u_n=\frac1{n}\int_0^{n}xf(x)dx \geq 0$. Let $\varepsilon > 0$. We need to show that $u_n \leq \varepsilon$ for large enough $n$.

By hypotesis, there is a $a$ such that $\int_a^{\infty}f(x)dx \leq \frac{\varepsilon}{2}$.

Let $n$ be an integer such that $n\geq {\sf max}(a,\frac{2\int_0^a xf(x)dx}{\varepsilon})$. Then

$$ u_n=\int_0^a \frac{xf(x)}{n}dx + \int_a^n \frac{xf(x)}{n}dx \leq \frac{\varepsilon}{2}+ \int_a^n \frac{nf(x)}{n}dx \leq \frac{\varepsilon}{2}+\frac{\varepsilon}{2} =\varepsilon $$

and we are done.


$$\forall n\geqslant k,\qquad0\leqslant\frac1{n}\int_0^{n}xf(x)\mathrm dx\leqslant\frac1n\int_0^{k}xf(x)\mathrm dx+\int_k^{\infty}f(x)\mathrm dx$$