Below is an exercise that consists of an inital problem and its generalization. I have only included my attempt at the solution of the initial problem. If the feedback I recieve here suggests I have gained mastery of the main idea behind the problem, I am comfortable with the accuracy of my solution at its generalization. Thank you in advance for any feedback on the correctness of my solution. Enjoy!
$\textbf{Problem:}$ Let $(X,\textbf{X}, \mu)$ be a finite measure space. Let $f$ be $\textbf{X}$-measurable; let $E_n=\{x \in X: (n-1)\leq |f(x)|<n\}$. Show that $ f \in L_1$ if and only if $$\sum^{\infty}_{n=1} n\mu(E_n) < +\infty.$$ More generally, $ f \in L_p$, for $1\leq p<\infty$ if and only if $$\sum^{\infty}_{n=1} n^p\mu(E_n) < +\infty.$$
$\textbf{ Attempt at Solution:}$ Assume $ f \in L_1$; we show $\sum^{\infty}_{n=1} n\mu(E_n) < +\infty.$ We note first that since $ f \in L_1$, $|f| \in L_1$. Furthermore, the simple function $\psi: X\rightarrow \textbf{R}$ defined by $\psi(x)=1$ belongs to $L_1$ since $\int \psi d\mu= 1\mu(X)<+\infty$. (This, of course, follows from our assumption that the measure space $(X,\textbf{X}, \mu)$ is finite.) The space $L_1$ is a linear space so that $|f|+1 \in L_1$. Observe that $$E_n=\{x \in X: (n-1)\leq |f(x)|<n\} =\{x \in X: n\leq |f(x)|+1 <n+1\}.$$ Now, let us construct a sequence $(\phi_k)$ of functions defined by the following equation $$\phi_{k}=\sum^{k}_{n=1} n\chi_{E_n}.$$ This sequence of functions is monotone increasing; set $g= \lim_k \phi_k$. Hence, the Monotone Convergence Theorem gives us that $$\int g d\mu = \lim_k \int \phi_k d\mu = \lim_k \sum^{k}_{n=1} n\mu(E_n)= \sum^{\infty}_{n=1} n\mu(E_n).$$ Given any $x \in X$, $x$ belongs to some set $E_n$ so that $g(x)=n\leq |f(x)|+1$. Indeed $g \leq |f(x)|+1$, from which it follows that $$ \sum^{\infty}_{n=1} n\mu(E_n) = \int g d\mu \leq \int |f(x)|+1 d\mu = \int ||f(x)|+1| d\mu < +\infty.$$
Conversely, assume $\sum^{\infty}_{n=1} n\mu(E_n) < +\infty.$ Define the sequence $(\phi_k)$ as before. Again, let $g= \lim_k \phi_k$. For each $x \in X$, $x$ belongs to some set $E_n$ so that $|f(x)| < n= g(x).$ Thus, $$ \int |f| d\mu < \int g d\mu = \sum^{\infty}_{n=1} n\mu(E_n) < +\infty.$$ Indeed, $f$ belongs to $L_1$. $\blacksquare$
Prove and integrate the pointwise inequality $$\sum_{n\geqslant1}n\chi_{E_n}\leqslant1+|f|\leqslant1+\sum_{n\geqslant1}n\chi_{E_n}. $$ Likewise, for every $p\geqslant1$, one can use $$\sum_{n\geqslant1}n^p\chi_{E_n}\leqslant(1+|f|)^p,\qquad |f|^p\leqslant\sum_{n\geqslant1}n^p\chi_{E_n}. $$