If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Double integrals

Double integrals are a way to integrate over a two-dimensional area.  Among other things, they lets us compute the volume under a surface.

What we're building to

Khan Academy video wrapper
  • Given a two-variable function f, left parenthesis, x, comma, y, right parenthesis, you can find the volume between this graph and a rectangular region of the x, y-plane by taking an integral of an integral,
    y1y2(x1x2f(x,y)dx)This is a function of ydy\begin{aligned} \int_{y_1}^{y_2}\overbrace{\left( \int_{x_1}^{x_2} f(x, y)dx \right)}^{\text{This is a function of $y$}}dy \end{aligned}
    This is called a double integral.
  • You can compute this same volume by changing the order of integration:
    x1x2(y1y2f(x,y)dy)This is a function of xdx\begin{aligned} \int_{x_1}^{x_2}\overbrace{\left( \int_{y_1}^{y_2} f(x, y)dy \right)}^{\text{This is a function of $x$}}dx \end{aligned}
    The computation will look and feel very different, but it still gives the same result.

Volume under a surface

Consider the function
f, left parenthesis, x, comma, y, right parenthesis, equals, x, plus, sine, left parenthesis, y, right parenthesis, plus, 1
Its graph looks like this:
Khan Academy video wrapper
Now consider the rectangle on the x, y-plane defined by
0, is less than, x, is less than, 2
and
minus, pi, is less than, y, is less than, pi
What is the volume above this rectangle, and under the graph of f, left parenthesis, x, comma, y, right parenthesis?
Khan Academy video wrapper

Quick refresh of area under curve

From single variable calculus, we know that integrals let us compute the area under a curve. For example, the area under the graph of y, equals, start fraction, 1, divided by, 4, end fraction, x, squared, plus, 1 between the values x, equals, minus, 3 and x, equals, 3 is
33(14x2+1)dx\begin{aligned} \int_{-3}^{3} \left( \dfrac{1}{4} x^2 + 1 \right) \, dx \end{aligned}
A nice way to think about this is to imagine adding the areas of infinitely many, infinitely thin rectangles which sweep under the curve in the specified region:
Khan Academy video wrapper
You can think of the value of the function g, left parenthesis, x, right parenthesis, equals, start fraction, 1, divided by, 4, end fraction, x, squared, plus, 1 as being the height of each rectangle, d, x as being the infinitesimal width, and integral as being a pumped-up summing machine that's able to handle the idea of infinitely many infinitely small things. Written more abstractly, this looks like
x1x2g(x)dx\begin{aligned} \int_{x_1}^{x_2} g(x)\,dx \end{aligned}

Sweeping area under a volume

For our volume problem, we can do something similar. Our strategy will be to
  1. Subdivide the volume into slices with two-dimensional area
  2. Compute the areas of these slices
  3. Combine them all together to get the volume as a whole.
Think of two-dimensional slices of the volume under the graph of f, left parenthesis, x, comma, y, right parenthesis. Specifically, take all the slices representing a constant value of y:
Khan Academy video wrapper
Consider just one of those slices, such as the one representing y, equals, start fraction, pi, divided by, 2, end fraction. The area of that slice is given by the integral
02f(x,π2)dx=02(x+sin(π2)+1)dx\begin{aligned} \int_0^2 f\left(x, \dfrac{\pi}{2}\right)\,dx &= \int_0^2 \left(x + \sin\left(\dfrac{\pi}{2}\right) + 1 \right)\,dx \end{aligned}
Written more abstractly, for a given value of y, the area of that slice is
02f(x,y)dx\begin{aligned} \int_0^2 f(x, y)\,dx \end{aligned}
Notice, this is an integral with respect to x, as indicated by the d, x, so as far as the integral is concerned, the symbol "y" represents a constant.
When you perform this integral, it will be some expression of y.
Try it for yourself: Perform the integral to compute the area of these constant-y-value slices:
02(x+sin(y)+1)dx=\begin{aligned} \int_0^2 (x+\sin(y)+1)\,dx = \end{aligned}

