Unit 4, lesson 24

Double Integrals over Rectangles

How a double integral over a rectangle is built from area weighted sums, what it means as signed volume and average value, and when it can be computed as an iterated integral in either order.

  • Theory part 47
  • Practice part 48
  • Double Integrals

A thermal camera shows a rectangular sheet as a grid of colored tiles, one temperature reading per tile. Multiply each reading by the area of its tile, add everything up, and you have a single number that describes the whole sheet. Make the tiles smaller and that number settles down to the double integral, which is what this lesson builds.

Key terms

Double Riemann sums

Definition Let R=[a,b]×[c,d]R = [a, b] \times [c, d] and let ff be defined on RR. A partition of RR comes from points a=x0<x1<⋯<xm=ba = x_0 < x_1 < \dots < x_m = b and c=y0<y1<⋯<yn=dc = y_0 < y_1 < \dots < y_n = d, which cut RR into the subrectangles Rij=[xi−1,xi]×[yj−1,yj]R_{ij} = [x_{i-1}, x_i] \times [y_{j-1}, y_j] with areas ΔAij=Δxi Δyj\Delta A_{ij} = \Delta x_i \, \Delta y_j. Choose a sample point (xij∗,yij∗)(x_{ij}^*, y_{ij}^*) in each RijR_{ij}. The double Riemann sum is

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

In plain words Cut the rectangle into tiles, read the function once on each tile, and weight each reading by the tile’s area.

Example Let f(x,y)=16−x2−2y2f(x, y) = 16 - x^2 - 2y^2 on R=[0,2]×[0,2]R = [0, 2] \times [0, 2]. Cut it into four unit squares and use their upper right corners as sample points, so every ΔAij=1\Delta A_{ij} = 1.

Sample point(1,1)(1, 1)(1,2)(1, 2)(2,1)(2, 1)(2,2)(2, 2)
Value of ff131377101044

The Riemann sum is 13+7+10+4=3413 + 7 + 10 + 4 = 34. The exact integral is 4848, as the iterated integral section shows. Since ff decreases as xx or yy grows, upper right corners give low readings and the sum comes out too small.

Integrability

Definition The norm ∥P∥\lVert P \rVert of a partition is the length of the longest diagonal among its subrectangles. A bounded function ff on RR is integrable on RR if there is a number II with the following property. For every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that ∣S−I∣<ε\lvert S - I \rvert < \varepsilon for every partition with ∥P∥<δ\lVert P \rVert < \delta and every choice of sample points. Then II is the double integral,

∬Rf(x,y) dA=lim⁡∥P∥→0∑i=1m∑j=1nf(xij∗,yij∗) ΔAij.\begin{aligned} &\iint_R f(x, y) \, dA \\[0.4em] &\quad = \lim_{\lVert P \rVert \to 0} \sum_{i=1}^{m} \sum_{j=1}^{n} f(x_{ij}^*, y_{ij}^*) \, \Delta A_{ij}. \end{aligned}

Every function that is continuous on RR is integrable. More generally, ff is integrable on RR if it is bounded on RR and every point where it fails to be continuous lies on one of finitely many smooth curves. Here a smooth curve means the graph of a continuously differentiable function y=g(x)y = g(x) or x=h(y)x = h(y) over a closed interval, or a curve with a continuously differentiable parametrization over a closed interval. Such curves can be covered by tiles of arbitrarily small total area, which is why they do not matter. A function that is unbounded on RR is not integrable in this sense, and needs an improper integral instead.

In plain words The double integral exists when all fine enough Riemann sums agree, no matter how the tiles are shaped or where the readings are taken. Continuity is enough for that, and a few clean jumps along curves do no harm.

Example On R=[0,2]×[0,1]R = [0, 2] \times [0, 1] let f(x,y)=1f(x, y) = 1 for x≤1x \le 1 and f(x,y)=2f(x, y) = 2 for x>1x > 1. It is bounded and jumps only along the segment x=1x = 1, so it is integrable, and the integral is 1⋅1+2⋅1=31 \cdot 1 + 2 \cdot 1 = 3. By contrast, the function equal to 11 at points with both coordinates rational and 00 elsewhere is not integrable on RR. Sums with rational sample points give 22 and sums with irrational ones give 00, however fine the partition.

Signed volume

Definition If ff is integrable and f(x,y)≥0f(x, y) \ge 0 on RR, then ∬Rf dA\iint_R f \, dA is the volume of the solid above RR and below the graph z=f(x,y)z = f(x, y). For a general integrable ff the integral is a signed volume, the volume above the xyxy plane minus the volume below it. The geometric volume between the graph and RR is

∬R∣f(x,y)∣ dA.\iint_R \lvert f(x, y) \rvert \, dA.

In plain words Parts of the graph below the plane count as negative. If you want the actual amount of space between the surface and the plane, integrate the absolute value.

