Multivariable

Double Integrals: How to Evaluate Them Step by Step

Double Integrals: How to Evaluate Them Step by Step — CalculusCalc cover image

A double integral \( \iint_R f(x, y)\,dA \) adds up \( f \) over a two-dimensional region \( R \). If \( f \ge 0 \), it’s the volume under the surface \( z = f(x,y) \) above \( R \). If \( f = 1 \), it’s the area of \( R \).

In practice you never add up infinitely many pieces directly. You evaluate a double integral as two ordinary integrals, one inside the other. This guide shows you why that works, how to set up the limits for any region, when to switch the order, and when polar coordinates make a hard problem easy.

Why it works: from Riemann sums to slices

Chop the region \( R \) into small rectangles of area \( \Delta A = \Delta x\,\Delta y \). Over each little rectangle, build a thin column whose height is \( f \) at a sample point. Its volume is about \( f(x_i, y_j)\,\Delta A \), and adding all the columns gives a two-dimensional Riemann sum. As the rectangles shrink, the sum approaches the double integral.

There is a second picture that explains how to compute it. Fix one value of \( x \) and slice the solid with the vertical plane at that \( x \). The slice is a flat region whose area is

$$A(x) = \int_c^d f(x, y)\,dy$$

because along the slice only \( y \) varies. Stacking these slices from \( x = a \) to \( x = b \), each of thickness \( dx \), gives the volume \( \int_a^b A(x)\,dx \). That is exactly an iterated integral: the inner integral finds the area of a slice, and the outer integral adds up the slices. It’s the same slicing idea behind the disk and washer method, applied to a solid with a flat base.

Fubini’s theorem: integrate one variable at a time

Over a rectangle \( R = [a, b]\times[c, d] \):

$$\begin{aligned} \iint_R f\,dA &= \int_a^b\left(\int_c^d f(x,y)\,dy\right)dx \\ &= \int_c^d\left(\int_a^b f(x,y)\,dx\right)dy \end{aligned}$$

Do the inner integral first, treating the outer variable as a constant (just like partial derivatives).

Slicing in \( x \) or in \( y \) must give the same volume, which is why both orders agree. Fubini’s theorem guarantees this for continuous functions on a rectangle, and for bounded regions described properly as below.

Example 1: a rectangle

\( \iint_R xy^2\,dA \) with \( R = [0, 2]\times[0, 1] \).

Inner (in \( y \)): \( \int_0^1xy^2\,dy = x\left[\frac{y^3}{3}\right]_0^1 = \frac x3 \)

Outer (in \( x \)): \( \int_0^2\frac x3\,dx = \frac13\cdot2 = \frac23 \)

Shortcut: when \( f(x,y) = g(x)h(y) \) over a rectangle, the integral splits: \( \int_0^2x\,dx\cdot\int_0^1y^2\,dy = 2\cdot\frac13 = \frac23 \).

Setting up limits for a general region

Most regions aren’t rectangles. There are two standard descriptions:

  • Type I (vertical strips): \( a \le x \le b \) and \( g_1(x) \le y \le g_2(x) \). Integrate \( dy \) first, from the bottom curve to the top curve.
  • Type II (horizontal strips): \( c \le y \le d \) and \( h_1(y) \le x \le h_2(y) \). Integrate \( dx \) first, from the left curve to the right curve.

To find the limits, sketch the region, draw one representative strip, and read off where it enters and leaves. The outer limits are the extreme values of the outer variable over the whole region. If you know how to set up area between curves, you already know how to do this: it’s the same “top minus bottom” picture.

Example 2: a non-rectangular region

Integrate \( f(x,y) = x \) over the region between \( y = x^2 \) and \( y = x \), \( 0\le x\le1 \). The \( y \)-limits now depend on \( x \):

$$\begin{aligned} \int_0^1\int_{x^2}^{x}x\,dy\,dx &= \int_0^1x(x - x^2)\,dx \\ &= \frac13 - \frac14 = \frac{1}{12} \end{aligned}$$

Rule: the outer limits must be constants; inner limits can depend on the outer variable.

