Example where $f\in L^{2}(\mathbb{R})$, but for all $p\in[1,2)\cup(2,\infty]$ $f\notin L^{p}(\mathbb{R})$.

20 Views Asked by At

Construct an example of a function $f:\mathbb{R}\rightarrow\mathbb{R}$ such that $f\in L^{2}(\mathbb{R})$, but such that for all $p\in[1,2)\cup(2,\infty]$ $f\notin L^{p}(\mathbb{R})$.

I can see how to go about constructing $f\in L^1(\Bbb{R})$ and $f\notin L^p$ for $p>1$, but this one asks for $f\in L^2$ Or is there a general construction for any specific $p$?