Example Take f(x,y)=x−yf(x, y) = x - y on [0,2]×[0,2][0, 2] \times [0, 2]. The graph is a tilted plane, above the xyxy plane where x>yx > y and below it where x<yx < y, and the two parts are mirror images. So the signed volume is 00. For the geometric volume, look at the part where x>yx > y. Over the triangle with corners (0,0)(0, 0), (2,0)(2, 0) and (2,2)(2, 2), of area 22, the graph rises from height 00 along the diagonal to height 22 above (2,0)(2, 0). That solid is a tetrahedron with apex (2,0,2)(2, 0, 2) straight above a corner of its base, so its volume is

13⋅2⋅2=43.\frac{1}{3} \cdot 2 \cdot 2 = \frac{4}{3}.

The part below the plane is its mirror image, so the geometric volume is 83\tfrac{8}{3} while the signed volume is 00.

Iterated integrals

Definition For a function ff on R=[a,b]×[c,d]R = [a, b] \times [c, d], the iterated integral

∫ab∫cdf(x,y) dy dx=∫ab[∫cdf(x,y) dy]dx\begin{aligned} &\int_a^b \int_c^d f(x, y) \, dy \, dx \\[0.4em] &\quad = \int_a^b \left[ \int_c^d f(x, y) \, dy \right] dx \end{aligned}

means the following. For each fixed xx, integrate f(x,y)f(x, y) in yy from cc to dd, which gives a function A(x)A(x), and then integrate A(x)A(x) from aa to bb. It is defined when A(x)A(x) exists for every xx in [a,b][a, b] and AA is integrable on [a,b][a, b]. The other order, ∫cd∫abf(x,y) dx dy\int_c^d \int_a^b f(x, y) \, dx \, dy, integrates in xx first. The inner integral is a partial integration, with the other variable held constant.

In plain words Work from the inside out. The inner integral collapses one direction and leaves an ordinary function of the other variable. When f≥0f \ge 0, the number A(x)A(x) is the area of the slice of the solid at that xx.

Example Compute ∫03∫12x2y dy dx\int_0^3 \int_1^2 x^2 y \, dy \, dx. Holding xx fixed,

∫12x2y dy=x2[y22]12=32x2.\int_1^2 x^2 y \, dy = x^2 \left[ \frac{y^2}{2} \right]_1^2 = \frac{3}{2} x^2.

Then ∫0332x2 dx=12⋅27=272\int_0^3 \tfrac{3}{2} x^2 \, dx = \tfrac{1}{2} \cdot 27 = \tfrac{27}{2}. Doing xx first gives ∫129y dy=272\int_1^2 9y \, dy = \tfrac{27}{2} as well.

The same steps give the exact value for the Riemann sum example. With f(x,y)=16−x2−2y2f(x, y) = 16 - x^2 - 2y^2,

∫02∫02f dy dx=∫02(803−2x2)dx=1603−163=48.\begin{aligned} &\int_0^2 \int_0^2 f \, dy \, dx \\[0.4em] &\quad = \int_0^2 \left( \frac{80}{3} - 2x^2 \right) dx \\[0.4em] &\quad = \frac{160}{3} - \frac{16}{3} = 48. \end{aligned}

Fubini’s theorem

Definition Fubini’s theorem for rectangles says the following. If ff is continuous on R=[a,b]×[c,d]R = [a, b] \times [c, d], then

∬Rf dA=∫ab∫cdf(x,y) dy dx=∫cd∫abf(x,y) dx dy.\begin{aligned} \iint_R f \, dA &= \int_a^b \int_c^d f(x, y) \, dy \, dx \\[0.4em] &= \int_c^d \int_a^b f(x, y) \, dx \, dy. \end{aligned}

More generally, if ff is integrable on RR and the inner integral ∫cdf(x,y) dy\int_c^d f(x, y) \, dy exists for every xx in [a,b][a, b], then the first equality holds, and the same goes for the other order. This covers bounded functions that are continuous except on finitely many smooth curves, as long as the inner integrals exist.

For improper integrals, where ff is unbounded near an edge or the rectangle is unbounded, the hypothesis is absolute integrability, a finite integral of ∣f∣\lvert f \rvert. Here is a version that needs only one variable calculus. Let ff be continuous on Q=[a,∞)×[c,∞)Q = [a, \infty) \times [c, \infty) and suppose

∣f(x,y)∣≤g(x) h(y)on Q,\lvert f(x, y) \rvert \le g(x) \, h(y) \quad \text{on } Q,

where gg and hh are continuous, nonnegative, and have convergent improper integrals on [a,∞)[a, \infty) and [c,∞)[c, \infty). Then both iterated integrals of ff and of ∣f∣\lvert f \rvert converge, and the two iterated integrals of ff are equal. Both also equal the limit of the integrals of ff over [a,M]×[c,N][a, M] \times [c, N] as MM and NN go to ∞\infty, which is the improper double integral. The same holds on (a,b]×(c,d](a, b] \times (c, d] for ff continuous there and possibly unbounded near the edges x=ax = a and y=cy = c. The fully general statement, that the two orders agree whenever the integral of ∣f∣\lvert f \rvert is finite, is true but needs the Lebesgue integral, which this course does not develop. Without some such hypothesis the two orders can give different answers.

