Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 4

Lesson 7: Triple integrals# Triple integrals

Triple integrals are the analog of double integrals for three dimensions. They are a tool for adding up infinitely many infinitesimal quantities associated with points in a three-dimensional region.

## Background

Make sure you have a solid grasp of double integrals before reading through this. The main difficulty in understanding multiple integrals is going from the concept of single integration, to that of double integration. After that, as in the case of triple integrals, most of the mental effort goes towards applying the same principles to situations which are a bit trickier to visualize.

## What we're building to

- At the risk of sounding obvious, triple integrals are just like double integrals, but in three dimensions. They are written abstractly aswhere
is some region in three-dimensional space.${R}$

is some scalar-valued function which takes points in three-dimensional space as its input.$f(x,y,z)$ is a tiny unit of volume. In cartesian coordinates, this is expanded as${dV}$ .${dV}=dx{\textstyle \phantom{\rule{0.167em}{0ex}}}dy{\textstyle \phantom{\rule{0.167em}{0ex}}}dz$

- Concretely, these are computed as three embedded integrals:As with double integrals, the bounds of inner integrals might be functions of the outer variables. These bound functions are what encodes the shape of
.${R}$ - Use a three-dimensional integral anytime you get that sensation of wanting to chop up a three-dimensional region into infinitely many pieces, associate each piece with a value, then add them all up. One place where this is surprisingly useful is just finding the volume of three-dimensional regions by adding up all the tiny volumes
.$dV$ - As with double integrals, the hard part is finding the right bounds which encode your region. This just takes some practice, and a willingness to roll up your sleeves and dive into the muck of a problem.

## Example 1: Rectangular prism with variable density

Suppose you have a block of metal in the shape of a rectangular prism with dimensions $3\times 2\times 5$ . However, suppose its density is non-uniform. To be able to describe its density with a three-variable function, let's start by imagining this block in three-dimensional cartesian space.

Specifically, the block is positioned such that

- One corner is sitting at the origin.
- One of its edges of length
rests on the positive$3$ -axis.$x$ - One of its edges of length
rests on the positive$2$ -axis.$y$ - One of its edges of length
rests on the positive$5$ -axis.$z$

Let's say its density at each point is given using the function

(The greek symbol $\rho $ , pronounced "rho", is the typical variable used to represent three-dimensional density.)

Key question: What is the mass of the entire block?

As with other integration problems, we start by imagining chopping up this region into many small pieces. Unlike ordinary integrals, where you chop up a line to get tiny pieces of length $dx$ , or double integrals, where you chop up a two-dimensional area to get tiny pieces of area $dA$ , this time each tiny piece has some volume $dV$ . Ultimately, this tiny volume will be broken down as the product of three tiny lengths, but as you set up the problem it is helpful to just think about it as a little volume.

Concretely, the way you might imagine chopping up this block into tiny pieces is by slicing it in three directions:

- Slice it with planes representing constant values of
.${x}$ - Slice it with planes representing constant values of
.${y}$ - Slice it with planes representing constant values of
.${z}$

Since $\rho (x,y,z)$ is a continuous function, when these tiny pieces are small enough, the density inside any one of them is pretty much constant. For example, as a particular piece shrinks around the point $(2,1,3)$ , its overall density approaches $\rho (2,1,3)=({2}^{2})(1)(\mathrm{cos}(\pi 3)+2)=(4)(1)(1)=4$ . Therefore, the mass of one of these tiny pieces can be written as

Where $(x,y,z)$ is any point inside the piece, and $dV$ is the volume of the piece (the specifics of which are handled by the integral).

Each piece will be a tiny rectangular prism with side lengths $dx$ , $dy$ and $dz$ , the tiny linear changes in the $x$ , $y$ and $z$ -directions. Therefore, the tiny volume is

I think it's important to always think through why $dV$ can be expanded like this, thinking very concretely about the tiny rectangular prism and its edge lengths. I say this because the way to expand it in other coordinate systems, such as cylindrical and spherical coordinate systems, is not so straightforward.

Putting this together, the mass of one of our tiny pieces is

To add up all of these tiny masses, we set up three embedded integrals, each one integrating in the direction of a different coordinate axis.

Notice, the bounds on the inner integral reflect the ${x}$ -values, since ${dx}$ is written before ${dy}$ and ${dz}$ . Similarly, the middle integral is bounded by ${y}$ values, since ${dy}$ is the second differential term listed, and the outer integral reflects the last term, ${dz}$ .

**Concept check**: Work through this triple integral. As a tip, you can keep things relatively tidy by factoring terms out of inner integrals as much as you can.

