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 beyond volume

Double integrals do more than find volume under three-dimensional graphs.  Here we cover other uses, a more general notation for double integrals, and explain the "feel" of double integration.

What we're building to

  • Double integrals are used anytime you get that feeling where you want to chop up a two-dimensional region into infinitely many infinitely small areas, multiply each one by some value, then add them up.
  • The more general notation for a double integral is
    RfdA
    where
  • R is the region that you are integrating over.
  • dA signifies a "tiny chunk of area", which typically means dxdy or dydx, unless another coordinate system is being used.
  • f(x,y) is a two-variable function.

Example 1: Mass of a plate

Imagine a metal plate 3 meters wide and 2 meters tall. Our goal will be to find its mass based on its density, but the catch is that the density is not constant over the plate.
To be able to describe this variable density with a function, start by situating the plate on the xy-plane:
Its lower left corner at the origin, and its long side resting on the x-axis.
Let's say that the density of this plate, in kg/m2, is expressed with the following function.
σ(x,y)=(sin(πx)+1)y
(σ is a typical variable name for two-dimensional density). Density is mass per unit area, so it might seem strange to define it using a function which takes in individual points. After all, what does it mean for a single point like (1,2) to have density σ(1,2)? If you prefer, you can interpret this function as giving the density within tiny region around each point.
To find the mass of the plate, you can imagine chopping it up into many tiny pieces, each one a rectangle, then adding up their masses.
Think of each of these rectangles as having a tiny width, dx, and a tiny height, dy.
Think about a specific rectangle, perhaps the one containing the point (1,2). Since this rectangle is really small, the density within it will pretty much equal the constant σ(1,2). The more finely you cut things, and the smaller the rectangles, the closer it is to being true that the density of each rectangle is constant.
This means we can find the mass of each such rectangle. For example,
σ(1,2)densitydxdytiny area=(sin(π)+1)(2)dxdy=2dxdy
To get the total mass of the plate, we integrate all of these tiny masses together. Since we are integrating over a two-dimensional region, we use a double integral. Caution: the order of your integrals depends on whether you express the tiny area of each rectangle as dxdy or dydx
Concept check: Which of the following double integrals represents the mass of our metal plate, which is 3 meters wide and 2 meters tall:
Choose 1 answer:

Concept check: Using the function σ(x,y)=(sin(πx)+1)y, evaluate this double integral. (If you are unsure about how to do this, consider reviewing the article introducing double integrals)
0203(sin(πx)+1)ydxdy= =

Thinking about tiny areas

Khan Academy video wrapper
When I first introduced double integrals, it was in the context of computing the volume under a graph. The thought process went something like this:
  • First cut the volume into infinitely many slices. Each slice represents a constant value for one of the variables, for example x=0.78.
  • Find the area of each of those slices. (This is what the inner integral does).
  • Make each slice an infinitesimal volume by giving it a little depth. Mathematically, this means multiplying the area of each slice by either dx or dy, whichever one represents a tiny step perpendicular to the slice.
  • Integrate those infinitesimal volumes together to get the volume of the solid as a whole. (This is what the outer integral does).
By contrast, the example from the previous section finding the mass of the plate has a different look and feel to it. We start by thinking about tiny areas, then we multiply each one by a constant (the density) and try to add all of them together at once.
Of course, both these perspectives are equivalent. And when it comes to the computation, nothing will look different. You will always set up one integral inside another, compute the inner integral, then compute the outer integral.
Nevertheless, in terms of visualization and conceptual understanding, framing a double integral in terms of tiny areas is distinct from framing it as one linear integral inside another. For example, if you thought about computing the volume under a graph by initially breaking your region of the xy-plane down into tiny areas, you might imagine adding together the volume of thin columns above those tiny areas.
Khan Academy video wrapper

General notation for double integrals

When we think about a double integral with respect to tiny areas, it's common to write it abstractly like this:
RfdA

R

