# What's the intuition behind change of variables?

I'm reading a derivation that confidently and without further comment asserts $$\int_{x_1=-\infty}^\infty \cdots \int_{x_n=-\infty}^\infty e^{-\sum_i x_i^2}\,dx_n\cdots dx_1 = \int_{r=0}^\infty e^{-r^2}\,\frac{d\text{Volume}(S_r^n)}{dr}\,dr\,.$$ (Where $S_r^n$ is the $n$-dimensional hypersphere with radius $r$.)

Why is this obvious? The only way I know how to do a change of variables is by finding an explicit transformation whose Jacobian I can then derive and stick into the integral together with the new variables. And I'm not even sure how exactly polar coordinates should generalize to $n$ dimensions. Clearly, the author of this derivation was able to sidestep all that with some geometric intuition that I'm not sharing.

• The intuition is that the function is spherically symmetric, i.e., depends only on the distance $r=\sqrt{\sum x_i^2}$ from the origin. – Hagen von Eitzen May 12 '18 at 20:08
• I see that that's true, but that's not giving me an epiphany. – Sebastian Oberhoff May 12 '18 at 20:11
• What are you struggling with in terms of understanding? – rubikscube09 May 12 '18 at 20:13
• In 2d there would be a $r\,d\theta$ in place of the $d\text{Volume}/dr$. What would the $n$-dimensional analogue of $r\,d\theta$ be and why is that equal to $d\text{Volume}/dr$? – Sebastian Oberhoff May 12 '18 at 20:23
• On the left, you are integrating over all of $\mathbb R^n$. Imagine that space is carved up into a bunch of thin concentric shells centered at the origin. Compute the contribution of each shell, and add up all these individual contributions to obtain the integral on the right. – littleO May 12 '18 at 21:15

Consider the two-dimensional case, using polar coordinates: $$I = \int_{x=-\infty}^{x=\infty} \int_{y=-\infty}^{y=\infty} e^{-(x^2+y^2)}\,dy\,dx = \int_{r=0}^{r=\infty} \int_{\theta=0}^{\theta=2\pi} e^{-r^2}r\,d\theta\,dr.$$ We can take a constant factor out of the inner integral: $$I = \int_{r=0}^{r=\infty} \left(e^{-r^2}\int_{\theta=0}^{\theta=2\pi} r\,d\theta\right)\,dr.$$ Now, $r\,d\theta$ is just an element of arc length, that is, $\int_{\theta=0}^{\theta=2\pi} r\,d\theta$ measures the circumference of a circle of radius $r,$ which is the boundary of a disk of radius $r,$ which has the same measure as the rate of change of the area of the disk with respect to $r.$ Putting this in the notation used in the question, $$\int_{\theta=0}^{\theta=2\pi} r\,d\theta = \frac{d\text{Volume}(S_r^2)}{dr} = 2\pi r.$$ In the three-dimensional case, the inner integral would be $$\int_{\phi=0}^{\phi=\pi} \int_{\theta=0}^{\theta=2\pi} r^2 \sin\phi\,d\theta\,d\phi = \frac{d\text{Volume}(S_r^3)}{dr} = 4\pi r^2.$$ We can explicitly do higher-dimensional integrals the same way, but the effort we have to make in order to correctly represent the volume element of the inner integral in $n$ dimensions merely obscures the fact that in every case the inner integral is just integrating $1$ over the boundary of an $n$-dimensional ball, and the integral is just the measure of the boundary, which is $\frac{\text{Volume}(S_r^n)}{dr}.$
A possible source of confusion is that this author uses the notation $\text{Volume}(S_r^n)$ where the volume measure of an $n$-dimensional ball is required, but calls $S_r^n$ an "$n$-dimensional hypersphere," which seems inconsistent with the way other authors use that term. We have to resolve that ambiguity in the intended way to see what the factor $\frac{\text{Volume}(S_r^n)}{dr}$ means in this context.
Change of variables works in a quite general way. If we write $B_r = \left\{ x \in \mathbb{R}^n : |x| \leq r \right\}$, then
and this becomes exact as $N\to\infty$. You may think of this as a generalization of the shell method.