Ran Wei/ Calculus/Module 19
中文
Calculus · Part V · Several variables

Module 19Multiple integrals

Add up quantities spread over a region of the plane or of space, such as the volume under a surface, the mass of a plate, the balance point of a solid or the probability that a random point lands in a region. You will define double and triple integrals as limits of Riemann sums, evaluate them one variable at a time, choose the coordinates (polar, cylindrical, spherical or your own) that make them easy, and prove the value of the Gaussian integral that Module 12 quoted.

⏱ 270 minYou need: Modules 1 to 18, in particular the definite integral (Module 9), the Fundamental Theorem and substitution (Module 10), applications and improper integrals (Module 12), polar coordinates and vectors (Module 16) and partial derivatives (Module 17)

In this module you will

  • Define a double integral as a limit of double Riemann sums, and evaluate it as an iterated integral with Fubini’s theorem
  • Describe a region by its boundary curves in either order, set up the limits from a sketch, and reverse the order of integration
  • Evaluate double integrals in polar coordinates, and prove that ∫−∞∞e−x2 dx=π\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt\pi
  • Compute areas, volumes, masses, centres of mass, moments of inertia and probabilities with multiple integrals
  • Set up and evaluate triple integrals in rectangular, cylindrical and spherical coordinates
  • Change the variables of a double integral with the Jacobian
1

Volumes and double integrals

Module 9 found the area under a curve by cutting an interval into short pieces, standing a thin rectangle on each and adding up the rectangles; the limit of those sums is the definite integral. This module takes the same idea up one dimension. For a continuous, nonnegative function of two variables f(x,y),f(x, y)\mathclose{\text{,}} picture its graph z=f(x,y)z = f(x, y) as a surface, as in Module 17. Over a rectangle in the xyxy-plane, the solid between the rectangle and the surface has a volume. Cut the region into small rectangles, stand a thin box on each, and add up the boxes: the limit of these sums is the double integral. It computes much more than volumes: masses, averages and probabilities too. A sum of the same kind is how a computer adds up anything recorded on a grid: the rainfall on each square of a weather map times the area of the square, added over a river’s catchment, approximates the volume of water that fell on it.

Start with a rectangle in the xyxy-plane, with a<ba < b and c<d,c < d\mathclose{\text{,}}

R=[a,b]×[c,d]={(x,y):a≤x≤b, c≤y≤d},R = [a, b] \times [c, d] = \{(x, y) : a \le x \le b,\ c \le y \le d\},

read “[a,b][a, b] cross [c,d][c, d]”: the points whose xx lies in [a,b][a, b] and whose yy lies in [c,d].[c, d]\mathclose{\text{.}} Suppose first that f(x,y)≥0f(x, y) \ge 0 on R.R\mathclose{\text{.}} The solid that lies above RR and below the surface z=f(x,y)z = f(x, y) is the set of points (x,y,z)(x, y, z) with (x,y)(x, y) in RR and 0≤z≤f(x,y).0 \le z \le f(x, y)\mathclose{\text{.}} What is its volume?

Cut [a,b][a, b] into mm subintervals of width Δx=(b−a)/m\Delta x = (b - a)/m and [c,d][c, d] into nn subintervals of width Δy=(d−c)/n.\Delta y = (d - c)/n\mathclose{\text{.}} The lines x=xix = x_i and y=yjy = y_j through the cut points divide RR into mnmn small rectangles

Rij=[xi−1,xi]×[yj−1,yj],R_{ij} = [x_{i-1}, x_i] \times [y_{j-1}, y_j],

each of area ΔA=Δx Δy.\Delta A = \Delta x\,\Delta y\mathclose{\text{.}} Choose a sample point (xij∗,yij∗)(x_{ij}^*, y_{ij}^*) in each RijR_{ij} and stand on RijR_{ij} a box of height f(xij∗,yij∗).f(x_{ij}^*, y_{ij}^*)\mathclose{\text{.}} Its volume is f(xij∗,yij∗) ΔA,f(x_{ij}^*, y_{ij}^*)\,\Delta A\mathclose{\text{,}} and together the boxes have the volume

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

a double Riemann sum. The two summation signs add one term for every pair (i,j):(i, j)\mathclose{\text{:}} mnmn terms in all (Figure 19.1).

Sixteen boxes under the surface z = 8 - x^2 - y^2 over the square [0, 2] times [0, 2] (Example 19.1 with n = 4). Each box stands on a small square of area Delta A = 0.25, and its height is the value of f at the corner of its square farthest from the origin. There f is smallest on the square, so every box lies under the surface: the grid lines drawn on the surface pass through the far top corners of the boxes. Together the boxes have volume 17, less than the volume 64/3 approx 21.33 under the surface.
Figure 19.1

Sixteen boxes under the surface z=8−x2−y2z = 8 - x^2 - y^2 over the square [0,2]×[0,2][0, 2] \times [0, 2] (Example 19.1 with n=4).n = 4\mathclose{\text{).}} Each box stands on a small square of area ΔA=0.25,\Delta A = 0.25\mathclose{\text{,}} and its height is the value of ff at the corner of its square farthest from the origin. There ff is smallest on the square, so every box lies under the surface: the grid lines drawn on the surface pass through the far top corners of the boxes. Together the boxes have volume 17, less than the volume 64/3≈21.3364/3 \approx 21.33 under the surface.

Example 19.1Trapping a volume✓ Checked

Let f(x,y)=8−x2−y2f(x, y) = 8 - x^2 - y^2 and R=[0,2]×[0,2].R = [0, 2] \times [0, 2]\mathclose{\text{.}} Cut RR into four squares of side 1. Find two double Riemann sums that trap the volume VV of the solid under the surface z=f(x,y)z = f(x, y) and above R,R\mathclose{\text{,}} and the sum whose sample points are the centres of the squares.

The squares are [0,1]×[0,1],[0, 1] \times [0, 1]\mathclose{\text{,}} [1,2]×[0,1],[1, 2] \times [0, 1]\mathclose{\text{,}} [0,1]×[1,2][0, 1] \times [1, 2] and [1,2]×[1,2],[1, 2] \times [1, 2]\mathclose{\text{,}} each of area ΔA=1.\Delta A = 1\mathclose{\text{.}} For x≥0x \ge 0 and y≥0,y \ge 0\mathclose{\text{,}} ff decreases as xx grows and as yy grows, because x2x^2 and y2y^2 grow. So on each square ff is largest at the corner nearest the origin and smallest at the corner farthest from it. With the far corners (1,1),(1, 1)\mathclose{\text{,}} (2,1),(2, 1)\mathclose{\text{,}} (1,2)(1, 2) and (2,2)(2, 2) as sample points, the boxes lie under the surface, and their total volume is

(f(1,1)+f(2,1)+f(1,2)+f(2,2))⋅1=6+3+3+0=12.\begin{aligned} &\big(f(1, 1) + f(2, 1) + f(1, 2) + f(2, 2)\big)\cdot 1 \\ &\quad= 6 + 3 + 3 + 0 = 12. \end{aligned}

With the near corners (0,0),(0, 0)\mathclose{\text{,}} (1,0),(1, 0)\mathclose{\text{,}} (0,1)(0, 1) and (1,1),(1, 1)\mathclose{\text{,}} the boxes contain the solid:

(f(0,0)+f(1,0)+f(0,1)+f(1,1))⋅1=8+7+7+6=28.\begin{aligned} &\big(f(0, 0) + f(1, 0) + f(0, 1) + f(1, 1)\big)\cdot 1 \\ &\quad= 8 + 7 + 7 + 6 = 28. \end{aligned}

So 12≤V≤28.12 \le V \le 28\mathclose{\text{.}} The centres (12,12),\big(\tfrac12, \tfrac12\big)\mathclose{\text{,}} (32,12),\big(\tfrac32, \tfrac12\big)\mathclose{\text{,}} (12,32)\big(\tfrac12, \tfrac32\big) and (32,32)\big(\tfrac32, \tfrac32\big) give the single estimate

7.5+5.5+5.5+3.5=22.7.5 + 5.5 + 5.5 + 3.5 = 22.

Section 19.2 shows that V=643≈21.33.V = \tfrac{64}{3} \approx 21.33\mathclose{\text{.}}

Smaller squares close the gap. Cut each side of RR into nn equal parts, making n2n^2 squares of side 2/n,2/n\mathclose{\text{,}} and compute the three sums: LnL_n with the far corners (a lower sum), UnU_n with the near corners (an upper sum) and MnM_n with the centres (a midpoint sum).

nnLnL_nUnU_nMnM_n
22121228282222
441717252521.521.5
8819.2519.2523.2523.2521.37521.375
161620.312520.312522.312522.312521.3437521.34375
323220.82812520.82812521.82812521.82812521.335937521.3359375

The lower sums rise and the upper sums fall, and the gap between them, Un−Ln=32/n,U_n - L_n = 32/n\mathclose{\text{,}} halves each time nn doubles. The midpoint sums close in on 643=21.333…\tfrac{64}{3} = 21.333\ldots much faster: the error, exact value minus approximation, is 643−Mn=−83n2.\tfrac{64}{3} - M_n = -\tfrac{8}{3n^2}\mathclose{\text{.}} Its magnitude is divided by 4 each time nn doubles, as for the midpoint sums of Module 9.

Definition 19.1Double integral over a rectangle

Let ff be defined on the rectangle R=[a,b]×[c,d],R = [a, b] \times [c, d]\mathclose{\text{,}} with a<ba < b and c<d.c < d\mathclose{\text{.}} Then ff is integrable on RR if there is a number II that its double Riemann sums approach: for every ε>0\varepsilon > 0 there is a whole number NN such that

∣∑i=1m∑j=1nf(xij∗,yij∗) ΔA−I∣<ε\Big|\sum_{i=1}^{m}\sum_{j=1}^{n} f(x_{ij}^*, y_{ij}^*)\,\Delta A - I\Big| < \varepsilon

whenever m≥Nm \ge N and n≥N,n \ge N\mathclose{\text{,}} wherever the sample points are. Then II is the double integral of ff over R:R\mathclose{\text{:}}

∬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.

The symbol ∬Rf(x,y) dA\iint_R f(x, y)\,dA reads “the double integral over RR of ff of x,x\mathclose{\text{,}} y,y\mathclose{\text{,}} dAdA”, and dA,dA\mathclose{\text{,}} the element of area, recalls the areas ΔA\Delta A of the small rectangles. When f≥0f \ge 0 on R,R\mathclose{\text{,}} the double integral is the volume of the solid between RR and the graph of f:f\mathclose{\text{:}} it defines that volume, and it agrees with the volumes of boxes, prisms and pyramids that you already know. Where ff is negative the boxes hang below the xyxy-plane and count as negative, so in general the double integral is a signed volume, like the signed area of Section 9.4. Module 9 allowed subintervals of different widths too; here equal widths keep the notation light, and a definition with unequal widths gives the same double integrals.

Theorem 19.1Integrable functions

If ff is continuous on the rectangle R,R\mathclose{\text{,}} then ff is integrable on R.R\mathclose{\text{.}} More generally, ff is integrable on RR if it is bounded on RR and continuous at every point of RR except those on finitely many curves, each the graph y=g(x)y = g(x) or x=h(y)x = h(y) of a continuous function on a closed interval.

As in Module 9, the proof belongs to a course in real analysis, and this series uses the theorem without proof. Its second sentence matters in Section 19.3, where a function is set to 0 outside a region and jumps along the region’s boundary. The properties of single integrals (Section 9.5) carry over, with the same proofs from the Riemann sums: for integrable ff and gg and a constant c,c\mathclose{\text{,}}

∬R(f+g) dA=∬Rf dA+∬Rg dA,∬Rc f dA=c∬Rf dA,\begin{aligned} \iint_R (f + g)\,dA &= \iint_R f\,dA + \iint_R g\,dA, \\ \iint_R c\,f\,dA &= c\iint_R f\,dA, \end{aligned}

and if f(x,y)≤g(x,y)f(x, y) \le g(x, y) at every point of R,R\mathclose{\text{,}} then ∬Rf dA≤∬Rg dA.\iint_R f\,dA \le \iint_R g\,dA\mathclose{\text{.}}

Watch out

Each term of a double Riemann sum is a volume, the height f(xij∗,yij∗)f(x_{ij}^*, y_{ij}^*) times the area ΔA=Δx Δy\Delta A = \Delta x\,\Delta y of the small rectangle, not the height alone. In Example 19.1 with n=4n = 4 the sixteen far-corner heights add up to 68, and only multiplying by ΔA=0.25\Delta A = 0.25 gives the lower sum L4=17.L_4 = 17\mathclose{\text{.}}

2

Iterated integrals and Fubini’s theorem

Limits of double sums are hard to compute directly. Module 12 had a better way to find a volume: slice the solid, find the area of each slice, and integrate the areas (Section 12.3). Fix xx in [a,b],[a, b]\mathclose{\text{,}} and slice the solid of Section 19.1 by the plane through xx parallel to the yzyz-plane. The slice is the region under the curve z=f(x,y),z = f(x, y)\mathclose{\text{,}} c≤y≤d,c \le y \le d\mathclose{\text{,}} with xx held constant, and its area is

A(x)=∫cdf(x,y) dy.A(x) = \int_c^d f(x, y)\,dy.

Computing it is partial integration with respect to y:y\mathclose{\text{:}} treat xx as a constant and integrate in y,y\mathclose{\text{,}} as a partial derivative treats xx as a constant and differentiates in yy (Module 17). The result is a function of xx alone. Integrating the areas of the slices gives the volume:

V=∫abA(x) dx=∫ab[∫cdf(x,y) dy] dx.V = \int_a^b A(x)\,dx = \int_a^b\Big[\int_c^d f(x, y)\,dy\Big]\,dx.

The right side is an iterated integral, usually written without the brackets,

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

Work from the inside out: the inner integral, whose dydy and limits cc and dd sit nearest to f,f\mathclose{\text{,}} comes first. Slicing the other way, by planes y=constant,y = \text{constant}\mathclose{\text{,}} gives the iterated integral ∫cd∫abf(x,y) dx dy,\int_c^d\int_a^b f(x, y)\,dx\,dy\mathclose{\text{,}} with the xx-integral inside.

Example 19.2The volume of Example 19.1✓ Checked

Find the volume under z=8−x2−y2z = 8 - x^2 - y^2 and above R=[0,2]×[0,2],R = [0, 2] \times [0, 2]\mathclose{\text{,}} slicing first by planes x=constantx = \text{constant} and then by planes y=constant.y = \text{constant}\mathclose{\text{.}}

Slices at fixed x.x\mathclose{\text{.}} With xx held constant, an antiderivative of 8−x2−y28 - x^2 - y^2 with respect to yy is 8y−x2y−y33,8y - x^2y - \tfrac{y^3}{3}\mathclose{\text{,}} so

A(x)=∫02(8−x2−y2) dy=[8y−x2y−y33]y=0y=2=16−2x2−83=403−2x2.\begin{aligned} A(x) &= \int_0^2 \big(8 - x^2 - y^2\big)\,dy \\ &= \Big[8y - x^2y - \frac{y^3}{3}\Big]_{y=0}^{y=2} \\ &= 16 - 2x^2 - \frac83 = \frac{40}{3} - 2x^2. \end{aligned}

For example, A(0)=403A(0) = \tfrac{40}{3} is the area under the parabola z=8−y2z = 8 - y^2 for 0≤y≤2,0 \le y \le 2\mathclose{\text{,}} the face of the solid in the plane x=0.x = 0\mathclose{\text{.}} Then

V=∫02(403−2x2) dx=803−163=643.V = \int_0^2 \Big(\frac{40}{3} - 2x^2\Big)\,dx = \frac{80}{3} - \frac{16}{3} = \frac{64}{3}.

Slices at fixed y.y\mathclose{\text{.}} The integrand does not change when xx and yy are swapped, so the same steps with the letters swapped give the inner integral ∫02(8−x2−y2) dx=403−2y2\int_0^2 (8 - x^2 - y^2)\,dx = \tfrac{40}{3} - 2y^2 and again V=643≈21.33.V = \tfrac{64}{3} \approx 21.33\mathclose{\text{.}} It lies between the bounds 12 and 28 of Example 19.1, close to the midpoint estimate 22.

Both orders gave the volume that the boxes of Section 19.1 approach. That is no accident:

Theorem 19.2Fubini’s theorem

If ff is continuous on the rectangle R=[a,b]×[c,d],R = [a, b] \times [c, d]\mathclose{\text{,}} then

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

More generally, if ff is bounded on RR and continuous except on finitely many curves of the kind in Theorem 19.1, then either iterated integral equals ∬Rf dA\iint_R f\,dA whenever its inner integrals exist for every value of the outer variable; their outer integral then exists too. If both orders meet this condition, both give the double integral.

For f≥0f \ge 0 the theorem says that slicing gives the volume that the boxes define. Its power is in computing: a double integral becomes two single integrals, each done with the methods of Modules 10 and 11, in whichever order is easier. The Going deeper box below proves it for continuous f.f\mathclose{\text{.}}

Going deeperWhy Fubini’s theorem holds

Here is a proof for continuous f.f\mathclose{\text{.}} It takes one fact from real analysis on trust: the function A(x)=∫cdf(x,y) dyA(x) = \int_c^d f(x, y)\,dy is continuous on [a,b].[a, b]\mathclose{\text{.}} (This rests on a property of functions continuous on a closed rectangle called uniform continuity.) Then AA is integrable on [a,b][a, b] (Theorem 9.3).

Cut [a,b][a, b] and [c,d][c, d] into mm and nn equal parts, and choose any points xi∗x_i^* in [xi−1,xi].[x_{i-1}, x_i]\mathclose{\text{.}} By additivity over intervals (Theorem 9.6) and the Mean Value Theorem for integrals (Theorem 9.9), applied to the continuous function y↦f(xi∗,y)y \mapsto f(x_i^*, y) on each [yj−1,yj],[y_{j-1}, y_j]\mathclose{\text{,}} there are points yij∗y_{ij}^* in [yj−1,yj][y_{j-1}, y_j] with

A(xi∗)=∑j=1n∫yj−1yjf(xi∗,y) dy=∑j=1nf(xi∗,yij∗) Δy.\begin{aligned} A(x_i^*) &= \sum_{j=1}^{n}\int_{y_{j-1}}^{y_j} f(x_i^*, y)\,dy \\ &= \sum_{j=1}^{n} f(x_i^*, y_{ij}^*)\,\Delta y. \end{aligned}

Multiply by Δx\Delta x and add over i:i\mathclose{\text{:}}

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

The right side is a double Riemann sum of f,f\mathclose{\text{,}} with the sample point (xi∗,yij∗)(x_i^*, y_{ij}^*) in Rij.R_{ij}\mathclose{\text{.}} Let I=∬Rf dAI = \iint_R f\,dA and ε>0,\varepsilon > 0\mathclose{\text{,}} and take NN as in Definition 19.1. For m≥N,m \ge N\mathclose{\text{,}} choose n=m:n = m\mathclose{\text{:}} the right side is within ε\varepsilon of I.I\mathclose{\text{.}} The left side does not involve nn at all; it is a Riemann sum of AA on [a,b][a, b] with mm equal subintervals. So every such Riemann sum of AA with m≥Nm \ge N is within ε\varepsilon of I,I\mathclose{\text{,}} whatever the points xi∗.x_i^*\mathclose{\text{.}} Their limit as m→∞m \to \infty is therefore I;I\mathclose{\text{;}} by Theorem 9.4 it is also ∫abA(x) dx.\int_a^b A(x)\,dx\mathclose{\text{.}} That proves the first equality. The second follows in the same way with the roles of xx and yy swapped.

The hypothesis cannot be dropped. On R=[0,1]×[0,1],R = [0, 1] \times [0, 1]\mathclose{\text{,}} let

f(x,y)=x2−y2(x2+y2)2f(x, y) = \frac{x^2 - y^2}{\big(x^2 + y^2\big)^2}

for (x,y)≠(0,0),(x, y) \ne (0, 0)\mathclose{\text{,}} and f(0,0)=0.f(0, 0) = 0\mathclose{\text{.}} For x>0x > 0 the quotient rule shows that ∂∂y(yx2+y2)=f(x,y),\dfrac{\partial}{\partial y}\Big(\dfrac{y}{x^2 + y^2}\Big) = f(x, y)\mathclose{\text{,}} so the inner integral is ∫01f(x,y) dy=1x2+1.\int_0^1 f(x, y)\,dy = \dfrac{1}{x^2 + 1}\mathclose{\text{.}} At x=0,x = 0\mathclose{\text{,}} however, f(0,y)=−1/y2f(0, y) = -1/y^2 for y>0,y > 0\mathclose{\text{,}} and that inner integral diverges. We therefore take the outer integral as an improper limit:

