Chapter 27. Spherical coordinates
In addition to cylindrical coordinates, there’s one more system we’ll use, called spherical coordinates. This chapter defines them and shows how to use them.
Note that there are competing conventions! For us, the letter names are going to mean
and we write them in that order. However, depending on your book:
- The names of and might be swapped. (Also note that the Greek letter may be written as in different fonts. If you use LaTeX, these are
\varphiand\phi.) - The order of and might be swapped (regardless of whether the names change too).
- might be replaced by instead.
§27.1 [TEXT] The definition of spherical coordinates
The idea behind spherical coordinates is that the projection of your point onto the -plane will have polar coordinates for some . But then rather than using to lift the point straight up, you rotate via some angle , getting a new distance such that which we’ll use to replace everywhere in what follows. See Figure 60 below.
Because of the right triangle with angle , hypotenuse , and legs and , we have
Unwinding everything to kill all the ’s, the transition map is given by
Just like how I wrote for polar if I needed to be more concise, we’ll have the analogous shorthand here:
We define spherical coordinates by
Now, in order to integrate over this, there’s supposed to be a change of variables with some Jacobian. To get the area scaling factor, we would compute the Jacobian
This takes some effort, so you probably should only do this once in your life and then remember the result. It works out to
I tried to do this calculation during recitation and got stuck at the board; not the kind of thing I’m good at. You really don’t want to redo this calculation on an exam, so just remember the result.
§27.2 [TEXT] The bounds of
Before talking about bounds for spherical coordinates, let me revisit polar coordinates for comparison.
§27.2.1 The bounds for polar coordinates
In polar (or cylindrical) coordinates, when we considered
we usually choose the convention
(13)
The thing I want to stress that some thought was put into choosing the interval for : the reason we use an interval of length is because if you choose a value of bigger than , then the point just “wraps around” to one you already knew; e.g.
denote the same point. More generally,
That’s why we adopt the convention Equation 13. When we define a coordinate system , we want to make sure that every point is given by exactly one pair. That is, every point should have a coordinate, but different coordinates should occupy different points.
Hence, to avoid repeating the same point with the same coordinates, the usual convention is to choose , although the convention works fine too, as does any interval of length .
§27.2.2 The bounds for spherical coordinates
Let’s go back to spherical coordinates
We want to choose a convention for values of such that (except for a few degenerate cases that we’ll ignore) every point has exactly one set of coordinates. The choice that we’re going to use is:
When we want to impose a range of values for spherical coordinates to avoid repeating points, we will choose the following convention:
(14)
That is, I claim that this choice of values Equation 14 will ensure every point is represented exactly once by , with a small number of exceptions23 we ignore.
The going from to is the same as in polar coordinates. However, the angle for might be a surprise to you; a common question asked on various forms is:
Well, if my claim about Equation 14 is true, that means if I plug in an “illegal” value of , into the formula then I should get a point that’s already represented. This is a bit like how , but the formula is a bit more complicated. So we’ll illustrate two cases in full to show how to convert the illegal value into a legal one.
§27.2.3 First case: Illegal angle greater than
In this case, I assert the following equation is true:
(15)
Here the sign for is arbitrary, and it’s chosen so that is a legal value.
Here are two ways to verify Equation 15 is true.
- Algebraic proof (easier)
We need to verify that the , , coordinates on both sides are the same:
But , , , and , so all the equations are true.
- Geometric proof (more informative)
Look at Figure 61. When the “illegal” value is picked for the angle, the red arrow ends up going all the way through . Hence, the projection of the new point onto the polar circle in blue ends up being the antipode rather than . If we then think about the angle from the axis to the brown radius , it has changed to the angle instead. This picture gives a geometric way of seeing why Equation 15 is true.
§27.2.4 Second case: Illegal angle less than zero
This time, I assert the following equation instead:
(16)
This is actually a bit easier to see than the last case.
- Algebraic proof (easier)
We need to verify that the , , coordinates on both sides are the same:
But , , , and , so all the equations are true.
- Geometric proof (more informative)
Look at Figure 62. This time, all that happens is we take the mirror image through the plane formed by the -axis and the line .
§27.3 [TEXT] Examples of using spherical coordinates
Here are two cookie-cutter uses where we have a sphere centered at the origin and we just integrate over the entire sphere (so taking , and ).
Solution. Placing the ball with its center at the origin:
Here, the “average” value of a function over a solid region is defined as .
Solution. The sphere has volume as we just saw. The only change to what we did before is that rather than integrating , we replace with the distance:
So the average value is
§27.4 [TEXT] Famous example: offset sphere
Recall the famous example in Section 24.3 where we showed that in polar coordinates, we could draw a circle passing through the origin; we called it an “offset circle”. There’s a 3D analog of this with an offset sphere where you have a sphere that’s sitting on the -plane. It’s actually pretty much exactly the same.
Solution. Like in Section 24.3, we can do either an algebra approach or a geometric one.
- Geometric approach
See Figure 63. All the points of the sphere lie in the half-space which is described as requiring . The value of is irrelevant by rotational symmetry, and can be anything from to . So we need to figure out how relates to .
Let and . Let be a point on the surface of the sphere. Like before, we have
So the surface of the sphere is those points for which . And the points inside the ball are , accordingly.
- Algebraic approach
The coordinates of the ball are
Recall the spherical coordinates transformation:
Substituting these into the sphere’s equation:
Expand and simplify:
Rearranging, this gives
In particular this requires i.e. .
In conclusion, the answer is that in spherical coordinates is exactly
The analogous famous exercise in 3D:
Let denote the solid ball of radius centered at . Calculate
Solution. As before, if we try to use integration it’s a disaster, but spherical coordinates are great because
We just saw that is given in spherical coordinates according to , , . Thus, the integral becomes:
§27.5 [TEXT] Spherical coordinates for gravity
Let’s go back to the equation for gravity where the components were given by
I didn’t do any examples last section because using coordinates when you have is just way too annoying. However, in spherical coordinates, the equations become much more manageable. For example, the one for reads:
(17)
Let’s see it in action with an offset sphere.
Solution. We use the offset sphere again: we pick coordinates so that (so the origin is the point , not the center of ). The center of will instead be at . Then by symmetry, we have , and Equation 17 just says
after setting the density to .
Then we can put in the bounds of integration for the offset sphere:
In other words, in the coordinate system we chose, gravity is given by
The magnitude is