Main content

## Multivariable calculus

### Course: Multivariable calculus > Unit 4

Lesson 5: Double integrals# Double integrals 5

Finding the volume when we have variable boundaries. Created by Sal Khan.

## Want to join the conversation?

- how would you know that y=x^2 if all you are given is that z=xy^2 ?(43 votes)
- They are not dependent on each other.

In the last video, y was a constant or a straight line. In this video, y is a function and y=x^2 was just chosen randomly because it's a familiar graph. Pretty much any function could have been chosen as an example as the y boundary.

z=xy^2 defines the surface at the top of the solid. Sal drew the top as a flat solid, but he does mention the fact that the top actually has the shape of the surface z=xy^2. Visualize the wedge as having a top that is not flat.(25 votes)

- If you integrated with respect to y first (dy*dx, not dx*dy) - would the lower boundary then be y=x^2?(6 votes)
- The lower would be 0, the upper y=x^2(9 votes)

- in question z=xy^2 why did you draw y=x^2(4 votes)
- In this problem you are given 3 pieces of information in order to solve for the volume under the curve z=xy^2.

1) The limits of integration over the z axis, those being z=0 and the curve itself, z=xy^2, which represents the ceiling or upper boundary or limit of integration of the volume on the z axis.

2) The limits of integration over the x axis, those being x=0 to x=1.

3) The limits of integration over the y axis, those being y=0 and y=x^2.

So Sal drew y=x^2 because it was a limit of integration for the problem, NOT because it has any relation with the curve z=xy^2.

This example is to show how to proceed when your limits of integration are themselves functions, or a Sal says, "variable boundaries".

This is a SUPER IMPORTANT skill in multivariable calculus - often figuring out the boundaries of integration is harder than doing the integration itself!

Keep Studying and Keep Asking Questions!(5 votes)

- I don't get intuitively why y does not have variable bounds. Doesn't y "bump into" the curve on the top?(5 votes)
- I don't know if this helps... but.. The first integral we must take into account for the curve, that is why we integrate from the edge of the curve to the x-value "1". Then, when we integrate along the y-axis, we have already taken account of the curve, so we don't need to re-integrate it again. So, we just integrate along it's minimum and maximum limits, from 0 to 1. I hope this makes sense. If not, Sal explains it in Double Integral video number 6.(3 votes)

- at7:42I do not understand why it is our lower bound sqrt of y, from were we concluded that that's the funtion of our curved? thanks(4 votes)
- The curved shape that we are integrating at that moment of the video is bounded by x = 1 on the upper end and by the curve formed by y = x² at the lower end. As Sal says, we don't know what point we would chose, so we need a value of x . We need to put the bounds in terms of
**x**so the next step is to find the inverse of y = x² . We can do that by taking the square root of both side of y = x² which gives √y = x(2 votes)