lim⁡ε→0+∫ε1∫01f(x,y) dy dx=lim⁡ε→0+∫ε1dx1+x2=π4.\begin{aligned} &\lim_{\varepsilon\to0^+}\int_\varepsilon^1\int_0^1 f(x, y)\,dy\,dx \\ &\quad= \lim_{\varepsilon\to0^+}\int_\varepsilon^1 \frac{dx}{1 + x^2} = \frac{\pi}{4}. \end{aligned}

But swapping xx and yy changes the sign of f,f\mathclose{\text{,}} so lim⁡ε→0+∫ε1∫01f(x,y) dx dy=−π4.\lim_{\varepsilon\to0^+}\int_\varepsilon^1\int_0^1 f(x, y)\,dx\,dy = -\tfrac{\pi}{4}\mathclose{\text{.}} These two improper iterated limits disagree. The function is not bounded on R:R\mathclose{\text{:}} along the xx-axis, f(x,0)=1/x2,f(x, 0) = 1/x^2\mathclose{\text{,}} which grows without bound as x→0.x \to 0\mathclose{\text{.}} Fubini’s theorem does not apply, and ff has no double Riemann integral over RR as defined in Section 19.1.

Example 19.3Choosing the order✓ Checked

Evaluate ∬Rxcos⁡(xy) dA,\displaystyle\iint_R x\cos(xy)\,dA\mathclose{\text{,}} where R=[0,π]×[0,1].R = [0, \pi] \times [0, 1]\mathclose{\text{.}}

The integrand is continuous, so by Fubini’s theorem either order gives the answer. Integrating first in yy is the easy way. With xx held constant, the chain rule gives ∂∂ysin⁡(xy)=xcos⁡(xy),\dfrac{\partial}{\partial y}\sin(xy) = x\cos(xy)\mathclose{\text{,}} so

∬Rxcos⁡(xy) dA=∫0π[sin⁡(xy)]y=0y=1 dx=∫0πsin⁡x dx=2.\begin{aligned} \iint_R x\cos(xy)\,dA &= \int_0^\pi\Big[\sin(xy)\Big]_{y=0}^{y=1}\,dx \\ &= \int_0^\pi \sin x\,dx = 2. \end{aligned}

In the other order, the inner integral ∫0πxcos⁡(xy) dx\int_0^\pi x\cos(xy)\,dx needs integration by parts (Module 11), and for 0<y≤10 < y \le 1 it gives

πsin⁡(πy)y+cos⁡(πy)−1y2.\frac{\pi\sin(\pi y)}{y} + \frac{\cos(\pi y) - 1}{y^2}.

An antiderivative of this is 1−cos⁡(πy)y,\dfrac{1 - \cos(\pi y)}{y}\mathclose{\text{,}} which takes some finding, and the integral from 0 to 1 needs a limit at y=0;y = 0\mathclose{\text{;}} the answer is 2 again. When one order is hard, try the other.

When gg is continuous on [a,b][a, b] and hh is continuous on [c,d],[c, d]\mathclose{\text{,}} their product g(x)h(y)g(x)h(y) is continuous on the rectangle R.R\mathclose{\text{.}} The inner integral of ∫ab∫cdg(x)h(y) dy dx\int_a^b\int_c^d g(x)h(y)\,dy\,dx is g(x)∫cdh(y) dy,g(x)\int_c^d h(y)\,dy\mathclose{\text{,}} a constant times g(x),g(x)\mathclose{\text{,}} and Fubini’s theorem splits the double integral into a product:

∬Rg(x)h(y) dA=∫abg(x) dx∫cdh(y) dy.\iint_R g(x)h(y)\,dA = \int_a^b g(x)\,dx\int_c^d h(y)\,dy.

For example, ∬Rsin⁡xcos⁡y dA=1⋅1=1\iint_R \sin x\cos y\,dA = 1 \cdot 1 = 1 over R=[0,π/2]×[0,π/2].R = [0, \pi/2] \times [0, \pi/2]\mathclose{\text{.}} This product rule needs a rectangle, whose limits are constants; Section 19.4 uses it to compute the Gaussian integral.

The average value of a function of one variable is its integral divided by the length of the interval (Section 9.7). In two variables, divide by the area.

Definition 19.2Average value

The average value of a function ff integrable on a rectangle RR of positive area is

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

where A(R)=(b−a)(d−c)A(R) = (b - a)(d - c) is the area of R.R\mathclose{\text{.}}

It is the number that the averages of ff over the sample points of finer and finer grids approach, as in Module 9; when f≥0,f \ge 0\mathclose{\text{,}} a box of height favgf_{\text{avg}} on RR has the same volume as the solid under the graph. The surface of Example 19.2 has the average height 643/4=163≈5.33\tfrac{64}{3} \big/ 4 = \tfrac{16}{3} \approx 5.33 over the square [0,2]×[0,2].[0, 2] \times [0, 2]\mathclose{\text{.}} Section 19.3 extends the definition to other regions, with the area of the region in place of A(R).A(R)\mathclose{\text{.}}

Compute itDouble integrals by computer

SymPy’s integrate takes one tuple per integral, the inner one first: (y, 0, 2) below is the inner integral, in y.y\mathclose{\text{.}}

Python
import sympy as sp
x, y = sp.symbols('x y')
f = 8 - x**2 - y**2
print(sp.integrate(f, (y, 0, 2)))              # the inner integral A(x)
print(sp.integrate(f, (y, 0, 2), (x, 0, 2)))   # y first, then x
print(sp.integrate(x*sp.cos(x*y), (y, 0, 1), (x, 0, sp.pi)))
Output
40/3 - 2*x**2
64/3
2

These are A(x)A(x) and the volume of Example 19.2, and the integral of Example 19.3. Numerically, a midpoint sum adds ff at the centres of an n×nn \times n grid. NumPy’s meshgrid builds every pair of centres (xi,yj)(x_i, y_j) at once, so even a million boxes take a fraction of a second:

Python
import numpy as np

def midpoint2d(f, a, b, c, d, n):
    dx, dy = (b - a)/n, (d - c)/n
    xs = a + (np.arange(n) + 0.5)*dx        # centres of the subintervals of [a, b]
    ys = c + (np.arange(n) + 0.5)*dy
    X, Y = np.meshgrid(xs, ys)              # all n*n centres (x_i, y_j)
    return np.sum(f(X, Y))*dx*dy

for n in [2, 10, 100, 1000]:
    print(n, midpoint2d(lambda x, y: 8 - x**2 - y**2, 0, 2, 0, 2, n))
Output
2 22.0
10 21.360000000000003
100 21.3336
1000 21.333336

The sums approach 643=21.333…\tfrac{64}{3} = 21.333\ldots with the signed error −83n2-\tfrac{8}{3n^2} found above, so each tenfold increase in nn divides its magnitude by 100. The digits …0003\ldots0003 at n=10n = 10 are floating-point rounding: that sum is exactly 21.36.

Watch out

Keep each variable with its own limits. In ∫02∫01f(x,y) dy dx\int_0^2\int_0^1 f(x, y)\,dy\,dx the inner limits 0 and 1 belong to y,y\mathclose{\text{,}} the variable of the inner dy,dy\mathclose{\text{,}} and the outer limits 0 and 2 belong to x.x\mathclose{\text{.}} Reading them the other way round integrates over [0,1]×[0,2][0, 1] \times [0, 2] instead of [0,2]×[0,1]:[0, 2] \times [0, 1]\mathclose{\text{:}} for f(x,y)=x2yf(x, y) = x^2y the right reading gives 43,\tfrac43\mathclose{\text{,}} the wrong one 23.\tfrac23\mathclose{\text{.}}

3

Integrals over general regions

Most regions are not rectangles: a disc, a triangle, the region between two curves. To integrate over a bounded region D,D\mathclose{\text{,}} enclose it in a rectangle RR and extend ff by zero:

F(x,y)={f(x,y)if (x,y) is in D,0if (x,y) is in R but not in D,F(x, y) = \begin{cases} f(x, y) & \text{if } (x, y) \text{ is in } D, \\ 0 & \text{if } (x, y) \text{ is in } R \text{ but not in } D, \end{cases}

and define ∬Df(x,y) dA=∬RF(x,y) dA\iint_D f(x, y)\,dA = \iint_R F(x, y)\,dA when the right side exists. The boxes outside DD have height 0 and add nothing, so the choice of RR does not matter. FF usually jumps at the boundary of D,D\mathclose{\text{,}} which is why Theorem 19.1 allows discontinuities along curves. Two shapes of region cover most cases (Figure 19.2).

Definition 19.3Type I and type II regions

A region DD is of type I if it lies between the graphs of two continuous functions of x:x\mathclose{\text{:}}

D={(x,y):a≤x≤b, g1(x)≤y≤g2(x)},D = \{(x, y) : a \le x \le b,\ g_1(x) \le y \le g_2(x)\},

with a<ba < b and g1(x)≤g2(x)g_1(x) \le g_2(x) for a≤x≤b.a \le x \le b\mathclose{\text{.}} It is of type II if it lies between the graphs of two continuous functions of y:y\mathclose{\text{:}}

D={(x,y):c≤y≤d, h1(y)≤x≤h2(y)},D = \{(x, y) : c \le y \le d,\ h_1(y) \le x \le h_2(y)\},

with c<dc < d and h1(y)≤h2(y)h_1(y) \le h_2(y) for c≤y≤d.c \le y \le d\mathclose{\text{.}}

Left: a type I region lies between a lower curve y = g1(x) and an upper curve y = g2(x), for a le x le b. Each vertical line between a and b meets it in one segment (orange), from g1(x) to g2(x). Right: a type II region lies between a left curve x = h1(y) and a right curve x = h2(y), for c le y le d; each horizontal line between c and d meets it in one segment, from h1(y) to h2(y).
Figure 19.2

Left: a type I region lies between a lower curve y=g1(x)y = g_1(x) and an upper curve y=g2(x),y = g_2(x)\mathclose{\text{,}} for a≤x≤b.a \le x \le b\mathclose{\text{.}} Each vertical line between aa and bb meets it in one segment (orange), from g1(x)g_1(x) to g2(x).g_2(x)\mathclose{\text{.}} Right: a type II region lies between a left curve x=h1(y)x = h_1(y) and a right curve x=h2(y),x = h_2(y)\mathclose{\text{,}} for c≤y≤d;c \le y \le d\mathclose{\text{;}} each horizontal line between cc and dd meets it in one segment, from h1(y)h_1(y) to h2(y).h_2(y)\mathclose{\text{.}}

Theorem 19.3Iterated integrals over type I and type II regions

If ff is continuous on a type I region DD as in Definition 19.3, then

∬Df(x,y) dA=∫ab∫g1(x)g2(x)f(x,y) dy dx.\iint_D f(x, y)\,dA = \int_a^b\int_{g_1(x)}^{g_2(x)} f(x, y)\,dy\,dx.

If ff is continuous on a type II region D,D\mathclose{\text{,}} then

∬Df(x,y) dA=∫cd∫h1(y)h2(y)f(x,y) dx dy.\iint_D f(x, y)\,dA = \int_c^d\int_{h_1(y)}^{h_2(y)} f(x, y)\,dx\,dy.
Proof

Take a type I region; the type II case is the same with xx and yy swapped. The continuous functions g1g_1 and g2g_2 are bounded on [a,b][a, b] (the Extreme Value Theorem, Module 3), so there are numbers c<dc < d with c≤g1(x)c \le g_1(x) and g2(x)≤dg_2(x) \le d for all xx in [a,b].[a, b]\mathclose{\text{.}} Let FF be ff extended by zero to R=[a,b]×[c,d].R = [a, b] \times [c, d]\mathclose{\text{.}} The function ff is bounded on the closed bounded region DD (by the Extreme Value Theorem for such regions, Module 18), so FF is bounded on R,R\mathclose{\text{,}} and it is continuous except perhaps on the graphs of g1g_1 and g2.g_2\mathclose{\text{.}} By Theorem 19.1, ∬Df dA=∬RF dA\iint_D f\,dA = \iint_R F\,dA exists. For each x,x\mathclose{\text{,}} F(x,y)F(x, y) equals f(x,y)f(x, y) for g1(x)≤y≤g2(x)g_1(x) \le y \le g_2(x) and 0 for the other yy in [c,d],[c, d]\mathclose{\text{,}} so

∫cdF(x,y) dy=∫g1(x)g2(x)f(x,y) dy.\int_c^d F(x, y)\,dy = \int_{g_1(x)}^{g_2(x)} f(x, y)\,dy.

For each fixed x,x\mathclose{\text{,}} the function y↦F(x,y)y \mapsto F(x, y) is bounded and continuous except possibly at the two ends g1(x)g_1(x) and g2(x),g_2(x)\mathclose{\text{,}} so its integral exists by Theorem 9.3. The general form of Fubini’s theorem now gives the formula.

∎

To set up the limits, draw a picture.

Key idea

Limits from a sketch. To set up ∬Df dA:\iint_D f\,dA\mathclose{\text{:}}

  1. Sketch D,D\mathclose{\text{,}} label its boundary curves, and find where they meet.
  2. For the order dy dx,dy\,dx\mathclose{\text{,}} draw a vertical line through DD at a typical x.x\mathclose{\text{.}} It enters DD on the lower curve y=g1(x)y = g_1(x) and leaves on the upper curve y=g2(x):y = g_2(x)\mathclose{\text{:}} these are the inner limits. The outer limits are the least and the greatest xx in D.D\mathclose{\text{.}}
  3. For the order dx dy,dx\,dy\mathclose{\text{,}} draw a horizontal line at a typical y.y\mathclose{\text{.}} It enters DD on the left curve and leaves on the right curve, both written as x=…:x = \dots\mathclose{\text{:}} these are the inner limits. The outer limits are the least and the greatest yy in D.D\mathclose{\text{.}}

These instructions describe a region of the chosen type. If a slice has several separate segments, split the region into suitable pieces and add their integrals. Splitting can also simplify a bound given by different formulas on different intervals. The outer limits are constant with respect to the integration variables; they may depend on a fixed parameter. The inner limits may depend on the outer variable, never on the inner one.

Example 19.4Both orders on a region between curves✓ Checked

Let DD be the region between the parabola y=x2y = x^2 and the line y=x.y = x\mathclose{\text{.}} Evaluate ∬Dxy dA\iint_D xy\,dA in both orders.

The curves meet where x2=x,x^2 = x\mathclose{\text{,}} at x=0x = 0 and x=1,x = 1\mathclose{\text{,}} that is, at (0,0)(0, 0) and (1,1).(1, 1)\mathclose{\text{.}} Between them the line is above the parabola, since x>x2x > x^2 for 0<x<1.0 < x < 1\mathclose{\text{.}}

Vertical slices. A vertical line at x,x\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} enters DD on the parabola and leaves on the line:

∬Dxy dA=∫01∫x2xxy dy dx=∫01x[y22]y=x2y=x dx=∫01x3−x52 dx=12(14−16)=124.\begin{aligned} \iint_D xy\,dA &= \int_0^1\int_{x^2}^{x} xy\,dy\,dx \\ &= \int_0^1 x\Big[\frac{y^2}{2}\Big]_{y=x^2}^{y=x}\,dx \\ &= \int_0^1 \frac{x^3 - x^5}{2}\,dx \\ &= \frac12\Big(\frac14 - \frac16\Big) = \frac{1}{24}. \end{aligned}

Horizontal slices. As functions of y,y\mathclose{\text{,}} the line is x=yx = y and the parabola, where x≥0,x \ge 0\mathclose{\text{,}} is x=y.x = \sqrt y\mathclose{\text{.}} A horizontal line at y,y\mathclose{\text{,}} 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} enters DD on the line and leaves on the parabola, since y≤yy \le \sqrt y there:

∬Dxy dA=∫01∫yyxy dx dy=∫01y[x22]x=yx=y dy=∫01y2−y32 dy=12(13−14)=124.\begin{aligned} \iint_D xy\,dA &= \int_0^1\int_{y}^{\sqrt y} xy\,dx\,dy \\ &= \int_0^1 y\Big[\frac{x^2}{2}\Big]_{x=y}^{x=\sqrt y}\,dy \\ &= \int_0^1 \frac{y^2 - y^3}{2}\,dy \\ &= \frac12\Big(\frac13 - \frac14\Big) = \frac{1}{24}. \end{aligned}

The same answer, as Theorem 19.3 promises: DD is of both types.

Try it

Start with the region of Example 19.4 and the order dy dx,dy\,dx\mathclose{\text{,}} and move the slider: the orange segment is the slice, and the readout gives its ends twice, as formulas (the inner limits x2x^2 and x)x\mathclose{\text{)}} and as numbers. Switch to dx dy:dx\,dy\mathclose{\text{:}} now the slice is horizontal, the boundary curves are labelled x=yx = y and x=y,x = \sqrt y\mathclose{\text{,}} and the inner limits change with them. Try the other regions. For the quarter disc, compare the inner limits 1−x2\sqrt{1 - x^2} and 1−y2.\sqrt{1 - y^2}\mathclose{\text{.}} For the region between y=xy = \sqrt x and y=x/2,y = x/2\mathclose{\text{,}} watch the outer limits change from 0≤x≤40 \le x \le 4 to 0≤y≤2.0 \le y \le 2\mathclose{\text{.}} Each time, the area computed with vertical slices and with horizontal slices comes out the same.

With f=1f = 1 the double integral is the area of D.D\mathclose{\text{.}} For a type I region,

A(D)=∬D1 dA=∫ab(g2(x)−g1(x)) dx,A(D) = \iint_D 1\,dA = \int_a^b\big(g_2(x) - g_1(x)\big)\,dx,

the formula for the area between curves of Section 12.2. When A(D)>0A(D) > 0 and ff is integrable on D,D\mathclose{\text{,}} its average value is 1A(D)∬Df dA.\tfrac{1}{A(D)}\iint_D f\,dA\mathclose{\text{.}}

Two more properties follow from those of Section 19.1, assuming the integrals involved exist. If DD is made of two regions D1D_1 and D2D_2 whose overlap has area 0, then ∬Df dA=∬D1f dA+∬D2f dA.\iint_D f\,dA = \iint_{D_1} f\,dA + \iint_{D_2} f\,dA\mathclose{\text{.}} For example, their common boundary may consist of finitely many curves of the kind in Theorem 19.1, which have area 0. And if f≥0f \ge 0 and D1D_1 lies inside D2,D_2\mathclose{\text{,}} then ∬D1f dA≤∬D2f dA,\iint_{D_1} f\,dA \le \iint_{D_2} f\,dA\mathclose{\text{,}} because ff extended by zero outside D1D_1 is at most ff extended by zero outside D2.D_2\mathclose{\text{.}}

Example 19.5The volume of a tetrahedron✓ Checked

For a,b,c>0,a, b, c > 0\mathclose{\text{,}} the plane xa+yb+zc=1\dfrac{x}{a} + \dfrac{y}{b} + \dfrac{z}{c} = 1 meets the axes at (a,0,0),(a, 0, 0)\mathclose{\text{,}} (0,b,0)(0, b, 0) and (0,0,c).(0, 0, c)\mathclose{\text{.}} Find the volume of the tetrahedron bounded by this plane and the three coordinate planes.

The tetrahedron is the solid under the plane, z=c(1−xa−yb),z = c\big(1 - \tfrac{x}{a} - \tfrac{y}{b}\big)\mathclose{\text{,}} above the triangle DD that the coordinate axes and the line xa+yb=1\tfrac{x}{a} + \tfrac{y}{b} = 1 cut from the xyxy-plane (where z=0).z = 0\mathclose{\text{).}} So DD is the type I region 0≤x≤a,0 \le x \le a\mathclose{\text{,}} 0≤y≤b(1−xa).0 \le y \le b\big(1 - \tfrac{x}{a}\big)\mathclose{\text{.}} Write w=1−xaw = 1 - \tfrac{x}{a} for short; it does not depend on y.y\mathclose{\text{.}} The inner integral is

∫0bwc(w−yb) dy=c[wy−y22b]0bw=c(bw2−bw22)=bc2w2,\begin{aligned} \int_0^{bw} c\Big(w - \frac{y}{b}\Big)\,dy &= c\Big[wy - \frac{y^2}{2b}\Big]_0^{bw} \\ &= c\Big(bw^2 - \frac{bw^2}{2}\Big) = \frac{bc}{2}w^2, \end{aligned}

and, substituting u=1−xau = 1 - \tfrac{x}{a} (Module 10),

