[Math] What are examples of functions that are $L^1$ but not $L^2$ and vice versa

real-analysis

This exercise is in Stein's Real analysis.

Find a function such that $f$ is $L^1(\mathbb{R}^n)$, but not $L^2(\mathbb{R}^n)$

Find a function such that $f$ is $L^2$ but not $L^1$.

Hint: consider $f(x)=|x|^{-a}$ on $|x|<1$ or $|x|>1$.

I was trying to use the hind to fin such functions.

Let $f(x)=|x|^{-a}$ on $|x|<1$ and $f(x)=0$ otherwise.

Since it is radial, $\int |f|dm_n = m_n(B(0,1))\int_0^1x^{-a}x^{n-1} dx$.

Similarly $\int |f|^2dm_n = m_n(B(0,1))\int_0^1x^{-2a}x^{n-1} dx$.

I could!'t find suitable $a$ to make this $f$ to be a desired function..

Help..

Best Answer

Let $n=1$, let $f(x)=0$ on $[0,1]$ and $\frac{1}{x}$ for $x\in (1,\infty)$. Then we have $$ |f|_{2}^{2}=\int^{\infty}_{1}\frac{1}{x^{2}}dx=-\frac{1}{x}|^{\infty}_{1}=1<\infty, |f|_{1}=\int^{\infty}_{1}\frac{1}{x}dx=\log[x]|^{\infty}_{1}=\log[\infty]=\infty $$ On the other hand we may let $n=2$. If we let $f=0$ on $r\in (1,\infty)$ and $r^{-\alpha}$ on $r\in [0,1]$, we have $$ |f|_{1}\sim \int^{1}_{0}r^{-\alpha}rdr,|f|_{2}^{2}\sim \int^{1}_{0}r^{-2\alpha}rdr $$ We want that $$ 0<1-\alpha<1, 1-2\alpha<0 $$ This means $$ \frac{1}{2}<\alpha<1 $$ and any $\alpha$ in this range should suffice. I am unable to construct an example for $n=1$, but I think this should be possible in principle.