Skip to main content

Section 4.1 Cylindrical and Spherical Coordinates

Subsection 4.1.1 Curvilinear Coordinate Systems

Polar coordinates was the most important change of variables in \(\RR^2\text{.}\) In \(\RR^3\text{,}\) there are two extremely useful changes of coordinates: cylindrical and sphereical coordinates. This section will review the definitions of these coordinate systems and give exmaples where they are used to solve multiple integrals.

Before I move on, I want to define a term for these three coordinate system (and other similar systems). All three of these coordinate systems are based around circle. Their utility comes from this; cartesian coordinates are not really good for anything with a circular structure. In cartesian coordinates, circles and spheres inevitably lead to annoying square roots in the calculations. These other coordinate systems simplify those calculations substantially. I want to use the fact that all of these systems involve circles (and thus angle and radii) to define a term that unites them.

Definition 4.1.1.

A coordinate system for \(\RR^n\) where at least one of the coordinates is an angle and at least one of the coordinates is a radius is called a curvilinear coordinate syste. By contrast, cartesian coordinates are often referred to as a rectangular coordinate system.

Subsection 4.1.2 Cylindrical Coordinates

Cylindrical coordinates leave \(z\) unchanges and use polar coordinates in the \(xy\)-plane. Here are the transformation. As before, the typical way to write the transformation is treating the cartesian variables as the dependent variables, the output.

\begin{align*} x \amp = r \cos \theta\\ y \amp = r \sin \theta\\ z \amp = z \end{align*}

It is useful to know the reverse transformations as well.

\begin{align*} r \amp = \sqrt{x^2 + y^2} \\ \theta \amp = \arctan \frac{y}{x}\\ z \amp = z \end{align*}

Let me calculate the Jacobian. The matrix of partial derivative is a \(3 \times 3\) matrix.

\begin{align*} \amp \frac{\del x}{\del r} = \cos \theta \amp \amp \frac{\del x}{\del \theta} = -r \sin \theta \amp \amp \frac{\del x}{\del z} = 0 \\ \amp \frac{\del y}{\del r} = \sin \theta \amp \amp \frac{\del y}{\del \theta} = r \cos \theta \amp \amp \frac{\del y}{\del z} = 0 \\ \amp \frac{\del z}{\del r} = 0 \amp \amp \frac{\del z}{\del \theta} = 0 \amp \amp \frac{\del z}{\del z} = 1 \end{align*}
\begin{align*} J \amp = \begin{pmatrix} \cos \theta \amp -r \sin \theta \amp 0 \\ \sin \theta \amp r \cos \theta \amp 0 \\ 0 \amp 0 \amp 1 \end{pmatrix} \\ \det J \amp = r \end{align*}

Like with polar coordinates, it is useful to know the shapes give by setting one of the three coordinates to a constant. The locus of \(r=c\) is a cylinder of radius \(c\) around the \(z\) axis. The cylinder extends infinitely in the positive and negative \(z\) axis. This cylinder is the source of the names of the system and, indeed, if it the easiest system to describe or integration over a cylinder. The locus of \(\theta = c\) is a halfplace extending out from the \(z\) axis; all points which have a particular angle in the \(xy\) plane. Finally, \(z=c\) is a horizontal plane at a fixed height \(c\text{.}\) This is the same as cartesian coordinates, since the \(z\) of cylindrical and the \(z\) of cartesian coordinates are excatly the same.

To describe a solid cylinder of radius \(3\) which starts at the \(xy\) plane and stops at neight \(z = 5\text{,}\) I can use constant bounds in each variable: \(r \in [0,3]\text{,}\) \(\theta \in [0,2\pi]\) and \(z \in 0,5\text{.}\) Many other objects that have some kind of cylindrical symmetry, or even just circular cross-sectiosn along the \(z\) axis, can be conveniently describe with cylindrical coordinates.

Subsection 4.1.3 Examples with Cylindrical Coordinates

Consider the region \(D\) defined by \(x^2 + y^2 \leq 4\) and \(1 \leq z \leq 5\text{.}\) This is a cylinder of radius \(2\) of height \(4\text{.}\) I want to integrate the function \(f(x,y,z) = z\sqrt{x^2+y^2}\) over this cylinder. I can use cylindrical coordinates with constant bounds. I change the integrand into cylindrical coordinates, which is convenient since \(r = \sqrt{x^2 + y^2}\text{.}\) I must also remember the Jacobian.