V=bc2∫0a(1−xa)2 dx=bc2⋅a∫01u2 du=abc6.\begin{aligned} V &= \frac{bc}{2}\int_0^a\Big(1 - \frac{x}{a}\Big)^2\,dx \\ &= \frac{bc}{2}\cdot a\int_0^1 u^2\,du = \frac{abc}{6}. \end{aligned}

The base triangle has area 12ab\tfrac12 ab and the height is c,c\mathclose{\text{,}} so V=13⋅12ab⋅c:V = \tfrac13 \cdot \tfrac12 ab \cdot c\mathclose{\text{:}} one third of the base times the height, as for the pyramids of Section 12.3.

Watch out

The inner limits describe one slice, not the corners of the region. For the triangle 0≤y≤x≤1,0 \le y \le x \le 1\mathclose{\text{,}} writing ∫01∫01f dy dx\int_0^1\int_0^1 f\,dy\,dx integrates over the whole square; a vertical slice at xx runs only from y=0y = 0 to y=x.y = x\mathclose{\text{.}} Keep fixed parameters distinct from integration variables. If the outer bound is a positive parameter s,s\mathclose{\text{,}} write ∫0s∫01f(x,y) dy dx:\int_0^s\int_0^1 f(x, y)\,dy\,dx\mathclose{\text{:}} hold ss fixed while integrating in xx and y.y\mathclose{\text{.}}

Reversing the order

Sometimes only one order can be done by hand.

Example 19.6An integral that needs reversing✓ Checked

Evaluate ∫01∫x1ey2 dy dx.\displaystyle\int_0^1\int_x^1 e^{y^2}\,dy\,dx\mathclose{\text{.}}

As written, the inner integral asks for an antiderivative of ey2,e^{y^2}\mathclose{\text{,}} and there is no elementary one (Module 11). So reverse the order. The limits say that 0≤x≤10 \le x \le 1 and x≤y≤1:x \le y \le 1\mathclose{\text{:}} the region DD is the triangle with vertices (0,0),(0, 0)\mathclose{\text{,}} (0,1)(0, 1) and (1,1),(1, 1)\mathclose{\text{,}} above the line y=x.y = x\mathclose{\text{.}} Slice it horizontally: at height y,y\mathclose{\text{,}} for 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} a horizontal line enters DD on the yy-axis and leaves on the line x=y.x = y\mathclose{\text{.}} As a type II region DD is 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} 0≤x≤y,0 \le x \le y\mathclose{\text{,}} so

∫01∫x1ey2 dy dx=∫01∫0yey2 dx dy=∫01y ey2 dy=[ey22]01=e−12≈0.859.\begin{aligned} \int_0^1\int_x^1 e^{y^2}\,dy\,dx &= \int_0^1\int_0^y e^{y^2}\,dx\,dy \\ &= \int_0^1 y\,e^{y^2}\,dy = \Big[\frac{e^{y^2}}{2}\Big]_0^1 \\ &= \frac{e - 1}{2} \approx 0.859. \end{aligned}

The inner integral, in x,x\mathclose{\text{,}} treats ey2e^{y^2} as a constant and multiplies it by the length yy of the slice; that factor yy is what the substitution u=y2u = y^2 needs (Module 10).

Compute itReversing the order by computer

SymPy can do the original order, but only with a special function:

Python
import sympy as sp
x, y = sp.symbols('x y')
inner = sp.integrate(sp.exp(y**2), (y, x, 1))
print(inner)
print(sp.simplify(sp.integrate(inner, (x, 0, 1))))
print(sp.integrate(sp.exp(y**2), (x, 0, y), (y, 0, 1)))   # reversed: x first
Output
-sqrt(pi)*erfi(x)/2 + sqrt(pi)*erfi(1)/2
-1/2 + E/2
-1/2 + E/2

The inner integral is written with erfi, the “imaginary error function”, a relative of the error function of Module 11 and, like it, not an elementary function. SymPy knows how to integrate it and, after simplifying, reaches -1/2 + E/2, that is, e−12\tfrac{e - 1}{2} (E is SymPy’s name for e):e\mathclose{\text{):}} the answer of Example 19.6, which the reversed order gives at once.

Watch out

To reverse an order, sketch the region and read the new limits from the picture; never move the limits around as they stand. Keeping the constant limits of ∫01∫x1ey2 dy dx\int_0^1\int_x^1 e^{y^2}\,dy\,dx and dropping the others gives ∫01∫01ey2 dx dy=∫01ey2 dy≈1.4627,\int_0^1\int_0^1 e^{y^2}\,dx\,dy = \int_0^1 e^{y^2}\,dy \approx 1.4627\mathclose{\text{,}} the integral over the whole square: not the triangle of Example 19.6, whose integral is about 0.859.

4

Polar coordinates

Discs, rings and sectors are awkward in xx and y:y\mathclose{\text{:}} the disc x2+y2≤1x^2 + y^2 \le 1 needs the limits ±1−x2.\pm\sqrt{1 - x^2}\mathclose{\text{.}} In the polar coordinates of Module 16, x=rcos⁡θx = r\cos\theta and y=rsin⁡θy = r\sin\theta with r≥0,r \ge 0\mathclose{\text{,}} the same disc is 0≤r≤1,0 \le r \le 1\mathclose{\text{,}} 0≤θ≤2π:0 \le \theta \le 2\pi\mathclose{\text{:}} a rectangle in rr and θ.\theta\mathclose{\text{.}} A polar rectangle is a region

{(r,θ):r0≤r≤r1, α≤θ≤β},\{(r, \theta) : r_0 \le r \le r_1,\ \alpha \le \theta \le \beta\},

with 0≤r0<r10 \le r_0 < r_1 and 0<β−α≤2π:0 < \beta - \alpha \le 2\pi\mathclose{\text{:}} a piece of a ring between two rays (Figure 19.3, left). The Greek letters α\alpha and β\beta are “alpha” and “beta”.

What is its area? A sector of radius rr and angle Δθ\Delta\theta has area 12r2Δθ\tfrac12 r^2\Delta\theta (Module 16), and the polar rectangle, with Δθ=β−α,\Delta\theta = \beta - \alpha\mathclose{\text{,}} is the difference of two sectors:

12r12 Δθ−12r02 Δθ=r0+r12 (r1−r0) Δθ=rˉ Δr Δθ,\begin{aligned} \frac12 r_1^2\,\Delta\theta - \frac12 r_0^2\,\Delta\theta &= \frac{r_0 + r_1}{2}\,(r_1 - r_0)\,\Delta\theta \\ &= \bar r\,\Delta r\,\Delta\theta, \end{aligned}

where Δr=r1−r0\Delta r = r_1 - r_0 and rˉ=r0+r12\bar r = \tfrac{r_0 + r_1}{2} is the average radius. A small polar rectangle is nearly a rectangle with sides Δr,\Delta r\mathclose{\text{,}} along a ray, and rˉ Δθ,\bar r\,\Delta\theta\mathclose{\text{,}} along an arc of radius rˉ.\bar r\mathclose{\text{.}} Its area is not Δr Δθ\Delta r\,\Delta\theta but rˉ Δr Δθ:\bar r\,\Delta r\,\Delta\theta\mathclose{\text{:}} polar rectangles with the same Δr\Delta r and Δθ\Delta\theta get bigger further from the origin.

Left: a polar rectangle, the part of a ring between two radii and between the rays at angles theta and theta + Deltatheta. Its sides are Delta r along a ray and about r,Deltatheta along an arc, and its area is exactly bar r,Delta r,Deltatheta, with bar r the average radius. Right: the disc Da of radius a lies inside the square Sa = [-a, a] times [-a, a], which lies inside the disc D{asqrt2} through its corners. The proof of Theorem 19.5 squeezes an integral over the square between integrals over the two discs.
Figure 19.3

Left: a polar rectangle, the part of a ring between two radii and between the rays at angles θ\theta and θ+Δθ.\theta + \Delta\theta\mathclose{\text{.}} Its sides are Δr\Delta r along a ray and about r Δθr\,\Delta\theta along an arc, and its area is exactly rˉ Δr Δθ,\bar r\,\Delta r\,\Delta\theta\mathclose{\text{,}} with rˉ\bar r the average radius. Right: the disc DaD_a of radius aa lies inside the square Sa=[−a,a]×[−a,a],S_a = [-a, a] \times [-a, a]\mathclose{\text{,}} which lies inside the disc Da2D_{a\sqrt2} through its corners. The proof of Theorem 19.5 squeezes an integral over the square between integrals over the two discs.

Theorem 19.4Double integrals in polar coordinates

Let ff be continuous on a region DD described in polar coordinates by

α≤θ≤β,h1(θ)≤r≤h2(θ),\alpha \le \theta \le \beta, \qquad h_1(\theta) \le r \le h_2(\theta),

where 0<β−α≤2π0 < \beta - \alpha \le 2\pi and h1,h_1\mathclose{\text{,}} h2h_2 are continuous on [α,β][\alpha, \beta] with 0≤h1(θ)≤h2(θ).0 \le h_1(\theta) \le h_2(\theta)\mathclose{\text{.}} Then

∬Df(x,y) dA=∫αβ∫h1(θ)h2(θ)f(rcos⁡θ,rsin⁡θ) r dr dθ.\begin{aligned} &\iint_D f(x, y)\,dA \\ &\quad= \int_\alpha^\beta\int_{h_1(\theta)}^{h_2(\theta)} f(r\cos\theta, r\sin\theta)\,r\,dr\,d\theta. \end{aligned}

The nonnegative radii and an angle range of at most one full turn ensure that points are covered once, apart from the origin and a possible shared boundary ray when β−α=2π.\beta - \alpha = 2\pi\mathclose{\text{.}} Those exceptional sets have area 0 and do not change the integral.

Use dA=r dr dθ:dA = r\,dr\,d\theta\mathclose{\text{:}} replace xx and yy by rcos⁡θr\cos\theta and rsin⁡θ,r\sin\theta\mathclose{\text{,}} and dAdA by r dr dθ.r\,dr\,d\theta\mathclose{\text{.}} For a polar rectangle, h1h_1 and h2h_2 are the constants r0r_0 and r1.r_1\mathclose{\text{.}} With f=1f = 1 and h1=0,h_1 = 0\mathclose{\text{,}} the inner integral is ∫0h2(θ)r dr=12h2(θ)2,\int_0^{h_2(\theta)} r\,dr = \tfrac12 h_2(\theta)^2\mathclose{\text{,}} and the theorem gives the area ∫αβ12h2(θ)2 dθ:\int_\alpha^\beta \tfrac12 h_2(\theta)^2\,d\theta\mathclose{\text{:}} the formula for areas in polar coordinates of Module 16.

The idea of the proof. Take a polar rectangle, and cut [r0,r1][r_0, r_1] and [α,β][\alpha, \beta] into mm and nn equal parts. The circles and rays through the cut points divide the region into mnmn small polar rectangles; the one between ri−1r_{i-1} and rir_i and between θj−1\theta_{j-1} and θj\theta_j has area rˉi Δr Δθ,\bar r_i\,\Delta r\,\Delta\theta\mathclose{\text{,}} where rˉi\bar r_i is its average radius. With the sample point at radius rˉi\bar r_i and some angle θj∗,\theta_j^*\mathclose{\text{,}} the sum

∑i=1m∑j=1nf(rˉicos⁡θj∗,rˉisin⁡θj∗) rˉi Δr Δθ\sum_{i=1}^{m}\sum_{j=1}^{n} f\big(\bar r_i\cos\theta_j^*, \bar r_i\sin\theta_j^*\big)\,\bar r_i\,\Delta r\,\Delta\theta

adds up ff times the areas of the pieces of D,D\mathclose{\text{,}} like a double Riemann sum. It is also an ordinary double Riemann sum of the function f(rcos⁡θ,rsin⁡θ) rf(r\cos\theta, r\sin\theta)\,r over the rectangle [r0,r1]×[α,β][r_0, r_1] \times [\alpha, \beta] of the rθr\theta-plane, so it approaches the right side of the theorem. That it also approaches ∬Df dA\iint_D f\,dA needs Riemann sums over pieces that are not rectangles, which this module does not develop; Section 19.8 places the theorem in a general rule.

Example 19.7Under a paraboloid✓ Checked

Find the volume of the solid under the paraboloid z=4−x2−y2z = 4 - x^2 - y^2 and above the xyxy-plane.

The paraboloid meets the plane z=0z = 0 in the circle x2+y2=4,x^2 + y^2 = 4\mathclose{\text{,}} so the solid stands on the disc DD of radius 2, where 4−x2−y2≥0.4 - x^2 - y^2 \ge 0\mathclose{\text{.}} In polar coordinates x2+y2=r2,x^2 + y^2 = r^2\mathclose{\text{,}} so the height is 4−r2,4 - r^2\mathclose{\text{,}} and DD is 0≤r≤2,0 \le r \le 2\mathclose{\text{,}} 0≤θ≤2π:0 \le \theta \le 2\pi\mathclose{\text{:}}

V=∫02π∫02(4−r2) r dr dθ=∫02π[2r2−r44]02 dθ=∫02π4 dθ=8π≈25.13.\begin{aligned} V &= \int_0^{2\pi}\int_0^2 \big(4 - r^2\big)\,r\,dr\,d\theta \\ &= \int_0^{2\pi}\Big[2r^2 - \frac{r^4}{4}\Big]_0^2\,d\theta \\ &= \int_0^{2\pi} 4\,d\theta = 8\pi \approx 25.13. \end{aligned}

The cylinder of radius 2 and height 4 has volume 16π,16\pi\mathclose{\text{,}} so the dome fills exactly half of it. In xx and yy the same volume is ∫−22∫−4−x24−x2(4−x2−y2) dy dx,\int_{-2}^{2}\int_{-\sqrt{4 - x^2}}^{\sqrt{4 - x^2}} \big(4 - x^2 - y^2\big)\,dy\,dx\mathclose{\text{,}} a much longer computation.

Example 19.8A disc through the origin✓ Checked

Evaluate ∬Dx2+y2 dA,\displaystyle\iint_D \sqrt{x^2 + y^2}\,dA\mathclose{\text{,}} where DD is the disc bounded by the circle x2+y2=2x.x^2 + y^2 = 2x\mathclose{\text{.}}

Completing the square, (x−1)2+y2=1:(x - 1)^2 + y^2 = 1\mathclose{\text{:}} the disc of radius 1 centred at (1,0),(1, 0)\mathclose{\text{,}} which touches the origin. In polar coordinates the circle is r2=2rcos⁡θ,r^2 = 2r\cos\theta\mathclose{\text{,}} that is, r=2cos⁡θr = 2\cos\theta (or r=0,r = 0\mathclose{\text{,}} the origin). The disc lies in the half-plane x≥0,x \ge 0\mathclose{\text{,}} so θ\theta runs from −π/2-\pi/2 to π/2,\pi/2\mathclose{\text{,}} and the ray at angle θ\theta runs through DD from r=0r = 0 to r=2cos⁡θ.r = 2\cos\theta\mathclose{\text{.}} With x2+y2=r,\sqrt{x^2 + y^2} = r\mathclose{\text{,}}

∬Dx2+y2 dA=∫−π/2π/2∫02cos⁡θr⋅r dr dθ=∫−π/2π/28cos⁡3θ3 dθ=83⋅43=329.\begin{aligned} \iint_D \sqrt{x^2 + y^2}\,dA &= \int_{-\pi/2}^{\pi/2}\int_0^{2\cos\theta} r\cdot r\,dr\,d\theta \\ &= \int_{-\pi/2}^{\pi/2} \frac{8\cos^3\theta}{3}\,d\theta \\ &= \frac83\cdot\frac43 = \frac{32}{9}. \end{aligned}

For the last integral, write cos⁡3θ=(1−sin⁡2θ)cos⁡θ\cos^3\theta = (1 - \sin^2\theta)\cos\theta and substitute u=sin⁡θ:u = \sin\theta\mathclose{\text{:}} ∫−π/2π/2cos⁡3θ dθ=∫−11(1−u2) du=43.\int_{-\pi/2}^{\pi/2}\cos^3\theta\,d\theta = \int_{-1}^{1}(1 - u^2)\,du = \tfrac43\mathclose{\text{.}} The disc has area π,\pi\mathclose{\text{,}} so the average distance of its points from the origin is 329π≈1.13,\tfrac{32}{9\pi} \approx 1.13\mathclose{\text{,}} a little more than the distance 1 of its centre.

Watch out

Two slips with polar coordinates. Forgetting the factor r:r\mathclose{\text{:}} ∫02π∫01dr dθ=2π\int_0^{2\pi}\int_0^1 dr\,d\theta = 2\pi is not the area of the unit disc; ∫02π∫01r dr dθ=π\int_0^{2\pi}\int_0^1 r\,dr\,d\theta = \pi is. And the wrong range of θ:\theta\mathclose{\text{:}} the circle r=2cos⁡θr = 2\cos\theta of Example 19.8 is traced once as θ\theta runs from −π/2-\pi/2 to π/2.\pi/2\mathclose{\text{.}} Letting θ\theta run from 0 to 2π2\pi gives ∫02π83cos⁡3θ dθ=0,\int_0^{2\pi} \tfrac83\cos^3\theta\,d\theta = 0\mathclose{\text{,}} because for π/2<θ<3π/2\pi/2 < \theta < 3\pi/2 the “radius” 2cos⁡θ2\cos\theta is negative, which Theorem 19.4 does not allow.

The Gaussian integral

Module 12 needed the value of ∫−∞∞e−x2 dx\int_{-\infty}^{\infty} e^{-x^2}\,dx to show that the normal density has total area 1, and quoted it (Section 12.9) with the promise of a proof here. There is no elementary antiderivative of e−x2e^{-x^2} (Module 11). The trick is to square the integral: the square is a double integral, and in polar coordinates the factor rr makes e−r2e^{-r^2} easy to integrate.

Theorem 19.5The Gaussian integral
∫−∞∞e−x2 dx=π.\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt\pi.
Proof

For a>0a > 0 let

Ia=∫−aae−x2 dx.I_a = \int_{-a}^{a} e^{-x^2}\,dx.

The square of IaI_a is a double integral. The name of the variable does not matter, so Ia=∫−aae−y2 dyI_a = \int_{-a}^{a} e^{-y^2}\,dy too, and by the product rule of Section 19.2 on the square Sa=[−a,a]×[−a,a],S_a = [-a, a] \times [-a, a]\mathclose{\text{,}}

Ia2=∫−aae−x2 dx∫−aae−y2 dy=∬Sae−(x2+y2) dA.\begin{aligned} I_a^2 &= \int_{-a}^{a} e^{-x^2}\,dx\int_{-a}^{a} e^{-y^2}\,dy \\ &= \iint_{S_a} e^{-(x^2 + y^2)}\,dA. \end{aligned}

Squeeze it between two discs. Let DRD_R be the disc of radius RR centred at the origin. The disc DaD_a lies inside Sa,S_a\mathclose{\text{,}} and SaS_a lies inside the disc Da2D_{a\sqrt2} through its corners (Figure 19.3, right). The integrand is positive, so a larger region gives a larger integral (Section 19.3):

∬Dae−(x2+y2) dA≤Ia2≤∬Da2e−(x2+y2) dA.\iint_{D_a} e^{-(x^2 + y^2)}\,dA \le I_a^2 \le \iint_{D_{a\sqrt2}} e^{-(x^2 + y^2)}\,dA.

Integrate over a disc in polar coordinates. On DR,D_R\mathclose{\text{,}} x2+y2=r2,x^2 + y^2 = r^2\mathclose{\text{,}} and the substitution u=r2u = r^2 (Module 10) integrates e−r2r:e^{-r^2}r\mathclose{\text{:}}

∬DRe−(x2+y2) dA=∫02π∫0Re−r2 r dr dθ=2π[−e−r22]0R=π(1−e−R2).\begin{aligned} \iint_{D_R} e^{-(x^2 + y^2)}\,dA &= \int_0^{2\pi}\int_0^R e^{-r^2}\,r\,dr\,d\theta \\ &= 2\pi\Big[-\frac{e^{-r^2}}{2}\Big]_0^R \\ &= \pi\big(1 - e^{-R^2}\big). \end{aligned}

With R=aR = a and R=a2,R = a\sqrt2\mathclose{\text{,}} the squeeze becomes

π(1−e−a2)≤Ia2≤π(1−e−2a2).\pi\big(1 - e^{-a^2}\big) \le I_a^2 \le \pi\big(1 - e^{-2a^2}\big).

