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.
 A: You can get an example from any two sequences of positive reals such that $\sum \alpha_n \beta_n < \infty$ but $\sum \alpha_n^2 \beta_n = \infty$, e.g. $\alpha_n = n$ and $\beta_n = 1/n^3$.
For the reverse non-containment, take $\alpha_n = 1/n$ and $\beta_n = 1$.
A: For an important example,
Check out Kolmogorov's example of a function in $L^1$ whose Fourier series diverges almost everywhere: http://books.google.com/books?id=ikN59GkYJKIC&pg=PA1
By Carleson's theorem this cannot be in $L^2$.
A: If we look at the discrete group $\mathbb{Z}$, we have $L^1(\mathbb{Z})=\ell^1(\mathbb{Z})\subset \ell^2(\mathbb{Z})=L^2(\mathbb{Z})$ - see the thread How do you show that $\ell^p\subset \ell^q$  for $p≤q$?.
If we look at the compact group $\mathbb{T}$ (the unit circle), we have $L^2(\mathbb{T})\subset L^1(\mathbb{T})$, since by Hölder's inequality
$$\|f\|_{L^1}=\int|f|dx=\int1\cdot|f|dx\leq\sqrt{\int1^2dx}\sqrt{\int|f|^2dx}=1\cdot\|f\|_{L^2}=\|f\|_{L^2}$$
If we look at the continuous non-compact group $\mathbb{R}$ there is no inclusion.
A: 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.
A: 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.
A: Coming across these answers, it might be valuable to add the following explicit calculation:
Let $f \in L^1(\mathbb{R}^d) \cap L^{\infty}(\mathbb{R}^d)$. Then $f \in L^2(\mathbb{R}^d)$.
Indeed, denoting by $dx$ the Lebesgue measure on $\mathbb{R}^d$, we have
$$\int_{\mathbb{R}^d}|f|^2 = \int_{|f| \geq 1} |f|^2 + \int_{|f| < 1} |f|^2 \leq \int_{|f| \geq 1} C^2 + \int_{|f| < 1}|f| \leq C^2 \cdot dx(|f| \geq 1) + ||f||_{L^1} < +\infty.$$ The first inequality uses the essential boundedness of $f$ and the last inequality uses $f \in L^1(\mathbb{R}^d),$ which yields $dx(|f| \geq 1) < +\infty$.
On an unbounded domain $D$ (such as $D= \mathbb{R}^d$), the "converse", i.e. $L^{\infty}(D) \cap L^2(D) \subseteq L^1(D)$ does not hold: While we can estimate
$$\int_D|f| \leq \int_{D \cap |f| > 1} |f|^2+\int_{D \cap |f| \leq 1} |f| \leq ||f||_{L^2(D)}+dx(D\cap \{|f| \leq 1\}),$$we cannot conclude $f \in L^1(D)$, because the last summand is certainly not finite. As nicely explained in the above answers, this may be understood as insufficient fast decay to $0$ of $|f|$ on $D \cap \{|f| \leq 1\}$, while the decay of $|f|^2$ on the same set is fast enough.
A: I have a very simple example of a function $f$ that is in $L^{1}(\lambda)$ where $\lambda$ is the Lebesgue measure but $f \notin L^{2}(\lambda)$.
Consider $f : [0,k) \mapsto \mathbb{R^{+}}$ where:
$$f(x) = \frac{1}{2\sqrt{k^2 -k x}},$$
for fixed $k >0$.

*

*It is in $L^1(\lambda)$ where $\lambda$ is the Lebesgue measure because (noticing that $f$ is positive):
$$ \int_{0}^{k} f(x) dx = -\frac{1}{k}\sqrt{k^2 - kx} \bigg|_{0}^k = 1 < \infty$$

*It is not in $L^{2}(\lambda)$ because:
$$\int_{0}^{k} \frac{1}{4k^2 - 4kx} dx = -\frac{1}{4k} \log{(4k^2 -4kx)} \bigg|_{0}^{k} = \infty$$
A: The inclusion holds if space is finite measurable.
In general, if $E$ is finite measurable and $1\leq p_1 < p_2 \leq \infty$, then $L^{p_2}$ is a proper subspace of $L^{p_1}$.
For instance, if $E=(0,1]$, $f(x) = x^\alpha$ where $-\frac{1}{p_1}<\alpha<-\frac{1}{p_2}$.
