Motivation and references for an integral formula in measure theory In Measure Theory class, my professor presented an integral formula to us that seems overly useful. Weirdly, though, I could not find any sources with the formula. So I have several requests/questions:


*

*What is the motivation of the formula? Where does it come up naturally and how would you discover it?

*More examples or better: references for this formula would be much appreciated.


Theorem. Let $(X, \mathfrak{A}, \mu)$ and $([0,\infty], \mathfrak{B}([0,\infty]), \nu)$ be $\sigma$-finite measure spaces with $$ \varphi(t) = \nu([0,t)) \quad \text{for } t \geq 0. $$ Then, for measurable $f:X \to [0,\infty]$ we have 
$$ \int_X \varphi \circ f \ d \mu = \int_{[0,\infty)} \mu(f>t) \ d\nu(t). $$
Proof. Follows quickly with Tonelli's theorem.
I mentioned that it seems overly useful. Here are examples that our professor presented (in short):


*

*Letting $d\nu(t) = pt^{p-1} d\lambda(t)$ we get $$ \int_X f^p \ d \mu = p \int_0^\infty t^{p-1} \mu(f>t) \ dt$$ which in particular gives an alternate definition for $\int_X f \ d \mu$ for $p = 1$.

*Letting $X = [0,\infty), f = \operatorname{id}, d\mu(x) = e^{-x} \ d\lambda(x)$ we get with the above examples $$ \Gamma(p+1) = p \Gamma(p).$$ While it does seem like an overkill here, the formula above could somehow be connected to integration by parts (as the most elementary proof of the functional equation of $\Gamma$ would be by integration by parts)?

*Letting $\psi : \mathbb{R}^n \to [0,\infty), \ x \mapsto \|x\|_2^2$ and $\nu = \psi \circ \lambda^n$ as well as $d\mu(t) = e^{-t} \ d\lambda(t), f = \operatorname{id}$ we get with some work the volume $\omega_n$ of a $n$-dimensional sphere $$ \omega_n = \frac{\pi^{\frac{n}{2}}}{\Gamma \left(\frac{n}{2} + 1 \right)}.$$ The main work of the formula was to prove $$ \omega_n \Gamma \left(\frac{n}{2} + 1 \right) = \int_{\mathbb{R}^n} e^{-\|x\|_2^2} d\lambda(x).$$

*An example of mine: I believe that the right substitutions yield the interpretation that the Lebesgue integral describes the area/measure under a graph. So the formula would at least be a generalization of that.


These example should convince anyone of the usefulness of the formula.
 A: This theorem can be found for instance in Measure and Integration Theory by H. Bauer. We find in chapter III Product Measures, section 23. Product measures and Fubini's Theorem:

A useful and at the same time surprising consequence of Tonelli's theorem is that it permits $\mu$-integrals to be expressed by means of $\lambda^1$-integrals.


