Prove $\lim\limits_{n \rightarrow \infty} \frac{1}{n} \int_0^n xg(x)\,dx=0$ If $g$ is a Lebesgue integrable function in $E=\lbrack 0,\infty)$, prove that 
$$\lim_{n \rightarrow \infty}\frac{1}{n}\int_0^n xg(x)\,dx=0.$$
I want to use the absolute continuity of the Lebesgue integral, i.e, if $\epsilon >0$ there is $\delta > 0$ such as if $|E|<\delta$ (Lebesgue measure) then $\int_E g(x)\,dx<\epsilon.$ I would like to split the integral in the subsets $\lbrack 0 , n-\delta\rbrack$ and $\lbrack n-\delta, n)$ (the last one has measure $\delta$) but I think this is wrong.
Thank you very much for your help!
 A: Let $f_n(x)=\frac{x}n g(x)\chi_{[0,n]} $ 


*

*Since $0\le x\le n$ we have, 
$$|f_n(x)| = |\frac{x}n g(x)\chi_{[0,n]}| \leq |g(x)|\in L^1(0,\infty)$$

*On the other hand, for almost every x we have, $$\lim_{n\to\infty}|f_n(x)|=\lim_{n\to\infty}|\frac{x}n g(x)\chi_{[0,n]}|\le|g(x)| \lim_{n\to\infty}\frac{|x|}n =0$$
It then readily springs from Dominated convergence theorem that, 
$$\lim_{n\to\infty}\frac1n\int_{0}^{\space n}xg(x)dx =\int_{0}^{\infty} f_n(x)dx=0$$
A: Define for an integrable function $f$, $L_n(f):=1/n\int_0^n xf(x)\,\mathrm dx$. Then $|L_n(f)|\leqslant \lVert f\rVert_1$. Consequently, by an approximation argument, we can consider the case where $g$ is a linear combination of characteristic function of sets of finite measure. By linearity, it suffices to deal with the case $g=\chi_A$, where $A$ is a set of finite measure. Notice that for any $n$ and any $R\gt 0$, 
$$|L_n(\chi_A)|\leqslant \frac 1n\int_0^Rx\chi_A(x)\,\mathrm dx+\frac 1n\int_R^nx\chi_A(x)\,\mathrm dx\leqslant \frac Rn \lambda(A) + \lambda(A\cap (R,+\infty)),$$
hence 
$$\limsup_{n\to+\infty}|L_n(\chi_A)|\leqslant \lambda(A\cap (R,+\infty)).$$Since $A$ has a finite measure, we conclude letting $R\to +\infty$.
A: WLOG, $g\ge 0.$ Let $n_0>0.$ Then for $n>n_0,$
$$\tag 1\frac{\int_0^n xg(x)\,dx}{n} = \frac{\int_0^{n_0} xg(x)\,dx}{n} + \frac{\int_{n_0}^n xg(x)\,dx}{n}$$ $$ \le \frac{\int_0^{n_0} xg(x)\,dx}{n} + \int_{n_0}^n g(x)\,dx.$$
Now let $n\to \infty$ to see the $\limsup$ of the left of $(1)$ is $\le 0+\int_{n_0}^\infty g(x)\,dx.$ But $\int_0^\infty g <\infty,$ hence $\int_{n_0}^\infty g(x)\,dx$ can be made arbitrarily small by choosing $n_0$ large. It follows that the $\limsup$ of the left of $(1)$ is $0,$ and this gives the result.
