Deadly Boring Math
The Mostest Bestestest FOSS Math Journal on the Internet[citation needed]
Notice a mistake? Contact me at plupy44@gmail.com
How To Contribute
Rendered with Sitix
Mathematical formulas generated via MathJax.
Disclaimer (important!)
By Tyler Clarke in Calculus on 2025-3-30
Howdy, folks! Today we're talking about a much-awaited topic: triple integrals in cylindrical and spherical coordinates. Hooray!
The core idea is that integrals that have a circular (or circle-like; ovals are technically doable, but really annoying) cross-section can be simplified quite a bit by integrating in terms of radius and angles (or radius, angle, and height). For instance, if you're trying to find the area of an 8-unit-high cylinder with a radius 3 circular base, you could do this with the Cartesian triple integral `int_{-3}^{3} int_{-sqrt(9 - x^2)}^{sqrt(9-x^2)} int_0^8 1 dz dy dx`, but that would get really annoying and gross rather quickly. However, because we can describe every point in that cylinder with a radius (distance from z-axis), an angle (counterclockwise on the xy plane), and a height (z), we can rewrite this as the much simpler integral `int_{0}^{2pi} int_{0}^{3} int_0^8 r dz dr d theta`. Much to our luck, all of those bounds are constants! This is very easy to evaluate, and you can probably do it in your head.
There's something a bit strange about this formula. Why `r dz dr d theta` instead of `1 dz dr d theta`? The reasoning here is complicated, and out of the scope of this chapter (it requires taking a Jacobian), but a bit of memorization doesn't hurt: this is the area element for integrals in cylindrical coordinates. Rather like a u-substitution in single variable calculus, we can't just magically switch our integration variables to `r`, `theta`, and `z`; the fact that `dV = r dz dr d theta` is a conveniently memorable way to not do complex math.
We'll add more to that table as we go.
Way back in the bit on 15.6 (so long ago...), we came across a particularly disgusting function, and I briefly hinted at the use of cylindrical coordinates: `int_{0}^{2pi} int_{0}^{2} int_{0}^{4-r^2} 2zr dz dr d theta`. Let's evaluate this, for fun! The inner integral `int_{0}^{4-r^2} 2zr dz` works out (unfortunately) to `|_0^{4 - r^2} z^2 r`. Hooray, binomial expansion... wooo.... I won't bore you with FOILing this out. The end result is `r^5 - 8r^3 + 16r`. Yikes. However, the rest of the integral is surprisingly smooth sailing: the next layer out is `dr`, `int_{0}^{2pi} int_{0}^{2} r^5 - 8r^3 + 16r dr d theta`. This is, for once, simple! We can just apply power rule and be done with it: `|_0^2 frac {r^6} {6} - 2r^4 + 8r^2 = frac {32} {3}`. The remainder is just `int_0^{2pi} frac {32} {3} d theta`, which evaluates to `frac {64 pi } { 3} = 67.0206`. Correct, and a whole lot simpler!
How did I convert that into cylindrical coordinates? Recall we have the absolutely monstrous integral, `int_{-2}^{2} int_{-sqrt(4 - x^2)}^{sqrt(4 - x^2)} int_{0}^{4-x^2-y^2} 2z dz dy dx`. Surprisingly enough, trigonometry saves the day here: we know that `r^2 = x^2 + y^2` (equation for a circle), `x = rcos(theta)`, and `y = rsin(theta)`. the y-bounds are telling: if `y = sqrt(4 - x^2)`, then `y^2 = 4 - x^2`... `x^2 + y^2 = 4`. This is a circle, radius 2! That means r must be between 0 and 2. `theta` is easy as well; because this is a full circle, it must be between `0` and `2pi`. Finally, we have z. We already know that `z = 4 - x^2 - y^2` is the upper bound, and the lower bound of `0` will not change. Notice something interesting? `z = 4 - (x^2 + y^2)`... `z = 4 - r^2`. Easy-peasy! This leaves us with `int_0^{2pi} int_0^2 int_{0}^{4-r^2} 2z dz dy dx`. The bounds are much nicer, but there's a problem: we still have `x` and `y` in here. The area-elements table saves us here: `dz dy dx = dV = r dz dr d theta`. Substitute in, and you get our pleasant and easily solvable integral!
Cylindrical coordinates are nice, but can we go further? Yes. Yes we can. Enter: spherical coordinates. The main difference is that we integrate in terms of `rho`, `theta`, and `phi`, instead of `r`, `theta`, and `z`. `rho` is just the radius, and `phi` is the angle from the z-axis to our target point. We also have a new area element: `dV = rho^2 sin(phi) d rho d phi d theta`. Deriving this is hard, and we won't even cover the maths necessary until 15.8 (tomorrow... yay...), but for now let's add it to the table and trust that it is true.
We also have a bunch of new trigonometry to use. These equations are easy enough to derive on your own, but I'll leave doing so as an exercise to the reader. Note that another set of equations can be easily created to relate all of these to spherical coordinates; I will not do so, but I'd recommend learning the spherical coordinate model well enough to derive them on the fly.
Spherical coordinates are useful for situations where we want to know the area of, say, a radius 5 conical segment of a sphere about the positive z-axis spanning `frac pi 4` radians in every direction. Let's solve this problem!
First order of business is to find the `rho`-bounds. Fortunately, because this shape is cut out of a `rho = 5` sphere, we can immediately intuit that these bounds are `0 <= rho <= 5`. `phi` is similarly easy: because this shape spans `frac pi 4` radians in every direction, it's simply `0 <= phi <= frac pi 4`. And finally, because this is a full cone, the `theta` bounds are `0 <= theta <= 2pi`. Easy! This would be particularly horrible in cartesian or in cylindrical, but it's quite simple in spherical.
Yoinking the spherical area element from our table gives us the full integral: `int_0^{2pi} int_0^{frac pi 4} int_0^5 rho^2 sin(phi) d rho d phi d theta`. The inner integral `int_0^5 rho^2 sin(phi) d rho` is slightly inconvenient, but not really all that bad; it works out to `frac 125 3 sin phi`. The next layer out is `int_0^{frac pi 4} frac 125 3 sin phi d phi`, or `|_0^{frac 4 pi} frac {-125} 3 cos(phi) = frac {-125} 3 (frac { sqrt(2) } { 2 } - 1)`. Not so bad. Because this is constant, we just have to multiply by `2pi` for the outer layer, to get a final result of `2pi frac {-125} 3 (frac { sqrt(2) } { 2 } - 1) = 76.68`
If you haven't fallen in love with cylindrical and spherical coordinates by now, you should probably consider switching to a liberal arts program. Prost!