As you work through one of these computations, it's all-too easy to lose sight of what it represents.

- You can think of the inner most integral as adding up little bits of mass along lines parallel to the
-axis. It returns some expression of$x$ and$y$ , which is a way of saying$z$ "Depending on the choice for the and$y$ coordinates of your line, which is parallel to the$z$ -axis, this is what the sum of the infinitesimal masses along that line will be."$x$ - The next integral, with respect to
, adds up the infinitesimal masses of those lines in the$y$ -direction, giving the infinitesimal mass of a sheet parallel to the$y$ -plane. It will return an expression purely in terms of$xy$ , which says$z$ "Depending on the height of your sheet above the -plane, this is what its infinitesimal mass will be".$xy$ - Finally, the outermost integral adds up the masses of these sheets as
ranges from$z$ to$0$ . It returns a constant, which is the (no-longer-infinitesimal) mass of the block of metal as a whole.$5$

### Example 2: Using a triple integral to compute volume.

You have seen how double integrals can compute the volume under the graph of a two-variable function. Indeed, for most of the regions you might be able to think up, if you are clever enough you can probably figure a way to compute the volume using some kind of double integral.

Remember, the reason double integrals could compute volume is because they took tiny pieces on the $xy$ -plane, with area $dA$ , and multiplied each one by the height of the function above that point, $f(x,y)$ , which gave the infinitesimal volume of a column above the piece with area $dA$ and below the graph.

With triple integrals, we have a stronger tool which can scan through an entire region and add up tiny units of volume as it goes. If for no other reason, doing this can be very good practice for putting bounds on a triple integral without getting bogged down by the function inside.

For example, consider the region $R$ bounded by the following two surfaces:

- The paraboloid
$z={x}^{2}+{y}^{2}$ - The plane
$z=2(x+y+1)$

Here's what those two surfaces look like:

And here's what the three-dimensional region $R$ bound between them looks like:

To find its volume, we start by setting up a deceptively simple looking integral which will add up the volume of all the little pieces you might cut this region into.

All of the difficulty lies in setting up the right bounds of these three integrals to accurately encode the region $R$ .

From definition of $R$ , we get the bounds of $z$ for free:

Since the bounds of $z$ are given as functions of $x$ and $y$ , this suggests that the inner-most integral of our triple integral should be with respect to $z$ . We might start writing the triple integral as follows:

But what do we put for the bounds of the outer two integrals? How far out can $x$ and $y$ go? For this, we must analyze where the two surfaces defining $R$ intersect. This intersection is a closed loop in three-dimensional space, pictured as a red line below.

Now imagine projecting the entire region $R$ onto the $xy$ -plane, which is a way of just focussing on which values of $x$ and $y$ matter.

The red loop marking the intersection between $z={x}^{2}+{y}^{2}$ and $z=2(x+y+1)$ becomes the boundary of the region in the $xy$ -plane that we care about.

This is all visual, but to find the analytic description of this curve, set the equations defining each of our two surfaces equal to each other:

By completing the square for both $x$ and $y$ , we can get an expression which is easier to geometrically interpret.

**Concept check**: What shape does this equation describe?

To describe how $x$ and $y$ range over this region, you can either break it up into vertical stripes or horizontal stripes. For no particular reason, I'll choose horizontal stripes.

We encode the fact that the vertical position of the stripes. ranges from $-1$ to $3$ by making these the bounds of $y$ .

The bounds for $x$ , which describe the left and right ends of each horizontal stripe in our circle, are the two solutions for $x$ in the equation defining the circle:

This means our final integral looks like this:

Isn't that absurd? Welcome to the world of triple integrals.

As a reminder, it's super important to write the differential terms in the right order, in this case, the order is $dz{\textstyle \phantom{\rule{0.167em}{0ex}}}dx{\textstyle \phantom{\rule{0.167em}{0ex}}}dy$ . The bounds of inner integral describe $z$ -values, so $dz$ is listed first, the next integral runs over $x$ -values, so $dx$ is listed second, etc.

The main skill to practice here is setting up the integral, as we have now done. From there, a computer can handle it. But if you want to practice computing one of these triple integrals, by all means, go for it. This particular integral gets out of hand rather quickly.

## Example 3: Volume of a conical region

**Problem**: Setup a triple integral which will find the volume of a region

Here's what this region looks like:

"But wait,"

I hear you say,

"I already know how to compute the volume of a cone!"

That's fine, but seeing how to find that volume with a triple integral will be a good way to stretch our triple integral muscles.

