Let $f:[0,\infty)\to[0,\infty)$ be continuous and $\int_0^\infty f(x)dx<\infty$.Prove that$$\lim_{n\to\infty}\frac 1 n \int\limits_0^n xf(x)dx=0$$
I have tried to approach this through integration by parts but have not been able to solve the problem.