Let $(X,\mu)$ be a measure space, and $\mu(X)< + \infty$. Let $f$ be a nonnegative measurable function on $X$ and $E_n = \{x \in X|f(x) \geq n \}$. Then $\int_X f^2d \mu < + \infty$ if and only if $\sum_{n=1}^{\infty} n \mu(E_n) <+\infty$.
Do I have to use simple functions that converge to $f$?
Thanks a lot.