**Concept check**: The region

**Concept check**: Given the two constraints defining our region,

**Concept check**: Based on the answer to the previous question, which of the following describes the region on the

**Concept check**: Which of the following shows the right way to set up our volume integral?

## Summary

- Triple integrals are written abstractly aswhere
is some region in three-dimensional space.${R}$

is some scalar-valued function which takes points in three-dimensional space as its input.$f(x,y,z)$ is a tiny unit of volume. In cartesian coordinates, this is expanded as${dV}$ .${dV}=dx{\textstyle \phantom{\rule{0.167em}{0ex}}}dy{\textstyle \phantom{\rule{0.167em}{0ex}}}dz$

- Concretely, these are computed as three embedded integrals:As with double integrals, the bounds of inner integrals might be functions of the outer variables.
- Use a three-dimensional integral anytime you get that sensation of wanting to chop up a three-dimensional region into infinitely many pieces, associate each piece with a value, then add them all up. One place where this is surprisingly useful is just finding the volume of three-dimensional regions by adding up all the tiny volumes
.$dV$ - As with double integrals, the hard part is finding the right bounds which encode your region. This just takes some practice, and a willingness to roll up your sleeves and dive into the muck of a problem.

## Want to join the conversation?

- A single integral calculates area. Double integrals calculate volume. I do not understand what triple integrals calculate.(5 votes)
- Single integrals can also be used to find the mass of a straight line given density (and you can find center of mass). Double integrals can also be used to find the mass of a thin plate given density (and you can find center of mass, too). This can be extended to triple integrals to find the mass of a solid, or the center of mass of it. But an extension to the area/volume perspective: triple integrals will give the 4D equivalent of volume.(9 votes)

- In example 3, why does our constraint change from y ≤ 2 sqrt(x^2+z^2) to y ≤ 2 sqrt(x^2+y^2) starting from the second concept check?(6 votes)
- That is a typo. It should still be sqrt(x^2+z^2). As you can see, it is the correct statement in the solutions provided (although only one solution is correct) and it is fixed for the rest of the problem. This needs to be flagged as an error.(3 votes)

- Please put some notes up on triple integrals in spherical and cylindrical coordinates if possible.(4 votes)
- Yes, and also some implicit differentiation, both definition and proof, that'd be great. Also there is exists for the moment not an article/video on continuity and differentiation. That's as far as I know atleast.(2 votes)

- in example 3, wouldn't it be easier if we do the triple integral in cylindrical coordinates?(3 votes)
- Are there any tutorials that explain the change of variables formula?(3 votes)
- In the first concept check, wouldn't the term outside the parentheses be multiplied with the ones inside it. Which would mean that we are not able to separate the terms into expressions of x, y, and z?

x^2*y*(cos(πz)+2)dxdydz is what I am talking about.(3 votes)- You can separate terms in double/triple integrals whenever they are pure functions of a variable that's not getting integrated over. For example,

\int \int xy dx dy = \int y \int x dx dy

This makes sense, because an integral will only change if the variable it's getting integrated over changes. The x in the example above is getting integrated over by the outer integral, so it doesn't matter whether it's placed inside or outside of the dy integral, as long as it's still in the dx integral.

I hope this helps.(1 vote)

- why can't a triple integral solve something in the fourth dimension?(2 votes)
- Because triple integrals integrate in three separate directions or in 3D. To integrate in the 4th dimension, you'd need another integral which integrates in the direction of the 4th dimension.(1 vote)

- What graphing tool is used to generate regions in the videos, and, specifically, how is the region in Example 2 generated?(2 votes)
- Love this fine explanation. Thank you!(2 votes)
- Re: Example 2 where the paraboloid is obliquely intersected by a plane:

Intuitively (to me) this seems like it would result in an elliptical region, and the video actually shows an elliptical region in R-2..... and yet the math gives a circle.How can this be?(1 vote)- As you see in the 3-D image, the intersection is tilted with respect to the x-y plane. The equation that you get is actually for the projection of the ellipse onto the x-y plane. Think of it as if you're holding an elliptical sheet of paper or a solid with an elliptical cross-section under a light source. If you tilt the object just right, the shadow it casts will be circular. This is the effect of the z variable not being present; it flattens everything.

To clarify, a circle actually is an ellipse: it's simply a special case of an ellipse, just as a square is a special case of a rectangle.

Therefore, the intersection is an ellipse, and it's projection happens to be a circle. All your observations were correct! I hope this helped. If you still have questions, please ask, and best wishes for your continuing education!(2 votes)