Double Integrals
A double integral adds up the values of f(x, y) over a region R in the plane. Over a rectangle R = [a, b] × [c, d], you evaluate double integrals as iterated integrals: integrate with respect to one variable while holding the other fixed, then integrate that result. When f ≥ 0, the double integral is the volume under the surface.
Before this lesson: Functions of Several Variables, Partial Derivatives and Fundamental Theorem of Calculus, Part 2
What a double integral measures
In Calculus 1, a definite integral adds up thin rectangles under a curve. A double integral does the same thing one dimension up. Cut the rectangle R into small pieces of area ΔA, build a thin box on each piece with height f(x, y), and add the box volumes. As the pieces shrink, these Riemann sums approach the double integral.
You almost never use the sums to compute. Instead, slice the solid. Hold x fixed and integrate f(x, y) in y: that gives the area of one slice. Then integrate those slice areas in x to stack the slices into the whole volume.
Double integral formula over a rectangle
\iint_R f(x, y)\,dA = \int_a^b \int_c^d f(x, y)\,dy\,dx = \int_c^d \int_a^b f(x, y)\,dx\,dy
This is Fubini’s theorem: if f is continuous on R = [a, b] × [c, d], both iterated integrals equal the double integral. The notation dA stands for a small piece of area.
- Read the integral from the inside out. The inner differential (dy or dx) goes with the inner limits.
- Do the inner integral. Treat the other variable as a constant, the way you do for partial derivatives.
- Substitute the inner limits. The result should contain only the outer variable.
- Do the outer integral with the outer limits.
Double integrals examples
Example 1: Integrate y first
Evaluate the iterated integral \int_0^2 \int_1^3 (x + 2y)\,dy\,dx.
\int_1^3 (x + 2y)\,dy = \Big[xy + y^2\Big]_{y=1}^{y=3}Integrate with respect to y. Treat x as a constant.
= (3x + 9) - (x + 1)
Substitute y = 3 and y = 1, and subtract.
= 2x + 8
Combine like terms.
\int_0^2 (2x + 8)\,dx = \Big[x^2 + 8x\Big]_0^2
Integrate the result with respect to x.
= (4 + 16) - 0
Substitute x = 2 and x = 0.
= 20
Add.
Answer: 20. If x + 2y is a height in meters over a region measured in meters, the solid holds 20 m³.
Example 2: Both orders give the same answer
Evaluate \iint_R x y^2\,dA over R = [0, 3] × [1, 2], first with x on the inside and then with y on the inside.
\int_0^3 x y^2\,dx = y^2 \Big[\dfrac{x^2}{2}\Big]_0^3Order dx dy: integrate in x. The factor y² is a constant.
= \dfrac{9y^2}{2}Substitute x = 3 and x = 0.
\int_1^2 \dfrac{9y^2}{2}\,dy = \dfrac{9}{2}\Big[\dfrac{y^3}{3}\Big]_1^2Integrate in y.
= \dfrac{9}{2} \cdot \dfrac{7}{3}Substitute: 8/3 − 1/3 = 7/3.
= \dfrac{21}{2}Multiply and reduce: 63/6 = 21/2.
\int_1^2 x y^2\,dy = x \Big[\dfrac{y^3}{3}\Big]_1^2Order dy dx: integrate in y. The factor x is a constant.
= \dfrac{7x}{3}Substitute y = 2 and y = 1.
\int_0^3 \dfrac{7x}{3}\,dx = \dfrac{7}{3}\Big[\dfrac{x^2}{2}\Big]_0^3Integrate in x.
= \dfrac{7}{3} \cdot \dfrac{9}{2}Substitute x = 3 and x = 0.
= \dfrac{21}{2}Multiply and reduce.
Answer: 21/2 both ways, as Fubini’s theorem promises.
Example 3: Choose the easier order
Evaluate \iint_R y e^{xy}\,dA over R = [0, 1] × [0, 2].
\iint_R y e^{xy}\,dA = \int_0^2 \int_0^1 y e^{xy}\,dx\,dyPut x on the inside. With y first, you would need integration by parts.
\int_0^1 y e^{xy}\,dx = \Big[e^{xy}\Big]_{x=0}^{x=1}Integrate in x. By the chain rule, the x-derivative of e^(xy) is y e^(xy).
= e^{y} - 1Substitute x = 1 and x = 0, using e⁰ = 1.
\int_0^2 (e^y - 1)\,dy = \Big[e^y - y\Big]_0^2
Integrate in y.
= (e^2 - 2) - (1 - 0)
Substitute y = 2 and y = 0.
= e^2 - 3 \approx 4.389
Simplify.
Answer: e² − 3 ≈ 4.389. Both orders are correct, but one is far shorter. Look for the order that makes the inner integral easy.
Example 4: Volume under a surface
Find the volume of the solid under z = 16 − x² − 2y² and above R = [0, 2] × [0, 2].
V = \int_0^2 \int_0^2 (16 - x^2 - 2y^2)\,dy\,dx
Set up the volume. The surface stays above the plane on R (its lowest height is 4).
\int_0^2 (16 - x^2 - 2y^2)\,dy = \Big[16y - x^2 y - \dfrac{2y^3}{3}\Big]_0^2Integrate in y.
= 32 - 2x^2 - \dfrac{16}{3}Substitute y = 2. The value at y = 0 is 0.
= \dfrac{80}{3} - 2x^2Combine the constants: 32 − 16/3 = 80/3.
\int_0^2 \Big(\dfrac{80}{3} - 2x^2\Big)dx = \Big[\dfrac{80x}{3} - \dfrac{2x^3}{3}\Big]_0^2Integrate in x.
= \dfrac{160}{3} - \dfrac{16}{3}Substitute x = 2. The value at x = 0 is 0.
= 48
Subtract: 144/3 = 48.
Answer: the volume is 48 cubic units.
Example 5: Water in a sloped pool
A pool is 20 m long and 10 m wide. Its depth is d(x, y) = 1 + 0.1x meters, where x is the distance from the shallow end. How much water does it hold when full, and what is its average depth?
V = \int_0^{20} \int_0^{10} (1 + 0.1x)\,dy\,dxSet up: x runs along the 20 m length and y across the 10 m width.
\int_0^{10} (1 + 0.1x)\,dy = (1 + 0.1x)\Big[y\Big]_0^{10}Integrate in y. The depth does not depend on y.
= 10 + x
Multiply: 10(1 + 0.1x) = 10 + x.
\int_0^{20} (10 + x)\,dx = \Big[10x + \dfrac{x^2}{2}\Big]_0^{20}Integrate in x.
= 200 + 200
Substitute x = 20. The value at x = 0 is 0.
= 400
Add.
\text{Area}(R) = 20 \cdot 10 = 200Find the area of the pool’s floor plan.
d_{\text{avg}} = \dfrac{400}{200} = 2Divide the volume by the area.
Answer: the pool holds 400 m³ of water, and its average depth is 2 m.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Doing the outer integral first | In Example 1, integrating x from 1 to 3 | Work from the inside out. The inner dy goes with the inner limits 1 to 3. |
| Treating the fixed variable as a variable | \int x y\,dy = \dfrac{x^2}{2} \cdot \dfrac{y^2}{2} | In the inner integral, x is a constant: \int xy\,dy = \dfrac{xy^2}{2}. |
| Mixing up limits when switching the order | In Example 2, putting 1 to 2 on the dx integral | Each pair of limits stays with its own variable: x from 0 to 3, y from 1 to 2. |
| Leaving y in after the inner integral | Getting 2x + 8y after the inner dy integral | Substitute the inner limits. The result must contain only the outer variable. |
| Splitting a sum like a product | \iint (x + y)\,dA = \Big(\int x\,dx\Big)\Big(\int y\,dy\Big) | The product shortcut works only when f(x, y) = g(x)h(y). |
| Forgetting to divide by the area | Calling 400 the average depth in Example 5 | Average value = double integral ÷ area of R. |
Related methods
Product shortcut
When f(x, y) = g(x)h(y) and R is a rectangle, the double integral splits into two single integrals: \iint_R g(x)h(y)\,dA = \Big(\int_a^b g(x)\,dx\Big)\Big(\int_c^d h(y)\,dy\Big). For example, over [0, π] × [0, π/2], the integral of sin x cos y is (2)(1) = 2.
Average value of a function of two variables
Like the average value of a function in Calculus 1, divide by the size of the region: f_{\text{avg}} = \dfrac{1}{\text{Area}(R)} \iint_R f(x, y)\,dA. Example 5 used this to find the average depth.
Area as a double integral
With f(x, y) = 1, the double integral gives the area of R. This matters more in the next lesson, on double integrals over general regions, where regions have curved edges.
Practice problems
- Evaluate \int_0^1 \int_0^2 (x + y)\,dy\,dx.
- Evaluate \int_0^2 \int_0^1 6x^2 y\,dy\,dx.
- Evaluate \iint_R (4 - x - y)\,dA over R = [0, 2] × [0, 1].
- Evaluate \int_0^{\pi} \int_0^{\pi/2} \sin(x + y)\,dy\,dx.
- Evaluate \iint_R x^2 y\,dA over R = [0, 3] × [1, 2] with x on the inside.
- Evaluate \iint_R x e^{xy}\,dA over R = [0, 1] × [0, 1]. Choose the easier order.
- Evaluate \iint_R e^{x + 2y}\,dA over R = [0, 1] × [0, 1] with the product shortcut.
- Find the volume under the plane z = 6 − x − 2y and above R = [0, 2] × [0, 1].
- Find the average value of f(x, y) = x² + y² over R = [0, 2] × [0, 2].
- A forest is 4 km long and 3 km wide. Its tree density is ρ(x, y) = 50 + 10x + 20y trees per km². How many trees does it have?
Show answers
1.
\int_0^2 (x + y)\,dy = \Big[xy + \dfrac{y^2}{2}\Big]_0^2Integrate in y. Treat x as a constant.
= 2x + 2
Substitute y = 2. The value at y = 0 is 0.
\int_0^1 (2x + 2)\,dx = \Big[x^2 + 2x\Big]_0^1
Integrate in x.
= 1 + 2
Substitute x = 1. The value at x = 0 is 0.
= 3
Add.
Answer: 3
2.
\int_0^1 6x^2 y\,dy = 6x^2 \Big[\dfrac{y^2}{2}\Big]_0^1Integrate in y. The factor 6x² is a constant.
= 3x^2
Substitute: 6x² · 1/2 = 3x².
\int_0^2 3x^2\,dx = \Big[x^3\Big]_0^2
Integrate in x.
= 8
Substitute x = 2 and x = 0.
Answer: 8
3.
\int_0^1 (4 - x - y)\,dy = \Big[4y - xy - \dfrac{y^2}{2}\Big]_0^1Integrate in y.
= 4 - x - \dfrac{1}{2}Substitute y = 1. The value at y = 0 is 0.
= \dfrac{7}{2} - xCombine the constants.
\int_0^2 \Big(\dfrac{7}{2} - x\Big)dx = \Big[\dfrac{7x}{2} - \dfrac{x^2}{2}\Big]_0^2Integrate in x.
= 7 - 2
Substitute x = 2. The value at x = 0 is 0.
= 5
Subtract.
Answer: 5
4.
\int_0^{\pi/2} \sin(x + y)\,dy = \Big[-\cos(x + y)\Big]_{y=0}^{y=\pi/2}Integrate in y.
= -\cos\Big(x + \dfrac{\pi}{2}\Big) + \cos xSubstitute y = π/2 and y = 0.
= \sin x + \cos x
Use cos(x + π/2) = −sin x (see sum and difference formulas).
\int_0^{\pi} (\sin x + \cos x)\,dx = \Big[-\cos x + \sin x\Big]_0^{\pi}Integrate in x.
= (1 + 0) - (-1 + 0)
Substitute x = π and x = 0.
= 2
Simplify.
Answer: 2
5.
\int_0^3 x^2 y\,dx = y \Big[\dfrac{x^3}{3}\Big]_0^3Integrate in x. The factor y is a constant.
= 9y
Substitute: y · 27/3 = 9y.
\int_1^2 9y\,dy = \Big[\dfrac{9y^2}{2}\Big]_1^2Integrate in y.
= 18 - \dfrac{9}{2}Substitute y = 2 and y = 1.
= \dfrac{27}{2}Subtract.
Answer: 27/2
6.
\int_0^1 \int_0^1 x e^{xy}\,dy\,dxPut y on the inside, so the factor x matches the chain rule.
\int_0^1 x e^{xy}\,dy = \Big[e^{xy}\Big]_{y=0}^{y=1}Integrate in y: the y-derivative of e^(xy) is x e^(xy).
= e^x - 1
Substitute y = 1 and y = 0.
\int_0^1 (e^x - 1)\,dx = \Big[e^x - x\Big]_0^1
Integrate in x.
= (e - 1) - (1 - 0)
Substitute x = 1 and x = 0.
= e - 2 \approx 0.718
Simplify.
Answer: e − 2 ≈ 0.718
7.
\iint_R e^{x}e^{2y}\,dA = \Big(\int_0^1 e^x\,dx\Big)\Big(\int_0^1 e^{2y}\,dy\Big)Write e^(x + 2y) = e^x e^(2y) (see exponent rules) and split.
\int_0^1 e^x\,dx = e - 1
Integrate the x part.
\int_0^1 e^{2y}\,dy = \dfrac{e^2 - 1}{2}Integrate the y part (see u-substitution with u = 2y).
(e - 1) \cdot \dfrac{e^2 - 1}{2} \approx 5.489Multiply: 1.71828 × 3.19453 ≈ 5.489.
Answer: (e − 1)(e² − 1)/2 ≈ 5.489
8.
\int_0^1 (6 - x - 2y)\,dy = \Big[6y - xy - y^2\Big]_0^1
Integrate in y. The plane is above R, since its lowest height is 2.
= 5 - x
Substitute y = 1: 6 − x − 1 = 5 − x.
\int_0^2 (5 - x)\,dx = \Big[5x - \dfrac{x^2}{2}\Big]_0^2Integrate in x.
= 10 - 2
Substitute x = 2. The value at x = 0 is 0.
= 8
Subtract.
Answer: 8 cubic units
9.
\int_0^2 (x^2 + y^2)\,dy = \Big[x^2 y + \dfrac{y^3}{3}\Big]_0^2Integrate in y.
= 2x^2 + \dfrac{8}{3}Substitute y = 2. The value at y = 0 is 0.
\int_0^2 \Big(2x^2 + \dfrac{8}{3}\Big)dx = \Big[\dfrac{2x^3}{3} + \dfrac{8x}{3}\Big]_0^2Integrate in x.
= \dfrac{16}{3} + \dfrac{16}{3}Substitute x = 2. The value at x = 0 is 0.
= \dfrac{32}{3}Add.
f_{\text{avg}} = \dfrac{32/3}{4} = \dfrac{8}{3}Divide by the area of R, which is 2 · 2 = 4.
Answer: 8/3 ≈ 2.67
10.
N = \int_0^4 \int_0^3 (50 + 10x + 20y)\,dy\,dx
Total = density integrated over the area, with x from 0 to 4 and y from 0 to 3.
\int_0^3 (50 + 10x + 20y)\,dy = \Big[50y + 10xy + 10y^2\Big]_0^3
Integrate in y.
= 150 + 30x + 90
Substitute y = 3. The value at y = 0 is 0.
= 240 + 30x
Combine the constants.
\int_0^4 (240 + 30x)\,dx = \Big[240x + 15x^2\Big]_0^4
Integrate in x.
= 960 + 240
Substitute x = 4. The value at x = 0 is 0.
= 1200
Add.
Answer: about 1,200 trees
Double integrals FAQ
What is the difference between a double integral and an iterated integral?
A double integral is defined as a limit of Riemann sums over a region. An iterated integral is how you compute it, one variable at a time. Fubini’s theorem says they are equal for continuous functions on a rectangle.
Does the order of integration matter in a double integral?
Over a rectangle with a continuous function, both orders give the same answer. The order can still change how much work it takes, as Example 3 shows.
What does a double integral represent?
If f ≥ 0, it is the volume under the surface z = f(x, y) and above R. If f is 1, it is the area of R. If f is a density, it is a total amount, such as mass or population.
How do you find the average value of a function of two variables?
Integrate f over R and divide by the area of R. For a pool, the volume divided by the floor area is the average depth.
Summary
- A double integral adds f(x, y) dA over a region; when f ≥ 0, it is a volume.
- Over a rectangle, compute it as an iterated integral, from the inside out.
- In the inner integral, treat the other variable as a constant.
- Fubini’s theorem: both orders give the same value, so pick the easier one.
- If f(x, y) = g(x)h(y), split it into a product of two single integrals.
- Average value = double integral ÷ area of R.
Previous lesson: Lagrange Multipliers
Next lesson: Double Integrals over General Regions
Back to the Calculus 3 Index