# How can we use Fubini's theorem to simplify $\int_0^r\frac 1{\sigma^{n-1}}\int_0^\sigma\rho^{n-1}f(\rho)\;d\rho\;d\sigma$?

Let $f:[0,\infty)\to\mathbb{R}$ and $R>0$. How does Fubini's theorem imply $$\int_0^r\frac 1{\sigma^{n-1}}\int_0^\sigma\rho^{n-1}f(\rho)\;d\rho\;d\sigma\color{red}{=\int_0^r\frac{r^{2-n}-\rho^{2-n}}{2-n}\rho^{n-1}f(\rho)\;d\rho}\;\;\;\text{for }r\in (0,R)$$ (I don't understand why the left part is equal to the $\color{red}{\text{red}}$ part)?

I know Fubini's theorem in the following version: Let

• $(\Omega_i,\mathcal{A}_i,\mu_i)$ be a $\sigma$-finite measure space
• $g:\Omega_1\times\Omega_2\to\overline{\mathbb{R}}$ be measurable with respect to $\mathcal{A}_1\otimes\mathcal{A}_2$ and nonnegative or $(\mu_1\otimes\mu_2)$-integrable

Then, $$G_1:\Omega_1\to\mathbb{R}\;,\;\;\;\omega_1\mapsto\int g(\omega_1,\cdot)\;d\mu_2$$ and $$G_2:\Omega_2\to\mathbb{R}\;,\;\;\;\omega_2\mapsto\int g(\cdot,\omega_2)\;d\mu_1$$ are $\mathcal{A}_2$- and $\mathcal{A}_1$-measurable, respectively, and it holds $$\int g\;d(\mu_1\otimes\mu_2)=\int G_1\;d\mu_1=\int G_2\;d\mu_2$$

What is $g$ in the given scenario?

Here is a hint : consider the measure spaces $\Omega_1=\,]0,r[\,=\Omega_2$ (with Lebesgue measure) and the function $$g(\rho,\sigma)=\frac1{\sigma^{n-1}}\mathbf 1_{]0, \rho[}(\sigma) \rho^{n-1}f(\rho)=\frac1{\sigma^{n-1}}\mathbf 1_{]\sigma, r[}(\rho) \rho^{n-1}f(\rho)\, .$$
You just permute the two integrals (looking at the endpoints gives you $0 \leq \rho \leq \sigma \leq r$), obtaining $\int \limits _o ^r \rho ^{n-1} f(\rho) \int \limits _\rho ^r \frac 1 {\sigma ^{n-1}} \mathbb{d}\sigma \mathbb{d}\rho$, and the inner integral is easy to compute.
(More detailed: you pass from $\int (\int \mathbb{d}\rho) \mathbb{d}\sigma$ to $\int \mathbb{d}(\rho, \sigma)$ (that's the integral on the product space) and then to $\int (\int \mathbb{d}\sigma) \mathbb{d}\rho$. So, you apply Fubini twice, the first time "backwards".)