Chapter 26. Triple integrals

We’re going to now consider integrals with three variables, rather than two. If you understood double integrals, then triple integrals is more of the same:

Idea
All the two-variable stuff ports over to three-variable stuff in the obvious way.

§26.1 [RECAP] Recap of triple integrals

I’m cheekily calling this section a “recap” to emphasize that there’s nothing new to learn here. Everything in the below list corresponds to a double integral thing you learned except with three variables rather than two.

One notational change: for 3D solids, I’ll prefer to use the letter 𝒯︀ instead of ℛ︀ for a 3D region moving forward. The reason is that much later on when we discuss the divergence theorem, we’ll sometimes have both a 2D region and 3D region at the same time, so one needs different letters.

§26.2 [TEXT] Examples of triple integrals

Sample Question
Compute the volume of the region bounded by 𝑥2+𝑦2≤1 and 𝑥2+𝑧2≤1.

Solution. Both inequalities must be satisfied simultaneously. Notice that for a fixed 𝑥, both 𝑦 and 𝑧 are bounded by:

𝑦2≤1−𝑥2⟹−1−𝑥2≤𝑦≤1−𝑥2,𝑧2≤1−𝑥2⟹−1−𝑥2≤𝑧≤1−𝑥2.

The variable 𝑥 ranges from −1 to 1.

Hence, we will write this as a triple integral

Vol(𝒯︀)=∫𝑥=−11∫𝑦=−1−𝑥21−𝑥2∫𝑧=−1−𝑥21−𝑥21d𝑧d𝑦d𝑥=∫𝑥=−11∫𝑦=−1−𝑥21−𝑥221−𝑥2d𝑦d𝑥=∫𝑥=−1121−𝑥2∫𝑦=−1−𝑥21−𝑥21d𝑦d𝑥=∫𝑥=−1121−𝑥2⋅21−𝑥2d𝑥=∫𝑥=−114(1−𝑥2)d𝑥=4[𝑥−𝑥33]𝑥=−11=4[(1−13)−(−1+13)]=163.

□

Digression on picture

If you draw a picture of the region, you get the intersection of these two cylinders which forms something apparently called a Steinmetz solid.

Surprisingly, you actually don’t want to use polar (or cylindrical) coordinates on this example. If you try to do so, I think you’ll actually get stuck. Straight 𝑥𝑦𝑧-integration turns out to work because of the unexpectedly convenient fact that you get two square roots that miraculously cancel.

Sample Question
Compute the volume of the region bounded by the surfaces 𝑧=3(𝑥2+𝑦2) and 𝑧=72−5(𝑥2+𝑦2).

Solution. The given surfaces are both paraboloids:

  1. 𝑧=3(𝑥2+𝑦2) is an upward-opening paraboloid.
  2. 𝑧=72−5(𝑥2+𝑦2) is a downward-opening paraboloid.

Before diving in, let’s figure out where these two intersect. If we set these equal we get

3(𝑥2+𝑦2)=72−5(𝑥2+𝑦2)⟹𝑥2+𝑦2=9.

With that in mind, we can convert the region 𝒯︀ to an inequality format: we write

3(𝑥2+𝑦2)≤𝑧≤72−5(𝑥2+𝑦2)

for the constraint on 𝑧 and then

𝑥2+𝑦2≤9

for the constraint on 𝑥 and 𝑦.

Hence, the volume can be written as

Vol(𝒯︀)=∭𝑥2+𝑦2≤93(𝑥2+𝑦2)≤𝑧≤72−5(𝑥2+𝑦2)d𝑥d𝑦d𝑧.

We’ll separate the integral into an integral over the circle 𝑥2+𝑦2≤9 and then a single integral over the resulting 𝑧:

Vol(𝒯︀)=∬𝑥2+𝑦2≤9(∫𝑧=3(𝑥2+𝑦2)72−5(𝑥2+𝑦2)d𝑧)d𝑥d𝑦=∬𝑥2+𝑦2≤9(72−8(𝑥2+𝑦2))d𝑥d𝑦.

At this point we’ll use polar coordinates: writing 𝑥=𝑟cos𝜃, and 𝑦=𝑟sin𝜃 as always, we have

Vol(𝒯︀)=∬𝑥2+𝑦2≤9(72−8(𝑥2+𝑦2))d𝑥d𝑦=∫𝜃=02𝜋∫𝑟=03(72−8𝑟2)⋅(𝑟d𝑟d𝜃)=(∫𝜃=02𝜋1d𝜃)(∫𝑟=03(72𝑟−8𝑟3)d𝑟)=2𝜋⋅[36𝑟2−2𝑟4]𝑟=03=324𝜋.

□

