# 15.6: Cylindrical and Spherical Coordinates

- Page ID
- 4827

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.