$L^p$-norm of a non-negative measurable function
Solution 1:
It is the so-called layer-cake representation. It can be found on some books, like Analysis by Lieb and Loss. Here is a short proof based on Fubini's theorem, page 5.
Solution 2:
$$f(x)^p=\int_0^{f(x)}pt^{p-1}\,\mathrm dt=\int_0^{+\infty}pt^{p-1}\,\mathbf 1_{f(x)\gt t}\,\mathrm dt$$
Solution 3:
If you know the definition of Lebesgue integral by the so called "archimedean integral" the exercise is just a simple change of variable. Let $X$ be a non empty set, $\mathcal A$ a $\sigma$-algebra over $X$ and $\mu$ a (positive) measure on $\mathcal A$.
If $f \colon X \to \mathbb R$ is a $\mathcal A$-measurable, positive function then $$ \int_X f d\mu := \int_0^{\infty} \mu( \{f>t\} ) dt $$ is a possible definition of the Lebesgue integral (note that the LHS is a Lebesgue integral while the RHS is a Riemann integral: infact, the function $t \mapsto \mu( \{f>t\} )$ is Riemann-integrable, since it is monotone).
Anyway, now consider $$ I=\int_0^{\infty}pt^{p-1} \mu( \{f>t\} )dt $$ By a simple change of variable ($w=t^p$) we get $dw = pt^{p-1}dt$ hence $$ I = \int_0^{\infty} \mu( \{f>\sqrt[p]{w}\} ) dw = \int_0^{\infty} \mu( \{f^p>w\} ) dw =\int_Xf^p d\mu = \Vert f \Vert_p^p. $$