Change of variables between different dimensions I was reading my statistical mechanics notes, and upon reading
$$
\int\cdots\int_{\mathbb{R}^3} H(q,p)\space\mathrm{e}^{-\beta H(q,p)}\space\mathrm{d}^{3n}p\space\mathrm{d}^{3n}q = \int_0^{\infty} E \space \mathrm{e}^{-\beta E} \space \Omega(E) \space\mathrm{d}E
$$
with $(q,p) = (q^1,\dots,q^{3n},p_1,\dots,p_{3n})$, of course, and
$$
\Omega(E) = \frac{\mathrm{d}}{\mathrm{d} E}\int\cdots\int_{H(q,p)\leq E} \mathrm{d}^{3n}p\space\mathrm{d}^{3n}q
$$
and I realised I don't know how to make this formal.
This looks like a change of variables, but the first integral is ${6n}$-dimensional and the second one is just $1$-dimensional. So, I tried with the simpler example of a function $f(u)$ and another function $g(x,y)$, and tried to find which $\Omega(z)$ do I need for
$$
\iint_{(x_0,y_0)}^{(x_1,y_1)} f(g(x,y))\space\mathrm{d}x\mathrm{d}y = \int_{g(x_0,y_0)}^{g(x_1,y_1)} f(u)\space\Omega(u)\space\mathrm{d}u.
$$
Now, as
$$
\mathrm{d}u = \frac{\partial g}{\partial x}\mathrm{d}x+\frac{\partial g}{\partial y}\mathrm{d}y,
$$
I thought maybe I could do
$$
\mathrm{d}x = \left(\frac{\partial g}{\partial x}\right)^{-1}\mathrm{d}u - \left(\frac{\partial g}{\partial x}\right)^{-1}\frac{\partial g}{\partial y}\mathrm{d}y
$$
and, assuming $\mathrm{d}x\mathrm{d}y$ is actually $\mathrm{d}x\wedge\mathrm{d}y$, I could substitute this $\mathrm{dx}$ and find
$$
\mathrm{d}x\mathrm{d}y = \left(\frac{\partial g}{\partial x}\right)^{-1}\mathrm{d}u\mathrm{d}y.
$$
After substituting this new measure inside the integral of $f(g(x,y))$ and manipulating a little, it is found that
$$
\Omega(u) \equiv \int_{y_1}^{y_2}\left(\frac{\partial g}{\partial x}\right)^{-1}\mathrm{d}y \equiv \int_{x_1}^{x_2}\left(\frac{\partial g}{\partial y}\right)^{-1}\mathrm{d}x,
$$
but I don't see how these two integrals are equal to
$$
\frac{\mathrm{d}}{\mathrm{d} u}\iint_{g(x,y)\leq u}\mathrm{d}x\mathrm{d}y,
$$
I'm a physicist and this requires too much rigour. How should I prove this?
 A: This is essentially one of the forms of the "layered cake representation". Essentially, this allows you to express integrals of functions over some space $X$ (in your case it is $\Bbb{R}^{6n}$) as integrals over $(0,\infty)$. I would definitely suggest you google this to see the pictorial idea.
Let us introduce the following notation: $X=\Bbb{R}^{6n}$, $x=(q,p)\in X$ and $f(x)=H(q,p)$
and $g(E)=Ee^{-\beta E}$; also $d\mu = d^{3n}p\,d^{3n}q$; so we're thinking of $\mu$ as the Lebesgue measure on $X=\Bbb{R}^{6n}$. The rough idea is to use Fubini's theorem; and for now I shall work very roughly to convince you the formula is right. If you want, afterwards, I can include the more technical measure-theoretic assumptions and details. So, here's how the proof goes:
\begin{align}
\text{your LHS}&= \int_Xg(f(x))\, d\mu(x)\\
&=\int_X -\int_{f(x)}^{\infty}g'(E)\,dE\, d\mu(x) \tag{$\lim\limits_{E\to \infty}g(E)= 0$}\\
&=-\int_X \int_0^{\infty}g'(E)\cdot \mathbf{1}_{[f(x),\infty)}(E)\,dE \,d\mu(x)\\
&=-\int_0^{\infty}\int_X g'(E)\cdot\mathbf{1}_{[f(x),\infty)}(E)\,d\mu(x)\,dE\tag{Fubini's theorem}\\
&=-\int_0^{\infty}g'(E)\cdot \mu\left(\{x\in E\,:\, f(x)\leq E\}\right)\, dE\\
&= \int_0^{\infty}g(E)\cdot \dfrac{d}{dE}\mu\left(\{x\in E\,:\, f(x)\leq E\}\right)\, dE\\
&\equiv \int_0^{\infty}g(E)\Omega(E)\,dE,
\end{align}
where in the second last line, I used integration by parts and assumed everything was nice enough that the boundary terms will just vanish.
Some comments: usually in the Layered cake formula (eg in the wikipedia link above), one has things like $\mu(\{x\in X\,:\, f(x)>E\})$, i.e there is a $>$ sign, but in my argument I have a $\leq $ sign. The reason for this is that I defined $f(x)=H(q,p)$, and usually the Hamiltonian is a non-negative quadratic function of the position and momenta, such as $H(q,p)=\frac{1}{2}(q^2+p^2)$ (modulo some constants). As a result, if we use $>$ in our argument, then we will get that $\mu\{x\in X\,:\, f(x)>E\}=\infty$ for all $E\geq 0$. This is very bad of course (usually, one works with $L^1$ functions in which case by Chebyshev's inequality, the measure of the set with $>$ will be finite for every $E$, but in your case, quadratic functions are never in $L^1$, hence I had to modify the argument slightly).
Next, one has to appeal to Fubini's theorem in the above proof (which requires a $\sigma$-finiteness assumption, but this isn't an issue in your case since we're working with Lebesgue measure throughout). There is an alternative proof which avoids Fubini's theorem (and is slightly more general), but it involves some more measure theory (translation: the proof is more opaque, but it's less hand-wavy), so I'm not sure if I should present it now, but if you want to see it, then I'll write it up when I have more time.