Let a→∞.a \to \infty\mathclose{\text{.}} Both bounds approach π,\pi\mathclose{\text{,}} because e−a2e^{-a^2} and e−2a2e^{-2a^2} approach 0. By the squeeze theorem (Section 2.6, which holds for limits at infinity too), Ia2→π;I_a^2 \to \pi\mathclose{\text{;}} since Ia>0I_a > 0 and the square root is continuous, Ia→π.I_a \to \sqrt\pi\mathclose{\text{.}} Finally, e−x2e^{-x^2} is even, so ∫0ae−x2 dx=12Ia→π2,\int_0^a e^{-x^2}\,dx = \tfrac12 I_a \to \tfrac{\sqrt\pi}{2}\mathclose{\text{,}} and likewise ∫−a0e−x2 dx→π2.\int_{-a}^0 e^{-x^2}\,dx \to \tfrac{\sqrt\pi}{2}\mathclose{\text{.}} Both halves of the improper integral converge (Section 12.8, with c=0),c = 0\mathclose{\text{),}} and their sum is π.\sqrt\pi\mathclose{\text{.}}

∎

The squeeze in numbers: the middle column below comes from computing IaI_a numerically, and both bounds close in on π=3.14159…\pi = 3.14159\ldots

aaπ(1−e−a2)\pi\big(1 - e^{-a^2}\big)Ia2I_a^2π(1−e−2a2)\pi\big(1 - e^{-2a^2}\big)
0.50.50.6949180.6949180.8511210.8511211.236121.23612
111.985871.985872.230992.230992.716422.71642
1.51.52.810472.810472.932232.932233.106693.10669
223.084053.084053.112273.112273.140543.14054
333.141203.141203.141453.141453.141593.14159
Good to know

Why the squeeze? A shorter argument writes the square of ∫−∞∞e−x2 dx\int_{-\infty}^{\infty} e^{-x^2}\,dx as one integral over the whole plane and switches to polar coordinates in one step: ∫02π∫0∞e−r2r dr dθ=π.\int_0^{2\pi}\int_0^\infty e^{-r^2}r\,dr\,d\theta = \pi\mathclose{\text{.}} That is the idea, but it uses a double integral over an unbounded region, which is improper and needs its own definition. The proof above uses only integrals over bounded regions and lets a→∞a \to \infty at the end.

Two consequences for probability. For c>0,c > 0\mathclose{\text{,}} the substitution x=c t,x = \sqrt c\,t\mathclose{\text{,}} with dx=c dt,dx = \sqrt c\,dt\mathclose{\text{,}} gives

∫−∞∞e−ct2 dt=1c∫−∞∞e−x2 dx=πc.\int_{-\infty}^{\infty} e^{-ct^2}\,dt = \frac{1}{\sqrt c}\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\frac{\pi}{c}}.

With c=12c = \tfrac12 this is ∫−∞∞e−t2/2 dt=2π,\int_{-\infty}^{\infty} e^{-t^2/2}\,dt = \sqrt{2\pi}\mathclose{\text{,}} the total area that makes the standard normal density φ(z)=e−z2/2/2π\varphi(z) = e^{-z^2/2}/\sqrt{2\pi} of Module 12 a density. And since the integrand is even, ∫0∞e−x2 dx=π2.\int_0^\infty e^{-x^2}\,dx = \tfrac{\sqrt\pi}{2}\mathclose{\text{.}}

5

Mass, centre of mass and probability

Volumes and areas are the start. Whenever a quantity is spread over a region with a known amount per unit area, a double integral adds it up, by the method of Section 12.1: slice (now into small rectangles), approximate, add, and take the limit.

Mass and centre of mass

A thin flat plate, a lamina, occupies a region DD of the plane, and its density at (x,y),(x, y)\mathclose{\text{,}} its mass per unit area, is ρ(x,y)\rho(x, y) kg/m². A small rectangle of the plate around a sample point has mass about ρ ΔA,\rho\,\Delta A\mathclose{\text{,}} and its moment about the yy-axis is about its mass times its signed distance xx from that axis; its moment about the xx-axis uses y.y\mathclose{\text{.}} Adding and taking the limit:

Definition 19.4Mass and centre of mass of a plate

Let a lamina occupy a bounded closed region DD of type I or type II, or a finite union of such regions, with continuous density ρ(x,y)≥0.\rho(x, y) \ge 0\mathclose{\text{.}} Its mass and its moments about the yy-axis and the xx-axis are

m=∬Dρ dA,My=∬Dxρ dA,Mx=∬Dyρ dA,\begin{aligned} m &= \iint_D \rho\,dA, \\ M_y &= \iint_D x\rho\,dA, \qquad M_x = \iint_D y\rho\,dA, \end{aligned}

These integrals are finite. If m>0,m > 0\mathclose{\text{,}} its centre of mass is the point (xˉ,yˉ)(\bar x, \bar y) with

xˉ=Mym,yˉ=Mxm.\bar x = \frac{M_y}{m}, \qquad \bar y = \frac{M_x}{m}.

If ρ\rho is a positive constant and DD has positive area, it cancels, and the centre of mass is the centroid of D.D\mathclose{\text{.}}

The plate balances on a point under its centre of mass, as the rods and plates of Section 12.7 did. Module 12’s centroid formulas for a uniform plate between two graphs are this definition with the inner integral done: integrating xx and yy in yy from g(x)g(x) to f(x)f(x) gives x(f(x)−g(x))x\big(f(x) - g(x)\big) and 12(f(x)2−g(x)2).\tfrac12\big(f(x)^2 - g(x)^2\big)\mathclose{\text{.}}

Example 19.9A plate that is denser at the rim✓ Checked

A thin plate occupies the quarter disc x2+y2≤1,x^2 + y^2 \le 1\mathclose{\text{,}} x≥0,x \ge 0\mathclose{\text{,}} y≥0,y \ge 0\mathclose{\text{,}} with lengths in metres, and its density is proportional to the distance from the origin: ρ=kx2+y2\rho = k\sqrt{x^2 + y^2} kg/m², for a constant k>0k > 0 (a hypothetical plate). Find its centre of mass.

In polar coordinates ρ=kr,\rho = kr\mathclose{\text{,}} and the quarter disc is 0≤r≤1,0 \le r \le 1\mathclose{\text{,}} 0≤θ≤π/2:0 \le \theta \le \pi/2\mathclose{\text{:}}

m=∫0π/2∫01kr⋅r dr dθ=π2⋅k3=kπ6,My=∫0π/2∫01(rcos⁡θ) kr⋅r dr dθ=k∫0π/2cos⁡θ dθ∫01r3 dr=k4.\begin{aligned} m &= \int_0^{\pi/2}\int_0^1 kr\cdot r\,dr\,d\theta = \frac{\pi}{2}\cdot\frac{k}{3} = \frac{k\pi}{6}, \\ M_y &= \int_0^{\pi/2}\int_0^1 (r\cos\theta)\,kr\cdot r\,dr\,d\theta \\ &= k\int_0^{\pi/2}\cos\theta\,d\theta\int_0^1 r^3\,dr = \frac{k}{4}. \end{aligned}

So xˉ=k/4kπ/6=32π≈0.477\bar x = \dfrac{k/4}{k\pi/6} = \dfrac{3}{2\pi} \approx 0.477 m. Swapping xx and yy changes neither the quarter disc nor the density, so Mx=MyM_x = M_y and yˉ=xˉ:\bar y = \bar x\mathclose{\text{:}} the centre of mass is (32π,32π),\big(\tfrac{3}{2\pi}, \tfrac{3}{2\pi}\big)\mathclose{\text{,}} and the constant kk has cancelled. A plate of constant density balances at the centroid of the quarter disc, (43π,43π)≈(0.424,0.424),\big(\tfrac{4}{3\pi}, \tfrac{4}{3\pi}\big) \approx (0.424, 0.424)\mathclose{\text{,}} the same height as for the half disc of Module 12: the extra mass near the rim moves the balance point outwards.

Moments of inertia

Definition 19.5Moments of inertia

The moments of inertia of the lamina of Definition 19.4 about the xx-axis, about the yy-axis and about the origin are

Ix=∬Dy2ρ dA,Iy=∬Dx2ρ dA,I0=∬D(x2+y2)ρ dA=Ix+Iy.\begin{aligned} I_x &= \iint_D y^2\rho\,dA, \qquad I_y = \iint_D x^2\rho\,dA, \\ I_0 &= \iint_D \big(x^2 + y^2\big)\rho\,dA = I_x + I_y. \end{aligned}

Each piece of the plate counts with its mass times the square of its distance from the axis; for I0,I_0\mathclose{\text{,}} the distance from the origin, which is the distance from the axis through the origin perpendicular to the plate. The moment of inertia measures how hard it is to start or stop the plate turning about that axis, as mass measures how hard it is to change a velocity: a rigid body rotating at ω\omega radians per second about a fixed axis has rotational kinetic energy 12Iω2,\tfrac12 I\omega^2\mathclose{\text{,}} the counterpart of 12mv2.\tfrac12 mv^2\mathclose{\text{.}} Because of the square, mass far from the axis counts most.

Example 19.10A disc and a ring✓ Checked

Find the moment of inertia I0I_0 of a uniform disc of radius a>0a > 0 and mass M>0M > 0 about the axis through its centre perpendicular to the disc, and compare it with that of an ideal thin ring of the same radius and mass about the same axis.

The density is ρ=Mπa2,\rho = \dfrac{M}{\pi a^2}\mathclose{\text{,}} and in polar coordinates x2+y2=r2:x^2 + y^2 = r^2\mathclose{\text{:}}

I0=∫02π∫0ar2 Mπa2 r dr dθ=Mπa2⋅2π⋅a44=12Ma2.\begin{aligned} I_0 &= \int_0^{2\pi}\int_0^a r^2\,\frac{M}{\pi a^2}\,r\,dr\,d\theta \\ &= \frac{M}{\pi a^2}\cdot 2\pi\cdot\frac{a^4}{4} = \frac12 Ma^2. \end{aligned}

In an ideal thin ring all the mass is at distance aa from the centre, so I0=Ma2:I_0 = Ma^2\mathclose{\text{:}} twice as much. Spinning the ring up to the same angular speed takes twice the energy. This explains why placing mass near the rim can help a flywheel store rotational energy.

Joint densities

Module 12 described one random quantity by a density (Section 12.9). Some pairs of random quantities, such as the independent waiting times below, can be described by one density function of two variables. Not every pair has such a density.

Definition 19.6Joint density

A joint density is a function f(x,y)≥0f(x, y) \ge 0 whose integral over the whole plane is 1. A pair of random variables (X,Y)(X, Y) has the joint density ff if, for every region D,D\mathclose{\text{,}}

P((X,Y)∈D)=∬Df(x,y) dA.P\big((X, Y) \in D\big) = \iint_D f(x, y)\,dA.

P((X,Y)∈D)P\big((X, Y) \in D\big) reads “the probability that the point (X,Y)(X, Y) lies in DD”. The integral over the whole plane is improper. For the densities of this module, which are continuous on a region and 0 outside it, it is the limit of the integrals over the squares [−a,a]×[−a,a][-a, a] \times [-a, a] as a→∞,a \to \infty\mathclose{\text{,}} as in the proof of Theorem 19.5, and an improper double integral of a function f≥0f \ge 0 can be computed as an iterated integral of improper integrals, in either order. This extension of Fubini’s theorem is taken on trust here.

Independence. Two random variables XX and YY with densities f1f_1 and f2f_2 are independent if they have a joint density that can be written as the product f(x,y)=f1(x)f2(y).f(x, y) = f_1(x)f_2(y)\mathclose{\text{.}} Then, by the product rule of Section 19.2,

P(a≤X≤b and c≤Y≤d)=∫abf1(x) dx∫cdf2(y) dy=P(a≤X≤b) P(c≤Y≤d):\begin{aligned} &P(a \le X \le b \text{ and } c \le Y \le d) \\ &\quad= \int_a^b f_1(x)\,dx\int_c^d f_2(y)\,dy \\ &\quad= P(a \le X \le b)\,P(c \le Y \le d): \end{aligned}

knowing where XX landed does not change the chances for Y.Y\mathclose{\text{.}} This is independence in outline; probability theory defines independence for all random variables, and proves that for random variables with densities it amounts to this product rule.

Example 19.11Which request arrives first?✓ Checked

Two servers each wait for their next request (a hypothetical system). The waiting times, in seconds, are independent: the first, X,X\mathclose{\text{,}} has the exponential density with rate 1, and the second, Y,Y\mathclose{\text{,}} the exponential density with rate 2 (Section 12.9). Find the probability P(Y<X)P(Y < X) that the second server’s request arrives first.

The joint density is f(x,y)=e−x⋅2e−2yf(x, y) = e^{-x}\cdot 2e^{-2y} for x≥0x \ge 0 and y≥0,y \ge 0\mathclose{\text{,}} and 0 elsewhere; the integrals of the two factors over [0,∞)[0, \infty) are both 1, so its integral over the plane is 1. The event Y<XY < X is the part of the first quadrant below the line y=x:y = x\mathclose{\text{:}} for each x≥0,x \ge 0\mathclose{\text{,}} yy runs from 0 to x.x\mathclose{\text{.}} So

P(Y<X)=∫0∞∫0xe−x 2e−2y dy dx=∫0∞e−x(1−e−2x) dx=∫0∞(e−x−e−3x) dx=1−13=23.\begin{aligned} P(Y < X) &= \int_0^\infty\int_0^x e^{-x}\,2e^{-2y}\,dy\,dx \\ &= \int_0^\infty e^{-x}\big(1 - e^{-2x}\big)\,dx \\ &= \int_0^\infty \big(e^{-x} - e^{-3x}\big)\,dx = 1 - \frac13 = \frac23. \end{aligned}

The faster stream of requests wins with probability two thirds: its rate, 2, is two thirds of the total rate, 3. Including the boundary y=xy = x in the integral changes nothing, because it has area 0.

Watch out

Two slips with joint densities. A joint density is not a probability, and can be larger than 1: in Example 19.11, f(0,0)=2.f(0, 0) = 2\mathclose{\text{.}} Probabilities come from integrating it over a region. And the limits must describe the event within the region where the density is not 0. For Y<XY < X above, yy starts at 0, where the density starts, not at −∞:-\infty\mathclose{\text{:}} the formula e−x⋅2e−2y,e^{-x}\cdot 2e^{-2y}\mathclose{\text{,}} integrated from y=−∞,y = -\infty\mathclose{\text{,}} would diverge, although the density there is 0.

Compute itProbabilities by simulation

A probability can also be estimated by simulating the random variables many times and counting. NumPy’s random-number generator draws exponential waiting times directly; its scale is the mean, 1/λ.1/\lambda\mathclose{\text{.}} The seed makes this sequence of calls repeatable in the same software environment on the same machine; other NumPy versions or environments can give different samples:

Python
import numpy as np
rng = np.random.default_rng(2026)
N = 1_000_000
X = rng.exponential(scale=1.0, size=N)     # rate 1
Y = rng.exponential(scale=0.5, size=N)     # rate 2
print(np.mean(Y < X))                      # the fraction of trials with Y < X
Output
0.666296

The fraction is close to 23≈0.6667,\tfrac23 \approx 0.6667\mathclose{\text{,}} as Example 19.11 found. For NN independent trials of an event with probability p,p\mathclose{\text{,}} the fraction’s standard deviation is p(1−p)/N.\sqrt{p(1-p)/N}\mathclose{\text{.}} Here p=2/3,p = 2/3\mathclose{\text{,}} so a million trials give a standard deviation of about 0.00047. This typical sampling error decreases like 1/N;1/\sqrt N\mathclose{\text{;}} the error in a particular run need not decrease, and no fixed number of correct digits is guaranteed. Integrals in many dimensions, where grids of boxes need too many points, are often estimated by such Monte Carlo methods, with this rate when the sampled quantity has finite variance.

6

Triple integrals

A function of three variables f(x,y,z)f(x, y, z) might give the density of a solid at each point, or the temperature in a room. For a box

B=[a,b]×[c,d]×[p,q],B = [a, b] \times [c, d] \times [p, q],

with a<b,a < b\mathclose{\text{,}} c<dc < d and p<q,p < q\mathclose{\text{,}} cut each edge into equal parts, so that BB is cut into small boxes of volume ΔV=Δx Δy Δz,\Delta V = \Delta x\,\Delta y\,\Delta z\mathclose{\text{,}} choose a sample point in each, and add up the values of ff at the sample points times ΔV:\Delta V\mathclose{\text{:}} a triple Riemann sum. Its limit as all three edge lengths tend to 0, independent of the sample points, is the triple integral ∭Bf(x,y,z) dV,\iiint_B f(x, y, z)\,dV\mathclose{\text{,}} read “the triple integral over BB of f,f\mathclose{\text{,}} dVdV”. For bounded solids that are not boxes, extend ff by zero to an enclosing box, as in Section 19.3, and use this definition when that extension is integrable. A solid EE is of type 1 if it lies between two surfaces over a region DD of the xyxy-plane,

E={(x,y,z):(x,y)∈D, u1(x,y)≤z≤u2(x,y)},E = \{(x, y, z) : (x, y) \in D,\ u_1(x, y) \le z \le u_2(x, y)\},

with u1u_1 and u2u_2 continuous and u1≤u2;u_1 \le u_2\mathclose{\text{;}} the solid’s shadow on the xyxy-plane is D.D\mathclose{\text{.}}

Theorem 19.6Triple integrals as iterated integrals

If ff is continuous on the box B,B\mathclose{\text{,}} then ∭Bf dV\iiint_B f\,dV equals an iterated integral in any of the six orders, for example

∭Bf dV=∫ab∫cd∫pqf(x,y,z) dz dy dx.\iiint_B f\,dV = \int_a^b\int_c^d\int_p^q f(x, y, z)\,dz\,dy\,dx.

If ff is continuous on a type 1 solid EE whose shadow DD is of type I or type II, then

∭Ef dV=∬D[∫u1(x,y)u2(x,y)f(x,y,z) dz] dA.\iiint_E f\,dV = \iint_D\Big[\int_{u_1(x, y)}^{u_2(x, y)} f(x, y, z)\,dz\Big]\,dA.

The proofs follow the arguments of Theorems 19.2 and 19.3, one dimension up. The double integral over DD is then set up as in Section 19.3. Solids that lie between two surfaces x=…x = \dots over a region of the yzyz-plane, or between two surfaces y=…y = \dots over a region of the xzxz-plane, work the same way with the letters changed. With f=1,f = 1\mathclose{\text{,}} ∭EdV\iiint_E dV is the volume of E.E\mathclose{\text{.}} For such a bounded closed solid, a continuous density ρ(x,y,z)≥0\rho(x, y, z) \ge 0 gives finite mass m=∭Eρ dVm = \iiint_E \rho\,dV and finite moments. If m>0,m > 0\mathclose{\text{,}} its centre of mass is (xˉ,yˉ,zˉ),(\bar x, \bar y, \bar z)\mathclose{\text{,}} where xˉ=1m∭Exρ dV,\bar x = \tfrac1m\iiint_E x\rho\,dV\mathclose{\text{,}} and similarly for yˉ\bar y and zˉ;\bar z\mathclose{\text{;}} with positive constant density it is the centroid of E.E\mathclose{\text{.}}

Example 19.12The centroid of a tetrahedron✓ Checked

Find the volume and the centroid of the tetrahedron EE with vertices (0,0,0),(0, 0, 0)\mathclose{\text{,}} (1,0,0),(1, 0, 0)\mathclose{\text{,}} (0,1,0)(0, 1, 0) and (0,0,1).(0, 0, 1)\mathclose{\text{.}}

The face opposite the origin lies in the plane x+y+z=1,x + y + z = 1\mathclose{\text{,}} so EE is the type 1 solid 0≤z≤1−x−y0 \le z \le 1 - x - y over the triangle D:D\mathclose{\text{:}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} 0≤y≤1−x.0 \le y \le 1 - x\mathclose{\text{.}} Its volume is

V=∫01∫01−x∫01−x−ydz dy dx=∫01∫01−x(1−x−y) dy dx=∫01(1−x)22 dx=16,\begin{aligned} V &= \int_0^1\int_0^{1-x}\int_0^{1-x-y} dz\,dy\,dx \\ &= \int_0^1\int_0^{1-x}(1 - x - y)\,dy\,dx \\ &= \int_0^1\frac{(1 - x)^2}{2}\,dx = \frac16, \end{aligned}

as Example 19.5 gives with a=b=c=1.a = b = c = 1\mathclose{\text{.}} For the centroid,

∭Ez dV=∫01∫01−x(1−x−y)22 dy dx=∫01(1−x)36 dx=124,\begin{aligned} \iiint_E z\,dV &= \int_0^1\int_0^{1-x}\frac{(1 - x - y)^2}{2}\,dy\,dx \\ &= \int_0^1\frac{(1 - x)^3}{6}\,dx = \frac{1}{24}, \end{aligned}

