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
- start color #0c7f99, R, end color #0c7f99 is some region in three-dimensional space.

- f, left parenthesis, x, comma, y, comma, z, right parenthesis is some scalar-valued function which takes points in three-dimensional space as its input.
- start color #bc2612, d, V, end color #bc2612 is a tiny unit of volume. In cartesian coordinates, this is expanded as start color #bc2612, d, V, end color #bc2612, equals, d, x, d, y, d, z.

- 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 start color #0c7f99, R, end color #0c7f99.
- 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 d, V.
- 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 3 rests on the positive x-axis.
- One of its edges of length 2 rests on the positive y-axis.
- One of its edges of length 5 rests on the positive z-axis.

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 d, x, or double integrals, where you chop up a two-dimensional area to get tiny pieces of area d, A, this time each tiny piece has some volume d, V. 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 start color #0c7f99, x, end color #0c7f99.
- Slice it with planes representing constant values of start color #bc2612, y, end color #bc2612.
- Slice it with planes representing constant values of start color #0d923f, z, end color #0d923f.

Since rho, left parenthesis, x, comma, y, comma, z, right parenthesis 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 left parenthesis, 2, comma, 1, comma, 3, right parenthesis, its overall density approaches rho, left parenthesis, 2, comma, 1, comma, 3, right parenthesis, equals, left parenthesis, 2, squared, right parenthesis, left parenthesis, 1, right parenthesis, left parenthesis, cosine, left parenthesis, pi, 3, right parenthesis, plus, 2, right parenthesis, equals, left parenthesis, 4, right parenthesis, left parenthesis, 1, right parenthesis, left parenthesis, 1, right parenthesis, equals, 4. Therefore, the mass of one of these tiny pieces can be written as

Where left parenthesis, x, comma, y, comma, z, right parenthesis is any point inside the piece, and d, V 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 d, x, d, y and d, z, 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 d, V 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 start color #0c7f99, x, end color #0c7f99-values, since start color #0c7f99, d, x, end color #0c7f99 is written before start color #bc2612, d, y, end color #bc2612 and start color #0d923f, d, z, end color #0d923f. Similarly, the middle integral is bounded by start color #bc2612, y, end color #bc2612 values, since start color #bc2612, d, y, end color #bc2612 is the second differential term listed, and the outer integral reflects the last term, start color #0d923f, d, z, end color #0d923f.

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

### 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 x, y-plane, with area d, A, and multiplied each one by the height of the function above that point, f, left parenthesis, x, comma, y, right parenthesis, which gave the infinitesimal volume of a column above the piece with area d, A 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, equals, x, squared, plus, y, squared
- The plane z, equals, 2, left parenthesis, x, plus, y, plus, 1, right parenthesis

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 x, y-plane, which is a way of just focussing on which values of x and y matter.

The red loop marking the intersection between z, equals, x, squared, plus, y, squared and z, equals, 2, left parenthesis, x, plus, y, plus, 1, right parenthesis becomes the boundary of the region in the x, y-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 minus, 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 d, z, d, x, d, y. The bounds of inner integral describe z-values, so d, z is listed first, the next integral runs over x-values, so d, x 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 R defined by the following properties:

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 R is defined using bounds for y, so which of the following is a valid way to start setting up the integral?

**Concept check**: Given the two constraints defining our region, y, is greater than or equal to, 0 and y, is less than or equal to, 2, minus, square root of, x, squared, plus, z, squared, end square root, how can you find the values of x and z within R?

**Concept check**: Based on the answer to the previous question, which of the following describes the region on the x, z-plane that captures all values of x and z that our triple integral needs to cover.

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

## Summary

- Triple integrals are written abstractly aswhere
- start color #0c7f99, R, end color #0c7f99 is some region in three-dimensional space.

- f, left parenthesis, x, comma, y, comma, z, right parenthesis is some scalar-valued function which takes points in three-dimensional space as its input.
- start color #bc2612, d, V, end color #bc2612 is a tiny unit of volume. In cartesian coordinates, this is expanded as start color #bc2612, d, V, end color #bc2612, equals, d, x, d, y, d, z.

- 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 d, V.
- 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.(8 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)
- 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)

- Are there any tutorials that explain the change of variables formula?(2 votes)
- 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)

- in the concept check in example 3 z and y are switched(2 votes)