\begin{align*} \int_D z\sqrt{x^2+y^2} dV \amp = \int_0^{2\pi} \int_0^2 \int_1^5 z r r dz dr d\theta\\ \amp = \int_0^{2\pi} d\theta \int_0^2 r^2 dr \int_1^5 z dz\\ \amp = 2\pi \frac{r^3}{3} \Bigg|_0^2 \frac{z^2}{2} \Bigg|_1^5 = 2\pi \frac{8}{3} \frac{24}{2} = 64\pi \end{align*}

I can set up the integral for volume of a cone in cylindrical coordinates. If the cone has height \(h\) and base radius \(R\text{,}\) and if I set it opening upwards with its point at the origin, then the bounds for \(z\) are \(z \in [0,h]\text{.}\) The radius increases linearly with \(z\) as \(r = \frac{zR}{h}\text{.}\) In \(\RR^3\text{,}\) we integrate \(1\) over the cone to calculate its volume. The bounds for \(z\) are non-constant, so \(z\) must be the inside variable. I must also remember the Jacobian.

\begin{align*} \int_C 1 dV \amp = \int_0^{2\pi} \int_0^h \int_0^{\frac{Rz}{h}} r dr dz d\theta\\ \amp = 2\pi \int_0^h \frac{r^2}{2} \Bigg|_0^{\frac{Rz}{h}} dz\\ \amp = 2\pi \int_0^h \frac{R^2 z^2}{2h^2} dz\\ \amp = 2\pi \frac{R^2}{2h^2} \frac{z^3}{3} \Bigg|_0^h\\ \amp = 2\pi \frac{R^2}{2h^2} \frac{h^3}{3} = \frac{R^2h\pi}{3} \end{align*}

Similarly, I can calculate the volume of a parabaloid this way. I orient it along the \(z\) axis, opening upwards. If the parabaloid has height \(h\) and base radius \(R\text{,}\) then the radius is \(r = \frac{R\sqrt{z}}{\sqrt{h}}\text{.}\) By solving for \(z\text{,}\) I get \(z = \frac{hr^2}{R^2}\text{.}\) The bounds for \(z\) are non-constant, so \(z\) must be the inside integral.

\begin{align*} \int_D 1 dV \amp = \int_0^{2\pi} \int_0^R \int_{\frac{hr^2}{R^2}}^h r dz dr d\theta\\ \amp = 2\pi \int_0^R r \left( h - \frac{hr^2}{R^2} \right) dr\\ \amp = 2\pi \left( \frac{hr^2}{2} - \frac{hr^4}{4R^2} \right) \Bigg|_0^R\\ \amp = 2\pi \left( \frac{hR^2}{2} - \frac{hR^4}{4R^2} \right)\\ \amp = hR^2 2\pi \left( \frac{1}{2} - \frac{1}{4} \right)\\ \amp = \frac{hR^2 \pi}{2} \end{align*}

This example it quite a tricky volume problem, but shows some clever use of polar coordinates. Assume there are three cylinders of radius \(R\) along each axis in \(\RR^3\text{.}\) What is the volume of the intersection of all three cylinders? (This object is called the tricylinder Steinmetz solid). Setting up the geometry is difficult. I will integrate a volume over the \(xy\) plane. By symmetry, I can work with one 16th of the shape: the portion that lies above one 8th of the circle above the axis. The first 8th of the circle is described by the bounds \(\theta \in \left[0, \frac{\pi}{4} \right]\) in cylindrical coordinates. The \(z\)-axis cylinder restricts the shape to the circle in the \(xy\)-plane and the \(x\)-axis cylinder is lower than the \(y\)-axis cylinder over this particular \(8th\) or a circle, so the \(x\)-axis cylinder is the limit on height. What is that height function? The equation of the cylinder is \(y^2 + z^2 = R^2\text{.}\) I can solve for \(z\) to get \(z ^2 = R^2 - y^2 = R^2 - r^2 \sin^2\theta\text{,}\) writing \(y\) in cylindrical coordinates. This determines a region of integration. I integrate constant \(1\) and I remember to include the Jacobian.