so zˉ=1/241/6=14.\bar z = \dfrac{1/24}{1/6} = \dfrac14\mathclose{\text{.}} Swapping any two of x,x\mathclose{\text{,}} yy and zz leaves EE unchanged, so xˉ=yˉ=zˉ=14.\bar x = \bar y = \bar z = \tfrac14\mathclose{\text{.}} The centroid (14,14,14)\big(\tfrac14, \tfrac14, \tfrac14\big) is the average of the four vertices, a quarter of the way from the centroid of the face z=0z = 0 towards the opposite vertex.

Choosing the order. The same tetrahedron can be described in all six orders. Projecting it onto the yzyz-plane, for example, gives 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} 0≤z≤1−y,0 \le z \le 1 - y\mathclose{\text{,}} 0≤x≤1−y−z,0 \le x \le 1 - y - z\mathclose{\text{,}} and V=∫01∫01−y∫01−y−zdx dz dy.V = \int_0^1\int_0^{1-y}\int_0^{1-y-z} dx\,dz\,dy\mathclose{\text{.}} The recipe of Section 19.3 works one variable at a time. The innermost limits are the two surfaces through which a line parallel to that variable’s axis enters and leaves E;E\mathclose{\text{;}} the other two variables describe the shadow of EE on the plane of their axes, as in two dimensions. Choose the order in which the shadow and the integrals are simplest.

Watch out

In a triple iterated integral the innermost limits may depend on both outer variables, the middle limits only on the outermost variable, and the outermost limits on none. In ∫01∫01−x∫01−x−yf dz dy dx,\int_0^1\int_0^{1-x}\int_0^{1-x-y} f\,dz\,dy\,dx\mathclose{\text{,}} the limit 1−x−y1 - x - y belongs inside, with dz;dz\mathclose{\text{;}} it cannot move to the middle integral, where yy is the variable being integrated.

7

Cylindrical and spherical coordinates

Cylindrical coordinates

Cylindrical coordinates (r,θ,z)(r, \theta, z) describe a point by the polar coordinates (r,θ)(r, \theta) of its shadow on the xyxy-plane and its height z,z\mathclose{\text{,}} with r≥0r \ge 0 and zz any real number. As in polar coordinates, θ\theta is arbitrary on the zz-axis:

x=rcos⁡θ,y=rsin⁡θ,z=z.x = r\cos\theta, \qquad y = r\sin\theta, \qquad z = z.

The cylinder x2+y2=4x^2 + y^2 = 4 becomes r=2,r = 2\mathclose{\text{,}} and the paraboloid z=x2+y2z = x^2 + y^2 becomes z=r2.z = r^2\mathclose{\text{.}} For a type 1 solid whose shadow is described in polar coordinates, Theorem 19.6 with Theorem 19.4 for the double integral gives dV=dz dA=r dz dr dθ:dV = dz\,dA = r\,dz\,dr\,d\theta\mathclose{\text{:}}

Theorem 19.7Triple integrals in cylindrical coordinates

Let EE be the solid u1(x,y)≤z≤u2(x,y)u_1(x, y) \le z \le u_2(x, y) over the region DD given by α≤θ≤β,\alpha \le \theta \le \beta\mathclose{\text{,}} h1(θ)≤r≤h2(θ),h_1(\theta) \le r \le h_2(\theta)\mathclose{\text{,}} with h1h_1 and h2h_2 as in Theorem 19.4 and u1≤u2u_1 \le u_2 continuous. If ff is continuous on E,E\mathclose{\text{,}} then

∭Ef dV=∫αβ∫h1(θ)h2(θ)∫u1u2f r dz dr dθ,\iiint_E f\,dV = \int_\alpha^\beta\int_{h_1(\theta)}^{h_2(\theta)}\int_{u_1}^{u_2} f\,r\,dz\,dr\,d\theta,

where ff is evaluated at (rcos⁡θ,rsin⁡θ,z),(r\cos\theta, r\sin\theta, z)\mathclose{\text{,}} and the limits u1u_1 and u2u_2 at (x,y)=(rcos⁡θ,rsin⁡θ).(x, y) = (r\cos\theta, r\sin\theta)\mathclose{\text{.}}

Example 19.13Water in a parabolic bowl✓ Checked

The bowl of Example 12.7 is the surface z=x2+y2,z = x^2 + y^2\mathclose{\text{,}} the parabola z=x2z = x^2 turned about the zz-axis (Module 12 called the vertical axis y).y\mathclose{\text{).}} It holds water of uniform positive density to the depth h>0.h > 0\mathclose{\text{.}} Find the volume of the water and the height of its centre of mass.

The water is the solid r2≤z≤hr^2 \le z \le h over the disc 0≤r≤h,0 \le r \le \sqrt h\mathclose{\text{,}} 0≤θ≤2π,0 \le \theta \le 2\pi\mathclose{\text{,}} where the bowl is below the water level. Its volume is

V=∫02π∫0h∫r2hr dz dr dθ=2π∫0h(h−r2) r dr=2π(h22−h24)=πh22,\begin{aligned} V &= \int_0^{2\pi}\int_0^{\sqrt h}\int_{r^2}^{h} r\,dz\,dr\,d\theta \\ &= 2\pi\int_0^{\sqrt h}\big(h - r^2\big)\,r\,dr \\ &= 2\pi\Big(\frac{h^2}{2} - \frac{h^2}{4}\Big) = \frac{\pi h^2}{2}, \end{aligned}

as Module 12 found by discs. The water does not change when it is turned about the zz-axis, so its centre of mass lies on the axis. Its height needs

∭z dV=2π∫0h[z22]r2h r dr=π∫0h(h2−r4) r dr=π(h32−h36)=πh33,\begin{aligned} \iiint z\,dV &= 2\pi\int_0^{\sqrt h}\Big[\frac{z^2}{2}\Big]_{r^2}^{h}\,r\,dr \\ &= \pi\int_0^{\sqrt h}\big(h^2 - r^4\big)\,r\,dr \\ &= \pi\Big(\frac{h^3}{2} - \frac{h^3}{6}\Big) = \frac{\pi h^3}{3}, \end{aligned}

so zˉ=πh3/3πh2/2=2h3:\bar z = \dfrac{\pi h^3/3}{\pi h^2/2} = \dfrac{2h}{3}\mathclose{\text{:}} two thirds of the way up, because the bowl is widest at the top. (If the rim is at z=h,z = h\mathclose{\text{,}} pumping all the water to that height lifts its mass mm by h−2h3=h3h - \tfrac{2h}{3} = \tfrac{h}{3} on average. With constant gravitational acceleration g,g\mathclose{\text{,}} the ideal work against gravity is 13mgh.)\tfrac13 mgh\mathclose{\text{.)}}

Spherical coordinates

Balls, cones with their tip at the origin and the regions between spheres call for coordinates of their own.

Definition 19.7Spherical coordinates

For a point P≠O,P \ne O\mathclose{\text{,}} the spherical coordinates (ρ,θ,φ)(\rho, \theta, \varphi) are its distance ρ>0\rho > 0 from the origin O;O\mathclose{\text{;}} the angle θ\theta of its cylindrical coordinates; and the angle φ\varphi between the positive zz-axis and the segment OP,OP\mathclose{\text{,}} with 0≤φ≤π.0 \le \varphi \le \pi\mathclose{\text{.}} The angle θ\theta is arbitrary on the zz-axis. The origin is represented by ρ=0,\rho = 0\mathclose{\text{,}} with both angles arbitrary. In every case,

x=ρsin⁡φcos⁡θ,y=ρsin⁡φsin⁡θ,z=ρcos⁡φ,\begin{aligned} x &= \rho\sin\varphi\cos\theta, \qquad y = \rho\sin\varphi\sin\theta, \\ z &= \rho\cos\varphi, \end{aligned}

and ρ2=x2+y2+z2.\rho^2 = x^2 + y^2 + z^2\mathclose{\text{.}}

The Greek letters are ρ,\rho\mathclose{\text{,}} “rho” (here a distance, not a density), and φ,\varphi\mathclose{\text{,}} “phi”. Away from the zz-axis, the vertical half-plane through that axis and PP contains OP,OP\mathclose{\text{,}} which has length ρ\rho and makes the angle φ\varphi with the positive zz-axis. Thus PP has height z=ρcos⁡φz = \rho\cos\varphi and lies at distance r=ρsin⁡φr = \rho\sin\varphi from the axis (Figure 19.4); then x=rcos⁡θx = r\cos\theta and y=rsin⁡θ.y = r\sin\theta\mathclose{\text{.}} The equation ρ=a,\rho = a\mathclose{\text{,}} for a>0,a > 0\mathclose{\text{,}} describes a sphere. For 0<c<π0 < c < \pi with c≠π/2,c \ne \pi/2\mathclose{\text{,}} φ=c\varphi = c describes one cone around the zz-axis; c=π/2c = \pi/2 gives the xyxy-plane, and c=0c = 0 or π\pi gives a ray along the positive or negative zz-axis. The equation θ=c\theta = c describes a vertical half-plane.

Good to know

Conventions differ. This series measures φ\varphi from the positive zz-axis, so that φ=0\varphi = 0 on the positive zz-axis, φ=π/2\varphi = \pi/2 in the xyxy-plane and φ=π\varphi = \pi on the negative zz-axis, and keeps θ\theta for the angle around the zz-axis, as in polar and cylindrical coordinates. Other references swap the two names, writing θ\theta for the angle from the zz-axis and φ\varphi for the angle around it, and geography measures latitude from the equator, not from the pole. Before you use a formula from another source, check which angle is which.

Spherical coordinates. The point P is at the distance rho from the origin and at the angle varphi from the positive z-axis. Its shadow on the xy-plane is at the distance r = rhosinvarphi from the origin, at the angle theta of polar coordinates, and its height is z = rhocosvarphi. The grey arcs outline the part of the sphere of radius rho in the first octant; the dashed arcs through P are parts of the circle of constant varphi and the half-circle of constant theta.
Figure 19.4

Spherical coordinates. The point PP is at the distance ρ\rho from the origin and at the angle φ\varphi from the positive zz-axis. Its shadow on the xyxy-plane is at the distance r=ρsin⁡φr = \rho\sin\varphi from the origin, at the angle θ\theta of polar coordinates, and its height is z=ρcos⁡φ.z = \rho\cos\varphi\mathclose{\text{.}} The grey arcs outline the part of the sphere of radius ρ\rho in the first octant; the dashed arcs through PP are parts of the circle of constant φ\varphi and the half-circle of constant θ.\theta\mathclose{\text{.}}

The volume element. A small spherical wedge, between the radii ρ\rho and ρ+Δρ,\rho + \Delta\rho\mathclose{\text{,}} the angles θ\theta and θ+Δθ\theta + \Delta\theta and the angles φ\varphi and φ+Δφ,\varphi + \Delta\varphi\mathclose{\text{,}} is nearly a box. Its edge along a ray from the origin has length Δρ.\Delta\rho\mathclose{\text{.}} Its edge along the half-circle of constant θ,\theta\mathclose{\text{,}} which has radius ρ,\rho\mathclose{\text{,}} has length about ρ Δφ.\rho\,\Delta\varphi\mathclose{\text{.}} Its edge along the circle of constant φ,\varphi\mathclose{\text{,}} which has radius r=ρsin⁡φr = \rho\sin\varphi about the zz-axis, has length about ρsin⁡φ Δθ.\rho\sin\varphi\,\Delta\theta\mathclose{\text{.}} The three edges meet at right angles, so the wedge has volume about ρ2sin⁡φ Δρ Δθ Δφ,\rho^2\sin\varphi\,\Delta\rho\,\Delta\theta\,\Delta\varphi\mathclose{\text{,}} and

dV=ρ2sin⁡φ dρ dθ dφ.dV = \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi.
Theorem 19.8Triple integrals in spherical coordinates

Let EE be the spherical wedge ρ0≤ρ≤ρ1,\rho_0 \le \rho \le \rho_1\mathclose{\text{,}} α≤θ≤β,\alpha \le \theta \le \beta\mathclose{\text{,}} φ0≤φ≤φ1,\varphi_0 \le \varphi \le \varphi_1\mathclose{\text{,}} where 0≤ρ0≤ρ1<∞,0 \le \rho_0 \le \rho_1 < \infty\mathclose{\text{,}} 0<β−α≤2π0 < \beta - \alpha \le 2\pi and 0≤φ0<φ1≤π.0 \le \varphi_0 < \varphi_1 \le \pi\mathclose{\text{.}} If ff is continuous on E,E\mathclose{\text{,}} then

∭Ef dV=∫φ0φ1∫αβ∫ρ0ρ1f ρ2sin⁡φ dρ dθ dφ,\iiint_E f\,dV = \int_{\varphi_0}^{\varphi_1}\int_\alpha^\beta\int_{\rho_0}^{\rho_1} f\,\rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi,

where ff is evaluated at the point with x=ρsin⁡φcos⁡θ,x = \rho\sin\varphi\cos\theta\mathclose{\text{,}} y=ρsin⁡φsin⁡θy = \rho\sin\varphi\sin\theta and z=ρcos⁡φ.z = \rho\cos\varphi\mathclose{\text{.}}

The wedge argument above is the idea of the proof; Section 19.8 gives the general reason, in which ρ2sin⁡φ\rho^2\sin\varphi is the absolute value of a Jacobian. The angular ranges cover the solid once except at the origin, the axis and possibly an angular seam, all of which have zero volume. The same formula holds with continuous radial bounds ρ0(θ,φ)\rho_0(\theta,\varphi) and ρ1(θ,φ)\rho_1(\theta,\varphi) satisfying 0≤ρ0≤ρ10 \le \rho_0 \le \rho_1 on the same closed angular rectangle.

Example 19.14A ball and an ice-cream cone✓ Checked

(a) Find the volume of a ball of radius a>0.a > 0\mathclose{\text{.}} (b) Find the volume of the part of the ball that lies within the angle π/3\pi/3 of the positive zz-axis, an “ice-cream cone”.

(a) The ball is 0≤ρ≤a,0 \le \rho \le a\mathclose{\text{,}} 0≤θ≤2π,0 \le \theta \le 2\pi\mathclose{\text{,}} 0≤φ≤π.0 \le \varphi \le \pi\mathclose{\text{.}} All the limits are constants and the integrand is a product of a function of each variable, so the integral splits as in Section 19.2:

V=∫0π∫02π∫0aρ2sin⁡φ dρ dθ dφ=∫0πsin⁡φ dφ∫02πdθ∫0aρ2 dρ=2⋅2π⋅a33=43πa3,\begin{aligned} V &= \int_0^\pi\int_0^{2\pi}\int_0^a \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi \\ &= \int_0^\pi \sin\varphi\,d\varphi\int_0^{2\pi} d\theta\int_0^a \rho^2\,d\rho \\ &= 2\cdot 2\pi\cdot\frac{a^3}{3} = \frac43\pi a^3, \end{aligned}

the volume that Example 12.5 found with discs.

(b) Now 0≤φ≤π/3,0 \le \varphi \le \pi/3\mathclose{\text{,}} and the factor ∫0π/3sin⁡φ dφ=1−cos⁡π3=12\int_0^{\pi/3}\sin\varphi\,d\varphi = 1 - \cos\tfrac{\pi}{3} = \tfrac12 replaces the 2:

V=12⋅2π⋅a33=πa33,V = \frac12\cdot 2\pi\cdot\frac{a^3}{3} = \frac{\pi a^3}{3},

a quarter of the ball. The cone φ=π/3\varphi = \pi/3 is the surface z=13x2+y2,z = \tfrac{1}{\sqrt3}\sqrt{x^2 + y^2}\mathclose{\text{,}} since r=ztan⁡π3=3 zr = z\tan\tfrac{\pi}{3} = \sqrt3\,z on it. In x,x\mathclose{\text{,}} yy and zz the ice-cream cone needs limits with square roots, and the inner integral meets the cone below and the sphere above; in spherical coordinates all six limits are constants.

Watch out

φ\varphi runs from 0 to π,\pi\mathclose{\text{,}} not to 2π:2\pi\mathclose{\text{:}} at φ=π\varphi = \pi the segment OPOP already points down the negative zz-axis. Allowing both angles to run from 0 to 2π2\pi covers almost every point of the ball twice. Keeping the signed factor sin⁡φ\sin\varphi would give volume 0, since ∫02πsin⁡φ dφ=0;\int_0^{2\pi}\sin\varphi\,d\varphi = 0\mathclose{\text{;}} using its absolute value would give twice the correct volume. The coordinate range must be right as well as the Jacobian. And the factor on the usual range is ρ2sin⁡φ:\rho^2\sin\varphi\mathclose{\text{:}} without the sin⁡φ,\sin\varphi\mathclose{\text{,}} ∫0π∫02π∫0aρ2 dρ dθ dφ=2π2a33≈6.58a3\int_0^\pi\int_0^{2\pi}\int_0^a \rho^2\,d\rho\,d\theta\,d\varphi = \tfrac{2\pi^2a^3}{3} \approx 6.58a^3 instead of 43πa3≈4.19a3.\tfrac43\pi a^3 \approx 4.19a^3\mathclose{\text{.}}

Compute itCoordinates and their volume elements

SymPy’s Matrix.jacobian builds the array of all the first partial derivatives of a transformation, and .det() takes its determinant, the Jacobian of Section 19.8. For polar, cylindrical and spherical coordinates:

Python
import sympy as sp
r, rho = sp.symbols('r rho', nonnegative=True)
theta, z, phi = sp.symbols('theta z phi', real=True)
polar = sp.Matrix([r*sp.cos(theta), r*sp.sin(theta)])
cyl = sp.Matrix([r*sp.cos(theta), r*sp.sin(theta), z])
sph = sp.Matrix([rho*sp.sin(phi)*sp.cos(theta),
                 rho*sp.sin(phi)*sp.sin(theta),
                 rho*sp.cos(phi)])
print(sp.simplify(polar.jacobian([r, theta]).det()))
print(sp.simplify(cyl.jacobian([r, theta, z]).det()))
print(sp.simplify(sph.jacobian([rho, phi, theta]).det()))
Output
r
r
rho**2*sin(phi)

These are the factors in dA=r dr dθ,dA = r\,dr\,d\theta\mathclose{\text{,}} dV=r dz dr dθdV = r\,dz\,dr\,d\theta and dV=ρ2sin⁡φ dρ dθ dφ.dV = \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi\mathclose{\text{.}} (Listing the spherical variables in the order ρ,\rho\mathclose{\text{,}} θ,\theta\mathclose{\text{,}} φ\varphi instead changes the sign of the determinant; the formulas use its absolute value.) A ball’s volume and the ice-cream cone of Example 19.14 follow:

Python
J = rho**2*sp.sin(phi)
a = sp.symbols('a', positive=True)
print(sp.integrate(J, (rho, 0, a), (theta, 0, 2*sp.pi), (phi, 0, sp.pi)))
print(sp.integrate(J, (rho, 0, a), (theta, 0, 2*sp.pi), (phi, 0, sp.pi/3)))
Output
4*pi*a**3/3
pi*a**3/3
8

Change of variables

