Let $(E,\tau,\mu)$ be a measure space and $f:E\to \mathbb{R}$ is an absolutely integrable function, that is $$\int_{E} |f| \ \mathrm{d}\mu <\infty.$$ Set $A_n=\left\{x\in E \mid |f(x)|<n\right\}$ for $n\in \mathbb{N}$, show that $$\sum_{n\geq 1} \frac{1}{n^2} \int_{A_n} |f|^2 \ \mathrm{d}\mu <\infty.$$
What have I tried, if we write $B_n=\left\{x\in E \mid n-1<|f(x)|<n\right\}$, then the sum would be something like this $$\sum_{n\geq 1} \left(\sum_{k\geq n} \frac{1}{k^2} \right) \int_{B_n} |f|^{2} \ \mathrm{d}\mu$$ We know that the inner sum is $\sim n^{-1}$, we just need to prove that the integral $\int_{B_n} |f|^{2} \ \mathrm{d}\mu$ converge fast enough to zero, but I have no idea on how to use the integrability of $|f|$ for the evaluation of the integral of $|f|^2$.
On $B_n$, estimate $|f|^2$ by $n|f|$, the $n$ is cancelled out by the inner sum, you remain with $\sum_n\int_{B_n}|f|=\int_{E}|f|<\infty$.