How to show the following limit involving integration Suppose that $f(x)$ is continuous, nonnegative for $x\geq0$ with $\int\limits_{0}^{\infty}f(x)dx<\infty$. Prove that $$\lim_{n\to\infty}\int\limits_{0}^{n}\frac{xf(x)}{n}dx=0$$
I approched like this: Suppose $\frac{x}{n}=y$. Then we get $\displaystyle\lim_{n\to\infty}n\int\limits_{0}^{1}yf(ny)dy$. From this how to approch?
 A: For $x\geq 0$, define $$f_n(x)=\frac {xf(x)}n 1_{[0,n)}(x)$$
Clearly, we have the pointwise limit: $$\lim_{n\rightarrow +\infty} f_n(x)=0$$
Also, for all $n\in\mathbb N^*$, and all $x\geq 0$, $$|f_n(x)|\leq f(x)$$
and since $$\int_0^{+\infty}f(x)dx <+\infty$$
By the Dominated Convergence Theorem,
$$\lim_{n\rightarrow +\infty} \int_0^{+\infty}f_n(x)=0$$
A: Let $\varepsilon > 0$. Pick $n_0 \in \mathbb{N}$ such that $$\int_{n_0}^\infty f(x)\,dx < \frac\varepsilon2$$
$f$ is continuous so $\int_0^{n_0}xf(x)\,dx$ exists and is finite. Pick $n_1 \in\mathbb{N}$ such that $$n \ge n_1 \implies \frac1n \int_0^{n_0} xf(x)\,dx < \frac\varepsilon2$$
For $n \ge \max\{n_0,n_1\}$ we have
$$\frac1n\int_0^nxf(x)\,dx = \frac1n \int_0^{n_0} xf(x)\,dx + \frac1n\int_{n_0}^nxf(x)\,dx < \frac\varepsilon2 + \int_{n_0}^nf(x)\,dx < \varepsilon$$
We conclude $$\lim_{n\to\infty}\frac1n\int_0^nxf(x)\,dx = 0$$
A: Stefan Lafon's answer is fine, but it uses the Dominated Convergence Theorem, which might not be known to the OP, since the question itself looks like it comes from an elementary calculus course. Let me propose an approach that does not involve measure theory.
Let
$$ F\colon(0,\infty)\to(0,\infty), \quad t\mapsto \int_0^tf(x)dx. $$
Since $f$ is continuous, $F$ is differentiable with $F'=f$. Integration by parts yields
$$ \int_0^n \frac{xf(x)}{n}dx = \frac{1}{n}\left( nF(n)-\int_0^nF(t)dt\right)=\frac{1}{n}\int_0^n(F(n)-F(t))dt.\tag{$+$}$$
By assumption,
$$F(t)\uparrow \int_0^\infty f(x)dx =: c \in (0,\infty) \quad \text{for $t\to\infty$},$$
so for any $\epsilon>0$ there is some $n_0\in\Bbb N$ such that
$$ |F(n)-F(t)| < \epsilon \quad \text{for all $t,n\ge n_0$.}$$
Hence, we can deduce from ($+$) that
\begin{align}
\int_0^n \frac{xf(x)}{n}dx &= \frac{1}{n} \int_0^{n_0}(F(n)-F(t))dt +\frac{1}{n} \int_{n_0}^n(F(n)-F(t))dt \\
&\le \frac{2n_0c}{n}   +\frac{n-n_0}{n} \epsilon \xrightarrow{n\to\infty} \epsilon,
\end{align}
so
$$ \limsup_{n\to\infty}\int_0^n \frac{xf(x)}{n}dx \le\epsilon.$$
But $\epsilon$ was arbitrary, so the proof is complete.
Edit: Oh, I just realized that this is way too complicated... But someone else has already posted a corresponding answer, so I'll just leave it like that.