- I don't get this at all !! at7:44why can't we take the limits for x between 0 and 1 itself?? When we know that x varies between 0 and 1 why are we taking variable limits?? and why have we taken the function y=x^2? why not y=x?? (isn't that way easier to integrate??)

Finally, is a double integral and a surface integral the same???

thanx!(2 votes)- We might want to answer your questions in a slightly different order that you asked them in, just to get some foundation.

Firstly, why are we integrating over y=x^2. This is a good question, and for this video, it is totally arbitrary. What Sal is doing is finding the volume under the surface given by z=f(x,y)=xy^2, but only finding that volume under the domain (x,y plane) of y=x^2. He could just as easily have chosen y=x as one of the domain bounds, or could have chosen the domain to be x^2+y^2 = 1 (then he would be finding the volume contained under a circle of radius 1 on the x-y plane. Choosing y=x is slightly easier, but you have to remember that this is not the function that is being integrated. They only determine the bounds of where we want our integration to start and stop within our domain.

Secondly, why can't we just say x varies from 0-1. Well... This has to do with the bounds given again. if we did that, then we would be finding the volume of the function under the rectangle from x=0 to x=1 and y=0 to y=1. We don't want that. we want to find the volume under the specific curve y=x^2. Now... lets look when y=1/2. At this fixed value of y, we do not start integrating x (the yellow) at 0, but rather at the start of our "curve" on the domain, or y=x^2. This is why this must be used as the lower bound of integration. It has to do with the domain that we are integrating over.

Finally, No this is not the same as a surface integral. Sal covers this in future videos.(5 votes)

- how did you get y=x^2 in the x-y plane?

if the function was other than z=y^2*x ( lets say z=x^3+y) how do i get the function in the x-y plane?(3 votes)- This is a curve given in the video. It is analogous to the boundaries given in the previous videos (x=0 to 1, y=0 to 1 / x=a to b, y=c to d). It is not related directly to the function z.

So, instead of simple scalar boundaries, one is being represented by a function to show the curve given in the video.(1 vote)

- how do you do indefinite double integrals?(2 votes)
- Say I'm double integrating some function f(x,y):

I'm going to have to integrate with respect to either x or y,

As usual, while integrating with respect to one variable, hold the other one constant.

So I'm going to (arbitrarily) integrate with respect to "x" first:

B/c I have no limits of integration, I get the antiderivative of f(x,y) plus some constant of integration g(y)

To motivate the fact that the constant is a function solely of "y" notice that if I take the derivative of g(y) with respect to "x" it must be zero b/c it is constant w/ respect to "x" just like the constant of integration for single variable integrals.

Now just integrate again this time w/ respect to y and don't forget the additive constant h(x)(2 votes)

- In solving a double integral problem is the y=x^2 given as a specification of the bounds on the integral like so : "D:{ 0<x<1 and y=x^2} (D from Domain how i learned the notation) " ?

Or is the problem written as a system : "{ z=xy^2 AND y=x^2}. Solve the volume delimited by these."(2 votes)- The first option Is worded better. Y=x^2 and z=xy^2 are independent.. Y=x^2 Is just the boundary, or the domain. (Same thing)(1 vote)

- At4:46, the transcript says "some them all up" but it should say "sum them all up"(2 votes)

## Video transcript

In all of the double
integrals we've done so far, the boundaries on
x and y were fixed. Now we'll see what happens
when the boundaries on x and y are variables. So let's say I have the same
surface, and I'm not going to draw it the way it looks, I'll
just kind of draw it figuratively. But the problem we're actually
going to do is z, and this is the exact same one we've
been doing all along. The point of here isn't to show
you how to integrate, the point of here is to show you how
to visualize and think about these problems. And frankly, in double integral
problems the hardest part is figuring out the boundaries. Once you do that, the
integration is pretty straightforward. It's really not any harder then
single variable integration. So let's say that's our
surface: z is equal to xy squared. Let me draw the axes again. So that's my x-axis. That's my z-axis. That's my y-axis. x, y, and z. And you saw what this graph
looked like several videos ago. I took out the whole grapher
and we rotated and things. I'm not going to draw the graph
the way it looks; I'm just going to brought fairly
abstractly as just an abstract surface. Because the point here it's
really to figure out the boundaries of integration. Before I actually even draw
the surface, I'm going to draw the boundary. The first time we did this
problem we said, OK, x goes from 0 to 2, y goes from 0 to
1, and then we figured out the volume above that
bounded domain. Now let's do something else. Let's say that x
goes from 0 to 1. And let's say that the volume
that we want to figure out under the surface, it's not
from a fixed y to an upper-bound y. I'll show you: it's
actually a curve. So this is all on the xy plane,
everything I'm drawing here. And this curve, we could view
it two ways: we could say y is a function of x, y is
equal to x squared. Or we could write is equal
to square root of y. We don't have to write plus or
minus or anything like that because we're in the
first quadrant. So this is the area
above which we want to figure out the volume. Let me, yeah, it doesn't hurt
to color it in just so we can really hone in on
what we care about. So that's the area
above which we want to figure out the volume. You could kind of say,
that's our bounded domain. And so x goes from 0 to
1, and then this point is going to be what? That point's going to
be 1 comma 1, right? 1 is equal to 1 squared, 1 is
equal to the square root of 1. So this point is
y is equal to 1. And then I'm not going to
draw this surface exactly. I'm just trying to give you a
sense of what the volume of the figure we're trying
to calculate is. If this is just some arbitrary
surface-- let me do it in a different color --so
this is the top. This line is going vertical
in the z-direction. Actually, I could draw it like
this, like it's a curve. And then this curve back here
is going to be like a wall. And maybe I'll paint this side
of the wall just so you can see what it kind of looks like. Trying my best. Think you get an idea. Let me make it a little darker;
this is actually more of an exercise in art than in
math, in many ways. You get the idea. And then the boundary
here is like this. And this top isn't flat,
you know, it could be curved surface. I do a little like that,
but it's a curved surface. And we know in the example
we're about to do that the surface right here is z
is equal to x squared. So we want to figure out
the volume under this. So how do we do it? Well, let's think about it. We could actually use the
intuition that I just gave you. We're essentially just going to
take a da, which is a little small square down here, and
that little area, that's the same thing as the dx-- let me
use a darker color --as a dx times a dy, and then we just
have to multiply it times f of xy, which is this, for
each area, and then some them all up. And then we could take a sum
in the x-direction first or the y-direction first. Now before doing that, just
to make sure that you have the intuition because the
boundaries are the hard part, let me just draw our xy plane. So let me rotate
it up like that. I'm just going to
draw our xy plane. Because that's what matters. Because the hard part here
is just figuring out our bounds of integration. So the curve is just y is
equal to x squared, look something like that. This is the point
y is equal to 1. This is y-axis, this is
the x-axis, this is the point x is equal to 1. That's not an x, that's a 1. This is the x. Anyway, so we want to figure
out, how do we sum up this dx times dy, or this da,
along this domain? So let's draw it. Let's visually draw it and it
doesn't hurt to do this when you actually have to do
the problem because this frankly is the hard part. A lot of calculus teachers will
just have you set up the integral and then say, OK,
well the rest is easy. Or the rest is Calc 1. OK, so this area, this area
here is the same thing as this area here. So its base is dx and
its height is dy. And then you could imagine
that we're looking at this thing from above. So the surface is up here some
place and we're looking straight down on it, and so
this is just this area. So let's say we wanted to
take the integral with respect to x first. So we want to sum up, so if we
want the volume above this column, first of all, is this
area times dx, dy, right? So let's write the volume
above that column. It's going to be the value of
the function, the height at that point, which is xy
squared times dx, dy. This expression gives us the
volume above this area, or this column right here. And let's say we want the sum
in the x direction first. So we want to sum that dx,
sum one here, sum here, et cetera, et cetera. So we're going to sum
in the x-direction. So my question to you
is, what is our lower bound of integration? Well, we're kind of holding
our y constant, right? And so if we go to the left, if
we go lower and lower x's we kind of bump into
the curve here. So the lower bound
of integration is actually the curve. And what is this curve
if we were to write x is a function of y? This curve is y is equal to
x squared, or x is equal to the square root of y. So if we're integrating with
respect to x for a fixed y right here-- we're integrating
in the horizontal direction first --our lower bound is x is
equal to the square root of y. That's interesting. I think it's the first time
you've probably seen a variable bound integral. But it makes sense because for
this row that we're adding up right here, the upper
bound is easy. The upper bound is
x is equal to 1. The upper bound is x is equal
to 1, but the lower bound is x is equal to the
square root of y. Because you go back like,
oh, I bump into the curve. And what's the curve? Well the curve is x is equal to
the square root of y because we don't know which y we picked. Fair enough. So once we've figured out the
volume-- so that'll give us the volume above this rectangle
right here --and then we want to add up the dy's. And remember, there's a
whole volume above what I'm drawing right here. I'm just drawing this
part in the xy plane. So what we've done just now,
this expression, as it's written right now, figures
out the volume above that rectangle. Now if we want to figure out
the entire volume of the solid, we integrate along the y-axis. Or we add up all the dy's. This was a dy right
here, not a dx. My dx's and dy's
look too similar. So now what is the lower bound
on the y-axis if I'm summing up these rectangles? Well, the lower bound
is y is equal to 0. So we're going to go from
y is equal to 0 to what-- what is the upper bound? --to y is equal to 1. And there you have it. Let me rewrite that integral. So the double integral is going
to be from x is equal to square root of y to x is equal to
1, xy squared, dx, dy. And then the y bound, y
goes from 0 to y to 1. I've just realized
I've run out of time. In the next video we'll
evaluate this, and then we'll do it in the other order. See you soon.