R represents the region that we are integrating over. The reason for writing it like this is that while you are setting things up, or reasoning about double integrals in general, you typically don't want to get bogged down with the specific (and potentially complicated) definition of your region while you scribble things down.
When it comes time to compute the integral, we replace this R with an actual pair of single-integrals with bounds that can be computed. When R is a rectangle, those bounds will be constants:
y1y2x1x2
More generally, when R is defined in terms of some curves in the xy-plane, the bounds of the inner integral are expressed as functions of the outer variable:
y1y2x1(y)x2(y)
(See the last article for practice with this idea.)

dA

dA represents a tiny area, in the same way that dx represents a tiny length in an ordinary integral.
You will typically imagine chopping up the region R into many tiny pieces, and this term represents the area of one of those pieces. Once you get down to computing the double integral, you will replace this with dxdy, or dydx. In other coordinate systems, there are different ways to break down dA, but I'll leave that for the next article.

f(x,y)

f(x,y) is some two-variable function. When you chop up your region into many tiny pieces, each piece typically represents some value that you are hoping to add up. Perhaps this value is a tiny bit of mass, or the tiny volume of a slim column under a graph.
Hopefully, you are able to express this tiny amount as something times the area of your tiny piece. For example, the mass of a piece is its density times its area; and the volume of a column above a piece is the height of the column times the area.
In these examples, f(x,y) represents density, or height. In general, it is the thing that needs to be multiplied by the area dA of a tiny piece, and it generally depends on the position of that tiny piece, expressed with (x,y)-coordinates.
"What if I cannot express the tiny value that I want to add up as something times dA?"
Well, in that case my friend, double integrals are not the tool for you. Although I cannot think of any examples where that comes up...
There are two benefits to this abstract notation:
  • Simplicity: When you're starting to set something up, or if you want to quickly reference the idea of a certain double integral without getting into the implementation details, it's nice to be able to write something quickly. Also, many of the theorems and tools coming up in multivariable calculus are expressed abstractly in this notation.
  • Generality: Writing your integral as RfdA gives you options as you sit down to compute it. For example, in the next article, we will cover double integrals in polar coordinates, in which case the way you expand dA and the way you put bounds on the two integrals are different than they are for cartesian coordinates.

Example 2: Center of mass

What is the center of mass of a half-disk?
For simplicity, let's say the radius of the disk is 1, and let's orient it such that the diameter rests on the y-axis. Also, assume the disk has uniform density everywhere.
This is a pretty interesting problem, don't you think? You can guess that the answer is something slightly to the left of (0.5,0), but it's not obvious what the specific answer should be, is it?
By the vertical symmetry of this half-disk, you can know that the center of mass will lie on the x-axis. In a sense, what we're looking for is the "average x-value" of points in the disk.
Concept check: If we let H represent this half-disk, with |H| representing its area, which of the following abstractly written integrals represents the x-value for the center of mass of H?
Choose 1 answer:

Concept check: What is the area of the half-disk H?
|H|=

Concept check: Which of the following represents the right way to expand the integral HxdA into a computable form?
Choose all answers that apply:

Bring it on home: Solve this integral, and use it to find the center of mass of H.
x-coordinate of center of mass:

Summary

Double integrals are used anytime you get that feeling where you want to chop up a two-dimensional region into infinitely many infinitely small areas, multiply each one by some value, then add them up.
The more general notation for a double integral is
RfdA
where
  • R is the region that you are integrating over.
  • dA signifies a "tiny chunk of area", which typically means dxdy or dydx, unless another coordinate system is being used.
  • f(x,y) is a two-variable function.
From this point forward, double integrals will be inextricably tied to most of the new topics in multivariable calculus. And in almost all cases, it helps to think about what's happening inside each "tiny area" of a given region, rather than thinking about integrating something along a line then integrating again in the perpendicular direction.

