how to prove $f(t)\rightarrow L$ as $t\rightarrow \infty$ Let $f$ be a $\mathcal{C}^1$ function on the $[0,\infty)$. Suppose that $$\int_0^\infty t|f'(t)|^2dt<\infty, \quad\lim_{T\rightarrow +\infty} \frac{1}{T}\int_0^T f(t)dt=L$$
how to prove $f(t)\rightarrow L$ as $t\rightarrow \infty$
I only get that $f'$ goes to $0$. how to prove $f$ goes to $L$?
 A: Hint: if 
$$\int_0^T f(t)dt\xrightarrow{T\rightarrow\infty}\infty$$
you can use De l'Hospital formula
$$L=\lim_{T\rightarrow +\infty} \frac{1}{T}\int_0^T f(t)dt=\lim_{T\rightarrow +\infty} \frac{\int_0^T f(t)dt}{T}=\lim_{T\rightarrow +\infty}f(T)$$
A: Put $\displaystyle g(x)=\int_0^x f(t)dt$. 
By integration by parts, we get
$$g(x)=xf(x)-\int_0^x tf^{\prime}(t)dt$$
Hence 
$$f(x)=\frac{g(x)}{x}+\frac{1}{x}\int_0^x tf^{\prime}(t)dt=\frac{g(x)}{x}+F(x)$$
We have only to show that $F$ has limit $0$ as $x$ goes to infinity. Let $\varepsilon>0$. There exists an $A>0$ such that $\displaystyle \int_A^{+\infty}tf^{\prime}(t)^2 \leq \varepsilon^2$. 
Writing $\displaystyle tf^{\prime}(t)=\sqrt{t}\sqrt{t}f^{\prime}(t)$ and using the Cauchy-Schwarz inequality we get for $x>A$:
$$(\int_A^x tf^{\prime}(t)dt)^2\leq \frac{x^2-A^2}{2}\int_A^x tf^{\prime}(t)^2dt\leq x^2\varepsilon^2$$
Now:
$$|F(x)|=| \frac{1}{x}\int_0^Atf^{\prime}(t) dt+\frac{1}{x}\int_A^x tf^{\prime}(t)dt|\leq | \frac{1}{x}\int_0^Atf^{\prime}(t) dt|+|\frac{1}{x}\int_A^x tf^{\prime}(t)dt|\leq  \frac{M}{x}+\varepsilon$$
with $\displaystyle M=|\int_0^Atf^{\prime}(t) dt|$. We can find $B\geq A$ such that $\displaystyle \frac{M}{x}<\varepsilon$ if $x\geq B$, so we have $|F(x)|\leq 2\varepsilon$ if $x\geq B$, and we have finished.