In plain words For a continuous function you may slice either way and you will get the same number, so pick the order that is easier. With an improper integral, check absolute integrability first.

Example For ∬Rxexy dA\iint_R x e^{xy} \, dA on R=[0,1]×[0,1]R = [0, 1] \times [0, 1], integrating in yy first is quick, because xexyx e^{xy} is the yy derivative of exye^{xy},

∫01∫01xexy dy dx=∫01(ex−1) dx=e−2.\begin{aligned} \int_0^1 \int_0^1 x e^{xy} \, dy \, dx &= \int_0^1 (e^x - 1) \, dx \\[0.4em] &= e - 2. \end{aligned}

The other order would need integration by parts, and Fubini guarantees the same value.

For a warning, take f(x,y)=x2−y2(x2+y2)2f(x, y) = \dfrac{x^2 - y^2}{(x^2 + y^2)^2} on (0,1]×(0,1](0, 1] \times (0, 1]. Since the yy derivative of yx2+y2\frac{y}{x^2 + y^2} is ff, the inner integral in yy is 11+x2\frac{1}{1 + x^2}, and the iterated integral is π4\frac{\pi}{4}. By the same computation with the roles swapped, the other order gives −π4-\frac{\pi}{4}. The function is unbounded near the origin, and in polar coordinates ∣f∣=∣cos⁡2θ∣/r2\lvert f \rvert = \lvert \cos 2\theta \rvert / r^2, so the integral of ∣f∣\lvert f \rvert is infinite. Fubini does not apply.

Average value

Definition If ff is integrable on RR and A(R)A(R) is the area of RR, the average value of ff on RR is

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

Equivalently, favg⋅A(R)=∬Rf dAf_{\text{avg}} \cdot A(R) = \iint_R f \, dA, so a box of height favgf_{\text{avg}} over RR has the same signed volume as the solid under the graph. The average has the units of ff, while the integral has the units of ff times area.

In plain words Spread the total evenly over the rectangle. The height you get is the average.

Example A plate occupies [0,4]×[0,2][0, 4] \times [0, 2], measured in meters, and its temperature is T(x,y)=20+3x+y2T(x, y) = 20 + 3x + y^2 degrees Celsius. Integrating in yy first,

∬RT dA=∫04(40+6x+83)dx=6563,\begin{aligned} \iint_R T \, dA &= \int_0^4 \left( 40 + 6x + \frac{8}{3} \right) dx \\[0.4em] &= \frac{656}{3}, \end{aligned}

in degrees Celsius times square meters. The area is 88 square meters, so the average temperature is

Tavg=6563⋅8=823≈27.3 degrees Celsius.\begin{aligned} T_{\text{avg}} &= \frac{656}{3 \cdot 8} = \frac{82}{3} \\[0.4em] &\approx 27.3 \text{ degrees Celsius.} \end{aligned}

Check yourself

  1. Evaluate ∬Rycos⁡(xy) dA\iint_R y \cos(xy) \, dA for R=[0,1]×[0,π2]R = [0, 1] \times \left[0, \frac{\pi}{2}\right] by choosing a good order.
Show the answer

Integrate in xx first, because ycos⁡(xy)y \cos(xy) is the xx derivative of sin⁡(xy)\sin(xy). The inner integral is ∫01ycos⁡(xy) dx=sin⁡y\int_0^1 y \cos(xy) \, dx = \sin y, and then ∫0π/2sin⁡y dy=1\int_0^{\pi/2} \sin y \, dy = 1. Fubini applies since the integrand is continuous on RR.

  1. For f(x,y)=xf(x, y) = x on R=[−1,2]×[0,1]R = [-1, 2] \times [0, 1], find the signed volume and the geometric volume between the graph and RR.
Show the answer

The signed volume is

∫01∫−12x dx dy=4−12=32.\int_0^1 \int_{-1}^2 x \, dx \, dy = \frac{4 - 1}{2} = \frac{3}{2}.

For the geometric volume integrate ∣x∣\lvert x \rvert, which gives 12+2=52\tfrac{1}{2} + 2 = \tfrac{5}{2}. The part below the plane, over −1≤x≤0-1 \le x \le 0, contributes 12\tfrac{1}{2} to the geometric volume but −12-\tfrac{1}{2} to the signed one.

  1. Find the average value of f(x,y)=xy2f(x, y) = xy^2 on R=[0,2]×[0,3]R = [0, 2] \times [0, 3].
Show the answer

The integrand is a product of a function of xx and a function of yy, so the integral splits as

∫02x dx⋅∫03y2 dy=2⋅9=18.\int_0^2 x \, dx \cdot \int_0^3 y^2 \, dy = 2 \cdot 9 = 18.

The area of RR is 66, so the average value is 186=3\tfrac{18}{6} = 3.

How this lesson connects

It also uses Single-variable definite integrals and antiderivatives and Functions of two variables and rectangular coordinates.