How can I solve this problem $\def\R{\mathbb R}$
Suppose that $f$ is integrable on $\R^n$. For each $t>0,$ let $E_t = \{x:|f(x)|>t\}$.
Prove $\int_{\R^n}|f(x)|dx = \int_0^\infty \lambda(E_t)dt.$ More generaly, prove if $f \in L^p,$ then $\int_{\R^n}|f(x)|^p\,dx = \int_0^\infty pt^{p-1}\lambda(E_t)\,dt.$
I solve this problem in this way :
\begin{align*} \int_{\R^n}|f(x)|dx &= \int_{\R^n}\int_0^{|f(x)|} 1\,dydx\\ &=\int_0^\infty\int_{|f|^{-1}(y)}^\infty 1\,dxdy\qquad\text{(Fubini Theorem)}\\ &=\int_0^\infty\lambda\{x:x>|f|^{-1}(y)\}dy\\ &=\int_0^\infty\lambda(E_y)dy. \end{align*}
However, it was considered only when $n=1$. I want to know more precise answer in $R^n$ for the first question.