16 Integrals & Coordinates
We’ve seen previously that certain double and triple integrals are particularly challenging because their bounds contain complicated expressions like \(\sqrt{1-x^2}\), which lead to you having to do an integral of functions containing things like \(\sqrt{1-x^2}\) which leads to difficult trigonometric substitutions, or worse.
These sort of expressions come up when integrating over circular, cylindrical and spherical regions, because these are all described with equations like \(x^2+y^2=1\) or \(x^2+y^2+z^2=1\) in \(\RR^2\) or \(\RR^3\). And this chapter is the bearer of good news: the reason these integrals look hard at first is that the cartesian coordinates \(x,y,z\) are not a good way to work with them. But, after adapting our viewpoint, all the square roots melt away and these integrals become straightforward to compute!
The reason is that cartesian coordinates are good for describing flat objects: the surfaces where one variable is held constant describe lines or planes. Thus, integrals over rectangles and boxes are easy in cartesian coordinates: their bounds are constants! To make integrals over circles, cylinders and spheres easy, we need to find coordinates for which circles, cylinders and spheres are described by constants. If we can change our perspective to work with these coordinates, we will be able to turn an integral with difficult bounds into a different integral with constant bounds - but the same overall value.
16.1 Polar Coordinates
Polar coordinates are a means of representing the plane using distance \(r\) from the origin, and angle \(\theta\) from the \(x\)-axis.
Using trigonometry, we can relate these to the usual \(x\) and \(y\) coordinates we are used to.
Definition 16.1 (Polar Coordinates) Polar coordinates on the plane are the coordinates \(r,\theta\) where \(r\) measures the distance from the origin, and \(\theta\) measures the angle from the \(x-\)axis. The conversion from cartesian to polar coordinates is given by the functions
\[x=r\cos\theta \hspace{1cm}y=r\sin\theta\]
Definition 16.2 (dA in Polar Coordinates) The area element \(dA\) was expressed in cartesian coordinates as \(dA=dxdy\) by drawing a small rectangle and taking length times width. The same approach succeeds in polar coordinates, where we draw a small rectangle using an infinitesimal angle \(d\theta\) and an infitesimal change in radius \(dr\)
PICTURE
Here we must be careful however, as while \(dr\) does represent one side of the rectangle, \(d\theta\) is an angle not a side length. The corresponding side length is an arc of a circle of radius \(r\), and since arc length is proportional to radius we see \(ds=r d\theta\). Together this gives \[dA=(\mathrm{length})(\mathrm{width})=(ds)(dr)=(r d\theta)(dr)\] \[=rdrd\theta\]
This lets us do a double integral in polar coordinates by first doing an \(r\) integral, and then a \(\theta\) integral or vice-versa:
\[\iint_R f\, dA = \int_{\theta_1}^{\theta_2}\int_{r_1}^{r_2}f\,rdrd\theta\]
Just like in cartesian coordinates, you can view this as slicing in teh \(r\) and \(\theta\) directions, and integrating the results.
Starting from an integral with cartesian coordinates \(x,y\), there is a straightforward procedure to convert to polar:
- Convert the function to polar coordinates: substitute \(x=r\cos\theta\) and \(y=r\sin\theta\) and simplify (remember \(x^2+y^2=r^2\)).
- Substitute \(dA\) or \(dxdy\) for the polar area unit \(dA=rdrd\theta\).
- Rewrite the bounds of integration in terms of polar coordinates.
Now you just have a standard iterated integral (but with variables named \(r\) and \(\theta\) instead of \(x\) and$ y$.) This can be computed as normal: just doing one integral at a time.
Example 16.1 Let \(D\) be the region inside the unit circle in the plane. Compute the integral \[\iint_D x^2+y^2 dA\]
With the bounds being the unit circle, if we slice the integral using cartesian coordinates we will get \[\int_{-1}^1\int_{-\sqrt{1-x^2}}^{\sqrt{1-x^2}}x^2+y^2 \, dy dx\] This turns out to be a challenging integral to do, so instead we decide to try polar coordinates. Converting the bounds first shows this is a good idea: for the unit circle we have \[0\leq r\leq 1\hspace{1cm}0\leq \theta\leq 2\pi\] The bounds are constant! Converting the function \[x^2+y^2=(r\cos\theta)^2+(r\sin\theta)^2 = r^2\] So our integral becomes
\[\iint_D x^2+y^2 dA = \int_0^{2\pi}\int_0^1 r^2\, rdrd\theta\]
This is easily evaluated:
\[\int_0^1 r^3dr = \frac{r^4}{4}\Bigg|_0^1= \frac{1}{4}\] \[\int_0^{2\pi}\frac{1}{4}d\theta = \frac{2\pi}{4}=\frac{\pi}{2}\]
In this case polar coordinates led to an integral with only \(r\), and no \(\theta\) dependence. In general there will be sines and cosines in the resulting integral, which will require us to remember techniques for trigonometric integrals from Calculus II.
:::{#thm-trigonometric integrals} If an integral contains an even power of \(\sin\) or \(\cos\), use the half angle identities (perhaps repeatedly) to decrease the power \[\cos^2\theta = \frac{1+\cos 2\theta}{2}\hspace{1cm}\sin^2\theta = \frac{1-\cos 2\theta}{2}\]
For example:
\[\int \sin^2\theta d\theta = \int\frac{1}{2}(1-\cos2\theta)d\theta = \frac{1}{2}\left(\theta-\frac{1}{2}\sin2\theta\right)+C\]
If an integral contains an odd power of sine or cosine, save one of the factors and convert the others from sine to cosine (or vice versa) using the pythagorean identity \(\sin^2+\cos^2=1\). This sets it up for a \(u\)-substitution. For example:
\[\int\cos^5\theta d\theta = \int(1-\sin^2\theta)^2\cos\theta d\theta\] \[=\int (1-u^2)^2 du=\int 1-2u^2+u^4du = \sin\theta - \frac{2}{3}\sin^3\theta +\frac{1}{5}\sin^5\theta\] :::
Application: Integrating the Gaussian
16.2 Cylindrical Coordinates
Cylindrical coordinates are just the natural three dimensional extension of polar coordinates, where we use \(r,\theta,\) and \(z\).
Definition 16.3 (Cylindrical Coordinates) Measure two directions in space using polar coordinates, and the orthogonal direction with its standard Cartesian axis. If we convert the \(xy\) plane to polar, this means
\[x=r\cos\theta\] \[y=r\sin\theta\] \[z=z\]
The volume element here is just the polar area element times \(dz\):
Definition 16.4 (Volume in Cylindrical Coordinates) \[dV=(dA)dz=rdrd\theta dz\]
Examples are easier to understand if you draw the regions along the way, so I’ve done some on my iPad to post below:
A second example:
And, a third example:
16.3 Spherical Coordinates
Spherical coordinates is a coordinate system in \(\RR^3\) where we represent a point with latitude, longitude, and radius.
Definition 16.5 (Spherical Coordinates) \[x=r\cos\theta\sin\phi\] \[y=r\sin\theta\sin\phi\] \[z=r\sin\phi\]
Using these coordinate definitions we can compute the volume element in spherical coordinates: it’ll be a product of the length in the \(r\) direction, the length in the \(\theta\) direction and the length in the \(\phi\) direction.
- Length in the \(r\) direction is \(dr\).
- Circles in the \(\theta\) direction (lines of longitude) have circumference \(2\pi r \sin\phi\). Thus a small amount of angle has length \(r\sin\phi d\theta\).
- Circles in the \(\phi\) direction are all longitudes on the sphere, of length \(2\pi r\). Thus a small bit of angle has length \(r d\phi\).
Definition 16.6 (Volume in Spherical Coordinates) \[dV=dr (r\sin\phi d\theta)(r d\phi)\] \[=r^2\sin\phi dr d\theta d\phi\]
Again, examples are easier when you can draw out the bounds so I’ve done some handwritten ones below:
And a second
16.4 Video Resources
Polar Coordinates
Cylindrical Coordinates
Spherical Coordinates
Examples in Spherical Coordinates:
{{< youtube jBcNOkwiS6k?si=MV-C12ELGIT6Ux6V >}}