When you plug in some value of y to this expression, such as y, equals, start fraction, pi, divided by, 2, end fraction, you get the area of a slice of our volume representing that y-value.
Now if we multiply the area of each one of these slices by d, y, a tiny change in the y-direction, we will get a tiny slice of volume. For example, 4, plus, 2, sine, left parenthesis, y, right parenthesis might represent the area of a slice, but left parenthesis, 4, plus, 2, sine, left parenthesis, y, right parenthesis, right parenthesis, d, y represents the infinitesimal volume of that slice.
Using yet another integral, this time with respect to y, we can effectively sum up all those tiny volume slices to get the total volume under the surface:
ππ(02f(x,y)dxArea of a slice)dyVolume under f(x,y)\begin{aligned} \overbrace{ \int_{-\pi}^{\pi}\left( \underbrace{ \int_0^2 f(x, y)dx }_{\text{Area of a slice}} \right)dy }^{\text{Volume under $f(x, y)$}} \end{aligned}
Try it yourself! What do you get when you plug in the expression for integral, start subscript, 0, end subscript, squared, f, left parenthesis, x, comma, y, right parenthesis, d, x that you found above, and solve the second integral?
ππ(02(x+sin(y)+1)dx)dy=\begin{aligned} \int_{-\pi}^{\pi}\left(\int_0^2(x+\sin(y)+1) dx \right)dy = \end{aligned}

Two choices in direction

You could also dissect the volume we are trying to find a different way. Take slices which represent constant x values, instead of constant y values, and add up the volume slices.
Khan Academy video wrapper
Concept check: Which of the following integrals represents the area of a constant-x-value slice?
Choose 1 answer:
Choose 1 answer:

Now imagine multiplying each of these areas by d, x, a tiny step in the x-direction, which is perpendicular to the slice. This will give some kind of infinitesimal volume. By adding up all those infinitesimal volumes as x ranges from 0 to 2, we will get the volume under the surface.
Concept check: Which of the following double-integrals represents the volume under the graph of our function
f, left parenthesis, x, comma, y, right parenthesis, equals, x, plus, sine, left parenthesis, y, right parenthesis, plus, 1
in the region where
0, is less than or equal to, x, is less than or equal to, 2 and minus, pi, is less than or equal to, y, is less than or equal to, pi?
Choose 1 answer:
Choose 1 answer:

Try it yourself!: Perform the double integral to compute the volume under the surface. (Of course, you already found the volume in the previous section, but it is edifying to see how it can be computed a second way).
02(ππ(x+sin(y)+1)dy)dx=\begin{aligned} \int_0^2\left( \int_{-\pi}^{\pi} (x+\sin(y)+1) dy \right) dx = \end{aligned}

Thankfully, this computation gives the same volume that we found in the previous section. Something would have to be wrong with our reasoning if it didn't.
In short, the order of integration does not matter. On the one hand, this might seem obvious, since either way you are computing the same volume. However, these are two genuinely different computations, so the fact that they equal each other turns out to be a useful mathematical trick.
For example, several proofs in probability theory involve showing that two quantities are equal by showing that both result from the same double integral, just computed in a different order.

Another example

Consider the function
f, left parenthesis, x, comma, y, right parenthesis, equals, cosine, left parenthesis, y, right parenthesis, x, squared, plus, 1
What is the volume under the graph of this function in the region where
minus, 1, is less than or equal to, x, is less than or equal to, 1
and
minus, pi, is less than or equal to, y, is less than or equal to, pi?
Here what this volume looks like:
Khan Academy video wrapper
Concept check: Imagine cutting this volume under f, left parenthesis, x, comma, y, right parenthesis, equals, cosine, left parenthesis, y, right parenthesis, x, squared, plus, 1 along the plane representing y, equals, 1. Which of the following integrals represents the area of that slice?
Choose 1 answer:
Choose 1 answer:

Practice: What do you get when you compute this integral for a general value of y, not just y, equals, 1?
11(cos(y)x2+1)dx=\begin{aligned} \int_{-1}^1 \big(\cos(y)x^2 + 1 \big)\, dx = \end{aligned}

More practice: The expression you just found represents the area of slices of our volume representing constant y-values. Using this expression, set up an integral to find the volume under the surface, and solve the integral.
Final volume: \quad

Summary

  • Given a two-variable function f, left parenthesis, x, comma, y, right parenthesis, you can find the volume between its graph and a rectangular region of the x, y-plane by taking an integral of an integral,
    y1y2(x1x2f(x,y)dx)This is a function of ydy\begin{aligned} \int_{y_1}^{y_2}\overbrace{\left( \int_{x_1}^{x_2} f(x, y)dx \right)}^{\text{This is a function of $y$}}dy \end{aligned}
    This is called a double integral.
  • You can compute this same volume by changing the order of integration:
    x1x2(y1y2f(x,y)dy)This is a function of xdx\begin{aligned} \int_{x_1}^{x_2}\overbrace{\left( \int_{y_1}^{y_2} f(x, y)dy \right)}^{\text{This is a function of $x$}}dx \end{aligned}
    The computation will look and feel very different, but it still gives the same result.

Want to join the conversation?