As a check, describe the same region with horizontal strips. For \( 0 \le y \le 1 \), a strip enters at the line \( x = y \) and leaves at the parabola \( x = \sqrt y \):

$$\int_0^1\int_y^{\sqrt y}x\,dx\,dy = \int_0^1\left(\frac y2 - \frac{y^2}{2}\right)dy = \frac1{12}$$

Same answer, as Fubini promises.

Example 3: switching the order

\( \int_0^1\int_x^1e^{y^2}\,dy\,dx \) is impossible as written (\( e^{y^2} \) has no elementary antiderivative, like the Gaussian integral). Sketch the region: \( 0\le x\le y\le1 \). Describe it the other way, \( 0\le y\le1 \), \( 0\le x\le y \):

$$\begin{aligned} \int_0^1\int_0^y e^{y^2}\,dx\,dy &= \int_0^1ye^{y^2}\,dy \\ &= \frac{e - 1}{2} \end{aligned}$$

The inner integral in \( x \) simply multiplies by \( y \), and that extra \( y \) is exactly what a u-substitution with \( u = y^2 \) needs. Reversing the order didn’t just change the bookkeeping; it turned an impossible integral into an easy one.

How to reverse the order: (1) write the inequalities from the given limits, (2) sketch the region, (3) read off the new outer limits as constants, and (4) read off the new inner limits as functions of the new outer variable. Never just swap the limits without the sketch.

Example 4: a triangle, both orders

Evaluate \( \iint_D (x + 2y)\,dA \), where \( D \) is the triangle bounded by \( y = 0 \), \( x = 2 \) and \( y = x \).

Vertical strips: for \( 0 \le x \le 2 \), \( y \) runs from 0 up to the line \( y = x \):

$$\begin{aligned} \int_0^2\int_0^x(x + 2y)\,dy\,dx &= \int_0^2\big[xy + y^2\big]_0^x\,dx \\ &= \int_0^2 2x^2\,dx = \frac{16}{3} \end{aligned}$$

Horizontal strips: for \( 0 \le y \le 2 \), \( x \) runs from the line \( x = y \) to \( x = 2 \):

$$\begin{aligned} \int_0^2\int_y^2(x + 2y)\,dx\,dy &= \int_0^2\left(2 + 4y - \frac{5y^2}{2}\right)dy \\ &= 4 + 8 - \frac{20}{3} = \frac{16}{3} \end{aligned}$$

Both orders agree. The first was a little shorter, which is typical: try to choose the order that gives the simplest limits.

Example 5: area as a double integral

With \( f = 1 \), the double integral is the area. For the region between \( y = x^2 \) and \( y = 2x \), which meet at \( x = 0 \) and \( x = 2 \):

$$\int_0^2\int_{x^2}^{2x}1\,dy\,dx = \int_0^2(2x - x^2)\,dx = \frac43$$

The inner integral just produces “top minus bottom,” which is why single-variable area problems are really double integrals in disguise.

Example 6: polar coordinates

For circular regions use \( x = r\cos\theta \), \( y = r\sin\theta \), and \( dA = r\,dr\,d\theta \) (don’t forget the extra \( r \)!).

Volume under \( z = x^2 + y^2 \) above the unit disk:

$$\int_0^{2\pi}\int_0^1r^2\cdot r\,dr\,d\theta = 2\pi\cdot\frac14 = \frac\pi2$$

The extra \( r \) comes from the shape of a polar patch. A small piece of a ring between radii \( r \) and \( r + dr \), spanning angle \( d\theta \), has one side of length \( dr \) and the other of length \( r\,d\theta \), an arc. Patches far from the center are bigger, and the factor \( r \) accounts for that.

Example 7: a Gaussian bump in polar form

Evaluate \( \iint_D e^{-(x^2 + y^2)}\,dA \) over the disk of radius 2. In rectangular coordinates this is hopeless, but \( x^2 + y^2 = r^2 \), and the extra \( r \) makes the inner integral a simple substitution:

$$\begin{aligned} \int_0^{2\pi}\int_0^2e^{-r^2}\,r\,dr\,d\theta &= 2\pi\cdot\frac{1 - e^{-4}}{2} \\ &= \pi\left(1 - e^{-4}\right) \approx 3.084 \end{aligned}$$

