summable square function implies...? I have difficulty to demonstrate this:
$$ \int_{-\infty}^{\infty}|f(x)|^2dx<\infty~~~\text{(summable square function)}$$ 
then, 
$$\lim_{|x|\rightarrow\infty }f(x)=0$$
thank you.
 A: You are probably having difficulties because this fact is false: The function $$f(x)=\begin{cases} 1 & x \in \mathbb Z \\0 & x \notin \mathbb Z \end{cases}$$ is a counterexample.
A: Just take a function $$f(x)=\frac{1}{n^2+1}(x-n)^{-1/3}, \quad x\in (n,n+1]$$
for $n\in \Bbb Z$.
A: Define ${\rm J}\left(x\right) \equiv \int_{-\infty}^{x}\left\vert{\rm f}\left(x'\right)\right\vert^{2}\,{\rm d}x'$. Then, $\forall \epsilon > 0, \exists\ N, N'$
such that $\left(x + h\right) > N$ and $x > N'\quad\Longrightarrow$
$$
\left\vert{\rm J}\left(x + h\right) - {\rm J}\left(x\right)\right\vert
\leq
\underbrace{\quad\left\vert{\rm J}\left(x + h\right) - {\rm J}\left(\infty\right)\right\vert\quad}
_{<\ \epsilon\,/\,2}
+
\underbrace{\quad\left\vert{\rm J}\left(x\right) - {\rm J}\left(\infty\right)\right\vert\quad}
_{<\ \epsilon\,/\,2}
<
\epsilon
$$
Then, $\forall\ \epsilon >0$; when $x > {\rm max}\left\lbrace N - h, N'\right\rbrace$, we have
$\left\vert{\rm J}\left(x + h\right) - {\rm J}\left(x\right)\right\vert < \epsilon$. That
means
$$
\lim_{x \to \infty}\left\vert{\rm J}\left(x + h\right) - {\rm J}\left(x\right)\right\vert
=
0
$$
Also
$$
0
=
\lim_{h \to 0}\lim_{x \to \infty}
\left\vert{{\rm J}\left(x + h\right) - {\rm J}\left(x\right) \over h}\right\vert
=
\lim_{x \to \infty}\lim_{h \to 0}
\left\vert{{\rm J}\left(x + h\right) - {\rm J}\left(x\right) \over h}\right\vert
=
\lim_{x \to \infty}\
\left\vert{\rm f}\left(x\right)\right\vert^{2}
$$ 
We have to be sure we can exchange the limits. That puts an extra condition on ${\rm J}\left(x\right)$ or/and ${\rm f}\left(x\right)$.