\begin{align*} V \amp = 16 \int_0^{\frac{\pi}{4}} \int_0^R \int_0^{\sqrt{R^2-r^2 \cos^2\theta}} r dz dr d\theta\\ \amp = 16 \int_0^{\frac{\pi}{4}} \int_0^R \sqrt{R^2-r^2 \cos^2\theta} r dr d\theta\\ \amp = 16 \int_0^{\frac{\pi}{4}} \left( (R^2-r^2 \cos^2\theta)^{\frac{3}{2}} \frac{2}{3} \frac{-1}{2\cos^2\theta} \right) \Bigg|_0^R d\theta\\ \amp = \frac{16}{3} \int_0^{\frac{\pi}{4}} \left( \frac{R^3}{\cos^2 \theta} - \frac{(R^2-R^2\cos^2 \theta)^{\frac{3}{2}}}{\cos^2 \theta} \right) d \theta\\ \amp = \frac{16}{3} \int_0^{\frac{\pi}{4}} \left( R^3\sec^2 \theta - \frac{R^3\sin^3 \theta}{\cos^2 \theta} \right) d \theta\\ \amp = \frac{16R^3}{3} \int_0^{\frac{\pi}{4}} \left( \sec^2 \theta - \frac{\sin \theta}{\cos^2 \theta} + \sin \theta \right) d \theta\\ \amp = \frac{16R^3}{3} \left( \tan \theta + \frac{-1}{\cos \theta} - \cos \theta \right) \Bigg|_0^{\frac{\pi}{4}}\\ \amp = \frac{16R^3}{3} \left( 1 - \frac{2}{\sqrt{2}} - \frac{\sqrt{2}}{2} - 0 + 1 + 1 \right)\\ \amp = \frac{16R^3}{3} \left( 3 - \frac{2\sqrt{2} + \sqrt{2}}{2} = \frac{16R^3}{3} \frac{6-3\sqrt{2}}{2} \right) = 8R^3 (2-\sqrt{2}) \end{align*}

Subsection 4.1.4 Spherical Coordinates

Cylindrical coordinates are very close to polar coordinates: I just added the ordinary \(z\) from cartesian coordinates to the existing \(r\) and \(\theta\) of polar coordiantes. The fundamental shape is a cylinder around the \(z\) axis, any cross section of which is a circle. The radius term is the radius of this circle around the \(z\) axis.

Spherical coordinates are more novel. Instead of using polar coordinates and circles, I now start with the sphere. The coordinate \(r\text{,}\) instead of being the radius of a circle, will now be the distance from the point to the origin. Equivalently, \(r\) is the radius of the sphere, centred at the origin, which contains the point. Once a sphere has been identified, I need to use the other two coordinates to specify which point on this sphere.

The system to identify points of a sphere is very similar to latitude and longitude; the reference points just different. I am going to defined two angles: \(\theta\) and \(\phi\text{.}\) The \(\theta\) angle will be the equivalent of longitute. Starting from the positive \(x\) axis and moving counterclockwise, \(\theta\) indicates an arc on the sphere from the ‘north pole’ to the ‘south pole’. This is essentially longitude, just instead of going from \(-180\) to \(180\text{,}\) using radius the range is \([0, 2\pi]\text{.}\) Finally, the second angle is something I will call colatitutde. This is, again, essentially latitude, but \(0\) is now at the north poth. The range here is only \(\phi \in [0,\pi)\text{,}\) since after \(\pi\) radians, I am already at the south pole of the sphere.

A bunch of trigonometry with these angles gives the transformation equations.

\begin{align*} x \amp = r \sin \phi \cos \theta\\ y \amp = r \sin \phi \sin \theta\\ z \amp = r \cos \phi \end{align*}

I'm not going to write the full inverse transformation, since the inverse transformations for the angles are rarely useful. However, the equation \(r = \sqrt{x^2 + y^2 +z^2}\) is very useful to remember.

Let me calculate the Jacobian. The matrix of partial derivative is a \(3 \times 3\) matrix.

\begin{align*} \amp \frac{\del x}{\del r} = \sin \phi \cos \theta \amp \amp \frac{\del x}{\del \theta} = -r \sin \phi \sin \theta \amp \amp \frac{\del x}{\del \phi} = r \cos \phi \cos \theta\\ \amp \frac{\del y}{\del r} = \sin \phi \sin \theta \amp \amp \frac{\del y}{\del \theta} = r \sin \phi \cos \theta \amp \amp \frac{\del y}{\del \phi} = r \cos \phi \sin \theta\\ \amp \frac{\del z}{\del r} = \cos \phi \amp \amp \frac{\del z}{\del \theta} = 0 \amp \amp \frac{\del z}{\del \phi} = - r \sin \phi \end{align*}
\begin{align*} J \amp = \begin{pmatrix} \sin \phi \cos \theta \amp -r \sin \phi \sin \theta \amp r \cos \phi \cos \theta \\ \sin \phi \sin \theta \amp r \sin \phi \cos \theta \amp r \cos \phi \sin \theta \\ \cos \phi \amp 0 \amp -r \sin \phi \end{pmatrix} \\ \det J \amp = r^2 \sin \phi \end{align*}

