Math Core

Lesson 4.1 · Multiple Integrals

Double integrals over rectangles

In single-variable calculus, ∫abf(x) dx\int_a^b f(x)\,dx adds up thin strips to find the area under a curve. Now the function is z=f(x,y)z = f(x, y), its graph is a surface, and the natural question is the volume under that surface. The double integral answers it, and the same machinery will later give mass, probability, averages and much more.

Riemann sums in two dimensions

Start with a rectangle R=[a,b]×[c,d]R = [a, b] \times [c, d], meaning a≤x≤ba \le x \le b and c≤y≤dc \le y \le d. Cut [a,b][a, b] into mm pieces of width Δx\Delta x and [c,d][c, d] into nn pieces of width Δy\Delta y. This slices RR into mnmn small rectangles RijR_{ij}, each of area ΔA=Δx Δy\Delta A = \Delta x\,\Delta y.

Pick a sample point (xij∗,yij∗)(x_{ij}^*, y_{ij}^*) in each small rectangle. Over RijR_{ij}, the solid under the surface is roughly a thin box with base ΔA\Delta A and height f(xij∗,yij∗)f(x_{ij}^*, y_{ij}^*). Adding the boxes gives the double Riemann sum

∑i=1m∑j=1nf(xij∗,yij∗) ΔA.\sum_{i=1}^{m} \sum_{j=1}^{n} f(x_{ij}^*, y_{ij}^*)\,\Delta A.

Definition

Double integral over a rectangle

The double integral of ff over RR is

∬Rf(x,y) dA=lim⁡m,n→∞∑i=1m∑j=1nf(xij∗,yij∗) ΔA,\iint_R f(x, y)\,dA = \lim_{m, n \to \infty} \sum_{i=1}^{m} \sum_{j=1}^{n} f(x_{ij}^*, y_{ij}^*)\,\Delta A,

when this limit exists. It always exists when ff is continuous on RR. If f≥0f \ge 0, it equals the volume of the solid above RR and below the surface z=f(x,y)z = f(x, y).

When ff takes negative values, the integral counts volume below the xyxy-plane as negative, exactly like signed area in one variable.

A common choice of sample point is the center of each small rectangle. That gives the midpoint rule, which is usually a good estimate even with a coarse grid.

The square R = [0, 2] × [0, 2] cut into four unit squares. The dots are the midpoints used by the midpoint rule.Open in grapher →

Worked example: The midpoint rule

Estimate ∬R(x2+y) dA\iint_R (x^2 + y)\,dA over R=[0,2]×[0,2]R = [0, 2] \times [0, 2] using the midpoint rule with four equal squares.

Solution. Each square has area ΔA=1\Delta A = 1, and the midpoints are (0.5,0.5)(0.5, 0.5), (1.5,0.5)(1.5, 0.5), (0.5,1.5)(0.5, 1.5) and (1.5,1.5)(1.5, 1.5). The function values there are 0.750.75, 2.752.75, 1.751.75 and 3.753.75. So

∬R(x2+y) dA≈(0.75+2.75+1.75+3.75)(1)=9.\iint_R (x^2 + y)\,dA \approx (0.75 + 2.75 + 1.75 + 3.75)(1) = 9.

Below you will find the exact value is 283≈9.33\dfrac{28}{3} \approx 9.33, so the estimate is already close.

Iterated integrals

Computing a limit of double sums directly is painful. Instead, you integrate one variable at a time. In the iterated integral

∫ab∫cdf(x,y) dy dx,\int_a^b \int_c^d f(x, y)\,dy\,dx,

you first compute the inner integral ∫cdf(x,y) dy\int_c^d f(x, y)\,dy, treating xx as a constant (partial integration, the reverse of partial differentiation). The result is a function of xx alone, which you then integrate from aa to bb.

Geometrically, the inner integral is the area A(x)A(x) of the cross-section of the solid at a fixed xx. Integrating cross-sectional area gives volume, which is exactly the slicing method from Calculus I.

Fubini's theorem

If ff is continuous on R=[a,b]×[c,d]R = [a, b] \times [c, d], then

∬Rf(x,y) dA=∫ab∫cdf(x,y) dy dx=∫cd∫abf(x,y) dx dy.\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.

On a rectangle, the order of integration does not change the answer, and every limit is a constant.

Read the differentials from the inside out: in ∫ab∫cd⋯ dy dx\int_a^b \int_c^d \cdots\,dy\,dx, the inner dydy goes with the inner limits cc to dd.

Worked example: Computing an iterated integral

Evaluate ∬R(x2+3y) dA\iint_R (x^2 + 3y)\,dA where R=[0,3]×[1,2]R = [0, 3] \times [1, 2].

Solution. Integrate with respect to xx first, holding yy fixed:

∫03(x2+3y) dx=[x33+3xy]x=0x=3=9+9y.\int_0^3 (x^2 + 3y)\,dx = \left[\frac{x^3}{3} + 3xy\right]_{x=0}^{x=3} = 9 + 9y.

