Let $\mu$ be a (positive) measure on $\mathbb{R}^d$ and $f$ be a $\mu$-measurable function on $\mathbb{R}^d$. How to prove that \begin{equation} \int_{\mathbb{R}^d} |f(x)|^p d\mu(x)=p\int_{0}^{\infty} \gamma^{p-1} \mu(\{x\in \mathbb{R}^d:|f(x)|>\gamma\}) d\gamma \end{equation} for every $1\leq p<\infty$ and every $\gamma>0$.
I found in Folland book that we have to prove the following equation:
\begin{align} \int_{\mathbb{R}^d} \phi(|f(x)|) d\mu(x)= -\int_{0}^{\infty} \phi(\gamma) d(\mu(\{x\in \mathbb{R}^d: |f(x)|>\gamma\})) \end{align} for non-negative function $\phi$ and using integration by part to get the result. Could we get some direct proof?