Polar, cylindrical and spherical coordinates are instances of one idea: describe a region with new variables in which it is simple, and pay for the change with a factor that measures how the new variables stretch areas or volumes. In one variable this is substitution: for continuously differentiable gg on [c,d][c,d] and continuous ff on its image, ∫g(c)g(d)f(x) dx=∫cdf(g(u)) g′(u) du\int_{g(c)}^{g(d)} f(x)\,dx = \int_c^d f\big(g(u)\big)\,g'(u)\,du (Section 10.7). The signed factor g′(u)g'(u) includes orientation; the local length scale is ∣g′(u)∣.\abs{g'(u)}\mathclose{\text{.}} In two variables, a transformation TT sends each point (u,v)(u, v) of a region SS of the uvuv-plane to a point (x,y)=T(u,v)(x, y) = T(u, v) of the xyxy-plane, by formulas

x=x(u,v),y=y(u,v),x = x(u, v), \qquad y = y(u, v),

and the stretching factor is a determinant. A 2 × 2 determinant is the number

∣abcd∣=ad−bc\begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc

Mathematical Foundations meets determinants with matrices, in its Module 10. The parallelogram spanned by two vectors ⟨a,c⟩\langle a, c\rangle and ⟨b,d⟩\langle b, d\rangle of the plane has area ∣ad−bc∣:\abs{ad - bc}\mathclose{\text{:}} regarded as the vectors ⟨a,c,0⟩\langle a, c, 0\rangle and ⟨b,d,0⟩\langle b, d, 0\rangle of space, they have the cross product ⟨0,0,ad−bc⟩,\langle 0, 0, ad - bc\rangle\mathclose{\text{,}} and the length of a cross product is the area of the parallelogram the two vectors span (Module 16).

Definition 19.8Jacobian

Let x=x(u,v)x = x(u, v) and y=y(u,v)y = y(u, v) have continuous first partial derivatives. The Jacobian of the transformation is

∂(x,y)∂(u,v)=∣∂x∂u∂x∂v∂y∂u∂y∂v∣=∂x∂u∂y∂v−∂x∂v∂y∂u.\frac{\partial(x, y)}{\partial(u, v)} = \begin{vmatrix} \dfrac{\partial x}{\partial u} & \dfrac{\partial x}{\partial v} \\[8pt] \dfrac{\partial y}{\partial u} & \dfrac{\partial y}{\partial v} \end{vmatrix} = \frac{\partial x}{\partial u}\frac{\partial y}{\partial v} - \frac{\partial x}{\partial v}\frac{\partial y}{\partial u}.

The symbol ∂(x,y)/∂(u,v)\partial(x, y)/\partial(u, v) reads “the Jacobian of xx and yy with respect to uu and vv”. It is a function of uu and v.v\mathclose{\text{.}}

Theorem 19.9Change of variables in a double integral

Let SS and DD be bounded closed regions of type I or type II. Suppose that TT has continuous first partial derivatives on a neighbourhood of S,S\mathclose{\text{,}} maps SS onto D,D\mathclose{\text{,}} is one-to-one on the interior of S,S\mathclose{\text{,}} and has a nonzero Jacobian there. Coincidences and a zero Jacobian on the boundary are allowed. If ff is continuous on D,D\mathclose{\text{,}} then

∬Df(x,y) dA=∬Sf(x(u,v),y(u,v)) ∣∂(x,y)∂(u,v)∣ du dv.\begin{aligned} &\iint_D f(x, y)\,dA \\ &\quad= \iint_S f\big(x(u, v), y(u, v)\big)\,\Big|\frac{\partial(x, y)}{\partial(u, v)}\Big|\,du\,dv. \end{aligned}

In short, dA=∣∂(x,y)∂(u,v)∣ du dv:dA = \Big|\dfrac{\partial(x, y)}{\partial(u, v)}\Big|\,du\,dv\mathclose{\text{:}} the absolute value of the Jacobian is the factor by which TT multiplies small areas near each point. The Going deeper box below explains why; a complete proof belongs to a course in advanced calculus. In one variable the sign of g′(u)g'(u) is taken care of by the order of the limits; areas have no direction, so here the absolute value does that job.

Example 19.15Polar coordinates again✓ Checked

Find the Jacobian of the polar coordinates x=rcos⁡θ,x = r\cos\theta\mathclose{\text{,}} y=rsin⁡θ.y = r\sin\theta\mathclose{\text{.}}

With rr and θ\theta in the roles of uu and v,v\mathclose{\text{,}}

∂(x,y)∂(r,θ)=∣cos⁡θ−rsin⁡θsin⁡θrcos⁡θ∣=rcos⁡2θ+rsin⁡2θ=r.\begin{aligned} \frac{\partial(x, y)}{\partial(r, \theta)} &= \begin{vmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{vmatrix} \\ &= r\cos^2\theta + r\sin^2\theta = r. \end{aligned}

For r≥0r \ge 0 its absolute value is r,r\mathclose{\text{,}} so dA=r dr dθ,dA = r\,dr\,d\theta\mathclose{\text{,}} as Theorem 19.4 says. For a>0,a > 0\mathclose{\text{,}} the rectangle 0≤r≤a,0 \le r \le a\mathclose{\text{,}} 0≤θ≤2π0 \le \theta \le 2\pi is mapped onto the disc of radius a,a\mathclose{\text{,}} one-to-one except on its boundary: the whole side r=0r = 0 goes to the origin, where the Jacobian is 0, and the sides θ=0\theta = 0 and θ=2π\theta = 2\pi go to the same segment. Theorem 19.9 allows both.

Example 19.16An ellipse✓ Checked

Find the area of the region EE inside the ellipse x2a2+y2b2=1,\dfrac{x^2}{a^2} + \dfrac{y^2}{b^2} = 1\mathclose{\text{,}} where a,b>0,a, b > 0\mathclose{\text{,}} and the integral ∬Ex2 dA.\iint_E x^2\,dA\mathclose{\text{.}}

The transformation x=au,x = au\mathclose{\text{,}} y=bvy = bv maps the disc u2+v2≤1u^2 + v^2 \le 1 one-to-one onto E,E\mathclose{\text{,}} since x2a2+y2b2=u2+v2.\tfrac{x^2}{a^2} + \tfrac{y^2}{b^2} = u^2 + v^2\mathclose{\text{.}} Its Jacobian is

∂(x,y)∂(u,v)=∣a00b∣=ab.\frac{\partial(x, y)}{\partial(u, v)} = \begin{vmatrix} a & 0 \\ 0 & b \end{vmatrix} = ab.

So the area of EE is ∬ab du dv\iint ab\,du\,dv over the unit disc: abab times its area π,\pi\mathclose{\text{,}} that is, πab.\pi ab\mathclose{\text{.}} In the same way, with polar coordinates in the uvuv-plane for the last step,

∬Ex2 dA=∬u2+v2≤1a2u2⋅ab du dv=a3b∫02π∫01r2cos⁡2θ r dr dθ=a3b⋅14⋅π=πa3b4,\begin{aligned} \iint_E x^2\,dA &= \iint_{u^2 + v^2 \le 1} a^2u^2\cdot ab\,du\,dv \\ &= a^3b\int_0^{2\pi}\int_0^1 r^2\cos^2\theta\,r\,dr\,d\theta \\ &= a^3b\cdot\frac14\cdot\pi = \frac{\pi a^3b}{4}, \end{aligned}

since ∫02πcos⁡2θ dθ=π\int_0^{2\pi}\cos^2\theta\,d\theta = \pi (write cos⁡2θ=12(1+cos⁡2θ),\cos^2\theta = \tfrac12(1 + \cos 2\theta)\mathclose{\text{,}} Module 11). For a uniform elliptical plate of density ρ,\rho\mathclose{\text{,}} this gives the moment of inertia Iy=πρa3b4=14Ma2I_y = \tfrac{\pi\rho a^3b}{4} = \tfrac14 Ma^2 about the yy-axis, where M=ρπabM = \rho\pi ab is its mass.

Example 19.17A parallelogram✓ Checked

Evaluate ∬D(2x−y) e2y−x dA,\displaystyle\iint_D (2x - y)\,e^{2y - x}\,dA\mathclose{\text{,}} where DD is the parallelogram with vertices (0,0),(0, 0)\mathclose{\text{,}} (2,1),(2, 1)\mathclose{\text{,}} (3,3)(3, 3) and (1,2).(1, 2)\mathclose{\text{.}}

The sides of DD lie on the lines 2x−y=02x - y = 0 (through (0,0)(0, 0) and (1,2)),(1, 2)\mathclose{\text{),}} 2x−y=32x - y = 3 (through (2,1)(2, 1) and (3,3)),(3, 3)\mathclose{\text{),}} 2y−x=02y - x = 0 (through (0,0)(0, 0) and (2,1))(2, 1)\mathclose{\text{)}} and 2y−x=32y - x = 3 (through (1,2)(1, 2) and (3,3)).(3, 3)\mathclose{\text{).}} In either Cartesian order, using one linear formula for each boundary on each piece splits DD into three iterated integrals. The integrand and the sides suggest the new variables

u=2x−y,v=2y−x,u = 2x - y, \qquad v = 2y - x,

in which DD becomes the square S:S\mathclose{\text{:}} 0≤u≤3,0 \le u \le 3\mathclose{\text{,}} 0≤v≤3.0 \le v \le 3\mathclose{\text{.}} To find xx and y,y\mathclose{\text{,}} add twice the first equation to the second, 2u+v=3x,2u + v = 3x\mathclose{\text{,}} and the first to twice the second, u+2v=3y:u + 2v = 3y\mathclose{\text{:}}

x=2u+v3,y=u+2v3.x = \frac{2u + v}{3}, \qquad y = \frac{u + 2v}{3}.

The Jacobian is

∂(x,y)∂(u,v)=∣2/31/31/32/3∣=49−19=13,\frac{\partial(x, y)}{\partial(u, v)} = \begin{vmatrix} 2/3 & 1/3 \\ 1/3 & 2/3 \end{vmatrix} = \frac49 - \frac19 = \frac13,

so, by the product rule of Section 19.2,

∬D(2x−y) e2y−x dA=∫03∫03u ev 13 du dv=13⋅92⋅(e3−1)=32(e3−1)≈28.63.\begin{aligned} \iint_D (2x - y)\,e^{2y - x}\,dA &= \int_0^3\int_0^3 u\,e^v\,\frac13\,du\,dv \\ &= \frac13\cdot\frac92\cdot\big(e^3 - 1\big) \\ &= \frac32\big(e^3 - 1\big) \approx 28.63. \end{aligned}

A check: the area of DD is ∬S13 du dv=13⋅9=3,\iint_S \tfrac13\,du\,dv = \tfrac13 \cdot 9 = 3\mathclose{\text{,}} and the parallelogram spanned by ⟨2,1⟩\langle 2, 1\rangle and ⟨1,2⟩\langle 1, 2\rangle has area ∣2⋅2−1⋅1∣=3.\abs{2 \cdot 2 - 1 \cdot 1} = 3\mathclose{\text{.}}

On the pictured region 1 le u le 2, 0 le v le 1, the transformation x = u^2 - v^2, y = 2uv maps the grid of squares one-to-one onto the curved grid on the right. The small rectangle with corner (u, v) and sides Delta u and Delta v (orange) becomes a small curved quadrilateral, which is nearly the parallelogram (dashed) spanned by the vectors Delta u,vb{r}u and Delta v,vb{r}v. That parallelogram has area abs{partial(x, y)/partial(u, v)},Delta u,Delta v.
Figure 19.5

On the pictured region 1≤u≤2,1 \le u \le 2\mathclose{\text{,}} 0≤v≤1,0 \le v \le 1\mathclose{\text{,}} the transformation x=u2−v2,x = u^2 - v^2\mathclose{\text{,}} y=2uvy = 2uv maps the grid of squares one-to-one onto the curved grid on the right. The small rectangle with corner (u,v)(u, v) and sides Δu\Delta u and Δv\Delta v (orange) becomes a small curved quadrilateral, which is nearly the parallelogram (dashed) spanned by the vectors Δu ru\Delta u\,\vb{r}_u and Δv rv.\Delta v\,\vb{r}_v\mathclose{\text{.}} That parallelogram has area ∣∂(x,y)/∂(u,v)∣ Δu Δv.\abs{\partial(x, y)/\partial(u, v)}\,\Delta u\,\Delta v\mathclose{\text{.}}

Going deeperWhy the Jacobian measures area

Take a small rectangle in the uvuv-plane with one corner at (u0,v0)(u_0, v_0) and sides Δu\Delta u and Δv.\Delta v\mathclose{\text{.}} By the linear approximation of Module 17, for small hh and k,k\mathclose{\text{,}}

x(u0+h,v0+k)≈x(u0,v0)+xuh+xvk,y(u0+h,v0+k)≈y(u0,v0)+yuh+yvk,\begin{aligned} x(u_0 + h, v_0 + k) &\approx x(u_0, v_0) + x_u h + x_v k, \\ y(u_0 + h, v_0 + k) &\approx y(u_0, v_0) + y_u h + y_v k, \end{aligned}

with the partial derivatives taken at (u0,v0).(u_0, v_0)\mathclose{\text{.}} In vector form, T(u0+h,v0+k)≈T(u0,v0)+h ru+k rv,T(u_0 + h, v_0 + k) \approx T(u_0, v_0) + h\,\vb{r}_u + k\,\vb{r}_v\mathclose{\text{,}} where ru=⟨xu,yu⟩\vb{r}_u = \langle x_u, y_u\rangle and rv=⟨xv,yv⟩.\vb{r}_v = \langle x_v, y_v\rangle\mathclose{\text{.}} As hh runs from 0 to Δu\Delta u and kk from 0 to Δv,\Delta v\mathclose{\text{,}} the right side fills the parallelogram with a corner at T(u0,v0)T(u_0, v_0) spanned by Δu ru\Delta u\,\vb{r}_u and Δv rv.\Delta v\,\vb{r}_v\mathclose{\text{.}} So the image of the small rectangle is nearly that parallelogram (Figure 19.5), whose area is

∣(xuΔu)(yvΔv)−(xvΔv)(yuΔu)∣=∣∂(x,y)∂(u,v)∣ Δu Δv.\begin{aligned} &\big|(x_u\Delta u)(y_v\Delta v) - (x_v\Delta v)(y_u\Delta u)\big| \\ &\quad= \Big|\frac{\partial(x, y)}{\partial(u, v)}\Big|\,\Delta u\,\Delta v. \end{aligned}

Use a fine rectangular grid on S.S\mathclose{\text{.}} Apart from pieces along its boundary, the cells are rectangles; their images divide DD into small pieces, of areas about ∣J∣ Δu Δv\abs{J}\,\Delta u\,\Delta v with JJ the Jacobian at a corner, so

∬Df dA≈∑f(T(ui,vj)) ∣J(ui,vj)∣ Δu Δv,\iint_D f\,dA \approx \sum f\big(T(u_i, v_j)\big)\,\abs{J(u_i, v_j)}\,\Delta u\,\Delta v,

and the right side is a Riemann sum for the right side of Theorem 19.9. The approximations improve as the grid shrinks. Turning this into a proof means controlling the boundary pieces and showing that the errors of all the linear approximations together tend to 0, which is the work of an advanced calculus course.

For a linear transformation, x=au+bvx = au + bv and y=cu+dv,y = cu + dv\mathclose{\text{,}} there is nothing to approximate: T(u0+h,v0+k)=T(u0,v0)+h⟨a,c⟩+k⟨b,d⟩T(u_0 + h, v_0 + k) = T(u_0, v_0) + h\langle a, c\rangle + k\langle b, d\rangle exactly, so every rectangle is mapped onto a parallelogram with exactly ∣ad−bc∣\abs{ad - bc} times its area. That is what happened in Example 19.17.

In three dimensions, a transformation x=x(u,v,w),x = x(u, v, w)\mathclose{\text{,}} y=y(u,v,w),y = y(u, v, w)\mathclose{\text{,}} z=z(u,v,w)z = z(u, v, w) has a Jacobian ∂(x,y,z)/∂(u,v,w),\partial(x, y, z)/\partial(u, v, w)\mathclose{\text{,}} the determinant of the 3 × 3 array of its nine first partial derivatives. The corresponding change-of-variables rule holds for continuous integrands on bounded closed solids with boundaries of zero volume: the transformation must have continuous first partial derivatives on a neighbourhood of the source solid, map it onto the target solid, and be one-to-one with nonzero Jacobian on the source interior. Then

dV=∣∂(x,y,z)∂(u,v,w)∣ du dv dw.dV = \Big|\frac{\partial(x, y, z)}{\partial(u, v, w)}\Big|\,du\,dv\,dw.

On the stated coordinate ranges, the absolute Jacobian is rr for cylindrical coordinates and ρ2sin⁡φ\rho^2\sin\varphi for spherical coordinates, as the compute box of Section 19.7 shows: the factors found there from pictures.

Watch out

Two slips with the Jacobian. First, use its absolute value. The transformation x=v,x = v\mathclose{\text{,}} y=u,y = u\mathclose{\text{,}} which swaps the axes, has Jacobian −1,-1\mathclose{\text{,}} yet it does not make areas negative. Second, use the Jacobian of xx and yy with respect to uu and v:v\mathclose{\text{:}} it converts du dvdu\,dv into dA.dA\mathclose{\text{.}} In Example 19.17 the formulas for uu and vv give at once

∂(u,v)∂(x,y)=∣2−1−12∣=3,\frac{\partial(u, v)}{\partial(x, y)} = \begin{vmatrix} 2 & -1 \\ -1 & 2 \end{vmatrix} = 3,

the reciprocal of the factor needed, 13.\tfrac13\mathclose{\text{.}} (For differentiable inverse transformations at matching points, the two Jacobians are nonzero reciprocals, by the chain rule.) Using 3 by mistake gives an answer 9 times too large.

9

What you learned

  • A double integral ∬Rf dA\iint_R f\,dA is the limit of double Riemann sums ∑i∑jf(xij∗,yij∗) ΔA:\sum_i\sum_j f(x_{ij}^*, y_{ij}^*)\,\Delta A\mathclose{\text{:}} boxes on small rectangles. For f≥0f \ge 0 it is the volume under the graph; in general a signed volume. On a rectangle, continuous functions are integrable, as are bounded functions continuous except along finitely many continuous graphs on closed intervals.
  • Fubini’s theorem: for ff continuous on a rectangle, ∬Rf dA=∫ab∫cdf dy dx=∫cd∫abf dx dy,\iint_R f\,dA = \int_a^b\int_c^d f\,dy\,dx = \int_c^d\int_a^b f\,dx\,dy\mathclose{\text{,}} computed from the inside out. Without suitable integrability hypotheses, the two improper orders can disagree. For continuous gg and hh on their intervals, ∬Rg(x)h(y) dA=∫g dx∫h dy.\iint_R g(x)h(y)\,dA = \int g\,dx\int h\,dy\mathclose{\text{.}} On a region of positive area, the average value of an integrable ff is 1area∬f dA.\tfrac{1}{\text{area}}\iint f\,dA\mathclose{\text{.}}
  • For continuous ff on a type I region a≤x≤b,a \le x \le b\mathclose{\text{,}} g1(x)≤y≤g2(x)g_1(x) \le y \le g_2(x) with continuous boundary functions, the integral is ∫ab∫g1(x)g2(x)f dy dx;\int_a^b\int_{g_1(x)}^{g_2(x)} f\,dy\,dx\mathclose{\text{;}} over a type II region, ∫cd∫h1(y)h2(y)f dx dy.\int_c^d\int_{h_1(y)}^{h_2(y)} f\,dx\,dy\mathclose{\text{.}} Read the inner limits from a slice of a sketch; outer limits are constants. Reversing the order can make an integral easier: ∫01∫x1ey2 dy dx=e−12.\int_0^1\int_x^1 e^{y^2}\,dy\,dx = \tfrac{e - 1}{2}\mathclose{\text{.}}
  • In polar coordinates, use r≥0r \ge 0 and cover the region once, apart from its boundary: dA=r dr dθ.dA = r\,dr\,d\theta\mathclose{\text{.}} Squaring the Gaussian integral, squeezing the integral over a square between two discs and letting the size grow proves ∫−∞∞e−x2 dx=π,\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt\pi\mathclose{\text{,}} and for c>0,c > 0\mathclose{\text{,}} ∫−∞∞e−ct2 dt=π/c.\int_{-\infty}^{\infty} e^{-ct^2}\,dt = \sqrt{\pi/c}\mathclose{\text{.}}
  • A bounded plate with integrable density ρ≥0\rho \ge 0 and positive mass m=∬Dρ dAm = \iint_D \rho\,dA has centre of mass (Mym,Mxm)\big(\tfrac{M_y}{m}, \tfrac{M_x}{m}\big) with My=∬xρ dAM_y = \iint x\rho\,dA and Mx=∬yρ dA,M_x = \iint y\rho\,dA\mathclose{\text{,}} and moments of inertia Ix=∬y2ρ dA,I_x = \iint y^2\rho\,dA\mathclose{\text{,}} Iy=∬x2ρ dA,I_y = \iint x^2\rho\,dA\mathclose{\text{,}} I0=Ix+Iy;I_0 = I_x + I_y\mathclose{\text{;}} a uniform disc of radius a>0a > 0 has I0=12Ma2.I_0 = \tfrac12 Ma^2\mathclose{\text{.}} A joint density is nonnegative and has total integral 1; it gives P((X,Y)∈D)=∬Df dA.P\big((X, Y) \in D\big) = \iint_D f\,dA\mathclose{\text{.}} Independent random variables with densities f1f_1 and f2f_2 have joint density f1(x)f2(y).f_1(x)f_2(y)\mathclose{\text{.}}
  • On a box, a continuous ff has the same triple integral ∭Ef dV\iiint_E f\,dV in any of six orders. For other solids, choose suitable bounds, splitting when needed; for a continuous ff on a solid between two continuous surfaces over a type I or type II region, integrate in zz first. With nonnegative radial coordinates and limits covering the solid once apart from boundary coincidences, cylindrical coordinates give dV=r dz dr dθ;dV = r\,dz\,dr\,d\theta\mathclose{\text{;}} spherical coordinates, with φ\varphi measured from the positive zz-axis and 0≤φ≤π,0 \le \varphi \le \pi\mathclose{\text{,}} give dV=ρ2sin⁡φ dρ dθ dφ.dV = \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi\mathclose{\text{.}} A ball of radius a>0a > 0 has volume 43πa3.\tfrac43\pi a^3\mathclose{\text{.}}
  • Change of variables: for a continuously differentiable, one-to-one coordinate map with nonzero Jacobian in the interior, allowing the boundary exceptions stated in Section 19.8, dA=∣∂(x,y)/∂(u,v)∣ du dv.dA = \abs{\partial(x, y)/\partial(u, v)}\,du\,dv\mathclose{\text{.}} The Jacobian is xuyv−xvyu,x_uy_v - x_vy_u\mathclose{\text{,}} and its absolute value is the local area scale factor. Polar coordinates have Jacobian r;r\mathclose{\text{;}} for a,b>0,a, b > 0\mathclose{\text{,}} x=au,x = au\mathclose{\text{,}} y=bvy = bv maps the unit disc to an ellipse of area πab.\pi ab\mathclose{\text{.}} Suitable linear substitutions turn parallelograms into rectangles.
