Skip to main content

Section 6.4 Application: Spherical and Cylindrical Coordinates

Sometimes it is useful to work with other `coordinates’ than Cartesian coordinates. The most commonly used such coordinates are spherical and cylindrical coordinates. We want to see how to integrate functions given in these coordinates. As for the polar coordinates in Section 5.4 we need to compute the corresponding Jacobian determinant.

Subsection 6.4.1 Spherical Coordinates

A point in space can be determined by giving the distance, \(r\text{,}\) from the origin and two angles, \(\theta\) and \(\varphi\text{,}\) as shown in Figure 6.7. For every point off the \(z\)-axis the triple \((r,\theta,\varphi)\) is uniquely determined if we choose \(r>0\text{,}\) \(\theta\in[0,\pi]\) and \(\varphi\in[0,2\pi)\text{.}\) We call \(r,\theta,\varphi\) the spherical coordinates of the given point. Our notation follows the naming convention used in applied mathematics and mathematical physics.
Figure 6.7. Spherical coordinates of a point
Looking at Figure 6.7 we can express \(x,y,z\) by
\begin{align*} x \amp =r\cos\varphi\sin\theta\\ y \amp =r\sin\varphi\sin\theta\\ z \amp =r\cos\theta\text{.} \end{align*}
Hence the transformation
\begin{equation} \vect g(r,\theta,\varphi) :=\bigl(r\cos\varphi\sin\theta,r\sin\varphi\sin\theta,r\cos\theta\bigr)\tag{6.4} \end{equation}
maps \([0,\infty)\times[0,\pi]\times[0,2\pi)\) onto \(\mathbb R^3\text{.}\) We now compute the Jacobian matrix of that transformation:
\begin{align*} J_{\vect g}(r,\theta,\varphi)\amp = \begin{bmatrix} \dfrac{\partial}{\partial r}r\cos\varphi\sin\theta \amp \dfrac{\partial}{\partial\theta}r\cos\varphi\sin\theta \amp \dfrac{\partial}{\partial\varphi}r\cos\varphi\sin\theta \\ \dfrac{\partial}{\partial r}r\sin\varphi\sin\theta \amp \dfrac{\partial}{\partial\theta}r\sin\varphi\sin\theta \amp \dfrac{\partial}{\partial\varphi}r\sin\varphi\sin\theta \\ \dfrac{\partial}{\partial r}r\cos\theta \amp \dfrac{\partial}{\partial\theta}r\cos\theta \amp \dfrac{\partial}{\partial\varphi}r\cos\theta \end{bmatrix}\\ \amp = \begin{bmatrix} \cos\varphi\sin\theta \amp r\cos\varphi\cos\theta \amp -r\sin\varphi\sin\theta \\ \sin\varphi\sin\theta \amp r\sin\varphi\cos\theta \amp r\cos\varphi\sin\theta \\ \cos\theta \amp -r\sin\theta \amp 0 \end{bmatrix}\text{.} \end{align*}
Expanding along the last row we get
\begin{align*} \det J_{\vect g}(r,\theta,\varphi)\amp = r^2\det \begin{bmatrix} \cos\varphi\sin\theta \amp \cos\varphi\cos\theta \amp -\sin\varphi\sin\theta \\ \sin\varphi\sin\theta \amp \sin\varphi\cos\theta \amp \cos\varphi\sin\theta \\ \cos\theta \amp -\sin\theta \amp 0 \end{bmatrix}\\ \amp =r^2\bigl(\cos\theta(\cos^2\varphi+\sin^2\varphi)\sin\theta\cos\theta\\ \amp \phantom{==}\sin\theta(\cos^2\varphi\sin^2\theta +\sin^2\varphi\sin^2\theta)\\ \amp =r^2\sin\theta(\cos^2\theta+\sin^2\theta)\\ \amp =r^2\sin\theta\text{.} \end{align*}
The fact that \(J_{\vect g}(r,\theta,\varphi)\) is positive for all \(\theta\in(0,\pi)\) tells us that the change of variables preserves the orientation of the coordinate systems, and that is why we take the variables in the order \((r,\theta,\varphi)\text{.}\) Hence we have the following lemma, providing the Jacobian determinant for spherical coordinates.
Applying the transformation formula from Theorem 6.5 we see that
\begin{equation} \iiint_{D}f(x,y,z)\,dx\,dy\,dz =\iiint_{\vect g(D)} f(r\cos\varphi\sin\theta,r\sin\varphi\sin\theta,r\cos\theta) r^2\sin\theta\,dr\,d\varphi\,d\theta.\text{.}\tag{6.5} \end{equation}

Remark 6.9.

Sometimes, spherical coordinates are defined measuring the angle \(\theta\) not from the \(z\)-axis but from the \(xy\)-plane. If done so then \(\theta\in[-\pi/2,\pi/2]\text{,}\) and
\begin{align*} x \amp =r\cos\varphi\cos\theta\\ y \amp =r\sin\varphi\cos\theta\\ z \amp =r\sin\theta\text{.} \end{align*}
Moreover, the corresponding Jacobian determinant is \(J_{\vect g}(r,\varphi,\theta)=r^2\cos\theta\text{.}\)

Example 6.10.

Compute the volume of a ball of radius \(R\) in \(\mathbb R^3\text{.}\)
Solution.
In polar coordinates we can describe the ball, \(B\text{,}\) of radius \(R\) as the set of all \((r,\theta,\varphi)\) for which \(r\in [0,R]\text{,}\) \(\varphi\in[0,2\pi]\) and \(\theta\in[0,\pi]\text{.}\) Hence, applying Fubini’s theorem and the formula for spherical coordinates, the volume of the ball is
\begin{align*} \int_B1d\vect x \amp=\int_0^{2\pi}\Bigl(\int_0^\pi\Bigl(\int_0^R r^2\sin\theta\,dr \Bigr)\,d\theta\Bigr)\,d\varphi =\int_0^{2\pi}\Bigl(\int_0^\pi\frac{R^3}{3}\sin\theta \,d\theta\Bigr)\,d\varphi\\ \amp=\frac{R^3}{3}\int_0^{2\pi}\Bigl(-\cos\theta\Bigr|_0^\pi \Bigr)\,d\varphi =\frac{R^3}{3}\int_0^{2\pi}2\,d\varphi =\frac{4\pi}{3}R^3\text{.} \end{align*}

Subsection 6.4.2 Cylindrical Coordinates

Given a point in space we can express the first two coordinates in polar coordinates, \((r,\varphi)\text{,}\) and leave the third one, \(z\text{,}\) as shown in Figure 6.11.
Figure 6.11. Cylindrical coordinates of a point
Choosing \(r>0\) and \(\varphi\in[0,2\pi)\) the triple \((r,\varphi,z)\) is uniquely determined for every point not on the \(z\)-axis. We call \(r,\varphi,z\) the cylindrical coordinates of a point. Looking at Figure 6.11 we can express \(x,y,z\) by
\begin{align*} x \amp =r\cos\varphi\\ y \amp =r\sin\varphi\\ z \amp =z \end{align*}
Hence the transformation
\begin{equation} \vect g(r,\varphi,z) :=\bigl(r\cos\varphi,r\sin\varphi,z\bigr)\tag{6.6} \end{equation}
maps \([0,\infty)\times[0,2\pi)\times\mathbb R\) onto \(\mathbb R^3\text{.}\) We now compute the Jacobian matrix of that transformation:
\begin{align*} J_{\vect g}(r,\varphi,z)\amp= \begin{bmatrix} \dfrac{\partial}{\partial r}r\cos\varphi \amp \dfrac{\partial}{\partial\varphi}r\cos\varphi \amp \dfrac{\partial}{\partial z}r\cos\varphi \\ \dfrac{\partial}{\partial r}r\sin\varphi \amp \dfrac{\partial}{\partial\varphi}r\sin\varphi \amp \dfrac{\partial}{\partial z}r\sin\varphi \\ \dfrac{\partial}{\partial r}z \amp \dfrac{\partial}{\partial\varphi}z \amp \dfrac{\partial}{\partial z}z \end{bmatrix}\\ \amp= \begin{bmatrix} \cos\varphi \amp -r\sin\varphi \amp 0 \\ \sin\varphi \amp r\cos\varphi \amp 0 \\ 0 \amp 0 \amp 1 \end{bmatrix}\text{.} \end{align*}
Expanding along the last row we get
\begin{equation*} \det J_{\vect g}(r,\varphi,z) =\det \begin{bmatrix} \cos\varphi \amp -r\sin\varphi \amp 0 \\ \sin\varphi \amp r\cos\varphi \amp 0 \\ 0 \amp 0 \amp 1 \end{bmatrix} =r(\cos^2\varphi+\sin^2\varphi) =r\text{.} \end{equation*}
Hence we have the following lemma, providing the Jacobian determinant for cylindrical coordinates.
Applying the transformation formula from Theorem 6.5 to cylindrical coordinates we see that
\begin{equation} \iiint_{D}f(x,y,z)\,dx\,dy\,dz =\iiint_{\vect g(D)} f(r\cos\varphi,r\sin\varphi,z)r\,dr\,d\varphi\,dz\text{.}\tag{6.7} \end{equation}