TAOCP 3.3.1 Exercise 15
Let J_n=\det\!
Section 3.3.1: General Test Procedures for Studying Random Data
Exercise 15. [**] [HM24] Polar coordinates in two dimensions are conventionally defined by the equations $x = r\cos\theta$ and $y = r\sin\theta$. For the purposes of integration, we have $dx,dy = r,dr,d\theta$. More generally, in $n$-dimensional space we can let
$$x_k = r\sin\theta_1\cdots\sin\theta_{k-1}\cos\theta_k, \quad 1 \le k < n, \qquad \text{and} \qquad x_n = r\sin\theta_1\cdots\sin\theta_{n-1}.$$
Show that in such a case
$$dx_1,dx_2\cdots dx_n = |r^{n-1}\sin^{n-2}\theta_1\cdots\sin\theta_{n-2}|,dr,d\theta_1\cdots d\theta_{n-1}.$$
Verified: yes
Solve time: 7m32s
Let
$$ J_n=\det!\left(\frac{\partial(x_1,\ldots,x_n)} {\partial(r,\theta_1,\ldots,\theta_{n-1})}\right), $$
where
$$ x_k=r\sin\theta_1\cdots\sin\theta_{k-1}\cos\theta_k \qquad (1\le k<n), $$
and
$$ x_n=r\sin\theta_1\cdots\sin\theta_{n-1}. $$
We shall compute $J_n$ by induction on $n$.
For $n=2$,
$$ x_1=r\cos\theta_1,\qquad x_2=r\sin\theta_1, $$
hence
$$ J_2= \det \begin{pmatrix} \cos\theta_1 & -r\sin\theta_1\[1mm] \sin\theta_1 & r\cos\theta_1 \end{pmatrix} =r. $$
Thus the desired formula is true for $n=2$.
Now assume $n\ge3$. Put
$$ s=\sin\theta_1\cdots\sin\theta_{n-2}. $$
Then
$$ x_{n-1}=rs\cos\theta_{n-1}, \qquad x_n=rs\sin\theta_{n-1}. $$
Let $A_n$ be the Jacobian matrix. Since $\theta_{n-1}$ appears only in
$x_{n-1}$ and $x_n$, the last column of $A_n$ has only two nonzero entries:
$$ \frac{\partial x_{n-1}}{\partial\theta_{n-1}} =-rs\sin\theta_{n-1}, \qquad \frac{\partial x_n}{\partial\theta_{n-1}} =rs\cos\theta_{n-1}. $$
Expand $J_n$ along the last column:
$$ J_n =(-rs\sin\theta_{n-1}),C_{n-1,n} +(rs\cos\theta_{n-1}),C_{n,n}, $$
where $C_{ij}$ denotes the corresponding cofactor.
Let $M_{n-1}$ and $M_n$ be the minors associated with
$C_{n-1,n}$ and $C_{n,n}$, respectively.
Since
$$ C_{n-1,n}=(-1)^{2n-1}M_{n-1}=-M_{n-1}, \qquad C_{n,n}=(-1)^{2n}M_n=M_n, $$
we obtain
$$ J_n =rs\bigl(\sin\theta_{n-1}M_{n-1} +\cos\theta_{n-1}M_n\bigr). \tag{1} $$
We now compute the combination in parentheses.
Delete the last column from $A_n$. In the resulting matrix, the last two rows are
$$ R_{n-1} =\cos\theta_{n-1},v, \qquad R_n =\sin\theta_{n-1},v, $$
where
$$ v= \left( s,, r\frac{\partial s}{\partial\theta_1}, \ldots, r\frac{\partial s}{\partial\theta_{n-2}} \right). $$
Indeed,
$$ x_{n-1}=(rs)\cos\theta_{n-1}, \qquad x_n=(rs)\sin\theta_{n-1}, $$
and differentiation with respect to
$r,\theta_1,\ldots,\theta_{n-2}$ merely multiplies the derivatives of
$rs$ by $\cos\theta_{n-1}$ or $\sin\theta_{n-1}$.
Let $B$ be the $(n-1)\times(n-1)$ matrix obtained from the first
$n-2$ rows of $A_n$ and the row $v$.
Then $M_{n-1}$ is obtained by replacing the last row of $B$ by
$\sin\theta_{n-1}v$, while $M_n$ is obtained by replacing it by
$\cos\theta_{n-1}v$. By multilinearity of the determinant in the last row,
$$ M_{n-1} =\sin\theta_{n-1}\det B, \qquad M_n =\cos\theta_{n-1}\det B. $$
Hence
$$ \sin\theta_{n-1}M_{n-1} +\cos\theta_{n-1}M_n = (\sin^2\theta_{n-1}+\cos^2\theta_{n-1})\det B = \det B. $$
Substituting into (1),
$$ J_n=rs,\det B. \tag{2} $$
It remains to identify $\det B$.
The rows of $B$ are precisely the derivatives of
$$ \begin{aligned} z_1 &= r\cos\theta_1,\ z_2 &= r\sin\theta_1\cos\theta_2,\ &\ \vdots\ z_{n-2} &= r\sin\theta_1\cdots\sin\theta_{n-3}\cos\theta_{n-2},\ z_{n-1} &= r\sin\theta_1\cdots\sin\theta_{n-2}, \end{aligned} $$
with respect to the variables
$$ r,\theta_1,\ldots,\theta_{n-2}. $$
Therefore
$$ \det B=J_{n-1}^{*}, $$
where $J_{n-1}^{*}$ is the Jacobian determinant for the $(n-1)$-dimensional spherical-coordinate transformation. Thus (2) becomes
$$ J_n = r\sin\theta_1\cdots\sin\theta_{n-2}, J_{n-1}^{*}. \tag{3} $$
By the induction hypothesis,
$$ J_{n-1}^{*} = r^{,n-2} \sin^{,n-3}\theta_1 \sin^{,n-4}\theta_2 \cdots \sin\theta_{n-3}. $$
Substituting into (3),
$$ \begin{aligned} J_n &= r^{,n-1} \bigl(\sin\theta_1\cdots\sin\theta_{n-2}\bigr) \bigl( \sin^{,n-3}\theta_1 \sin^{,n-4}\theta_2 \cdots \sin\theta_{n-3} \bigr)\ &= r^{,n-1} \sin^{,n-2}\theta_1 \sin^{,n-3}\theta_2 \cdots \sin\theta_{n-2}. \end{aligned} $$
This proves, for all $n\ge2$,
$$ J_n = r^{,n-1} \sin^{,n-2}\theta_1 \sin^{,n-3}\theta_2 \cdots \sin\theta_{n-2}. $$
Therefore
$$ dx_1,dx_2\cdots dx_n = |J_n|, dr,d\theta_1\cdots d\theta_{n-1}, $$
that is,
$$ dx_1,dx_2\cdots dx_n = \left| r^{,n-1} \sin^{,n-2}\theta_1 \sin^{,n-3}\theta_2 \cdots \sin\theta_{n-2} \right| ,dr,d\theta_1\cdots d\theta_{n-1}. $$
This is the required formula. $\square$