10

Exercises

Exercise 19.1★A double integral on a square

Let f(x,y)=xy2+1f(x, y) = xy^2 + 1 and R=[0,2]×[0,2].R = [0, 2] \times [0, 2]\mathclose{\text{.}}

  • (a) Estimate ∬Rf dA\iint_R f\,dA with the midpoint sum on the four squares of side 1.
  • (b) Find the exact value as an iterated integral, in both orders.
  • (c) Is the midpoint sum too large or too small? Explain why from the shape of f.f\mathclose{\text{.}}
Show solution✓ Checked

(a) The centres are (12,12),\big(\tfrac12, \tfrac12\big)\mathclose{\text{,}} (32,12),\big(\tfrac32, \tfrac12\big)\mathclose{\text{,}} (12,32)\big(\tfrac12, \tfrac32\big) and (32,32),\big(\tfrac32, \tfrac32\big)\mathclose{\text{,}} where ff takes the values 98,\tfrac98\mathclose{\text{,}} 118,\tfrac{11}{8}\mathclose{\text{,}} 178\tfrac{17}{8} and 358.\tfrac{35}{8}\mathclose{\text{.}} Each square has area ΔA=1,\Delta A = 1\mathclose{\text{,}} so the midpoint sum is

9+11+17+358=728=9.\frac{9 + 11 + 17 + 35}{8} = \frac{72}{8} = 9.

(b) In the order dy dx,dy\,dx\mathclose{\text{,}} the inner integral holds xx constant:

∫02(xy2+1) dy=[xy33+y]y=0y=2=8x3+2,∫02(8x3+2) dx=163+4=283≈9.333.\begin{aligned} \int_0^2 \big(xy^2 + 1\big)\,dy &= \Big[\frac{xy^3}{3} + y\Big]_{y=0}^{y=2} \\ &= \frac{8x}{3} + 2, \\ \int_0^2\Big(\frac{8x}{3} + 2\Big)\,dx &= \frac{16}{3} + 4 = \frac{28}{3} \approx 9.333. \end{aligned}

In the order dx dy:dx\,dy\mathclose{\text{:}}

∫02(xy2+1) dx=[x2y22+x]x=0x=2=2y2+2,∫02(2y2+2) dy=163+4=283.\begin{aligned} \int_0^2 \big(xy^2 + 1\big)\,dx &= \Big[\frac{x^2y^2}{2} + x\Big]_{x=0}^{x=2} \\ &= 2y^2 + 2, \\ \int_0^2 \big(2y^2 + 2\big)\,dy &= \frac{16}{3} + 4 = \frac{28}{3}. \end{aligned}

The two orders agree, as Fubini’s theorem says.

(c) The midpoint sum, 9, is too small, by 13.\tfrac13\mathclose{\text{.}} In xx the function is linear, and a linear function’s average over an interval is its value at the midpoint, so the xx-direction causes no error. In y,y\mathclose{\text{,}} ff grows like y2,y^2\mathclose{\text{,}} which curves upwards: on [0,1],[0, 1]\mathclose{\text{,}} for instance, y2y^2 averages 13\tfrac13 but equals only 14\tfrac14 at the midpoint. So the value at each centre is below the average over its square.

Exercise 19.2★Limits from a sketch

Let DD be the region between the curves y=xy = \sqrt x and y=x/2,y = x/2\mathclose{\text{,}} and let ff be continuous on D.D\mathclose{\text{.}}

  • (a) Sketch DD and find where the curves meet.
  • (b) Write ∬Df dA\iint_D f\,dA as an iterated integral in both orders.
  • (c) Find the area of DD both ways.
  • (d) Find ∬Dy dA,\iint_D y\,dA\mathclose{\text{,}} and the height yˉ\bar y of the centroid of D.D\mathclose{\text{.}}

Check (b) and (c) with the widget of Section 19.3.

Show solution✓ Checked

(a) The curves meet where x=x/2.\sqrt x = x/2\mathclose{\text{.}} Squaring, x=x2/4,x = x^2/4\mathclose{\text{,}} so x(x−4)=0:x(x - 4) = 0\mathclose{\text{:}} at x=0x = 0 and x=4,x = 4\mathclose{\text{,}} the points (0,0)(0, 0) and (4,2).(4, 2)\mathclose{\text{.}} Both are true meeting points, since 4=2=4/2.\sqrt4 = 2 = 4/2\mathclose{\text{.}} At x=1x = 1 the curves are at heights 1 and 12,\tfrac12\mathclose{\text{,}} so y=xy = \sqrt x is the upper curve.

(b) Vertical slices: for 0≤x≤4,0 \le x \le 4\mathclose{\text{,}} yy runs from x/2x/2 to x,\sqrt x\mathclose{\text{,}} so ∬Df dA=∫04∫x/2xf dy dx.\iint_D f\,dA = \int_0^4\int_{x/2}^{\sqrt x} f\,dy\,dx\mathclose{\text{.}} Horizontal slices: written as functions of y,y\mathclose{\text{,}} the curves are x=y2x = y^2 (from y=x,y = \sqrt x\mathclose{\text{,}} with y≥0)y \ge 0\mathclose{\text{)}} and x=2y.x = 2y\mathclose{\text{.}} At y=1y = 1 they are at x=1x = 1 and x=2,x = 2\mathclose{\text{,}} so x=y2x = y^2 is the left curve, and yy runs from 0 to 2:

∬Df dA=∫02∫y22yf dx dy.\iint_D f\,dA = \int_0^2\int_{y^2}^{2y} f\,dx\,dy.

(c) With f=1:f = 1\mathclose{\text{:}}

∫04(x−x2) dx=[23x3/2−x24]04=163−4=43,∫02(2y−y2) dy=[y2−y33]02=4−83=43.\begin{aligned} \int_0^4\Big(\sqrt x - \frac x2\Big)\,dx &= \Big[\frac23x^{3/2} - \frac{x^2}{4}\Big]_0^4 \\ &= \frac{16}{3} - 4 = \frac43, \\ \int_0^2 \big(2y - y^2\big)\,dy &= \Big[y^2 - \frac{y^3}{3}\Big]_0^2 \\ &= 4 - \frac83 = \frac43. \end{aligned}

(d) Horizontal slices are easier here:

∬Dy dA=∫02y(2y−y2) dy=[2y33−y44]02=163−4=43.\begin{aligned} \iint_D y\,dA &= \int_0^2 y\big(2y - y^2\big)\,dy \\ &= \Big[\frac{2y^3}{3} - \frac{y^4}{4}\Big]_0^2 = \frac{16}{3} - 4 = \frac43. \end{aligned}

So yˉ=4/34/3=1.\bar y = \dfrac{4/3}{4/3} = 1\mathclose{\text{.}} (With vertical slices, ∫04[y22]x/2x dx=∫04(x2−x28) dx=4−83=43,\int_0^4\big[\tfrac{y^2}{2}\big]_{x/2}^{\sqrt x}\,dx = \int_0^4\big(\tfrac x2 - \tfrac{x^2}{8}\big)\,dx = 4 - \tfrac83 = \tfrac43\mathclose{\text{,}} the same.)

Exercise 19.3★One order or two?

Let DD be the triangle with vertices (0,0),(0, 0)\mathclose{\text{,}} (2,0)(2, 0) and (1,1).(1, 1)\mathclose{\text{.}}

  • (a) Using one of the triangle’s straight sides for each inner bound, explain why the order dy dxdy\,dx needs two pieces and the order dx dydx\,dy needs only one.
  • (b) Evaluate ∬Dy dA\iint_D y\,dA in both orders, and find the height yˉ\bar y of the centroid of D.D\mathclose{\text{.}}
Show solution✓ Checked

(a) The sides of DD lie on the lines y=0,y = 0\mathclose{\text{,}} y=xy = x (from (0,0)(0, 0) to (1,1))(1, 1)\mathclose{\text{)}} and y=2−xy = 2 - x (from (1,1)(1, 1) to (2,0)).(2, 0)\mathclose{\text{).}} A vertical line at xx enters DD on y=0,y = 0\mathclose{\text{,}} but it leaves on y=xy = x when 0≤x≤10 \le x \le 1 and on y=2−xy = 2 - x when 1≤x≤2:1 \le x \le 2\mathclose{\text{:}} the upper boundary changes formula at x=1,x = 1\mathclose{\text{,}} so split [0,2][0, 2] there to use one side on each piece. A single iterated integral is also possible with the upper bound min⁡(x,2−x),\min(x, 2 - x)\mathclose{\text{,}} but evaluating it still involves the two formulas. A horizontal line at y,y\mathclose{\text{,}} 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} always enters on the line x=yx = y and leaves on the line x=2−y:x = 2 - y\mathclose{\text{:}} one formula each.

(b) In the order dy dx,dy\,dx\mathclose{\text{,}} split at x=1:x = 1\mathclose{\text{:}}

∫01∫0xy dy dx+∫12∫02−xy dy dx=∫01x22 dx+∫12(2−x)22 dx=16+16=13.\begin{aligned} &\int_0^1\int_0^x y\,dy\,dx + \int_1^2\int_0^{2-x} y\,dy\,dx \\ &\quad= \int_0^1\frac{x^2}{2}\,dx + \int_1^2\frac{(2 - x)^2}{2}\,dx \\ &\quad= \frac16 + \frac16 = \frac13. \end{aligned}

In the order dx dy,dx\,dy\mathclose{\text{,}} the slice at height yy has length (2−y)−y=2−2y:(2 - y) - y = 2 - 2y\mathclose{\text{:}}

∫01∫y2−yy dx dy=∫01(2y−2y2) dy=1−23=13.\begin{aligned} \int_0^1\int_y^{2-y} y\,dx\,dy &= \int_0^1 \big(2y - 2y^2\big)\,dy \\ &= 1 - \frac23 = \frac13. \end{aligned}

The triangle has base 2 and height 1, so its area is 1 and yˉ=13:\bar y = \tfrac13\mathclose{\text{:}} the centroid of a triangle lies a third of the way up from its base.

Exercise 19.4★Polar or Cartesian

Let DD be the quarter disc x2+y2≤1,x^2 + y^2 \le 1\mathclose{\text{,}} x≥0,x \ge 0\mathclose{\text{,}} y≥0.y \ge 0\mathclose{\text{.}} Evaluate ∬Dxy dA\iint_D xy\,dA (a) in polar coordinates and (b) as an iterated integral in xx and y.y\mathclose{\text{.}}

Show solution✓ Checked

(a) In polar coordinates xy=r2cos⁡θsin⁡θxy = r^2\cos\theta\sin\theta and dA=r dr dθ,dA = r\,dr\,d\theta\mathclose{\text{,}} and DD is 0≤r≤1,0 \le r \le 1\mathclose{\text{,}} 0≤θ≤π/2.0 \le \theta \le \pi/2\mathclose{\text{.}} The integrand is a product, so the integral splits:

∬Dxy dA=∫0π/2∫01r2cos⁡θsin⁡θ r dr dθ=∫01r3 dr∫0π/2sin⁡θcos⁡θ dθ=14⋅12=18,\begin{aligned} \iint_D xy\,dA &= \int_0^{\pi/2}\int_0^1 r^2\cos\theta\sin\theta\,r\,dr\,d\theta \\ &= \int_0^1 r^3\,dr\int_0^{\pi/2}\sin\theta\cos\theta\,d\theta \\ &= \frac14\cdot\frac12 = \frac18, \end{aligned}

since ∫0π/2sin⁡θcos⁡θ dθ=[12sin⁡2θ]0π/2=12\int_0^{\pi/2}\sin\theta\cos\theta\,d\theta = \big[\tfrac12\sin^2\theta\big]_0^{\pi/2} = \tfrac12 (substitute u=sin⁡θ).u = \sin\theta\mathclose{\text{).}}

(b) A vertical slice at xx runs from y=0y = 0 up to the circle, y=1−x2:y = \sqrt{1 - x^2}\mathclose{\text{:}}

∫01∫01−x2xy dy dx=∫01x(1−x2)2 dx=12(12−14)=18.\begin{aligned} \int_0^1\int_0^{\sqrt{1 - x^2}} xy\,dy\,dx &= \int_0^1 \frac{x\big(1 - x^2\big)}{2}\,dx \\ &= \frac12\Big(\frac12 - \frac14\Big) = \frac18. \end{aligned}

The common slip in (a) is to forget the factor rr of dA,dA\mathclose{\text{,}} which gives ∫01r2 dr⋅12=16.\int_0^1 r^2\,dr \cdot \tfrac12 = \tfrac16\mathclose{\text{.}}

Exercise 19.5★★Reverse the order

Evaluate ∫01∫x11+y3 dy dx.\displaystyle\int_0^1\int_{\sqrt x}^{1} \sqrt{1 + y^3}\,dy\,dx\mathclose{\text{.}}

Show solution✓ Checked

The inner antiderivative of 1+y3\sqrt{1 + y^3} is not one of our standard forms, so try reversing the order. The limits say 0≤x≤10 \le x \le 1 and x≤y≤1.\sqrt x \le y \le 1\mathclose{\text{.}} For x≥0x \ge 0 and y≥0,y \ge 0\mathclose{\text{,}} y≥xy \ge \sqrt x is the same as x≤y2,x \le y^2\mathclose{\text{,}} so the region is bounded by the yy-axis, the parabola x=y2x = y^2 and the line y=1:y = 1\mathclose{\text{:}} a horizontal line at height y,y\mathclose{\text{,}} 0≤y≤1,0 \le y \le 1\mathclose{\text{,}} enters it on the yy-axis and leaves it on the parabola x=y2.x = y^2\mathclose{\text{.}} So

∫01∫x11+y3 dy dx=∫01∫0y21+y3 dx dy=∫01y21+y3 dy.\begin{aligned} &\int_0^1\int_{\sqrt x}^{1} \sqrt{1 + y^3}\,dy\,dx \\ &\quad= \int_0^1\int_0^{y^2}\sqrt{1 + y^3}\,dx\,dy \\ &\quad= \int_0^1 y^2\sqrt{1 + y^3}\,dy. \end{aligned}

Substitute u=1+y3,u = 1 + y^3\mathclose{\text{,}} du=3y2 dy;du = 3y^2\,dy\mathclose{\text{;}} the limits become u=1u = 1 and u=2:u = 2\mathclose{\text{:}}

13∫12u1/2 du=13⋅23[u3/2]12=29(22−1)≈0.4063.\begin{aligned} \frac13\int_1^2 u^{1/2}\,du &= \frac13\cdot\frac23\Big[u^{3/2}\Big]_1^2 \\ &= \frac29\big(2\sqrt2 - 1\big) \approx 0.4063. \end{aligned}
Exercise 19.6★★Two random numbers

Let XX and YY be independent random numbers, each uniform on [0,1]:[0, 1]\mathclose{\text{:}} their joint density is 1 on the square [0,1]×[0,1][0, 1] \times [0, 1] and 0 elsewhere. Find

  • (a) P(X+Y≤1),P(X + Y \le 1)\mathclose{\text{,}}
  • (b) P(Y≤X2),P\big(Y \le X^2\big)\mathclose{\text{,}}
  • (c) P(XY≤12).P\big(XY \le \tfrac12\big)\mathclose{\text{.}}
Show solution✓ Checked

Each probability is the integral of 1 over the part of the square where the event happens, that is, the area of that part.

(a) x+y≤1x + y \le 1 is the triangle 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} 0≤y≤1−x,0 \le y \le 1 - x\mathclose{\text{,}} of area ∫01(1−x) dx=12.\int_0^1 (1 - x)\,dx = \tfrac12\mathclose{\text{.}}

(b) y≤x2y \le x^2 is the region under the parabola: P=∫01∫0x2dy dx=∫01x2 dx=13.P = \int_0^1\int_0^{x^2} dy\,dx = \int_0^1 x^2\,dx = \tfrac13\mathclose{\text{.}}

(c) Work with the complement, xy>12,xy > \tfrac12\mathclose{\text{,}} which is one region: y>12x,y > \dfrac{1}{2x}\mathclose{\text{,}} and since y≤1y \le 1 this needs 12x<1,\dfrac{1}{2x} < 1\mathclose{\text{,}} that is, x>12.x > \tfrac12\mathclose{\text{.}} So

P(XY>12)=∫1/21(1−12x) dx=12−12(ln⁡1−ln⁡12)=12−ln⁡22,\begin{aligned} P\Big(XY > \frac12\Big) &= \int_{1/2}^{1}\Big(1 - \frac{1}{2x}\Big)\,dx \\ &= \frac12 - \frac12\Big(\ln 1 - \ln\frac12\Big) \\ &= \frac12 - \frac{\ln 2}{2}, \end{aligned}

and

P(XY≤12)=1−(12−ln⁡22)=1+ln⁡22≈0.847.\begin{aligned} P\Big(XY \le \frac12\Big) &= 1 - \Big(\frac12 - \frac{\ln 2}{2}\Big) \\ &= \frac{1 + \ln 2}{2} \approx 0.847. \end{aligned}

(Directly, the event xy≤12xy \le \tfrac12 can be split into two pieces: the whole strip 0≤x≤12,0 \le x \le \tfrac12\mathclose{\text{,}} and 0≤y≤12x0 \le y \le \tfrac{1}{2x} for 12≤x≤1.)\tfrac12 \le x \le 1\mathclose{\text{.)}}

Exercise 19.7★★A plate denser at the top

A thin plate occupies the half disc x2+y2≤a2,x^2 + y^2 \le a^2\mathclose{\text{,}} y≥0,y \ge 0\mathclose{\text{,}} with a>0,a > 0\mathclose{\text{,}} and its density is proportional to the distance from the xx-axis: ρ=ky,\rho = ky\mathclose{\text{,}} with a constant k>0.k > 0\mathclose{\text{.}} Find its mass and its centre of mass, and compare with the centroid (0,4a3π)\big(0, \tfrac{4a}{3\pi}\big) of a uniform half disc (Example 12.15).

Show solution✓ Checked

In polar coordinates the half disc is 0≤r≤a,0 \le r \le a\mathclose{\text{,}} 0≤θ≤π,0 \le \theta \le \pi\mathclose{\text{,}} and ρ=krsin⁡θ.\rho = kr\sin\theta\mathclose{\text{.}} The mass is

m=∫0π∫0akrsin⁡θ⋅r dr dθ=k∫0πsin⁡θ dθ∫0ar2 dr=k⋅2⋅a33=2ka33.\begin{aligned} m &= \int_0^\pi\int_0^a kr\sin\theta\cdot r\,dr\,d\theta \\ &= k\int_0^\pi\sin\theta\,d\theta\int_0^a r^2\,dr \\ &= k\cdot 2\cdot\frac{a^3}{3} = \frac{2ka^3}{3}. \end{aligned}

The plate and its density do not change when xx is replaced by −x,-x\mathclose{\text{,}} so the moments of mirror-image pieces about the yy-axis cancel: My=0M_y = 0 and xˉ=0.\bar x = 0\mathclose{\text{.}} (In the integral, ∫0πcos⁡θsin⁡θ dθ=0.)\int_0^\pi\cos\theta\sin\theta\,d\theta = 0\mathclose{\text{.)}} For yˉ,\bar y\mathclose{\text{,}} with ∫0πsin⁡2θ dθ=π2\int_0^\pi \sin^2\theta\,d\theta = \tfrac{\pi}{2} (write sin⁡2θ=12(1−cos⁡2θ)),\sin^2\theta = \tfrac12(1 - \cos 2\theta)\mathclose{\text{),}}

Mx=∬Dy⋅ky dA=k∫0π∫0ar2sin⁡2θ⋅r dr dθ=k⋅π2⋅a44=kπa48,\begin{aligned} M_x &= \iint_D y\cdot ky\,dA \\ &= k\int_0^\pi\int_0^a r^2\sin^2\theta\cdot r\,dr\,d\theta \\ &= k\cdot\frac{\pi}{2}\cdot\frac{a^4}{4} = \frac{k\pi a^4}{8}, \end{aligned}

