$\int_0^\infty t|f'(t)|^2\,dt < \infty$ and $\lim_{T \to \infty} T^{-1} \int_0^T f(t)\,dt = L$, do we have that $f(t) \to L$ as $t \to \infty$? Let $f \in C^1([0, \infty))$ and suppose that $\int_0^\infty t|f'(t)|^2\,dt < \infty$ and $\lim_{T \to \infty} T^{-1} \int_0^T f(t)\,dt = L$. Do we have that $f(t) \to L$ as $t \to \infty$?
 A: Yes. Let's assume that $L=0$. Then we cannot have $|f|\ge 1$ at arbitrarily large $t$ values. If we did, then we could find disjoint intervals $I_n$ such that $f=1$ (or $=-1$, which is analogous, of course) somewhere on each $I_n$, and $|f|\ge 1/2$ on all of $I_n$ and $f=1/2$ at the endpoints. (We find arbitrarily many of these because $|f|$ cannot stay $\ge \delta$ forever; it has to move close to zero or to values of the opposite sign eventually.)
Then $\int_I |f'|\ge 1$ for each such interval. By Cauchy-Schwarz,
$$
1 \le \int_I |f'| \lesssim \left( \int_I t|f'|^2\int_I \frac{dt}{t} \right)^{1/2} .
$$
So if we write $I=(a,b)$, then $\log b/a\to \infty$ as we take intervals that are located at larger and larger $t$ values, but this is impossible: since $I=(a,b)$ makes a contribution $\ge (b-a)/2$ to $\int f$ and $b/a \gg 1$, we must have that $\int_0^a f$ is negative and $\gtrsim b$ in absolute value, to keep the average over $[0,b]$ small. But then $(1/a)\int_0^a f \lesssim -b/a\ll -1$ is not close to zero.