This previous example shows how, because of the way the problem was set, it was natural to do the integral for 𝑧 separately but do 𝑥 and 𝑦 with polar coordinates. This technique is called cylindrical coordinates, a name that doesn’t need to exist because it’s just polar coordinates with 𝑧 tacked on.

(Actually, I think the most surprising thing is the example we need with the Steinmetz solid earlier is not good to do with cylindrical coordinates, despite appearances.)

§26.3 [TEXT] Cylindrical coordinates (i.e. polar with 𝑧 tacked on)

There’s actually nothing new happening here — it’s just polar coordinates with 𝑧 tacked on.22 If you were able to do the earlier example with 𝑧=3(𝑥2+𝑦2) and 𝑧=72−5(𝑥2+𝑦2) by yourself without reading the solution, then you can safely skip this entire section!

The transition map (𝑟,𝜃,𝑧)↦(𝑥,𝑦,𝑧), illustrated in Figure 57, is given by

𝑥=𝑟cos𝜃𝑦=𝑟sin𝜃𝑧=𝑧.

Figure 57: Picture of cylindrical coordinates. The 𝑥𝑦-plane (now drawn as “flat” is just polar coordinates, as suggested by the blue circle. And then we tack on a height 𝑧.

The volume scaling factor is unsurprisingly the same as the one for 2D polar coordinates, and you may have used it implicitly on some previous problem sets already:

Memorize: Scaling factor for cylindrical coordinates
d𝑉≔d𝑥d𝑦d𝑧=𝑟d𝑟d𝜃d𝑧.

If you want to see this fully explicitly, you could compute the Jacobian

det𝐽polar=|𝜕𝑥𝜕𝑟𝜕𝑥𝜕𝜃𝜕𝑥𝜕𝑧𝜕𝑦𝜕𝑟𝜕𝑦𝜕𝜃𝜕𝑦𝜕𝑧𝜕𝑧𝜕𝑟𝜕𝑧𝜕𝜃𝜕𝑧𝜕𝑧|=|cos𝜃−𝑟sin𝜃0sin𝜃𝑟cos𝜃0001|=|cos𝜃−𝑟sin𝜃sin𝜃𝑟cos𝜃|=𝑟.

OK, let’s run the example. Note that, as I said, we could have given this example before this section.

Sample Question
Compute the volume and center of mass of the cone defined by 9(𝑥2+𝑦2)≤𝑧2 and 0≤𝑧≤5, assuming uniform density distribution 𝛿=1.

Solution. The given inequalities describe a single cone with its apex at the origin, extending upwards to 𝑧=5. To solve for both the volume and the center of mass, we’ll employ cylindrical coordinates due to the symmetry of the cone. As always, 𝒯︀ denotes the region (cone).

The values of 𝑧 that appear at all are 𝑧=0 to 5, and within them we have only the requirement that

9(𝑥2+𝑦2)≤𝑧2⟹𝑥2+𝑦2≤𝑧3.

In other words, we can write

Vol(𝒯︀)=∫𝑧=05∬𝑥2+𝑦2≤𝑧31d𝑥d𝑦d𝑧.

However, of course we should just change to cylindrical coordinates right away:

Vol(𝒯︀)=∫𝑧=05∫𝑟=0𝑧3∫𝜃=02𝜋𝑟d𝜃d𝑟d𝑧=2𝜋∫𝑧=05∫𝑟=0𝑧3𝑟d𝑟d𝑧=2𝜋∫𝑧=05[𝑟22]𝑟=0𝑧3d𝑧=2𝜋∫𝑧=05𝑧218d𝑧=𝜋9∫𝑧=05𝑧2d𝑧=𝜋9[𝑧33]𝑧=05=125𝜋27.

This gives us the volume of the cone. And since the density was constant, we also have Mass(𝒯︀)=Vol(𝒯︀)=125𝜋27.

As for the center of mass, nominally there are three integrals, but again we can shortcut the calculation by noting that by symmetry the center of mass (𝑥̅,𝑦̅,𝑧̅) should lie on the 𝑧-axis, meaning 𝑥̅=𝑦̅=0. Hence the only one we need to bother with is

𝑧̅=1Mass(𝒯︀)∫𝑧=05∬𝑥2+𝑦2≤𝑧3𝑧d𝑥d𝑦d𝑧=1Mass(𝒯︀)∫𝑧=05∫𝑟=0𝑧3∫𝜃=02𝜋𝑟𝑧d𝜃d𝑟d𝑧=1Mass(𝒯︀)∫𝑧=05𝑧∫𝑟=0𝑧3∫𝜃=02𝜋𝑟d𝜃d𝑟d𝑧=2𝜋Mass(𝒯︀)∫𝑧=05𝑧⋅𝑧218d𝑧(repeating from earlier)=2𝜋Mass(𝒯︀)[𝑧472]𝑧=05=54⋅𝜋36Mass(𝒯︀)=54⋅𝜋3653⋅𝜋27=154.

Hence the center of mass is (0,0,154).□

§26.4 [TEXT] Gravity

Type signature
Gravitational force is a vector.

Suppose a point of mass 𝑚 is located at the origin 𝑂=(0,0,0). In general, given a mass 𝑚 at a point 𝑂 and a point of mass 𝑀 at a point 𝑃, Newton’s law says the gravitational force exerted by 𝑃 on 𝑂 is

𝐅gravity=𝐺⋅𝑚⋅𝑀|𝑂𝑃|2⋅𝑂𝑃⃗|𝑂𝑃|⏟unit vector from𝑂to𝑃

where 𝐺≈6.67430⋅10−11⋅N⋅m2⋅kg−2 is the gravitational constant.

But in real life, we usually want our mass 𝑀 to take up a whole region 𝒯︀, with some density 𝛿. (Point masses don’t occur in real life unless you count black holes.) So let’s suppose we have a solid mass occupying region 𝒯︀. In that case, each individual point 𝑃=(𝑥,𝑦,𝑧) in 𝒯︀ can be thought of a vector

Gravity exerted by(𝑥,𝑦,𝑧)on(0,0,0)=𝐺𝑚⋅(𝛿(𝑥,𝑦,𝑧)d𝑉)𝑥2+𝑦2+𝑧2⋅⟨𝑥,𝑦,𝑧⟩𝑥2+𝑦2+𝑧2⏟unit vector from𝑂to𝑃.

The total gravitational force is then the integral of this over the entire mass 𝒯︀.

Figure 58: The force of gravity exerted by a large mass 𝒯︀ such as the sun on a point mass of mass 𝑚. Each individual point like 𝑃 or 𝑄 in the region 𝒯︀ exerts a tiny force on the point mass of mass 𝑚. The total gravitational force is the sum (integral) across the whole region 𝒯︀.

So the total gravitational force is nominally

𝐆=∫𝒯︀𝐺𝑚⋅(𝛿(𝑥,𝑦,𝑧)d𝑉)𝑥2+𝑦2+𝑧2⋅⟨𝑥,𝑦,𝑧⟩𝑥2+𝑦2+𝑧2.

(12)

Now, if you have been following my advice to always audit type safety, then you should stop me right here. This is the first time in the entire notes that I’ve had an integral where the integrand is a vector rather than the number. What’s going on?

The general answer is that you should just do everything component wise. But to keep things simple for the course, I will never use Equation 12 in that form, so that our integrands always have type number rather than type vector. To do this, I’ll rewrite Equation 12 as follows:

Memorize: Gravitational attraction of a region on the origin

Suppose 𝒯︀ is a region with density function 𝛿. The gravitational vector 𝐆=⟨𝐺1,𝐺2,𝐺3⟩ on the origin is defined by

𝐺1≔𝐺𝑚∭𝒯︀𝑥𝛿(𝑥,𝑦,𝑧)(𝑥2+𝑦2+𝑧2)32d𝑥d𝑦d𝑧𝐺2≔𝐺𝑚∭𝒯︀𝑦𝛿(𝑥,𝑦,𝑧)(𝑥2+𝑦2+𝑧2)32d𝑥d𝑦d𝑧𝐺3≔𝐺𝑚∭𝒯︀𝑧𝛿(𝑥,𝑦,𝑧)(𝑥2+𝑦2+𝑧2)32d𝑥d𝑦d𝑧.

That is, 𝐆=𝐺1𝐞1+𝐺2𝐞2+𝐺3𝐞3.

Now 𝐺1, 𝐺2, 𝐺3 are integrals of numbers again, so we’re fine.

Because the (𝑥2+𝑦2+𝑧2)32 is so awkward to work with, you will commonly do a certain change-of-variables called spherical coordinates. So we’ll punt all the examples to next chapter, Chapter 27.

§26.5 [EXER] Exercises

Exercise 26.1 (Napkin-ring problem). Let 𝑅>𝑎>0 be given real numbers, and let ℎ≔2𝑅2−𝑎2. A cylindrical hole of radius 𝑎 is drilled through the center of a wooden ball of radius 𝑅 to get a bead of height ℎ, as shown in Figure 59. Compute the volume of the resulting bead as a function of ℎ.

Figure 59: The napkin-ring problem. A bead is shown in blue, drilled out of a sphere of radius 𝑅, and with height ℎ=2𝑅2−𝑎2. One must determine the volume of the bead in terms of ℎ.
  1. 22 Technically, we maybe should use a different letter for the new 𝑧, but since they’re equal we just use the same letter in both places. Also, in principle, I could also introduce a notation (𝑟,𝜃,𝑧)cyl analogous to (𝑟,𝜃)pol, but I don’t think I’ll have a need to do so.