Notice that the Jacobian has \(r^2\text{,}\) so units of area. As with polar coordinates, this corrects the units in the infinitesimal expression \(dr d\theta d\phi\text{.}\) With two angles, the infinitesimal expression only has unit of length. Mutiplying by the Jacobian produces units of volume, as we expect for this infinitesimal in \(\RR^2\text{.}\)

As with the other curvilinear coordinates, I'm interesting in the loci described by setting each coordinate to a constant. The most important of these is \(r =c\text{,}\) which describes a sphere of radius \(c\text{;}\) I already used this in the definition and this is what gives the coordinates their name. Setting longitutde to be constant (but allowing any radius and any lattitude) gives a halfplane going out from the \(z\) axis, must like with cylindrical coordiantes. Setting the colatitude to be constant (but allowing any radius and any longitute) produces a cone. The cone expands upwards if the latitute is less than \(\frac{\pi}{2}\) and expands downwards if the latitude is greater than \(\frac{\pi}{2}\text{.}\) The special case of \(\phi = \frac{\pi}{2}\) (which corresponds to points of the equators of each sphere) gives the \(xy\) plane.

The easiest example is calculating volume of a sphere of radius \(R\text{.}\) The bounds are all constant: \(r \in [0,R\text{,}\) \(\theta \in [0,2\pi]\) and \(\phi \in [0,\pi]\text{.}\) This describes any longitude, an colatitude, and all radii up to \(R\text{,}\) thus giving the solid sphere. Since this is volume, the integrand is \(1\text{.}\) I must also remember the Jacobian.

\begin{align*} \int_S 1 dV \amp = \int_0^{2\pi} \int_0^{\pi} \int_0^R r^2 \sin \phi dr d\phi d\theta\\ \amp = \int_0^{2\pi} d\theta \int_0^{\pi} \sin \phi d \phi \int_0^R r^2 dr\\ \amp = 2\pi \left( -\cos \phi \right) \Bigg|_0^{\pi} \frac{r^3}{3} \Bigg|_0^R\\ \amp = 2\pi ( 1+1) \frac{R^3}{3} = \frac{4\pi R^3}{3} \end{align*}

Consider a sphere of radius \(R\text{.}\) Inside this sphere is a cone with flare angle \(\frac{\pi}{6}\text{,}\) where the tip of the cone is located at very bottom of the sphere and the cone opens up inside the sphere. The cone, plus the portion of the sphere above the cone, gives a shape that is something like an ice-cream cone; it's a cone plus a spherically curved cap at the top of the cone. What is the volume of this object?

If I put the centre of the sphere at \((0,0,R)\text{,}\) then the vertex of the cone can be put at the origin. The equation of such a sphere is

\begin{equation*} x^2+ y^2 + (z-R)^2 = R^2\text{.} \end{equation*}

Since \(r^2 = x^2 + y^2 + z^2\text{,}\) this equation simplifies into \(r^2 = 2 R z\) which is \(r^2 = 2Rr\cos \phi\) or \(r = 2R\cos \phi\text{.}\) This can be taken at the outside bound of the radius term, as \(\phi \in \left[0, \frac{\pi}{2} \right]\) and \(\theta \in [0, 2\pi]\text{.}\) The flare of the cone is \(\frac{\pi}{6}\text{,}\) which restricts \(\phi \in \left[0, \frac{\pi}{6} \right]\text{.}\) I integrate with these bounds for the volume, making sure that \(r\) is an inside integral since its bounds depend on \(\theta\text{.}\) Since this is volume, the integrand is \(1\text{.}\) I need to remember the Jacobian.

\begin{align*} \int_D 1 dV \amp = \int_0^{2\pi} \int_0^{\frac{\pi}{6}} \int_0^{2 R \cos \phi} r^2 \sin \phi dr d\phi d\theta\\ \amp = 2\pi \int_0^{\frac{\pi}{6}} \frac{r^3}{3} \Bigg|_0^{2R\cos \phi} \sin \phi d \phi\\ \amp = 2\pi \int_0^{\frac{\pi}{6}} \frac{8R^3 \cos^3 \phi \sin \phi}{3} d\phi\\ \amp = \frac{16\pi r^3}{3} \left( \frac{-\cos^4\phi}{4} \right) \Bigg|_0^{\frac{\pi}{6}}\\ \amp = \frac{16R^3\pi}{3} \left( \frac{1}{4} - \frac{9}{64} \right) = \frac{7\pi R^3}{12} \end{align*}