what functions or classes of functions are $L^1$ but not $L^2$

We know that if a real function is in $L^2$ then it is in $L^1$, but the reverse is not necessarily true. So what are the examples of functions that are $L^1$ but not $L^2$, especially those intrinsically unbounded ones if any? Welcome more examples, or classes of examples. Thanks.


Neither containment holds in general. On $\mathbb{R}$, the function $f$ such that $f(x)=1/x$ if $x\geq1$ and $f(x)=0$ otherwise is in $L^2\setminus L^1$, and the function $g$ such that $g(x)=1/\sqrt{x}$ if $0\lt x\leq1$ and $g(x)=0$ otherwise is in $L^1\setminus L^2$.

For bounded domains, $L^2\subset L^1$, because what keeps a function from being integrable on a bounded set is being too large, and squares make large numbers larger. If $f$ is a bounded function in $L^1$, then $f$ is also in $L^2$, because what keeps a bounded function from being integrable is not going to zero fast enough, and squares make numbers go to zero faster.


I assume that you mean integrable functions in $[0,1]$.

In the sense of Baire almost every function in $L^{1}[0,1]$ is not in $L^{2}[0,1]$:

The space $L^{2}[0,1]$ is meager in $L^{1}[0,1]$ (that is to say it is a countable union of sets whose closure has empty interior in $L^{1}$).

The easiest way to see this by using the open mapping theorem: the inclusion $L^{2}[0,1] \to L^{1}[0,1]$ is continuous but not onto. More explicitly, the set $B_{n} = \{f \in L^{1}\,:\,\int |f|^{2} \leq n\}$ is easily seen to be closed and have empty interior and $L^{2}[0,1] = \bigcup_{n=1}^{\infty} B_{n}$. Similarly, if $1 \leq p < q \leq \infty$ then $L^{q}[0,1] \subset L^{p}[0,1]$ is meager.

This result is analogous to Baire's theorem saying that almost every continuous function on $[0,1]$ is nowhere differentiable, and with the same defect: If you choose a 'generic' function it won't be differentiable (or square-integrable) but from the statement you don't have a clue what such a function looks like.