# Behaviour of $L^2$ functions at infinity [duplicate]

Is it possible to prove that if $f\in L^2(\mathbb {R})$ then $\exists\lim_{x\to\pm\infty}\lvert f\rvert^2$ and $\lim_{x\to\pm\infty}\lvert f\rvert^2=0$? If not, is it easy to find a counterexample?

## marked as duplicate by Jonas Meyer, user147263, Matt Samuel, Strants, graydadJul 17 '15 at 2:44

• Let $f(x)=n$ on $[n,n+{1\over n^4}]$, $n$ a positive integer, and $0$ otherwise. – David Mitra Jul 16 '15 at 13:41
• If we add the hypothesis $f\in\mathcal{C}^0$ is it still so easy? I was thinking to something like a wavefunction in QM for example. Thanks! – Red Lex Jul 16 '15 at 13:52
• Instead of steps over $[n,n+1/n^4]$, take "spikes". (You can smooth things out as nicely as you wish.) – David Mitra Jul 16 '15 at 13:53
• A standard condition to have a zero limit is $f \in W^{1,2}(\mathbb{R})$, i.e. $f \in L^2$ and $f' \in L^2$. – Siminore Jul 16 '15 at 14:00
• The shortest answer to the title: may be nasty. – A.Γ. Jul 16 '15 at 14:00