Want to join the conversation?

  • male robot hal style avatar for user David
    The bounds for the integral of the last problem for dy should be from sqrt(1-x^2) to -sqrt(1-x^2)
    (8 votes)
    Default Khan Academy avatar avatar for user
    • blobby green style avatar for user aryadityabasisth
      No, After computing the inner integral, you get the function which tells you the area of a slither whose base is the horizontal component on the input region... That slither of the input region then varies from y=+1 to y=-1 hence they are the bounds. Another intuition to see this is that when you enter the bounds you suggest, we would get our answer as a function of x which we shouldn't get.
      (1 vote)
  • spunky sam blue style avatar for user Minhaj Turjo
    What did he mean by "average x-value"? And how come dividing the integral by the total mass of the semi-circle gives this "average x-value"?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • stelly orange style avatar for user Lucas
    How would I find the center of mass if the density is not uniform?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • primosaur seed style avatar for user Ian Pulizzotto
      For a two-dimensional region R with density function p(x,y), which may or may not be uniform:

      x-coordinate of center of mass =
      double integral on R of x*p(x,y)dA / double integral on R of p(x,y)dA
      = double integral on R of x*p(x,y)dA / mass

      y-coordinate of center of mass =
      double integral on R of y*p(x,y)dA / double integral on R of p(x,y)dA
      = double integral on R of y*p(x,y)dA / mass

      Note that each coordinate of the center of mass can be thought of as a weighted average of that coordinate over the region, with the values of the density function used as the weights.

      Similar formulas can be used for regions besides two-dimensional regions. The concept is the same.
      (4 votes)
  • male robot hal style avatar for user Aiman
    Why do we divide the answer by the area pi/2?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Vinod Rathore
    The example of density using the area are quite confusing. logically it is not acceptable as mass is product of density and volume. please Find some other example to explain.
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Alexander Wu
      How about this -- the height of the plate is 1, and the density doesn't depend on h. That is, at any given point if you move up and down through the "plate," the density doesn't change. Then we have ρ(x,y,h) = (sin(π x) + 1) y, where the variable h is "useless." So we don't need to account for it in our integral:

      m = ∫∫∫ρ dh dx dy= ∫∫ (∫ρ dh) dx dy = ∫∫ (ρ ∫dh) dx dy= ∫∫ (ρ h) dx dy = ∫∫ρ (1) dx dy = ∫∫ρ dx dy.

      We can take ρ out of the first integral because it doesn't depend on h. And since h is 1, it disappears nicely.

      So above we turned the density back into our good ol' three dimensional ρ. However, just because we live in three dimensions doesn't mean that is the only number of dimensions in which density exists. It is perfectly fine for an infinitesimally thin plane to have 2D density, σ = m/A = (a number) kg/㎡. Or 1D density on a line, λ = m/𝓁 = (a number) kg/m. They just describe the mass per area or length. You get these a lot in multivariable calculus and physics. You can even have 4D density, though I don't know what the symbol for it is. It would have units kg/m^4.

      Neither is mass the only thing that can have density. Charge density is almost as common in physics, σ = q/A = (a number) C/㎡, where q is charge, and C is coulombs.

      So in conclusion, you can make the density 3D density in this example to help you understand it, but really density doesn't have to be 3D. Then the metal plate is infinitesimally thin.
      (3 votes)
  • male robot hal style avatar for user Michael Robertson
    In the final answer, the page won't accept (4/3)pi as an answer, even though this is the answer given in the explanation.
    (0 votes)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user davorkuharic1997
    In the example 1 how did we get in a second row (-cos(pi*x))/pi out of first row shouldn't it be -cos(pi*x)*(pi*x^2)/2
    (1 vote)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user jjklg
      If I understand what you are asking, it seems as though you are trying to use the chain rule for integration, but the chain rule only works for differentiation. To integrate sin (pi*x), you have to think of the chain rule backward. We know that the anti derivative of sin is -cos, and the derivative of pi*x is pi, so the anti derivative of sin (pi*x) is (-cos (pi*x))/pi. To check this answer, just use the chain rule on (-cos(pi*x))/pi to see if you get sin (pi*x), which you do because the derivative of what is inside the -cos () (pi in this case) gets canceled by the pi in the denominator, and the derivative of -cos is sin.
      (1 vote)
  • blobby green style avatar for user MCO
    How would it be to integrate dy first?
    (1 vote)
    Default Khan Academy avatar avatar for user