16  Integrals & Coordinates

We’ve seen previously that certain double and triple integrals are particularly challenging because their bounds contain complicated expressions like 1x2, which lead to you having to do an integral of functions containing things like 1x2 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 x2+y2=1 or x2+y2+z2=1 in R2 or R3. 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 θ from the x-axis.

Polar Coordinates definition.

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,θ where r measures the distance from the origin, and θ measures the angle from the xaxis. The conversion from cartesian to polar coordinates is given by the functions

x=rcosθy=rsinθ

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θ 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θ 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=rdθ. Together this gives dA=(length)(width)=(ds)(dr)=(rdθ)(dr) =rdrdθ

This lets us do a double integral in polar coordinates by first doing an r integral, and then a θ integral or vice-versa:

RfdA=θ1θ2r1r2frdrdθ

Just like in cartesian coordinates, you can view this as slicing in teh r and θ 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=rcosθ and y=rsinθ and simplify (remember x2+y2=r2).
  • Substitute dA or dxdy for the polar area unit dA=rdrdθ.
  • Rewrite the bounds of integration in terms of polar coordinates.

Now you just have a standard iterated integral (but with variables named r and θ 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 Dx2+y2dA

With the bounds being the unit circle, if we slice the integral using cartesian coordinates we will get 111x21x2x2+y2dydx 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 0r10θ2π The bounds are constant! Converting the function x2+y2=(rcosθ)2+(rsinθ)2=r2 So our integral becomes

Dx2+y2dA=02π01r2rdrdθ

This is easily evaluated:

01r3dr=r44|01=14 02π14dθ=2π4=π2

In this case polar coordinates led to an integral with only r, and no θ 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 cos2θ=1+cos2θ2sin2θ=1cos2θ2

For example:

sin2θdθ=12(1cos2θ)dθ=12(θ12sin2θ)+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 sin2+cos2=1. This sets it up for a u-substitution. For example:

cos5θdθ=(1sin2θ)2cosθdθ =(1u2)2du=12u2+u4du=sinθ23sin3θ+15sin5θ :::

Application: Integrating the Gaussian

16.2 Cylindrical Coordinates

Cylindrical coordinates are just the natural three dimensional extension of polar coordinates, where we use r,θ, and z.

Cylindrical coordinates definition

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=rcosθ y=rsinθ 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θ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 R3 where we represent a point with latitude, longitude, and radius.

Defining spherical coordinates.

Definition 16.5 (Spherical Coordinates) x=rcosθsinϕ y=rsinθsinϕ z=rsinϕ

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 θ direction and the length in the ϕ direction.

  • Length in the r direction is dr.
  • Circles in the θ direction (lines of longitude) have circumference 2πrsinϕ. Thus a small amount of angle has length rsinϕdθ.
  • Circles in the ϕ direction are all longitudes on the sphere, of length 2πr. Thus a small bit of angle has length rdϕ.

Definition 16.6 (Volume in Spherical Coordinates) dV=dr(rsinϕdθ)(rdϕ) =r2sinϕdrdθdϕ

Surfaces of r,θ,ϕ = constant.

Again, examples are easier when you can draw out the bounds so I’ve done some handwritten ones below:

And a second

16.4 General Coordinate Transformations

We have spent some time understanding polar and spherical changes of variables, but these are merely the beginning of a rich collection of coordinate changes. There are elliptical coordinates, which are helpful when a problem involves ellipses, hyperbolic coordinates for problems involving hyperbolas, and many more

Because coordinates help simplify a problem by making the bounds easier many of you will see lots of different coordinate systems in your future, especially in physics and engineering.
In this one semester course we will not have the time nor need to deep dive into any other specific examples, but we will take a brief look at the general theory, and see how one can transform any integral into any coordinates.

When we computed double integrals in polar coordinates, we used the change of variables x=rcosθ,y=rsinθ to rewrite a region in the xy-plane in terms of new coordinates r and θ. In many examples, this change of variables dramatically simplified both the region of integration and the integrand. The key idea is that if we understand the geometry of a region better in some new coordinate system, we can rewrite the integral accordingly, as long as we account for how area is distorted by the change of coordinates.

This motivates the more general question: given a change of variables x=g(u,v),y=h(u,v), can we express a double integral over a region R in the xy-plane as an integral over a region S in the uv-plane? To answer this, we need to understand how small area elements transform under the map (u,v)(x,y).

Suppose we are integrating over the region R in the xy-plane bounded by the lines y=x, y=2x, xy=1, and xy=2. This region is awkward to describe in Cartesian coordinates, but if we define new variables u=xy,v=yx, then the boundaries become u=1, u=2, v=1, and v=2 — a rectangle in the uv-plane!

This illustrates the power of a good change of variables: a complicated region in xy becomes a simple rectangle in uv. We can’t yet evaluate an integral in these coordinates, though, because we need to understand how area is affected by the change of variables.

Let (x,y)=(g(u,v),h(u,v)) be a smooth change of variables. To compute how area changes, consider a small rectangle in the uv-plane with corners at (u,v), (u+Δu,v), (u,v+Δv), and (u+Δu,v+Δv). The image of this rectangle under the transformation is approximately a parallelogram in the xy-plane spanned by the vectors (x,y)uΔuand(x,y)vΔv. The area of this parallelogram is given by the magnitude of the determinant |(x,y)(u,v)|=||xuxvyuyv||. This determinant is called the of the transformation. It measures how a small area element dudv is stretched or compressed when mapped to the xy-plane. So, the change of variables formula becomes Rf(x,y)dxdy=Sf(g(u,v),h(u,v))|(x,y)(u,v)|dudv.

16.4.1 Example Area Element

Let us return to our earlier example, where u=xy, and v=yx. To apply the change of variables, we solve for x and y in terms of u and v. Since y=vx, we substitute into u=xy to get u=x(vx)=vx2x=uv,y=vuv=uv. We restrict to the first quadrant, so x,y>0.

Now, to compute the transformed integral, we must also calculate the Jacobian determinant |(x,y)(u,v)|. we differentiate:

xu=12uvxv=12vuv

yu=12vuyv=12uv

Now we compute the determinant:

|(x,y)(u,v)|=|12uv12uv3/212vu12uv|=(12uv12uv)(12uv3/212vu)=14uuvv+14uvv3/2u=141vu+141v=14v(1u+1).

This tells us our new dA:

dA=|(x,y)(u,v)|dudv=14v(1u+1)dudv

We can assemble all of this into a full example

Example 16.2 (A Change of Variables) To compute the integral Rx2dA over the region R defined by y=x, y=2x, xy=1, and xy=2, we make a coordinate substitution to simplify the bounds. Setting u=xy and v=yx, this converts our bounds to a region S in the uv plane:

S={(u,v):1u2,1v2}

So, our new bounds are constants, but to convert x,y to u,v we need to *solve for u,v in our coordinate change. This gives x=uv and y=uv. Thus, our function to integrate is x2=(uv)2=uv.

We can also use this to find the area element dA=|(x,y)(u,v)|dudv=14v(1u+1)dudv. All together then

Rx2dxdy=1212uv14v(1u+1)dudv

Simplifying a bit, this integral is easy as its a function of u times a function of v:

=1412121v2(u+u)dudv

16.5 Video Resources

Polar Coordinates

Cylindrical Coordinates

Spherical Coordinates

Examples in Spherical Coordinates:

{{< youtube jBcNOkwiS6k?si=MV-C12ELGIT6Ux6V >}}