Prove that $f^2$ is Lebesgue integrable if and only if $\sum_{k=1}^\infty k \cdot m\{x\in A: |f(x)|>k\}<\infty.$ 
Question: Let $f$ be a Lebesgue measurable function on $A$ with $m(A)<\infty.$
  Prove that $f^2$ is Lebesgue integrable if and only if 
  $$\sum_{k=0}^\infty k\cdot m\{x\in A: |f(x)|>k\}<\infty.$$

My attempt: 
For each $k\geq 0,$ denote
$$A_k=\{x\in A: f^2(x)>k^2 \} = \{x\in A: |f(x)|>k\}.$$
Observe that the union 
$$A = \bigcup_{k=0}^\infty (A_k\setminus A_{k+1})$$
is disjoint. 
It follows that 
$$\int_A f^2 = \int_{\bigcup_{k=0}^\infty (A_k\setminus A_{k+1})}f^2 = \sum_{k=0}^\infty \int_{A_k \setminus A_{k+1}} f^2.$$
I am not sure whether the following inequality
$$ k \cdot m\{x\in A: |f(x)|>k\} \leq \int_{A_k\setminus A_{k+1}}f^2 \leq (k+1) \cdot m\{x\in A: |f(x)|>k\}.$$
holds.
If it does, then I am done. 

You only have
$$k^2 \lambda(A_k \setminus A_{k+1}) \leq \int_{A_k \setminus A_{k+1}} f^2 \mathrm{d} \mu \leq \lambda \leq (k+1)^2 \lambda(A_k \setminus A_{k+1}).$$
However, noting that
\begin{align}
\sum_{k=1}^\infty k \lambda(x \in A \colon |f(x)| >k) &= \sum_{k=1}^\infty k \sum_{i=k}^\infty \lambda(A_i \setminus A_{i +1}) \\
&= \sum_{i=1}^\infty \lambda(A_i \setminus A_{i+1}) \sum_{k=1}^i k \\
&= \frac{1}{2} \sum_{i=1}^\infty i (i+1) \lambda(A_i \setminus A_{i+1}),
\end{align}
we are done.
