Nice Example for $\mathfrak{L}^1 \not \subset \mathfrak{L}^2$ I am searching for an example of an measurable space $(\Omega,\mathfrak{A},\mu)$ and a measurable function f: $\Omega \to \mathbb{R}$ such that $f \in \mathfrak{L}^1 (\Omega,\mathfrak{A},\mu)$ but $f^2 \notin \mathfrak{L}^1(\Omega,\mathfrak{A},\mu)$
I guess the standard example for this woulf be $f =\frac{1}{\sqrt{|x|}}$, but I thought you can construct something better, having the free choice of the measurable space.
 A: Consider $\mathbb{R}$ with Lebesgue measure $\lambda$, let $\rho(x) := (x^2+1)^{-1}$ on $\mathbb{R}$, and define a $\lambda$-absolutely continuous positive measure $\mu$ on $\mathbb{R}$ by $d\mu := \rho d\lambda$. Then, as you can easily check, the function $f(x) := \sqrt{\lvert x \rvert}$ on $\mathbb{R}$ satisfies $f \in L^1(\mathbb{R},\mu) \setminus L^2(\mathbb{R},\mu)$. More generally, do you see how to construct similar examples out of $\mathbb{R}^n$ with the $n$-dimensional Lebesgue measure?
A: (I). Measure spaces are a very broad class. For example the counting measure on the subsets of $\mathbb N$ (or on the subsets of any set) where $\mu (S)$ is the number of members of $S$ if $S$ is finite, and $\mu (S)=\infty$ if $S$ is an infinite set. In this case,  $f\in L^1\implies \infty > \sum_{n\in \mathbb N}f(n) \implies \infty > \sum_{n\in \mathbb N}f(n)^2  \implies f^2\in L^1.$
An atom of a measure $\mu$ is  a set $A\in dom (\mu)$ such that $\mu (A)\ne 0$ and such that for any $B\in dom (\mu)$ with $B\subset A$ we have $\mu (B)=0$ or $\mu (B)=\mu (A).$ 
For example, with the counting measure on $\mathbb N,$ the set $\{n\}$ is an atom for each $n\in \mathbb N.$
(II). Let $(M,S,\mu)$ be a measure space where $S$ is a $\sigma$-algebra on M, and $\mu:S\to [0,\infty]$ is a countably additive measure with $\mu(M)\ne 0.$
We can prove that if $A\in S$ with $\mu(A)\ne 0,$ and if no subset of $A$ is  an atom of $\mu,$ then for each $r\in (0,\mu(A))$ there exists $B$ with $A\supset B\in S$ with $r>\mu(B)>0.$  And from this we can prove that for any sequence $(r_n)_{n\in \mathbb N}$ of positive reals there exists a sequence $(B_n)_{n\in \mathbb N}$ of subsets of $A$ that are in $dom (\mu),$ such that  $x_n>\mu(B_n)>0$ for every $n$, and such that $B_m\cap B_n=\phi$ when $m\ne n.$
Consider the case  $r_n=1/n^3.$  For $x\in M$ let $f(x)=1/n^2m(B_n)$ for $x\in B_n,$ and $f(x)=0$ if $x$ is not in any $B_n.$ Then $\int_M|f|d\mu=\sum_{m\in \mathbb N}1/n^2<\infty$ but $\int_{B_n}|f|^2d\mu=\sum_{n\in \mathbb N}1/(n^4m(B_n)\geq  \sum_{n\in \mathbb N}1/n=\infty.$
So $f\in L^1$ and $f^2\not \in L^1.$