23.8 Theorem. Let $(\Omega, \mathcal{A},\mu)$ be a $\sigma$-finite measure space and $f:\Omega \to \mathbb{R}_{+}$ a measurable, non-negative, real function. Further, let $\varphi:\mathbb{R}_{+}\to\mathbb{R}_{+}$ be a continuous isotone function which is continuously differentiable at least on $\mathbb{R_{+}^{\star}}:=]0,+\infty[$ and satisfies $\varphi(0)=0$. Then


\begin{align*}
\int\varphi\circ f\,d\mu=\int_{\mathbb{R}_{+}^{\star}}\varphi^{\prime}(t)\mu(\{f\geq t\})\lambda^1(dt)\tag{$23.7$}
=\int_0^{+\infty}\varphi^{\prime}(t)\mu(\{f\geq t\})\,dt.
\end{align*}

The author continues after the proof of this theorem with an example which is OPs example 1 together with a special case and a hint.

Example. 2.  The relevant hypotheses are certainly fulfilled by the functions $\varphi(t):=t^p$ with $p>0$. Thus for every $\mathcal{A}$-measurable real function $f\geq 0$ on $\Omega$


\begin{align*}
\int f^p\,d\mu=p\cdot\int_{0}^{+\infty}t^{p-1}\mu(\{f\geq t\})\,dt.\tag{$23.9$}
\end{align*}


When $p=1$ we get the especially important formula


\begin{align*}
\int f\,d\mu=\int_{\mathbb{R}_{+}}\mu(\{f\geq t\})\lambda^1\,(dt)=\int_0^{+\infty}\mu(\{f\geq t\})\,dt.\tag{$23.10$}
\end{align*}


The reader should not overlook the geometric significance of this, which is that the integral $\int f\,d\mu$ is formed vertically, while the integral on the right-hand side of $(23.10)$ is formed horizontally.



A slightly more specific setting is stated in Measure Theory by D.L. Cohn. We find in chapter 5 Product Measures, section 3 Applications:

We begin by noting a couple of easy-to-derive consequences of the theory of product measures.


Let $(X,\mathcal{A},\mu)$ be a $\sigma$-finite measure space, let $\lambda$ be Lebesgue measure on $(\mathbb{R},\mathcal{B}(\mathbb{R}))$, and let $f:\to [0,+\infty]$ be $\mathcal{A}$-measurable. ...


Thus we have the often useful relation
\begin{align*}
\int_Xf(x)\mu\,(dx)=\int_0^{\infty}\mu(\{x\in X:f(x)>y\})\,dy.
\end{align*}

and we find in the exercises part of this section:

2. Let $\mu$ be a $\sigma$-finite measure on $(X,\mathcal{A})$, let $f:X\to[0,+\infty]$ be $\mathcal{A}$-measurable, and let $p$ satisfy $1\leq p<+\infty$. Show that


\begin{align*}
\int f^p\,d\mu=\int_0^\infty pt^{p-1}\mu(\{x:f(x)>t\})\,dt.
\end{align*}



We can find in A Concise Introduction to the Theory of Integration by D.W. Stroock in chapter V Changes of Variable, section 5.1 Lebesgue Integrals vs. Riemann Integrals:

5.1.4 Theorem. Let $(E,\mathcal{B},\mu)$ be a measure space and $f$ a non-negative, measurable function on $(E,\mathcal{B})$. Then $t\in(0,\infty)\mapsto\mu(f>t)\in[0,\infty]$ is a right-continuous, non-increasing function. In particular, it is measurable on $\left((0,\infty),\mathcal{B}_{(0,\infty)}\right)$ and has at most a countable number of discontinuities. Next, assume that $\varphi\in C\left([0,\infty]\right)\cap C^1\left((0,\infty)\right)$ is a non-decreasing function satisfying $\varphi(0)=0<\varphi(t),t>0$ and set $\varphi(\infty)=\lim_{t\to\infty}\varphi(t)$. Then


\begin{align*}
\int_{E}\varphi \circ f(x)\mu(dx)=\int_{(0,\infty)}\varphi^{\prime}(t)\mu(f>t)\lambda_{\mathbb{R}}(dt).\tag{$5.1.5$}
\end{align*}


Hence, either $\mu(f>\delta)=\infty$ for some $\delta>0$, in which case both sides of (5.1.5) are infinite, or for each $0<\delta<r<\infty$ the map $t\in[\delta,r]\mapsto\varphi^{\prime}(t)\mu(f>t)$ is Riemann integrable and


\begin{align*}
\int_E\varphi\circ f(x)\mu(dx)=\lim_{{\delta\searrow 0}\atop{r\nearrow\infty}}(R)\int_{[\delta,r]}\varphi^{\prime}(t)\mu(f>t)dt.
\end{align*}

We find in the exercises part of this section:

5.1.6 Exercise: Here are two familiar applications of the ideas discussed in this section.



*

*(i) Let $\psi$ be a continuous, non-decreasing function on the compact interval $[a,b]$. Show that



\begin{align*}
(R)\int_{[a,b]}f\circ \psi(s)\,d\psi(s)=(R)\int_{[\psi(a),\psi(b)]}f(t)\,dt,\qquad f\in C([a,b]).\tag{$5.1.7$}
\end{align*}



*

*(ii) Suppose that $\mu$ is a measure on $(\mathbb{R},\mathcal{B}_{\mathbb{R}})$ with the properties that $\mu(I)<\infty$ for each compact interval $I$ and $\mu(\{t\})=0$ for each $t\in\mathbb{R}$. Let $\Phi:\mathbb{R}\to\mathbb{R}$ be a function satisfying $\mu([a,b])=\Phi(b)-\Phi(a)$ for all $-\infty<a<b<\infty$. Note that $\Phi$ is necessarily continuous and non-decreasing, and show that $\Phi_{\star}\mu$ coincides with the restriction of $\lambda_{\mathbb{R}}$ to $\mathcal{B}_{\mathbb{R}}\left[\Phi(\mathbb{R})\right]$.



5.1.8 Exercise: A particularly important case of Theorem 5.1.4 is when $\varphi(t)=t^p$ for some $p\in(0,\infty)$, in which case (5.1.5) yields


\begin{align*}
\int_{E}|f(x)|^p\mu(dx)=p\int_{(0,\infty)}t^{p-1}\mu\left(|f|>t\right)\lambda_{\mathbb{R}}(dt).\tag{$5.1.9$}
\end{align*}


Use (5.1.9) to show $|f|^p$ is $\mu$-integrable if and only if


\begin{align*}
\sum_{n=1}^\infty\frac{1}{n^{p+1}}\mu\left(|f|>\frac{1}{n}\right)+\sum_{n=1}^\infty n^{p-1}\mu\left(|f|>n\right)<\infty.
\end{align*}