Let the radius grow without bound and the answer approaches \( \pi \). That limit is the classic route to proving \( \int_{-\infty}^{\infty}e^{-x^2}dx = \sqrt\pi \).

Common mistakes

  • Limits in the wrong order. If the inner limits depend on \( x \), the inner differential must be \( dy \). Writing \( \int\int_{x^2}^{x} f\,dx\,dy \) is meaningless.
  • Variables left in the outer limits. The final answer of a double integral is a number, so the outer limits must be constants.
  • Forgetting the \( r \) in \( dA = r\,dr\,d\theta \). Without it, the area of the unit disk would come out as \( 2\pi \) instead of \( \pi \).
  • Swapping limits without a sketch. Reversing \( \int_0^1\int_x^1 \) is not \( \int_0^1\int_y^1 \). You have to redescribe the region, as in Example 3.
  • Missing a boundary change. If the top or bottom curve changes formula partway across, one set of limits won’t do. Split the region, or use the other order.

Where it’s used

  • Average value of \( f \) over a region: divide the integral by the area. For \( xy^2 \) on \( [0,2]\times[0,1] \), the average is \( \frac{2/3}{2} = \frac13 \). This extends the one-variable average value.
  • Mass and center of mass: if \( \rho(x, y) \) is the density of a thin plate, \( \iint_R \rho\,dA \) is its mass.
  • Probability: for a joint density \( p(x, y) \), the probability of landing in \( R \) is \( \iint_R p\,dA \).
  • Surface area and flux in later courses start from the same setup.

Double integral calculator (rectangles)

Evaluate \( \iint_R f\,dA \) over any rectangle numerically with composite Simpson’s rule:

Multivariable#23

Double Integral over a Rectangle

\(\iint_R f(x, y)\,dA\) for \(R = [a, b] \times [c, d]\).

The full double integral calculator page has more examples. To check an inner or outer integral on its own, use the definite integral calculator.

Practice problems

Try these before checking the answers.

  1. \( \int_0^1\int_0^2(x + y)\,dy\,dx \)
  2. \( \iint_R e^{x + y}\,dA,\ R = [0,1]^2 \)
  3. Area of the unit disk in polar form
  4. \( \int_0^1\int_0^x xy\,dy\,dx \)
  5. \( \iint_D 1\,dA \) where \( D \) is the disk of radius 3
  6. \( \int_0^1\int_y^1\sin(x^2)\,dx\,dy \) (hint: reverse the order)

Answers: (1) \( 3 \); (2) \( (e - 1)^2 \); (3) \( \pi \); (4) \( \frac18 \); (5) \( 9\pi \); (6) \( \frac{1 - \cos 1}{2} \approx 0.2298 \).

For problem 2, the integrand factors as \( e^xe^y \), so the answer is \( \left(\int_0^1e^x\,dx\right)^2 \). For problem 6, the region is \( 0 \le y \le x \le 1 \); in the other order the inner integral in \( y \) gives \( x\sin(x^2) \), which integrates with \( u = x^2 \).

FAQ

Does the order of integration matter?

For continuous functions the answer is the same (Fubini), but one order is often much easier.

How do I find the average value of f over a region?

Divide the double integral by the area of the region, just like the one-variable average value.

What does a double integral represent?

When \( f \ge 0 \), the volume of the solid under the surface and above the region. With \( f = 1 \) it’s the area of the region. With a density function it’s a total mass, and with a probability density it’s a probability.

When should I use polar coordinates?

When the region is a disk, a ring or a sector, or when the integrand contains \( x^2 + y^2 \). Both simplify dramatically once you substitute \( r \) and \( \theta \).

Can a double integral be negative?

Yes. Where \( f \) is negative, its contribution is negative, just as in one variable. The result is then a signed volume: volume above the plane minus volume below it.

What is the difference between a double integral and an iterated integral?

A double integral is defined as a limit of sums over the region. An iterated integral is the pair of single integrals you actually compute. Fubini’s theorem says they’re equal, which is why the terms are often used interchangeably.

Further reading

Calculators for this topic

Leave a comment

Your email address will not be published. Required fields are marked *