15.6: Cylindrical and Spherical Coordinates
- Page ID
- 4827
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)
( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\id}{\mathrm{id}}\)
\( \newcommand{\Span}{\mathrm{span}}\)
\( \newcommand{\kernel}{\mathrm{null}\,}\)
\( \newcommand{\range}{\mathrm{range}\,}\)
\( \newcommand{\RealPart}{\mathrm{Re}}\)
\( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)
\( \newcommand{\Argument}{\mathrm{Arg}}\)
\( \newcommand{\norm}[1]{\| #1 \|}\)
\( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)
\( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)
\( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)
\( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)
\( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vectorC}[1]{\textbf{#1}} \)
\( \newcommand{\vectorD}[1]{\overrightarrow{#1}} \)
\( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}} \)
\( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)
\( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \)
\( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)
\(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)We have seen that sometimes double integrals are simplified by doing them in polar coordinates; not surprisingly, triple integrals are sometimes simpler in cylindrical coordinates or spherical coordinates. To set up integrals in polar coordinates, we had to understand the shape and area of a typical small region into which the region of integration was divided. We need to do the same thing here, for three dimensional regions.
The cylindrical coordinate system is the simplest, since it is just the polar coordinate system plus a \(z\) coordinate. A typical small unit of volume is the shape shown below "fattened up'' in the \(z\) direction, so its volume is \(r\Delta r\Delta \theta\Delta z\), or in the limit, \(r\,dr\,d\theta\,dz\).
A polar coordinates "grid".
Example \(\PageIndex{1}\)
Find the volume under \(z=\sqrt{4-r^2}\) above the quarter circle inside \(x^2+y^2=4\) in the first quadrant.
Solution
We could of course do this with a double integral, but we'll use a triple integral:
\[\int_0^{\pi/2}\int_0^2\int_0^{\sqrt{4-r^2}} r\,dz\,dr\,d\theta=
\int_0^{\pi/2}\int_0^2 \sqrt{4-r^2}\; r\,dr\,d\theta=
{4\pi\over3}.\]
Compare this to Example 15.2.1.
Example \(\PageIndex{2}\)
An object occupies the space inside both the cylinder \(x^2+y^2=1\) and the sphere \(x^2+y^2+z^2=4\), and has density \(x^2\) at \((x,y,z)\). Find the total mass.
Solution
We set this up in cylindrical coordinates, recalling that \(x=r\cos\theta\):
\[\eqalign{
\int_0^{2\pi}\int_0^1\int_{-\sqrt{4-r^2}}^{\sqrt{4-r^2}}
r^3\cos^2(\theta)\,dz\,dr\,d\theta
&=\int_0^{2\pi}\int_0^1 2\sqrt{4-r^2}\;r^3\cos^2(\theta)\,dr\,d\theta\cr
&=\int_0^{2\pi}
\left({128\over15}-{22\over5}\sqrt3\right)\cos^2(\theta)\,d\theta\cr
&=\left({128\over15}-{22\over5}\sqrt3\right)\pi\cr
}\]
Spherical coordinates are somewhat more difficult to understand. The small volume we want will be defined by \(\Delta\rho\), \(\Delta\phi\), and \(\Delta\theta\), as pictured in Figure \(\PageIndex{1}\).
The small volume is nearly box shaped, with 4 flat sides and two sides formed from bits of concentric spheres. When \(\Delta\rho\), \(\Delta\phi\), and \(\Delta\theta\) are all very small, the volume of this little region will be nearly the volume we get by treating it as a box. One dimension of the box is simply \(\Delta\rho\), the change in distance from the origin. The other two dimensions are the lengths of small circular arcs, so they are \(r\Delta\alpha\) for some suitable \(r\) and \(\alpha\), just as in the polar coordinates case.
Figure \(\PageIndex{1}\): A small unit of volume for a spherical coordinates (AP)
The easiest of these to understand is the arc corresponding to a change in \(\phi\), which is nearly identical to the derivation for polar coordinates, as shown in the left graph in Figure \(\PageIndex{2}\). In that graph we are looking "face on'' at the side of the box we are interested in, so the small angle pictured is precisely \(\Delta\phi\), the vertical axis really is the \(z\) axis, but the horizontal axis is not a real axis---it is just some line in the \(x\)-\(y\) plane. Because the other arc is governed by \(\theta\), we need to imagine looking straight down the \(z\) axis, so that the apparent angle we see is \(\Delta\theta\). In this view, the axes really are the \(x\) and \(y\) axes. In this graph, the apparent distance from the origin is not \(\rho\) but \(\rho\sin\phi\), as indicated in the left graph.
Figure \(\PageIndex{2}\): Setting up integration in spherical coordinates.
The upshot is that the volume of the little box is approximately \(\Delta\rho(\rho\Delta\phi)(\rho\sin\phi\Delta\theta) =\rho^2\sin\phi\Delta\rho\Delta\phi\Delta\theta\), or in the limit \(\rho^2\sin\phi\,d\rho\,d\phi\,d\theta\).
Example \(\PageIndex{3}\)
Suppose the temperature at \((x,y,z)\) is \[T=\dfrac{1}{1+x^2+y^2+z^2}.\nonumber\] Find the average temperature in the unit sphere centered at the origin.
Solution
In two dimensions we add up the temperature at "each'' point and divide by the area; here we add up the temperatures and divide by the volume, \((4/3)\pi\):
\[{3\over4\pi}\int_{-1}^1\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}
\int_{-\sqrt{1-x^2-y^2}}^{\sqrt{1-x^2-y^2}}
{1\over1+x^2+y^2+z^2}\,dz\,dy\,dx \nonumber
\]
This looks quite messy; since everything in the problem is closely related to a sphere, we'll convert to spherical coordinates.
\[{3\over4\pi}\int_0^{2\pi}\int_0^\pi
\int_0^1
{1\over1+\rho^2}\,\rho^2\sin\phi\,d\rho\,d\phi\,d\theta
={3\over4\pi}(4\pi -\pi^2)=3-{3\pi\over4}. \nonumber
\]
Contributors
Integrated by Justin Marshall.