so

yˉ=kπa4/82ka3/3=3πa16≈0.589a.\bar y = \frac{k\pi a^4/8}{2ka^3/3} = \frac{3\pi a}{16} \approx 0.589a.

The centre of mass is (0,3πa16),\big(0, \tfrac{3\pi a}{16}\big)\mathclose{\text{,}} higher than the centroid 4a3π≈0.424a\tfrac{4a}{3\pi} \approx 0.424a of a uniform half disc, because the density grows towards the top of the plate.

Exercise 19.8★★One sixth of a cube
  • (a) Evaluate V=∫01∫0x∫0ydz dy dx.V = \displaystyle\int_0^1\int_0^x\int_0^y dz\,dy\,dx\mathclose{\text{.}}
  • (b) Describe the solid EE over which it integrates, and write VV as an iterated integral in the order dx dy dz.dx\,dy\,dz\mathclose{\text{.}}
  • (c) Explain why V=16V = \tfrac16 without integrating.
  • (d) Find the coordinate xˉ\bar x of the centroid of E.E\mathclose{\text{.}}
Show solution✓ Checked

(a) From the inside out: ∫0ydz=y,\int_0^y dz = y\mathclose{\text{,}} then ∫0xy dy=x22,\int_0^x y\,dy = \tfrac{x^2}{2}\mathclose{\text{,}} then ∫01x22 dx=16.\int_0^1 \tfrac{x^2}{2}\,dx = \tfrac16\mathclose{\text{.}}

(b) The limits say 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} 0≤y≤x0 \le y \le x and 0≤z≤y:0 \le z \le y\mathclose{\text{:}} EE is the set of points of the unit cube with 0≤z≤y≤x≤1.0 \le z \le y \le x \le 1\mathclose{\text{.}} For the order dx dy dz,dx\,dy\,dz\mathclose{\text{,}} the outermost variable zz runs over all its values in E,E\mathclose{\text{,}} from 0 to 1. For a fixed z,z\mathclose{\text{,}} yy runs from zz to 1, and for fixed yy and z,z\mathclose{\text{,}} xx runs from yy to 1:

V=∫01∫z1∫y1dx dy dz.V = \int_0^1\int_z^1\int_y^1 dx\,dy\,dz.

(c) Every point of the cube [0,1]3[0, 1]^3 has its three coordinates in some order: x≥y≥z,x \ge y \ge z\mathclose{\text{,}} as in E,E\mathclose{\text{,}} or x≥z≥y,x \ge z \ge y\mathclose{\text{,}} or one of the four other orders. So the six solids defined by the six orders fill the cube, and they overlap only on planes such as x=y,x = y\mathclose{\text{,}} which have no volume. Swapping two coordinates, a reflection in a plane such as x=y,x = y\mathclose{\text{,}} turns one of these solids into another without changing volumes, so all six have the same volume, 16\tfrac16 of the cube.

(d) ∭Ex dV=∫01x⋅x22 dx=18\iiint_E x\,dV = \int_0^1 x\cdot\frac{x^2}{2}\,dx = \frac18 (the inner two integrals are as in (a), with the factor xx outside), so xˉ=1/81/6=34.\bar x = \dfrac{1/8}{1/6} = \dfrac34\mathclose{\text{.}}

Exercise 19.9★★Inside a ball

Take a ball of radius a>0a > 0 centred at the origin, with constant density k>0,k > 0\mathclose{\text{,}} so that its mass is M=43πa3k.M = \tfrac43\pi a^3k\mathclose{\text{.}}

  • (a) Find the average distance of the points of the ball from its centre.
  • (b) Find its moment of inertia about the zz-axis, Iz=∭(x2+y2)k dV,I_z = \iiint \big(x^2 + y^2\big)k\,dV\mathclose{\text{,}} in terms of MM and a,a\mathclose{\text{,}} and compare with the uniform disc of Example 19.10.
Show solution✓ Checked

(a) The average of the distance ρ\rho over the ball is its integral divided by the volume 43πa3.\tfrac43\pi a^3\mathclose{\text{.}} With dV=ρ2sin⁡φ dρ dθ dφ,dV = \rho^2\sin\varphi\,d\rho\,d\theta\,d\varphi\mathclose{\text{,}} the integral of ρ\rho splits into three single integrals:

∭ρ dV=∫0π∫02π∫0aρ3sin⁡φ dρ dθ dφ=a44⋅2π⋅2=πa4,\begin{aligned} \iiint \rho\,dV &= \int_0^\pi\int_0^{2\pi}\int_0^a \rho^3\sin\varphi\,d\rho\,d\theta\,d\varphi \\ &= \frac{a^4}{4}\cdot 2\pi\cdot 2 = \pi a^4, \end{aligned}

so the average distance is πa443πa3=3a4.\dfrac{\pi a^4}{\tfrac43\pi a^3} = \dfrac{3a}{4}\mathclose{\text{.}} Most of a ball’s volume lies near its surface.

(b) In spherical coordinates x2+y2=r2=ρ2sin⁡2φ,x^2 + y^2 = r^2 = \rho^2\sin^2\varphi\mathclose{\text{,}} and the factor ρ2sin⁡φ\rho^2\sin\varphi of dVdV makes the integrand kρ4sin⁡3φ:k\rho^4\sin^3\varphi\mathclose{\text{:}}

Iz=k∫0π∫02π∫0aρ4sin⁡3φ dρ dθ dφ=k⋅a55⋅2π∫0πsin⁡3φ dφ.\begin{aligned} I_z &= k\int_0^\pi\int_0^{2\pi}\int_0^a \rho^4\sin^3\varphi\,d\rho\,d\theta\,d\varphi \\ &= k\cdot\frac{a^5}{5}\cdot 2\pi\int_0^\pi\sin^3\varphi\,d\varphi. \end{aligned}

For the last integral write sin⁡3φ=(1−cos⁡2φ)sin⁡φ\sin^3\varphi = \big(1 - \cos^2\varphi\big)\sin\varphi and substitute u=cos⁡φ:u = \cos\varphi\mathclose{\text{:}} ∫0πsin⁡3φ dφ=∫−11(1−u2) du=43.\int_0^\pi \sin^3\varphi\,d\varphi = \int_{-1}^{1}\big(1 - u^2\big)\,du = \tfrac43\mathclose{\text{.}} So

Iz=8πka515=25⋅43πa3k⋅a2=25Ma2.I_z = \frac{8\pi ka^5}{15} = \frac25\cdot\frac43\pi a^3k\cdot a^2 = \frac25 Ma^2.

A uniform disc of the same mass and radius has I0=12Ma2,I_0 = \tfrac12 Ma^2\mathclose{\text{,}} more than 25Ma2:\tfrac25 Ma^2\mathclose{\text{:}} in the ball, much of the mass lies near the axis, above and below the centre.

Exercise 19.10★★★Between two hyperbolas

Let DD be the region of the first quadrant bounded by the hyperbolas xy=1xy = 1 and xy=4xy = 4 and the lines y=xy = x and y=4x.y = 4x\mathclose{\text{.}}

  • (a) Show that the new variables u=xyu = xy and v=y/xv = y/x describe DD as the square 1≤u≤4,1 \le u \le 4\mathclose{\text{,}} 1≤v≤4,1 \le v \le 4\mathclose{\text{,}} and that x=u/vx = \sqrt{u/v} and y=uv.y = \sqrt{uv}\mathclose{\text{.}}
  • (b) Find the Jacobian ∂(x,y)∂(u,v),\dfrac{\partial(x, y)}{\partial(u, v)}\mathclose{\text{,}} and check it with ∂(u,v)∂(x,y).\dfrac{\partial(u, v)}{\partial(x, y)}\mathclose{\text{.}}
  • (c) Find the area of D.D\mathclose{\text{.}}
Show solution✓ Checked

(a) In the first quadrant x>0x > 0 and y>0,y > 0\mathclose{\text{,}} so u=xy>0u = xy > 0 and v=y/x>0.v = y/x > 0\mathclose{\text{.}} The hyperbolas are u=1u = 1 and u=4,u = 4\mathclose{\text{,}} and the lines are v=1v = 1 and v=4;v = 4\mathclose{\text{;}} DD lies between both pairs, so it is described by 1≤u≤4,1 \le u \le 4\mathclose{\text{,}} 1≤v≤4.1 \le v \le 4\mathclose{\text{.}} Conversely uv=y2uv = y^2 and u/v=x2,u/v = x^2\mathclose{\text{,}} and taking the positive roots, y=uvy = \sqrt{uv} and x=u/v.x = \sqrt{u/v}\mathclose{\text{.}} So each point of the square comes from exactly one point of D.D\mathclose{\text{.}}

(b) With x=u1/2v−1/2x = u^{1/2}v^{-1/2} and y=u1/2v1/2,y = u^{1/2}v^{1/2}\mathclose{\text{,}}

xu=12uv,xv=−u2v3/2,yu=v2u,yv=u2v,\begin{aligned} x_u &= \frac{1}{2\sqrt{uv}}, & x_v &= -\frac{\sqrt u}{2v^{3/2}}, \\ y_u &= \frac{\sqrt v}{2\sqrt u}, & y_v &= \frac{\sqrt u}{2\sqrt v}, \end{aligned}

so

∂(x,y)∂(u,v)=xuyv−xvyu=14v+14v=12v.\begin{aligned} \frac{\partial(x, y)}{\partial(u, v)} &= x_uy_v - x_vy_u \\ &= \frac{1}{4v} + \frac{1}{4v} = \frac{1}{2v}. \end{aligned}

The check: from u=xyu = xy and v=y/x,v = y/x\mathclose{\text{,}}

∂(u,v)∂(x,y)=∣yx−y/x21/x∣=yx+yx=2yx=2v,\begin{aligned} \frac{\partial(u, v)}{\partial(x, y)} &= \begin{vmatrix} y & x \\ -y/x^2 & 1/x \end{vmatrix} \\ &= \frac yx + \frac yx = \frac{2y}{x} = 2v, \end{aligned}

the reciprocal of 12v,\tfrac{1}{2v}\mathclose{\text{,}} as the pitfall of Section 19.8 says it must be.

(c) The Jacobian is positive, so

A(D)=∫14∫1412v du dv=3⋅12ln⁡4=3ln⁡2≈2.079.\begin{aligned} A(D) &= \int_1^4\int_1^4\frac{1}{2v}\,du\,dv \\ &= 3\cdot\frac12\ln 4 = 3\ln 2 \approx 2.079. \end{aligned}

In xx and yy the area takes two integrals, split at the corner x=1:x = 1\mathclose{\text{:}} ∫1/21(4x−1x) dx+∫12(4x−x) dx,\int_{1/2}^{1}\big(4x - \tfrac1x\big)\,dx + \int_1^2\big(\tfrac4x - x\big)\,dx\mathclose{\text{,}} which also gives 3ln⁡2.3\ln 2\mathclose{\text{.}}

Exercise 19.11★★★A napkin ring

A cylindrical hole of radius b>0b > 0 is drilled through the centre of a ball of radius a>b,a > b\mathclose{\text{,}} along a diameter, leaving a ring.

  • (a) Use cylindrical coordinates to find the volume of the ring.
  • (b) Show that it equals πh36,\dfrac{\pi h^3}{6}\mathclose{\text{,}} where h=2a2−b2h = 2\sqrt{a^2 - b^2} is the height of the ring. So the volume depends only on the height.
  • (c) Check with a=2a = 2 and b=1.b = 1\mathclose{\text{.}}
Show solution✓ Checked

(a) Put the hole along the zz-axis. The ball is r2+z2≤a2,r^2 + z^2 \le a^2\mathclose{\text{,}} so at the distance rr from the axis it runs from z=−a2−r2z = -\sqrt{a^2 - r^2} to z=a2−r2.z = \sqrt{a^2 - r^2}\mathclose{\text{.}} The ring is the part with b≤r≤a:b \le r \le a\mathclose{\text{:}}

V=∫02π∫ba∫−a2−r2a2−r2r dz dr dθ=2π∫ba2ra2−r2 dr.\begin{aligned} V &= \int_0^{2\pi}\int_b^a\int_{-\sqrt{a^2 - r^2}}^{\sqrt{a^2 - r^2}} r\,dz\,dr\,d\theta \\ &= 2\pi\int_b^a 2r\sqrt{a^2 - r^2}\,dr. \end{aligned}

With w=a2−r2,w = a^2 - r^2\mathclose{\text{,}} dw=−2r dr,dw = -2r\,dr\mathclose{\text{,}} an antiderivative of 2ra2−r22r\sqrt{a^2 - r^2} is −23(a2−r2)3/2,-\tfrac23\big(a^2 - r^2\big)^{3/2}\mathclose{\text{,}} so

V=2π⋅23(a2−b2)3/2=4π3(a2−b2)3/2.V = 2\pi\cdot\frac23\big(a^2 - b^2\big)^{3/2} = \frac{4\pi}{3}\big(a^2 - b^2\big)^{3/2}.

(b) The wall of the hole meets the sphere where r=b,r = b\mathclose{\text{,}} at heights z=±a2−b2,z = \pm\sqrt{a^2 - b^2}\mathclose{\text{,}} so the ring has the height h=2a2−b2.h = 2\sqrt{a^2 - b^2}\mathclose{\text{.}} Then (a2−b2)3/2=(h2)3=h38,\big(a^2 - b^2\big)^{3/2} = \big(\tfrac h2\big)^3 = \tfrac{h^3}{8}\mathclose{\text{,}} and

V=4π3⋅h38=πh36.V = \frac{4\pi}{3}\cdot\frac{h^3}{8} = \frac{\pi h^3}{6}.

A ring 6 cm tall cut from a ball the size of an orange and one 6 cm tall cut from a ball the size of the Earth have the same volume, 36π≈11336\pi \approx 113 cm³: the second ring is far wider around, but its wall is far thinner.

(c) With a=2a = 2 and b=1,b = 1\mathclose{\text{,}} the formula of (a) gives 4π3⋅33/2=43 π.\tfrac{4\pi}{3}\cdot 3^{3/2} = 4\sqrt3\,\pi\mathclose{\text{.}} The height is h=23,h = 2\sqrt3\mathclose{\text{,}} and the formula of (b) gives the same:

π(23)36=243 π6=43 π≈21.77.\frac{\pi\big(2\sqrt3\big)^3}{6} = \frac{24\sqrt3\,\pi}{6} = 4\sqrt3\,\pi \approx 21.77.
Exercise 19.12★★★Darts and the normal distribution

Model the horizontal and vertical errors XX and YY of a dart player’s throws as independent standard normal random variables (a hypothetical model). Assume both directions have the same standard deviation and measure all lengths in that common unit, with the target at the origin. Their joint density is

φ(x)φ(y)=12πe−(x2+y2)/2.\varphi(x)\varphi(y) = \frac{1}{2\pi}e^{-(x^2 + y^2)/2}.
  • (a) For c≥0,c \ge 0\mathclose{\text{,}} use polar coordinates to show that the probability of landing within the distance cc of the target is 1−e−c2/2.1 - e^{-c^2/2}\mathclose{\text{.}} Evaluate it for c=1,c = 1\mathclose{\text{,}} 2 and 3, and compare with the 68–95–99.7 rule of Section 12.9.
  • (b) In the way that Section 12.9 defined the mean of one random variable, the finite mean of a quantity g(X,Y)g(X, Y) is ∬g(x,y)f(x,y) dA\iint g(x, y)f(x, y)\,dA over the plane, provided ∬∣g(x,y)∣f(x,y) dA<∞.\iint \abs{g(x, y)}f(x, y)\,dA < \infty\mathclose{\text{.}} Show that the mean distance from the target is π/2≈1.253.\sqrt{\pi/2} \approx 1.253\mathclose{\text{.}} You may use the Gaussian integral.
Show solution✓ Checked

(a) The event is the disc x2+y2≤c2,x^2 + y^2 \le c^2\mathclose{\text{,}} which is 0≤r≤c,0 \le r \le c\mathclose{\text{,}} 0≤θ≤2π0 \le \theta \le 2\pi in polar coordinates. With u=r2/2,u = r^2/2\mathclose{\text{,}}

P=∫02π∫0c12πe−r2/2 r dr dθ=[−e−r2/2]0c=1−e−c2/2.\begin{aligned} P &= \int_0^{2\pi}\int_0^c \frac{1}{2\pi}e^{-r^2/2}\,r\,dr\,d\theta \\ &= \Big[-e^{-r^2/2}\Big]_0^c = 1 - e^{-c^2/2}. \end{aligned}

For c=1,c = 1\mathclose{\text{,}} 2 and 3 this is 1−e−1/2≈0.393,1 - e^{-1/2} \approx 0.393\mathclose{\text{,}} 1−e−2≈0.8651 - e^{-2} \approx 0.865 and 1−e−9/2≈0.989.1 - e^{-9/2} \approx 0.989\mathclose{\text{.}} In one dimension the probabilities of landing within 1, 2 and 3 standard deviations are about 0.683, 0.954 and 0.997. The disc condition X2+Y2≤c2X^2 + Y^2 \le c^2 is stronger than either coordinate condition ∣X∣≤c\abs{X} \le c or ∣Y∣≤c\abs{Y} \le c alone; even being inside both coordinate ranges gives a square larger than the disc.

(b) The distance is r,r\mathclose{\text{,}} so the mean distance is

∫02π∫0∞r⋅12πe−r2/2 r dr dθ=∫0∞r2e−r2/2 dr,\begin{aligned} &\int_0^{2\pi}\int_0^\infty r\cdot\frac{1}{2\pi}e^{-r^2/2}\,r\,dr\,d\theta \\ &\quad= \int_0^\infty r^2e^{-r^2/2}\,dr, \end{aligned}

an improper integral of a positive function. Integrate by parts with u=ru = r and dv=re−r2/2 dr,dv = re^{-r^2/2}\,dr\mathclose{\text{,}} so v=−e−r2/2:v = -e^{-r^2/2}\mathclose{\text{:}} for t>0,t > 0\mathclose{\text{,}}

∫0tr2e−r2/2 dr=−te−t2/2+∫0te−r2/2 dr.\int_0^t r^2e^{-r^2/2}\,dr = -te^{-t^2/2} + \int_0^t e^{-r^2/2}\,dr.

As t→∞,t \to \infty\mathclose{\text{,}} te−t2/2→0te^{-t^2/2} \to 0 (by L’Hôpital’s rule, Module 7, applied to t/et2/2),t\big/e^{t^2/2}\mathclose{\text{),}} and by the Gaussian integral with c=12c = \tfrac12 (Section 19.4), ∫0∞e−r2/2 dr\int_0^\infty e^{-r^2/2}\,dr is half of 2π.\sqrt{2\pi}\mathclose{\text{.}} So the mean distance is

2π2=π2≈1.253.\frac{\sqrt{2\pi}}{2} = \sqrt{\frac{\pi}{2}} \approx 1.253.
11

Check yourself

1
Let ff be continuous on the triangle D,D\mathclose{\text{,}} where 0≤y≤x≤10 \le y \le x \le 1 (vertices (0,0),(0, 0)\mathclose{\text{,}} (1,0)(1, 0) and (1,1)).(1, 1)\mathclose{\text{).}} Which iterated integral equals ∬Df(x,y) dA?\iint_D f(x, y)\,dA\mathclose{\text{?}}
2
∫01∫02(x+2y) dy dx\displaystyle\int_0^1\int_0^2 (x + 2y)\,dy\,dx equals
3
Which integral is the area of the disc x2+y2≤9?x^2 + y^2 \le 9\mathclose{\text{?}}
4
For gg continuous on [0,1],[0, 1]\mathclose{\text{,}} reversing the order of integration gives ∫01∫x1g(y) dy dx\displaystyle\int_0^1\int_x^1 g(y)\,dy\,dx equal to
5
The transformation x=2u+v,x = 2u + v\mathclose{\text{,}} y=u−vy = u - v maps the unit square 0≤u≤1,0 \le u \le 1\mathclose{\text{,}} 0≤v≤10 \le v \le 1 onto a parallelogram. Its area is
6
In spherical coordinates, with ρ≥0\rho \ge 0 and 0≤φ≤π0 \le \varphi \le \pi measured from the positive zz-axis, the volume element dVdV is
7
XX and YY are independent and each uniform on [0,1].[0, 1]\mathclose{\text{.}} P(X+Y≤12)P\big(X + Y \le \tfrac12\big) is
8
∫0∞e−x2 dx\displaystyle\int_0^\infty e^{-x^2}\,dx equals
Finished this module?