Cookies   I display ads to cover the expenses. See the privacy policy for more information. You can keep or reject the ads.

# Triple integrals 1 | Double and triple integrals | Multivariable Calculus | Khan Academy

Let's say I wanted to find the volume of a cube, where the
values of the cube-- let's say x is between-- x is greater
than or equal to 0, is less than or equal to,
I don't know, 3.
Let's say y is greater than or equal to 0, and is
less than or equal to 4.
And then let's say that z is greater than or equal to 0 and
is less than or equal to 2.
And I know, using basic geometry you could figure out--
you know, just multiply the width times the height times
the depth and you'd have the volume.
But I want to do this example, just so that you get used to
what a triple integral looks like, how it relates to a
double integral, and then later in the next video we could do
something slightly more complicated.
So let's just draw that, this volume.
So this is my x-axis, this is my z-axis, this is the y.
x, y, z.
OK.
So x is between 0 and 3.
So that's x is equal to 0.
This is x is equal to-- let's see, 1, 2, 3.
y is between 0 and 4.
1, 2, 3, 4.
So the x-y plane will look something like this.
The kind of base of our cube will look something like this.
And then z is between 0 and 2.
So 0 is the x-y plane, and then 1, 2.
So this would be the top part.
And maybe I'll do that in a slightly different color.
So this is along the x-z axis.
You'd have a boundary here, and then it would
come in like this.
You have a boundary here, come in like that.
A boundary there.
So we want to figure out the volume of this cube.
And you could do it.
You could say, well, the depth is 3, the base, the width is 4,
so this area is 12 times the height.
12 times 2 is 24.
You could say it's 24 cubic units, whatever
units we're doing.
But let's do it as a triple integral.
So what does a triple integral mean?
Well, what we could do is we could take the volume of a very
small-- I don't want to say area-- of a very small volume.
So let's say I wanted to take the volume of a small cube.
Some place in this-- in the volume under question.
And it'll start to make more sense, or it starts to become a
lot more useful, when we have variable boundaries and
surfaces and curves as boundaries.
But let's say we want to figure out the volume of this
little, small cube here.
That's my cube.
It's some place in this larger cube, this larger rectangle,
cubic rectangle, whatever you want to call it.
So what's the volume of that cube?
Let's say that its width is dy.
So that length right there is dy.
It's height is dx.
Sorry, no, it's height is dz, right?
The way I drew it, z is up and down.
And it's depth is dx.
This is dx.
This is dz.
This is dy.
So you can say that a small volume within this larger
volume-- you could call that dv, which is kind of the
volume differential.
And that would be equal to, you could say, it's just
the width times the length times the height.
dx times dy times dz.
And you could switch the orders of these, right?
Because multiplication is associative, and order
doesn't matter and all that.
But anyway, what can you do with it in here?
Well, we can take the integral.
All integrals help us do is help us take infinite sums of
infinitely small distances, like a dz or a dx or
a dy, et cetera.
So, what we could do is we could take this cube and
first, add it up in, let's say, the z direction.
So we could take that cube and then add it along the up and
down axis-- the z-axis-- so that we get the
volume of a column.
So what would that look like?
Well, since we're going up and down, we're adding-- we're
taking the sum in the z direction.
We'd have an integral.
And then what's the lowest z value?
Well, it's z is equal to 0.
And what's the upper bound?
Like if you were to just take-- keep adding these cubes, and
keep going up, you'd run into the upper bound.
And what's the upper bound?
It's z is equal to 2.
And of course, you would take the sum of these dv's.
And I'll write dz first.
Just so it reminds us that we're going to
take the integral with respect to z first.
And let's say we'll do y next.
And then we'll do x.
So this integral, this value, as I've written it, will
figure out the volume of a column given any x and y.
It'll be a function of x and y, but since we're dealing with
all constants here, it's actually going to be
a constant value.
It'll be the constant value of the volume of one
of these columns.
So essentially, it'll be 2 times dy dx.
Because the height of one of these columns is 2,
and then its with and its depth is dy and dx.
So then if we want to figure out the entire volume-- what
we did just now is we figured out the height of a column.
So then we could take those columns and sum them
in the y direction.
So if we're summing in the y direction, we could just take
another integral of this sum in the y direction.
And y goes from 0 to what? y goes from 0 to 4.
I wrote this integral a little bit too far to the
left, it looks strange.
But I think you get the idea.
y is equal to 0, to y is equal to 4.
And then that'll give us the volume of a sheet that is
parallel to the zy plane.
And then all we have left to do is add up a bunch of those
sheets in the x direction, and we'll have the volume
of our entire figure.
So to add up those sheets, we would have to sum
in the x direction.
And we'd go from x is equal to 0, to x is equal to 3.
And to evaluate this is actually fairly
straightforward.
So, first we're taking the integral with respect to z.
Well, we don't have anything written under here, but we
can just assume that there's a 1, right?
Because dz times dy times dx is the same thing as
1 times dz times dy dx.
So what's the value of this integral?
Well, the antiderivative of 1 with respect to
z is just z, right?
Because the derivative of z is 1.
And you evaluate that from 2 to 0.
So then you're left with-- so it's 2 minus 0.
So you're just left with 2.
So you're left with 2, and you take the integral of that from
y is equal to 0, to y is equal to 4 dy, and then
you have the x.
From x is equal to 0, to x is equal to 3 dx.
And notice, when we just took the integral with respect to
z, we ended up with a double integral.
And this double integral is the exact integral we would have
done in the previous videos on the double integral, where you
would have just said, well, z is a function of x and y.
So you could have written, you know, z, is a function of x
and y, is always equal to 2.
It's a constant function.
It's independent of x and y.
But if you had defined z in this way, and you wanted to
figure out the volume under this surface, where the surface
is z is equal to 2-- you know, this is a surface, is z
is equal to 2-- we would have ended up with this.
So you see that what we're doing with the triple
integral, it's really, really nothing different.
And you might be wondering, well, why are we
doing it at all?
And I'll show you that in a second.
But anyway, to evaluate this, you could take the
antiderivative of this with respect to y, you get 2y-- let
me scroll down a little bit.
You get 2y evaluating that at 4 and 0.
And then, so you get 2 times 4.
So it's 8 minus 0.
And then you integrate that from, with respect
to x from 0 to 3.
So that's 8x from 0 to 3.
So that'll be equal to 24 four units cubed.
So I know the obvious question is, what is this good for?
Well, when you have a kind of a constant value within
the volume, you're right.
You could have just done a double integral.
But what if I were to tell you, our goal is not to figure out
the volume of this figure.
Our goal is to figure out the mass of this figure.
And even more, this volume-- this area of space or
whatever-- its mass is not uniform.
If its mass was uniform, you could just multiply its uniform
density times its volume, and you'd get its mass.
But let's say the density changes.
It could be a volume of some gas or it could be even some
material with different compounds in it.
So let's say that its density is a variable function
of x, y, and z.
So let's say that the density-- this row, this thing that looks
like a p is what you normally use in physics for density-- so
its density is a function of x, y, and z.
Let's-- just to make it simple-- let's make
it x times y times z.
If we wanted to figure out the mass of any small volume, it
would be that volume times the density, right?
Because density-- the units of density are like kilograms
per meter cubed.
So if you multiply it times meter cubed, you get kilograms.
So we could say that the mass-- well, I'll make up notation, d
mass-- this isn't a function.
Well, I don't want to write it in parentheses, because it
makes it look like a function.
So, a very differential mass, or a very small mass, is going
to equal the density at that point, which would be xyz,
times the volume of that of that small mass.
And that volume of that small mass we could write as dv.
And we know that dv is the same thing as the width times
the height times the depth.
dv doesn't always have to be dx times dy times dz.
If we're doing other coordinates, if we're doing
polar coordinates, it could be something slightly different.
And we'll do that eventually.
But if we wanted to figure out the mass, since we're using
rectangular coordinates, it would be the density function
at that point times our differential volume.
So times dx dy dz.
And of course, we can change the order here.
So when you want to figure out the volume-- when you want to
figure out the mass-- which I will do in the next video, we
essentially will have to integrate this function.
As opposed to just 1 over z, y and x.
And I'm going to do that in the next video.
And you'll see that it's really just a lot of basic taking
antiderivatives and avoiding careless mistakes.
I will see you in the next video.