Now integrate that in yy:

∫12(9+9y) dy=[9y+9y22]12=(18+18)−(9+92)=452.\int_1^2 (9 + 9y)\,dy = \left[9y + \frac{9y^2}{2}\right]_1^2 = (18 + 18) - \left(9 + \frac{9}{2}\right) = \frac{45}{2}.

As a check, integrating in yy first gives ∫03(x2+92)dx=9+272=452\int_0^3 \left(x^2 + \tfrac{9}{2}\right)dx = 9 + \tfrac{27}{2} = \tfrac{45}{2}, as Fubini promises.

Separable integrands

If the integrand factors as g(x) h(y)g(x)\,h(y) and the region is a rectangle, the double integral splits into a product of two single integrals:

∬[a,b]×[c,d]g(x) h(y) dA=(∫abg(x) dx)(∫cdh(y) dy).\iint_{[a,b] \times [c,d]} g(x)\,h(y)\,dA = \left(\int_a^b g(x)\,dx\right)\left(\int_c^d h(y)\,dy\right).

This works because h(y)h(y) is a constant during the xx-integration, so it pulls out.

Worked example: A product of one-variable functions

Evaluate ∬Rysin⁡x dA\iint_R y \sin x\,dA over R=[0,π2]×[0,1]R = \left[0, \tfrac{\pi}{2}\right] \times [0, 1].

Solution. The integrand is sin⁡x\sin x times yy, so

∬Rysin⁡x dA=(∫0π/2sin⁡x dx)(∫01y dy)=(1)(12)=12.\iint_R y \sin x\,dA = \left(\int_0^{\pi/2} \sin x\,dx\right)\left(\int_0^1 y\,dy\right) = (1)\left(\frac{1}{2}\right) = \frac{1}{2}.

Choosing the order

Fubini says both orders give the same number, but one order is often much easier to carry out.

Worked example: Let the easy order do the work

Evaluate ∬Rxexy dA\iint_R x e^{xy}\,dA over R=[0,1]×[0,1]R = [0, 1] \times [0, 1].

Solution. Integrating in xx first would need integration by parts with yy floating around. Integrating in yy first is clean, because xx is exactly the factor that the chain rule produces:

∫01xexy dy=[exy]y=0y=1=ex−1.\int_0^1 x e^{xy}\,dy = \Big[e^{xy}\Big]_{y=0}^{y=1} = e^{x} - 1.

Then ∫01(ex−1) dx=(e−1)−1=e−2\displaystyle\int_0^1 (e^x - 1)\,dx = (e - 1) - 1 = e - 2.

Common mistake

During the inner integration, only the inner variable changes. Treat the other variable as a constant, and do not substitute numbers for it until the outer integration. Also keep the limits paired with the right differential: the inner limits belong to the inner variable.

Average value

Dividing a double integral by the area of the region gives the average height of the surface:

favg=1A(R)∬Rf(x,y) dA.f_{\text{avg}} = \frac{1}{A(R)} \iint_R f(x, y)\,dA.

The volume under the surface equals the volume of a box with base RR and height favgf_{\text{avg}}.

Tip

A quick sanity check: if m≤f(x,y)≤Mm \le f(x, y) \le M on RR, then m A(R)≤∬Rf dA≤M A(R)m\,A(R) \le \iint_R f\,dA \le M\,A(R). For x2+yx^2 + y on [0,2]×[0,2][0, 2] \times [0, 2] the values run from 00 to 66, so the integral must lie between 00 and 2424.

Practice

Practice 1

Evaluate ∫02∫03(x+y) dy dx\displaystyle\int_0^2 \int_0^3 (x + y)\,dy\,dx.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 2

Evaluate ∫12∫016x2y dx dy\displaystyle\int_1^2 \int_0^1 6x^2 y\,dx\,dy.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 3

Use the midpoint rule with four equal squares to estimate ∬Rxy2 dA\iint_R xy^2\,dA over R=[0,4]×[0,4]R = [0, 4] \times [0, 4].

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 4

Evaluate ∬Rysin⁡x dA\iint_R y \sin x\,dA where R=[0,π]×[0,2]R = [0, \pi] \times [0, 2].

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 5

Find the average value of f(x,y)=x2yf(x, y) = x^2 y over the rectangle R=[0,3]×[0,2]R = [0, 3] \times [0, 2].

Enter a number. Fractions like 3/4 and sqrt(2) are OK.

Practice 6

Which iterated integral equals ∬Rf(x,y) dA\iint_R f(x, y)\,dA for R=[1,4]×[0,2]R = [1, 4] \times [0, 2]?

Practice 7

Evaluate ∬Ryexy dA\iint_R y e^{xy}\,dA where R=[0,1]×[0,ln⁡2]R = [0, 1] \times [0, \ln 2] (so 0≤x≤10 \le x \le 1 and 0≤y≤ln⁡20 \le y \le \ln 2). Give an exact answer.

Enter a number. Fractions like 3/4 and sqrt(2) are OK.