Ran Wei/ Calculus/Module 12
中文
Calculus · Part III · Integrals

Module 12Applications of integration and improper integrals

Use integrals to add up quantities that are spread out (areas between curves, volumes, lengths of curves, the work done by varying forces, centres of mass), all with one method: slice, approximate, add and take the limit. Then extend integrals to infinite intervals and to functions that blow up, and use them to compute probabilities.

⏱ 270 minYou need: Modules 1 to 11, in particular the definite integral (Module 9), the Fundamental Theorem and substitution (Module 10), and integration by parts and Simpson’s rule (Module 11)

In this module you will

  • Set up an integral for a quantity by slicing it, approximating each slice, adding the slices and taking the limit
  • Find areas between curves with vertical or horizontal strips, and volumes by slicing, discs, washers and cylindrical shells
  • Compute arc lengths, exactly or numerically, the work done by variable forces, and the centres of mass of rods and plates
  • Decide whether an improper integral converges, with the definitions, the pp-integrals and the comparison tests, and find its value when it does
  • Compute probabilities and expected values from a probability density, including the exponential and normal distributions
1

Slice, approximate, add

Module 9 found the area under a curve by slicing the region into thin strips, approximating each strip by a rectangle, adding the rectangles and taking the limit of the sums; Module 10 evaluated such limits with antiderivatives. The same four steps compute much more than areas: volumes, lengths, work, masses, centres of mass and probabilities. This section shows the method on one example. The rest of the module uses it again and again.

Suppose a metal rod 2 metres long is thicker towards one end, so that its density, its mass per unit length, is

ρ(x)=1+x2 kg/m\rho(x) = 1 + x^2 \text{ kg/m}

at the point xx metres from the thin end. (The rod is hypothetical; ρ\rho is the Greek letter “rho”.) What is its mass? If the density were constant, the mass would be density times length. It is not constant, but along a short piece of the rod it hardly changes. So slice the rod into nn pieces of length Δx=2/n,\Delta x = 2/n\mathclose{\text{,}} with ends x0=0,x1,…,xn=2.x_0 = 0, x_1, \dots, x_n = 2\mathclose{\text{.}} The iith piece has a density close to ρ(xi−1),\rho(x_{i-1})\mathclose{\text{,}} its value at the piece’s left end, so its mass is about ρ(xi−1) Δx.\rho(x_{i-1})\,\Delta x\mathclose{\text{.}} Adding the pieces gives an estimate LnL_n of the mass of the rod; using the right ends instead gives another, Rn:R_n\mathclose{\text{:}}

Ln=∑i=1nρ(xi−1) Δx,Rn=∑i=1nρ(xi) Δx.\begin{aligned} L_n &= \sum_{i=1}^{n} \rho(x_{i-1})\,\Delta x, \\ R_n &= \sum_{i=1}^{n} \rho(x_i)\,\Delta x. \end{aligned}
nnLnL_nRnR_n
443.753.755.755.75
10104.284.285.085.08
1001004.62684.62684.70684.7068
100010004.662674.662674.670674.67067

The density increases along the rod, so each piece is heavier than its left-end estimate and lighter than its right-end estimate: the true mass MM satisfies Ln≤M≤RnL_n \le M \le R_n for every n.n\mathclose{\text{.}} Both sums are Riemann sums of ρ\rho on [0,2],[0, 2]\mathclose{\text{,}} so both approach ∫02ρ(x) dx\int_0^2 \rho(x)\,dx as n→∞n \to \infty (Module 9), and M,M\mathclose{\text{,}} squeezed between them, must equal that integral:

M=∫02(1+x2) dx=[x+x33]02=2+83=143≈4.667 kg.\begin{aligned} M &= \int_0^2 (1 + x^2)\,dx = \Big[x + \frac{x^3}{3}\Big]_0^2 \\ &= 2 + \frac83 = \frac{14}{3} \approx 4.667 \text{ kg}. \end{aligned}

The table agrees: for n=1000n = 1000 the two sums pin the mass between 4.66267 and 4.67067 kg.

Key idea

Slice, approximate, add, take the limit. To compute a quantity QQ spread over an interval [a,b]:[a, b]\mathclose{\text{:}}

  1. Slice [a,b][a, b] into nn thin pieces of width Δx.\Delta x\mathclose{\text{.}}
  2. Approximate the part of QQ in the piece near xx by q(x) Δx,q(x)\,\Delta x\mathclose{\text{,}} for a continuous function q:q\mathclose{\text{:}} density times length, height times width, force times distance.
  3. Add the pieces: Q≈∑i=1nq(xi∗) Δx,Q \approx \sum_{i=1}^{n} q(x_i^*)\,\Delta x\mathclose{\text{,}} a Riemann sum.
  4. Take the limit as n→∞:n \to \infty\mathclose{\text{:}} Q=∫abq(x) dx.Q = \int_a^b q(x)\,dx\mathclose{\text{.}}

Why is the limit exactly Q,Q\mathclose{\text{,}} and not only close to it? The rod shows the reason. On each piece a continuous qq has a least and a greatest value (the Extreme Value Theorem, Module 3). If the true amount in every piece lies between Δx\Delta x times the least value and Δx\Delta x times the greatest, then QQ lies between two Riemann sums of q:q\mathclose{\text{:}} the one that samples each piece where qq is least, and the one that samples it where qq is greatest. Both sums approach ∫abq(x) dx,\int_a^b q(x)\,dx\mathclose{\text{,}} so QQ is squeezed to that value, as in the squeeze theorem of Section 2.6. When you set up a new application, this is the property to look for. An approximation without such a guarantee can give a wrong answer, as Section 12.5 shows.

Leibniz’s notation keeps the method in view. Write the amount in a slice of width dxdx as dQ=q(x) dx,dQ = q(x)\,dx\mathclose{\text{,}} here dm=ρ(x) dx,dm = \rho(x)\,dx\mathclose{\text{,}} and the total as Q=∫abdQ.Q = \int_a^b dQ\mathclose{\text{.}}

Tip

Units check a set-up: the integrand times dxdx must have the units of the answer, here kg/m×m=kg;\text{kg/m} \times \text{m} = \text{kg}\mathclose{\text{;}} for a volume, an area times a length; for work, a force times a distance.

Watch out

Each term of the sum is the amount in a slice, q(xi) Δx,q(x_i)\,\Delta x\mathclose{\text{,}} not the value q(xi)q(x_i) alone. The right-end densities of the rod add up to 1.25+2+3.25+5=11.51.25 + 2 + 3.25 + 5 = 11.5 for n=4n = 4 and to about 2335 for n=1000:n = 1000\mathclose{\text{:}} without the factor Δx,\Delta x\mathclose{\text{,}} the sums grow without bound instead of settling down to the mass.

2

Area between curves

When a region lies between two curves, y=f(x)y = f(x) above and y=g(x)y = g(x) below, for a≤x≤b,a \le x \le b\mathclose{\text{,}} slice it by vertical lines. The strip at x,x\mathclose{\text{,}} of width Δx,\Delta x\mathclose{\text{,}} is nearly a rectangle of height f(x)−g(x),f(x) - g(x)\mathclose{\text{,}} top minus bottom. Adding the strips and taking the limit gives the area.

Definition 12.1Area between curves

Let ff and gg be continuous on [a,b],[a, b]\mathclose{\text{,}} with g(x)≤f(x)g(x) \le f(x) for a≤x≤b.a \le x \le b\mathclose{\text{.}} The area of the region between their graphs, the set of points (x,y)(x, y) with a≤x≤ba \le x \le b and g(x)≤y≤f(x),g(x) \le y \le f(x)\mathclose{\text{,}} is

A=∫ab(f(x)−g(x)) dx.A = \int_a^b \big(f(x) - g(x)\big)\,dx.

With g=0g = 0 this is the area under a curve, as in Module 9. The curves may dip below the xx-axis: only the height f(x)−g(x)f(x) - g(x) of each strip matters, and moving both curves up by the same amount does not change it. For “the region enclosed by” two curves, the limits aa and bb are where the curves meet: solve f(x)=g(x).f(x) = g(x)\mathclose{\text{.}}

Example 12.1Two parabolas✓ Checked

Find the area of the region enclosed by the parabolas y=4−x2y = 4 - x^2 and y=x2−2x.y = x^2 - 2x\mathclose{\text{.}}

The curves meet where 4−x2=x2−2x,4 - x^2 = x^2 - 2x\mathclose{\text{,}} that is, 2x2−2x−4=0,2x^2 - 2x - 4 = 0\mathclose{\text{,}} or x2−x−2=0.x^2 - x - 2 = 0\mathclose{\text{.}} This factors as (x−2)(x+1)=0,(x - 2)(x + 1) = 0\mathclose{\text{,}} so the curves meet at x=−1x = -1 and x=2.x = 2\mathclose{\text{.}} Between the two meeting points the same curve stays on top (otherwise the continuous function f−gf - g would be 0 somewhere in between, by the Intermediate Value Theorem of Module 3), so test one point: at x=0,x = 0\mathclose{\text{,}} 4−x2=44 - x^2 = 4 and x2−2x=0,x^2 - 2x = 0\mathclose{\text{,}} so y=4−x2y = 4 - x^2 is the top. Top minus bottom is (4−x2)−(x2−2x)=4+2x−2x2,(4 - x^2) - (x^2 - 2x) = 4 + 2x - 2x^2\mathclose{\text{,}} and

A=∫−12(4+2x−2x2) dx=[4x+x2−2x33]−12=203−(−73)=9.\begin{aligned} A &= \int_{-1}^{2} \big(4 + 2x - 2x^2\big)\,dx \\ &= \Big[4x + x^2 - \frac{2x^3}{3}\Big]_{-1}^{2} \\ &= \frac{20}{3} - \Big(-\frac{7}{3}\Big) = 9. \end{aligned}

When the curves cross, the top and the bottom swap at each crossing. An area counts every strip as positive, so split the interval at the crossings; in one formula, the area is ∫ab∣f(x)−g(x)∣ dx.\int_a^b \abs{f(x) - g(x)}\,dx\mathclose{\text{.}}

Example 12.2Curves that cross✓ Checked

Find the area of the region between y=sin⁡xy = \sin x and y=cos⁡xy = \cos x for 0≤x≤π.0 \le x \le \pi\mathclose{\text{.}}

The curves cross where sin⁡x=cos⁡x,\sin x = \cos x\mathclose{\text{,}} that is, tan⁡x=1;\tan x = 1\mathclose{\text{;}} in [0,π][0, \pi] that happens only at x=π/4.x = \pi/4\mathclose{\text{.}} At x=0,x = 0\mathclose{\text{,}} cos⁡x=1\cos x = 1 and sin⁡x=0,\sin x = 0\mathclose{\text{,}} so cos⁡x\cos x is on top on [0,π/4];[0, \pi/4]\mathclose{\text{;}} at x=π/2,x = \pi/2\mathclose{\text{,}} sin⁡x=1\sin x = 1 and cos⁡x=0,\cos x = 0\mathclose{\text{,}} so sin⁡x\sin x is on top on [π/4,π].[\pi/4, \pi]\mathclose{\text{.}} Hence

A=∫0π/4(cos⁡x−sin⁡x) dx+∫π/4π(sin⁡x−cos⁡x) dx=[sin⁡x+cos⁡x]0π/4+[−cos⁡x−sin⁡x]π/4π=(2−1)+(1+2)=22≈2.828.\begin{aligned} A &= \int_0^{\pi/4} (\cos x - \sin x)\,dx \\ &\qquad + \int_{\pi/4}^{\pi} (\sin x - \cos x)\,dx \\ &= \big[\sin x + \cos x\big]_0^{\pi/4} \\ &\qquad + \big[-\cos x - \sin x\big]_{\pi/4}^{\pi} \\ &= \big(\sqrt2 - 1\big) + \big(1 + \sqrt2\big) \\ &= 2\sqrt2 \approx 2.828. \end{aligned}
Watch out

Without the split, the integral is not the area: ∫0π(cos⁡x−sin⁡x) dx=[sin⁡x+cos⁡x]0π=−1−1=−2.\int_0^\pi (\cos x - \sin x)\,dx = \big[\sin x + \cos x\big]_0^\pi = -1 - 1 = -2\mathclose{\text{.}} The strips where sin⁡x\sin x is on top count as negative, and an area is never negative. Before integrating, find where the curves cross and which one is on top between the crossings.

Horizontal strips

Some regions are easier to slice the other way: choose the direction in which every strip runs between the same two curves. Figure 12.1 shows the region between the parabola x=y2x = y^2 and the line y=x−2.y = x - 2\mathclose{\text{.}} A vertical strip runs from the lower half of the parabola, y=−x,y = -\sqrt x\mathclose{\text{,}} to its upper half when 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} but from the line to the upper half when 1≤x≤4:1 \le x \le 4\mathclose{\text{:}} two formulas, so two integrals. Every horizontal strip runs from the parabola on the left to the line on the right. For a region between a left boundary x=xL(y)x = x_L(y) and a right boundary x=xR(y),x = x_R(y)\mathclose{\text{,}} for c≤y≤d,c \le y \le d\mathclose{\text{,}} a horizontal strip of height Δy\Delta y has length xR(y)−xL(y),x_R(y) - x_L(y)\mathclose{\text{,}} right minus left, and

A=∫cd(xR(y)−xL(y)) dy.A = \int_c^d \big(x_R(y) - x_L(y)\big)\,dy.
The region between the parabola x = y^2 and the line y = x - 2, which meet at (1, -1) and (4, 2). Left: a vertical strip runs from y = -sqrt x to y = sqrt x when x < 1, but from y = x - 2 to y = sqrt x when x > 1, so vertical strips need two integrals. Right: every horizontal strip runs from x = y^2 to x = y + 2, so one integral is enough (Example 12.3).
Figure 12.1

The region between the parabola x=y2x = y^2 and the line y=x−2,y = x - 2\mathclose{\text{,}} which meet at (1,−1)(1, -1) and (4,2).(4, 2)\mathclose{\text{.}} Left: a vertical strip runs from y=−xy = -\sqrt x to y=xy = \sqrt x when x<1,x < 1\mathclose{\text{,}} but from y=x−2y = x - 2 to y=xy = \sqrt x when x>1,x > 1\mathclose{\text{,}} so vertical strips need two integrals. Right: every horizontal strip runs from x=y2x = y^2 to x=y+2,x = y + 2\mathclose{\text{,}} so one integral is enough (Example 12.3).

Example 12.3Horizontal strips✓ Checked

Find the area of the region between x=y2x = y^2 and y=x−2,y = x - 2\mathclose{\text{,}} with horizontal strips and with vertical strips.

Horizontal strips. Write the line as x=y+2.x = y + 2\mathclose{\text{.}} The curves meet where y2=y+2,y^2 = y + 2\mathclose{\text{,}} that is, (y−2)(y+1)=0:(y - 2)(y + 1) = 0\mathclose{\text{:}} at y=−1y = -1 and y=2,y = 2\mathclose{\text{,}} the points (1,−1)(1, -1) and (4,2).(4, 2)\mathclose{\text{.}} At y=0y = 0 the line is at x=2x = 2 and the parabola at x=0,x = 0\mathclose{\text{,}} so the line is on the right:

A=∫−12((y+2)−y2) dy=[y22+2y−y33]−12=103−(−76)=92.\begin{aligned} A &= \int_{-1}^{2} \big((y + 2) - y^2\big)\,dy \\ &= \Big[\frac{y^2}{2} + 2y - \frac{y^3}{3}\Big]_{-1}^{2} \\ &= \frac{10}{3} - \Big(-\frac{7}{6}\Big) = \frac{9}{2}. \end{aligned}

Vertical strips. From x=0x = 0 to x=1x = 1 a strip runs from −x-\sqrt x to x;\sqrt x\mathclose{\text{;}} from x=1x = 1 to x=4,x = 4\mathclose{\text{,}} from x−2x - 2 to x.\sqrt x\mathclose{\text{.}} With the antiderivatives 43x3/2\tfrac43 x^{3/2} and 23x3/2−12x2+2x,\tfrac23 x^{3/2} - \tfrac12 x^2 + 2x\mathclose{\text{,}}

A=∫012x dx+∫14(x−x+2) dx=43+196=92.\begin{aligned} A &= \int_0^1 2\sqrt x\,dx \\ &\qquad + \int_1^4 \big(\sqrt x - x + 2\big)\,dx \\ &= \frac43 + \frac{19}{6} = \frac{9}{2}. \end{aligned}

The same area, as it must be, with more work.

Watch out

In an integral with respect to y,y\mathclose{\text{,}} everything is written in terms of y:y\mathclose{\text{:}} the boundaries as x=…,x = \dots\mathclose{\text{,}} the length of a strip as right minus left (not top minus bottom), and the limits as values of y.y\mathclose{\text{.}} In Example 12.3 the limits are −1-1 and 2,2\mathclose{\text{,}} the yy-coordinates of the meeting points, not their xx-coordinates 1 and 4.

3

Volumes by slicing

Cross-sections

Slice a loaf of bread: each slice is nearly a flat slab, whose volume is the area of its face times its thickness. The same idea gives the volume of any solid whose cross-sections you know. Put an xx-axis through the solid, and let A(x)A(x) be the area of its cross-section by the plane perpendicular to the axis at x.x\mathclose{\text{.}} A slab of thickness Δx\Delta x at xx has volume about A(x) Δx.A(x)\,\Delta x\mathclose{\text{.}} Adding and taking the limit:

Definition 12.2Volume by slicing

Let a solid lie between the planes perpendicular to the xx-axis at x=ax = a and x=b,x = b\mathclose{\text{,}} and let its cross-section at xx have area A(x),A(x)\mathclose{\text{,}} where AA is continuous on [a,b].[a, b]\mathclose{\text{.}} The volume of the solid is

V=∫abA(x) dx.V = \int_a^b A(x)\,dx.

A check: a prism or cylinder of height hh whose cross-sections all have the same area BB has V=∫0hB dx=Bh,V = \int_0^h B\,dx = Bh\mathclose{\text{,}} base times height, the familiar formula.

Example 12.4A pyramid✓ Checked

A pyramid has a square base of side ss and height h.h\mathclose{\text{.}} Find its volume.

Put the apex at the origin and the xx-axis down through the centre of the base, so that xx is the depth below the apex and the base is at x=h.x = h\mathclose{\text{.}} The cross-section at depth xx is a square. By similar triangles, its side grows in proportion to the depth, from 0 at the apex to ss at the base, so it is sx/h.sx/h\mathclose{\text{.}} So A(x)=(sx/h)2=s2x2/h2,A(x) = (sx/h)^2 = s^2x^2/h^2\mathclose{\text{,}} and

V=∫0hs2h2x2 dx=s2h2⋅h33=13s2h.V = \int_0^h \frac{s^2}{h^2}x^2\,dx = \frac{s^2}{h^2}\cdot\frac{h^3}{3} = \frac{1}{3}s^2h.

A pyramid fills one third of the box with the same base and height. The argument works for a base of any shape: the cross-section at depth xx is the base scaled by the factor x/h,x/h\mathclose{\text{,}} so its area is B x2/h2,B\,x^2/h^2\mathclose{\text{,}} where BB is the area of the base (areas scale by the square of the factor), and V=∫0hBx2/h2 dx=13Bh.V = \int_0^h Bx^2/h^2\,dx = \tfrac13 Bh\mathclose{\text{.}} A cone of radius rr is the case B=πr2:B = \pi r^2\mathclose{\text{:}} V=13πr2h.V = \tfrac13\pi r^2h\mathclose{\text{.}}

Discs and washers

Rotate the region under the graph of a continuous function f≥0,f \ge 0\mathclose{\text{,}} for a≤x≤b,a \le x \le b\mathclose{\text{,}} about the xx-axis. It sweeps out a solid of revolution. Each point of the region moves on a circle about the axis, so the cross-section at xx is a disc of radius f(x)f(x) and area πf(x)2,\pi f(x)^2\mathclose{\text{,}} and

V=π∫abf(x)2 dx(discs).V = \pi\int_a^b f(x)^2\,dx \qquad\text{(discs)}.
Example 12.5The volume of a ball✓ Checked

Find the volume of a ball of radius a.a\mathclose{\text{.}}

The ball is swept out by the half disc under y=a2−x2,y = \sqrt{a^2 - x^2}\mathclose{\text{,}} −a≤x≤a.-a \le x \le a\mathclose{\text{.}} Here f(x)2=a2−x2,f(x)^2 = a^2 - x^2\mathclose{\text{,}} so the square root disappears:

V=π∫−aa(a2−x2) dx=π[a2x−x33]−aa=π(2a33+2a33)=43πa3.\begin{aligned} V &= \pi\int_{-a}^{a} \big(a^2 - x^2\big)\,dx \\ &= \pi\Big[a^2x - \frac{x^3}{3}\Big]_{-a}^{a} \\ &= \pi\Big(\frac{2a^3}{3} + \frac{2a^3}{3}\Big) = \frac43\pi a^3. \end{aligned}

If the region does not reach the axis, the solid has a hole. Let the region lie between y=R(x)y = R(x) and y=r(x),y = r(x)\mathclose{\text{,}} with 0≤r(x)≤R(x).0 \le r(x) \le R(x)\mathclose{\text{.}} The cross-section at xx is then a washer, a disc of radius R(x)R(x) with a hole of radius r(x)r(x) (Figure 12.2), of area πR(x)2−πr(x)2,\pi R(x)^2 - \pi r(x)^2\mathclose{\text{,}} and

V=π∫ab(R(x)2−r(x)2) dx(washers).V = \pi\int_a^b \big(R(x)^2 - r(x)^2\big)\,dx \quad\text{(washers)}.

The outer radius R(x)R(x) is the distance from the axis to the farther boundary, and the inner radius r(x)r(x) the distance to the nearer one.

Left: the region between y = sqrt x and y = x^2, 0 le x le 1 (dark blue), rotates about the x-axis and sweeps out a solid shaped like a thick bowl (Example 12.6); its outer surface is drawn as a transparent shell, and the purple circles lie on its inner surface. The slice at x (orange) is a washer. Right: the washer seen along the axis, with outer radius R = sqrt x and inner radius r = x^2.
Figure 12.2

Left: the region between y=xy = \sqrt x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤10 \le x \le 1 (dark blue), rotates about the xx-axis and sweeps out a solid shaped like a thick bowl (Example 12.6); its outer surface is drawn as a transparent shell, and the purple circles lie on its inner surface. The slice at xx (orange) is a washer. Right: the washer seen along the axis, with outer radius R=xR = \sqrt x and inner radius r=x2.r = x^2\mathclose{\text{.}}

Example 12.6A solid with a hole✓ Checked

Find the volume of the solid swept out when the region between y=xy = \sqrt x and y=x2y = x^2 rotates about the xx-axis.

The curves meet where x=x2;\sqrt x = x^2\mathclose{\text{;}} squaring, x=x4,x = x^4\mathclose{\text{,}} that is, x(x3−1)=0,x(x^3 - 1) = 0\mathclose{\text{,}} so at x=0x = 0 and x=1.x = 1\mathclose{\text{.}} For 0<x<1,0 < x < 1\mathclose{\text{,}} x>x2\sqrt x > x^2 (at x=14,x = \tfrac14\mathclose{\text{,}} 12>116),\tfrac12 > \tfrac{1}{16}\mathclose{\text{),}} so R(x)=xR(x) = \sqrt x and r(x)=x2:r(x) = x^2\mathclose{\text{:}}

V=π∫01(x−x4) dx=π(12−15)=3π10≈0.942.\begin{aligned} V &= \pi\int_0^1 \big(x - x^4\big)\,dx = \pi\Big(\frac12 - \frac15\Big) \\ &= \frac{3\pi}{10} \approx 0.942. \end{aligned}
Watch out

The area of a washer is πR2−πr2,\pi R^2 - \pi r^2\mathclose{\text{,}} not π(R−r)2.\pi(R - r)^2\mathclose{\text{.}} With R=2R = 2 and r=1r = 1 the washer has area 4π−π=3π,4\pi - \pi = 3\pi\mathclose{\text{,}} while π(R−r)2=π.\pi(R - r)^2 = \pi\mathclose{\text{.}} Square each radius, then subtract.

Other axes

The same reasoning works for any axis: slice perpendicular to the axis, and measure each radius from the axis. For the yy-axis the slices are horizontal, so the radii are functions of y,y\mathclose{\text{,}} and V=π∫cd(R(y)2−r(y)2) dy.V = \pi\int_c^d \big(R(y)^2 - r(y)^2\big)\,dy\mathclose{\text{.}} For a horizontal line y=k,y = k\mathclose{\text{,}} a point at height yy is at distance ∣y−k∣\abs{y - k} from the axis.

Example 12.7Rotating about other lines✓ Checked

(a) A bowl has the shape of the surface swept out when the parabola y=x2y = x^2 rotates about the yy-axis. Find the volume of water in it when the water is hh deep.

(b) The region between y=xy = x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} rotates about the line y=−1.y = -1\mathclose{\text{.}} Find the volume of the solid.

(a) The water is the solid swept out by the region between the yy-axis and the parabola, for 0≤y≤h.0 \le y \le h\mathclose{\text{.}} Its slice at height yy is a disc whose radius is the x≥0x \ge 0 with x2=y,x^2 = y\mathclose{\text{,}} that is, y.\sqrt y\mathclose{\text{.}} So

V=π∫0h(y)2 dy=π∫0hy dy=πh22.\begin{aligned} V &= \pi\int_0^h \big(\sqrt y\big)^2\,dy \\ &= \pi\int_0^h y\,dy = \frac{\pi h^2}{2}. \end{aligned}

The cylinder with the same height hh and the same top radius h\sqrt h holds π(h)2h=πh2:\pi\big(\sqrt h\big)^2 h = \pi h^2\mathclose{\text{:}} the bowl holds exactly half as much.

(b) The slices perpendicular to the axis y=−1y = -1 are vertical, so integrate in x.x\mathclose{\text{.}} Both curves lie above the axis, and for 0<x<10 < x < 1 the line y=xy = x is farther from it, since x>x2.x > x^2\mathclose{\text{.}} The radii are the distances from the axis: R(x)=x−(−1)=x+1R(x) = x - (-1) = x + 1 and r(x)=x2+1.r(x) = x^2 + 1\mathclose{\text{.}} So

V=π∫01((x+1)2−(x2+1)2) dx=π∫01(2x−x2−x4) dx=π(1−13−15)=7π15≈1.466.\begin{aligned} V &= \pi\int_0^1 \big((x + 1)^2 - (x^2 + 1)^2\big)\,dx \\ &= \pi\int_0^1 \big(2x - x^2 - x^4\big)\,dx \\ &= \pi\Big(1 - \frac13 - \frac15\Big) = \frac{7\pi}{15} \approx 1.466. \end{aligned}
Watch out

Radii are distances from the axis of rotation, not heights. Rotating about y=−1,y = -1\mathclose{\text{,}} the radius of the curve y=xy = x is x+1,x + 1\mathclose{\text{,}} not x.x\mathclose{\text{.}} Rotating the same region about y=2,y = 2\mathclose{\text{,}} which lies above it, the outer radius belongs to the lower curve: R(x)=2−x2R(x) = 2 - x^2 and r(x)=2−x.r(x) = 2 - x\mathclose{\text{.}}

4

Cylindrical shells

Rotate the region under y=4x−x3,y = 4x - x^3\mathclose{\text{,}} 0≤x≤2,0 \le x \le 2\mathclose{\text{,}} about the yy-axis. Washers would need horizontal slices, and the radii of the slice at height yy are the solutions xx of the cubic equation 4x−x3=y:4x - x^3 = y\mathclose{\text{:}} hard to find. Slice the region the other way, into vertical strips. A thin strip at distance xx from the axis, of width Δx\Delta x and height f(x),f(x)\mathclose{\text{,}} sweeps out a thin cylindrical shell, a tube of radius x,x\mathclose{\text{,}} height f(x)f(x) and thickness Δx\Delta x (Figure 12.3). Cut the tube along its height and unroll it: it is nearly a flat slab of length 2πx2\pi x (the circumference), height f(x)f(x) and thickness Δx,\Delta x\mathclose{\text{,}} with volume about 2πx f(x) Δx.2\pi x\,f(x)\,\Delta x\mathclose{\text{.}}

That approximation is good enough. A tube of constant height hh between radii xx and x+Δxx + \Delta x has volume

π(x+Δx)2h−πx2h=2π(x+Δx2)h Δx,\pi(x + \Delta x)^2h - \pi x^2h = 2\pi\Big(x + \frac{\Delta x}{2}\Big)h\,\Delta x,

the circumference at the middle of the tube times its height and thickness. Using xx for the radius changes this by πh(Δx)2,\pi h(\Delta x)^2\mathclose{\text{,}} at most πH(Δx)2\pi H(\Delta x)^2 if HH is the greatest height of the region; over all nn shells that adds up to at most πH(b−a) Δx,\pi H(b - a)\,\Delta x\mathclose{\text{,}} which approaches 0. The height varies a little across the strip, but, as in Section 12.1, the solid that the strip sweeps out lies between the tubes with the least and the greatest heights on the strip. Adding the shells and taking the limit gives the shell method: when the region under the graph of a continuous function f≥0,f \ge 0\mathclose{\text{,}} for 0≤a≤x≤b,0 \le a \le x \le b\mathclose{\text{,}} rotates about the yy-axis,

V=2π∫abx f(x) dx.V = 2\pi\int_a^b x\,f(x)\,dx.

For other regions and vertical axes, V=2π∫(radius)(height) dx,V = 2\pi\int (\text{radius})(\text{height})\,dx\mathclose{\text{,}} with the radius measured from the axis and the height top minus bottom. Shells and washers always give the same volume when both apply; Exercise 12.11 proves it for the region under a decreasing curve.

Cylindrical shells. Left: the region under y = 4x - x^3, 0 le x le 2, with a strip of width Delta x at distance x from the y-axis. Right: rotating about the y-axis (dashed), the strip sweeps out a thin shell of radius x, height f(x) and thickness Delta x, inside the solid whose outline is drawn in blue. Unrolled, the shell is nearly a slab of volume 2pi x cdot f(x) cdot Delta x.
Figure 12.3

Cylindrical shells. Left: the region under y=4x−x3,y = 4x - x^3\mathclose{\text{,}} 0≤x≤2,0 \le x \le 2\mathclose{\text{,}} with a strip of width Δx\Delta x at distance xx from the yy-axis. Right: rotating about the yy-axis (dashed), the strip sweeps out a thin shell of radius x,x\mathclose{\text{,}} height f(x)f(x) and thickness Δx,\Delta x\mathclose{\text{,}} inside the solid whose outline is drawn in blue. Unrolled, the shell is nearly a slab of volume 2πx⋅f(x)⋅Δx.2\pi x \cdot f(x) \cdot \Delta x\mathclose{\text{.}}

Example 12.8When shells beat washers✓ Checked

Find the volume of the solid swept out when the region under y=4x−x3,y = 4x - x^3\mathclose{\text{,}} 0≤x≤2,0 \le x \le 2\mathclose{\text{,}} rotates about the yy-axis.

The region lies above the xx-axis: 4x−x3=x(2−x)(2+x)≥04x - x^3 = x(2 - x)(2 + x) \ge 0 for 0≤x≤2.0 \le x \le 2\mathclose{\text{.}} By shells, with radius xx and height 4x−x3,4x - x^3\mathclose{\text{,}}

V=2π∫02x(4x−x3) dx=2π∫02(4x2−x4) dx=2π(323−325)=128π15≈26.81.\begin{aligned} V &= 2\pi\int_0^2 x\big(4x - x^3\big)\,dx \\ &= 2\pi\int_0^2 \big(4x^2 - x^4\big)\,dx \\ &= 2\pi\Big(\frac{32}{3} - \frac{32}{5}\Big) = \frac{128\pi}{15} \approx 26.81. \end{aligned}
Key idea

Washers slice perpendicular to the axis; shells slice parallel to it. About a horizontal axis, washers integrate in xx and shells in y;y\mathclose{\text{;}} about a vertical axis, washers integrate in yy and shells in x.x\mathclose{\text{.}} Choose the method whose slices need one formula and whose radii are easy to write down: shells when solving for xx would be hard, as in Example 12.8.

Watch out

The radius of a shell is its distance from the axis. Rotating the region between y=xy = x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} about the line x=2,x = 2\mathclose{\text{,}} the strip at xx is 2−x2 - x from the axis, so V=2π∫01(2−x)(x−x2) dx=π/2.V = 2\pi\int_0^1 (2 - x)(x - x^2)\,dx = \pi/2\mathclose{\text{.}} Using xx as the radius would give the volume for the yy-axis instead, π/6.\pi/6\mathclose{\text{.}}

Compute itAreas and volumes with SymPy

SymPy finds where curves meet with solve and evaluates the integrals with integrate. For the region of Example 12.6:

Python
import sympy as sp
x, y = sp.symbols('x y')
print(sp.solve(sp.Eq(sp.sqrt(x), x**2), x))       # where the curves meet
print(sp.integrate(sp.sqrt(x) - x**2, (x, 0, 1)))  # the area between them
print(sp.pi*sp.integrate(x - x**4, (x, 0, 1)))     # the volume by washers
Output
[0, 1]
1/3
3*pi/10

Now compute one volume both ways: the region between y=xy = x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} rotating about the yy-axis. Shells have radius xx and height x−x2.x - x^2\mathclose{\text{.}} Horizontal slices at height yy run from x=yx = y to x=y,x = \sqrt y\mathclose{\text{,}} so the washers have R=yR = \sqrt y and r=y:r = y\mathclose{\text{:}}

Python
shells = 2*sp.pi*sp.integrate(x*(x - x**2), (x, 0, 1))
washers = sp.pi*sp.integrate(sp.sqrt(y)**2 - y**2, (y, 0, 1))
print(shells, washers)
Output
pi/6 pi/6

The two methods agree, as they must: they slice the same solid in different ways.

5

Arc length

How long is one arch of the curve y=sin⁡x,y = \sin x\mathclose{\text{,}} from x=0x = 0 to x=π?x = \pi\mathclose{\text{?}} A ruler measures straight segments, so approximate the curve by a polygon. Choose n+1n + 1 equally spaced points x0=0,x1,…,xn=π,x_0 = 0, x_1, \dots, x_n = \pi\mathclose{\text{,}} and join the neighbouring points of the curve by straight chords. By Pythagoras’ theorem, the chord from (xi−1,f(xi−1))\big(x_{i-1}, f(x_{i-1})\big) to (xi,f(xi))\big(x_i, f(x_i)\big) has length (Δx)2+(Δyi)2,\sqrt{(\Delta x)^2 + (\Delta y_i)^2}\mathclose{\text{,}} where Δyi=f(xi)−f(xi−1).\Delta y_i = f(x_i) - f(x_{i-1})\mathclose{\text{.}} As nn grows, the polygons hug the curve more closely:

Chords nn Length of the polygon
1 3.14159
2 3.72419
4 3.79009
8 3.81253
16 3.81827
64 3.82008

The lengths increase: the corners of each polygon are among the corners of the next, and replacing a chord by two chords with the same ends cannot shorten the path, because a straight segment is the shortest path between its ends. And they settle near 3.820. That number is what the length of the curve means.

Definition 12.3Arc length

The length (or arc length) of the graph of ff from x=ax = a to x=bx = b is the limit, as n→∞,n \to \infty\mathclose{\text{,}} of the lengths of the polygons whose vertices are the points of the graph at n+1n + 1 equally spaced values a=x0<x1<⋯<xn=b,a = x_0 < x_1 < \dots < x_n = b\mathclose{\text{,}} if the limit exists.

Theorem 12.1The arc length formula

If f′f' is continuous on [a,b],[a, b]\mathclose{\text{,}} the length of the graph of ff from x=ax = a to x=bx = b is

L=∫ab1+f′(x)2 dx.L = \int_a^b \sqrt{1 + f'(x)^2}\,dx.
Proof

By the Mean Value Theorem (Module 8), applied to ff on [xi−1,xi],[x_{i-1}, x_i]\mathclose{\text{,}} there is a point xi∗x_i^* in that interval with Δyi=f′(xi∗) Δx.\Delta y_i = f'(x_i^*)\,\Delta x\mathclose{\text{.}} So the iith chord has length

(Δx)2+f′(xi∗)2(Δx)2=1+f′(xi∗)2 Δx,\begin{aligned} &\sqrt{(\Delta x)^2 + f'(x_i^*)^2(\Delta x)^2} \\ &\qquad= \sqrt{1 + f'(x_i^*)^2}\,\Delta x, \end{aligned}

and the polygon has length ∑i=1n1+f′(xi∗)2 Δx.\sum_{i=1}^{n} \sqrt{1 + f'(x_i^*)^2}\,\Delta x\mathclose{\text{.}} This is a Riemann sum of the function 1+f′(x)2,\sqrt{1 + f'(x)^2}\mathclose{\text{,}} which is continuous on [a,b][a, b] because f′f' is. So, as n→∞,n \to \infty\mathclose{\text{,}} the polygon lengths approach ∫ab1+f′(x)2 dx\int_a^b \sqrt{1 + f'(x)^2}\,dx (Module 9).

∎

In Leibniz’s notation, a tiny piece of the curve is the hypotenuse of a tiny right triangle with sides dxdx and dy:dy\mathclose{\text{:}} dL=(dx)2+(dy)2=1+(dy/dx)2 dx.dL = \sqrt{(dx)^2 + (dy)^2} = \sqrt{1 + (dy/dx)^2}\,dx\mathclose{\text{.}} Module 16 extends the formula to curves given by parametric equations.

Example 12.9A hanging cable✓ Checked

A cable or chain hanging under its own weight takes the shape of a catenary (Module 6), the graph of y=acosh⁡(x/a)y = a\cosh(x/a) for a constant a>0,a > 0\mathclose{\text{,}} where cosh⁡\cosh is the hyperbolic cosine. Find the length of the catenary y=cosh⁡xy = \cosh x from x=−1x = -1 to x=1.x = 1\mathclose{\text{.}}

Here f′(x)=sinh⁡x,f'(x) = \sinh x\mathclose{\text{,}} and the identity cosh⁡2x−sinh⁡2x=1\cosh^2 x - \sinh^2 x = 1 (Module 6) gives 1+sinh⁡2x=cosh⁡2x.1 + \sinh^2 x = \cosh^2 x\mathclose{\text{.}} Since cosh⁡x>0,\cosh x > 0\mathclose{\text{,}} 1+f′(x)2=cosh⁡x,\sqrt{1 + f'(x)^2} = \cosh x\mathclose{\text{,}} and

L=∫−11cosh⁡x dx=[sinh⁡x]−11=2sinh⁡1=e−e−1≈2.350.\begin{aligned} L &= \int_{-1}^{1} \cosh x\,dx = \big[\sinh x\big]_{-1}^{1} \\ &= 2\sinh 1 = e - e^{-1} \approx 2.350. \end{aligned}

In metres: a cable 2.350 m long, hung from two hooks 2 m apart at a height of cosh⁡1≈1.543\cosh 1 \approx 1.543 m, sags to a lowest point 1 m above the ground.

When the square root in the arc length formula has no elementary antiderivative, numerical integration can approximate the length.

Example 12.10One arch of a sine wave✓ Checked

Find the length of y=sin⁡x,y = \sin x\mathclose{\text{,}} 0≤x≤π.0 \le x \le \pi\mathclose{\text{.}}

Here f′(x)=cos⁡x,f'(x) = \cos x\mathclose{\text{,}} so L=∫0π1+cos⁡2x dx.L = \int_0^\pi \sqrt{1 + \cos^2 x}\,dx\mathclose{\text{.}} This is an elliptic integral. Its integrand has no elementary antiderivative, a fact we use without proof. Module 11 explains what this means. Use Simpson’s rule to approximate the length. With n=4n = 4 and Δx=π/4\Delta x = \pi/4 you need g(x)=1+cos⁡2xg(x) = \sqrt{1 + \cos^2 x} at five points: g(0)=g(π)=2,g(0) = g(\pi) = \sqrt2\mathclose{\text{,}} g(π/4)=g(3π/4)=3/2g(\pi/4) = g(3\pi/4) = \sqrt{3/2} and g(π/2)=1.g(\pi/2) = 1\mathclose{\text{.}} So

S4=π/43[2+432+2⋅1+432+2]=π12(22+832+2)≈3.8292.\begin{aligned} S_4 &= \frac{\pi/4}{3}\Big[\sqrt2 + 4\sqrt{\tfrac32} + 2 \cdot 1 \\ &\qquad + 4\sqrt{\tfrac32} + \sqrt2\Big] \\ &= \frac{\pi}{12}\Big(2\sqrt2 + 8\sqrt{\tfrac32} + 2\Big) \\ &\approx 3.8292. \end{aligned}

With more points, Simpson’s rule gives S8≈3.82028S_8 \approx 3.82028 and S16≈3.8201978S_{16} \approx 3.8201978 (the Compute it box below), so the arch has length L≈3.8202,L \approx 3.8202\mathclose{\text{,}} as the polygons suggested. That is about 21.6% longer than its base, π:\pi\mathclose{\text{:}} a corrugated metal sheet whose profile is a sine wave needs that much more flat sheet than its width.

Watch out

An approximation must follow the direction of the curve. A staircase of nn horizontal and nn vertical steps, each of length 1/n,1/n\mathclose{\text{,}} runs along the diagonal of a unit square from one corner to the other. Its length is 2n⋅1n=22n \cdot \tfrac1n = 2 for every n,n\mathclose{\text{,}} and it approaches the diagonal as closely as you like; yet the diagonal has length 2≈1.414.\sqrt2 \approx 1.414\mathclose{\text{.}} Each step replaces a piece of the diagonal of length (Δx)2+(Δy)2\sqrt{(\Delta x)^2 + (\Delta y)^2} by Δx+Δy,\Delta x + \Delta y\mathclose{\text{,}} which is not close to it, however small the pieces. Chords point along the curve; steps do not.

Compute itArc length by computer

The polygons and Simpson’s rule are a few lines of Python each. math.hypot(dx, dy) is dx2+dy2,\sqrt{dx^2 + dy^2}\mathclose{\text{,}} Pythagoras’ theorem:

Python
import math

def polygon(f, a, b, n):
    """Polygon through n + 1 equally spaced points of y = f(x)."""
    xs = [a + (b - a)*i/n for i in range(n + 1)]
    return sum(math.hypot(xs[i + 1] - xs[i], f(xs[i + 1]) - f(xs[i]))
               for i in range(n))

def simpson(g, a, b, n):
    """Simpson's rule with n subintervals (n even)."""
    h = (b - a)/n
    inner = sum((4 if i % 2 else 2)*g(a + i*h) for i in range(1, n))
    return h/3*(g(a) + inner + g(b))

P = polygon(math.sin, 0, math.pi, 1000)
print(f"polygon, 1000 chords: {P:.10f}")
g = lambda x: math.sqrt(1 + math.cos(x)**2)
for n in [4, 8, 16, 32]:
    print(f"Simpson, n = {n:2d}:     {simpson(g, 0, math.pi, n):.10f}")
Output
polygon, 1000 chords: 3.8201972963
Simpson, n =  4:     3.8291789256
Simpson, n =  8:     3.8202824061
Simpson, n = 16:     3.8201978136
Simpson, n = 32:     3.8201977890

Even a thousand chords are off by about 5×10−7,5 \times 10^{-7}\mathclose{\text{,}} while Simpson’s rule with n=32n = 32 agrees with the true length to all ten decimals shown. SymPy evaluates the integral to as many digits as you ask. Asked for an antiderivative, it returns the integral unevaluated: it found no elementary antiderivative. (There is none, but SymPy’s failure alone would not prove that.)

Python
import sympy as sp
x = sp.symbols('x')
print(sp.Integral(sp.sqrt(1 + sp.cos(x)**2), (x, 0, sp.pi)).evalf(20))
print(sp.integrate(sp.sqrt(1 + sp.cos(x)**2), x))
Output
3.8201977890277120179
Integral(sqrt(cos(x)**2 + 1), x)
6

Work

Lift a 2 kg bag of flour steadily by 1.5 m. You exert a force equal to its weight, mg=2×9.8=19.6mg = 2 \times 9.8 = 19.6 newtons (N), where g≈9.8g \approx 9.8 m/s² is the acceleration due to gravity (Module 1). A constant force FF acting through a distance dd does work W=Fd,W = Fd\mathclose{\text{,}} here 19.6×1.5=29.419.6 \times 1.5 = 29.4 joules (J): a force of 1 newton acting through 1 metre does 1 joule of work. When the force changes along the way, slice the path. On a short piece of length Δx\Delta x the force is nearly constant, so the work there is about F(x) Δx.F(x)\,\Delta x\mathclose{\text{.}}

Definition 12.4Work

If a continuous force F(x),F(x)\mathclose{\text{,}} acting along a line, moves an object from x=ax = a to x=b,x = b\mathclose{\text{,}} the work done is

W=∫abF(x) dx.W = \int_a^b F(x)\,dx.

Springs. Stretch a spring xx metres beyond its natural length, and it pulls back with a force proportional to x:x\mathclose{\text{:}} F(x)=kx,F(x) = kx\mathclose{\text{,}} where the spring constant kk is measured in N/m. This is Hooke’s law. It holds for stretches that are not too large (within the spring’s elastic limit), and for compressions too. To stretch the spring you must exert the force kxkx yourself.

Example 12.11Stretching a spring✓ Checked

A force of 30 N holds a spring stretched 0.15 m beyond its natural length. How much work does it take to stretch it (a) from its natural length to 0.15 m beyond it, and (b) from 0.15 m to 0.30 m beyond it?

By Hooke’s law 30=k×0.15,30 = k \times 0.15\mathclose{\text{,}} so k=200k = 200 N/m, and the force needed at stretch xx is 200x200x N. An antiderivative of 200x200x is 100x2.100x^2\mathclose{\text{.}}

(a) W=∫00.15200x dx=[100x2]00.15=100×0.0225=2.25W = \int_0^{0.15} 200x\,dx = \big[100x^2\big]_0^{0.15} = 100 \times 0.0225 = 2.25 J.

(b) W=[100x2]0.150.30=9−2.25=6.75W = \big[100x^2\big]_{0.15}^{0.30} = 9 - 2.25 = 6.75 J: three times as much for the same extra 0.15 m, because the spring pulls harder the more it is stretched.

Watch out

“Force times distance” holds only for a constant force. In (a), 30×0.15=4.530 \times 0.15 = 4.5 J is twice the true work: the force grows from 0 to 30 N, and its average over the stretch is 15 N. And xx is the stretch beyond the natural length, not the length of the spring.

Lifting a rope. When different parts of an object move different distances, slice the object instead of the path.

Example 12.12Lifting a rope✓ Checked

A rope 20 m long, with a mass of 0.4 kg per metre, hangs from the top of a building (Figure 12.4, left). How much work does it take to pull the whole rope up to the top?

Measure the depth yy downwards from the top. The piece of rope between depths yy and y+Δyy + \Delta y has mass 0.4 Δy0.4\,\Delta y kg and weight 0.4×9.8 Δy=3.92 Δy0.4 \times 9.8\,\Delta y = 3.92\,\Delta y N, and it is lifted about yy metres. So its work is about 3.92 y Δy3.92\,y\,\Delta y J, and

W=∫0203.92 y dy=3.92×2022=784 J.\begin{aligned} W &= \int_0^{20} 3.92\,y\,dy \\ &= 3.92 \times \frac{20^2}{2} = 784 \text{ J}. \end{aligned}

Slicing the motion instead gives the same answer: when xx metres have been pulled up, the hanging part weighs 3.92(20−x)3.92(20 - x) N, and ∫0203.92(20−x) dx=784\int_0^{20} 3.92(20 - x)\,dx = 784 J.

Watch out

The rope weighs 3.92×20=78.43.92 \times 20 = 78.4 N, but the work is not 78.4×20=156878.4 \times 20 = 1568 J: only the bottom end rises 20 m, and the top end hardly moves. On average the rope rises 10 m, and 78.4×10=78478.4 \times 10 = 784 J. That average is the depth of the rope’s centre of mass (Section 12.7).

Pumping a liquid. To empty a tank, slice the liquid into thin horizontal layers: each layer is lifted as a whole to the outlet.

Left: a rope 20 m long hangs from the top of a building; the piece at depth y, of length Delta y, is lifted y metres (Example 12.12). Right: the cone-shaped tank of Example 12.13, 4 m deep with a top of radius 2 m; the layer of water at height y above the vertex has radius y/2 and is pumped up 4 - y metres to the top.
Figure 12.4

Left: a rope 20 m long hangs from the top of a building; the piece at depth y,y\mathclose{\text{,}} of length Δy,\Delta y\mathclose{\text{,}} is lifted yy metres (Example 12.12). Right: the cone-shaped tank of Example 12.13, 4 m deep with a top of radius 2 m; the layer of water at height yy above the vertex has radius y/2y/2 and is pumped up 4−y4 - y metres to the top.

Example 12.13Emptying a tank✓ Checked

The cone-shaped tank of Example 7.2, 4 m deep with its vertex at the bottom and a top of radius 2 m, is full of water, whose density is 1000 kg/m³. How much work does it take to pump all the water out over the top?

Let yy be the height above the vertex (Figure 12.4, right). As in Example 7.2, similar triangles give the radius of the water’s surface at height yy as y/2.y/2\mathclose{\text{.}} The layer of water between heights yy and y+Δyy + \Delta y is nearly a disc of radius y/2y/2 and thickness Δy,\Delta y\mathclose{\text{,}} so it has

  • volume about π(y/2)2 Δy=π4y2 Δy\pi(y/2)^2\,\Delta y = \tfrac{\pi}{4}y^2\,\Delta y m³,
  • mass about 1000⋅π4y2 Δy=250πy2 Δy1000 \cdot \tfrac{\pi}{4}y^2\,\Delta y = 250\pi y^2\,\Delta y kg,
  • weight about 9.8×250πy2 Δy=2450πy2 Δy9.8 \times 250\pi y^2\,\Delta y = 2450\pi y^2\,\Delta y N,

and it is lifted 4−y4 - y metres, to the top. So

W=∫042450πy2(4−y) dy=2450π[4y33−y44]04=2450π(2563−64)=156 800π3≈1.64×105 J,\begin{aligned} W &= \int_0^4 2450\pi y^2(4 - y)\,dy \\ &= 2450\pi\Big[\frac{4y^3}{3} - \frac{y^4}{4}\Big]_0^4 \\ &= 2450\pi\Big(\frac{256}{3} - 64\Big) \\ &= \frac{156\,800\pi}{3} \approx 1.64 \times 10^5 \text{ J}, \end{aligned}

about 164 kJ. A pump of 500 watts, that is, 500 joules per second, would need about 5.5 minutes, if it wasted no energy.

Watch out

Use weight, not mass: a layer of mass mm kilograms needs a force of mgmg newtons to lift it, so the factor g=9.8g = 9.8 must appear, or the answer is not in joules. And measure the distance from the layer to where the liquid goes: to the top here, 4−y;4 - y\mathclose{\text{;}} to a spout 1 m above the top, 5−y.5 - y\mathclose{\text{.}}

7

Centre of mass

A seesaw balances when the law of the lever holds: mass times distance from the pivot is the same on both sides. Masses m1,…,mnm_1, \dots, m_n at positions x1,…,xnx_1, \dots, x_n on a line balance at their centre of mass

xˉ=m1x1+⋯+mnxnm1+⋯+mn=∑mixi∑mi,\bar x = \frac{m_1x_1 + \dots + m_nx_n}{m_1 + \dots + m_n} = \frac{\sum m_ix_i}{\sum m_i},

read “x bar”. The sum ∑mixi\sum m_ix_i is the moment of the masses about the origin. Measured from xˉ\bar x instead, the moments cancel: ∑mi(xi−xˉ)=∑mixi−xˉ∑mi=0.\sum m_i(x_i - \bar x) = \sum m_ix_i - \bar x\sum m_i = 0\mathclose{\text{.}} For example, children of 30 kg and 20 kg sitting at x=0x = 0 and x=3x = 3 m balance at xˉ=(30⋅0+20⋅3)/50=1.2\bar x = (30 \cdot 0 + 20 \cdot 3)/50 = 1.2 m, nearer the heavier child.

A rod. For a rod along [a,b][a, b] with density ρ(x),\rho(x)\mathclose{\text{,}} slice: the piece at xx has mass about ρ(x) Δx\rho(x)\,\Delta x and moment about x ρ(x) Δx.x\,\rho(x)\,\Delta x\mathclose{\text{.}} Adding and taking limits:

Definition 12.5Centre of mass of a rod

A rod along [a,b][a, b] with continuous density ρ(x)>0\rho(x) > 0 has mass M=∫abρ(x) dxM = \int_a^b \rho(x)\,dx and centre of mass

xˉ=1M∫abx ρ(x) dx.\bar x = \frac{1}{M}\int_a^b x\,\rho(x)\,dx.
Example 12.14The rod of Section 12.1✓ Checked

Find the centre of mass of the rod of Section 12.1, whose density is ρ(x)=1+x2\rho(x) = 1 + x^2 kg/m for 0≤x≤2.0 \le x \le 2\mathclose{\text{.}}

Its mass is M=143M = \tfrac{14}{3} kg. Its moment is

∫02x(1+x2) dx=[x22+x44]02=2+4=6 kg m,\begin{aligned} \int_0^2 x\big(1 + x^2\big)\,dx &= \Big[\frac{x^2}{2} + \frac{x^4}{4}\Big]_0^2 \\ &= 2 + 4 = 6 \text{ kg m}, \end{aligned}

so xˉ=6/143=97≈1.29\bar x = 6 \big/ \tfrac{14}{3} = \tfrac{9}{7} \approx 1.29 m from the thin end: beyond the middle of the rod, towards its denser end, as it should be.

A thin plate. A thin flat plate is called a lamina. Here its density (mass per unit area) is uniform, the same at every point; Module 19 lets it vary. The centre of mass of a plate is a point (xˉ,yˉ)(\bar x, \bar y) in its plane. Let the plate occupy the region between y=g(x)y = g(x) and y=f(x),y = f(x)\mathclose{\text{,}} a≤x≤b,a \le x \le b\mathclose{\text{,}} and slice it into vertical strips. The strip at xx is nearly a rectangle of width Δx\Delta x and height f(x)−g(x),f(x) - g(x)\mathclose{\text{,}} which balances at its centre, (x,12(f(x)+g(x))),\big(x, \tfrac12(f(x) + g(x))\big)\mathclose{\text{,}} by symmetry; its mass is the density times its area. Weighting each strip’s coordinates by its mass and taking limits gives the formulas below. The density cancels, so the centre of mass depends only on the shape. For yˉ,\bar y\mathclose{\text{,}} the height of a strip’s centre times its area is 12(f+g)(f−g) Δx=12(f2−g2) Δx.\tfrac12(f + g)(f - g)\,\Delta x = \tfrac12\big(f^2 - g^2\big)\,\Delta x\mathclose{\text{.}}

Definition 12.6Centroid of a plate

Let ff and gg be continuous on [a,b][a, b] with g≤f.g \le f\mathclose{\text{.}} Suppose the region between their graphs has area A>0.A > 0\mathclose{\text{.}} Its centroid is the point (xˉ,yˉ)(\bar x, \bar y) with

xˉ=1A∫abx(f(x)−g(x)) dx,yˉ=1A∫ab12(f(x)2−g(x)2) dx.\begin{aligned} \bar x &= \frac1A\int_a^b x\big(f(x) - g(x)\big)\,dx, \\ \bar y &= \frac1A\int_a^b \frac12\big(f(x)^2 - g(x)^2\big)\,dx. \end{aligned}

A plate of uniform density occupying the region balances at its centroid.

Symmetry. If a region is symmetric about a line, its centroid lies on that line: the moments of mirror-image strips about the line cancel.

Example 12.15A half disc✓ Checked

Find the centroid of the half disc x2+y2≤a2,x^2 + y^2 \le a^2\mathclose{\text{,}} y≥0,y \ge 0\mathclose{\text{,}} with radius a>0.a > 0\mathclose{\text{.}}

The half disc is symmetric about the yy-axis, so xˉ=0.\bar x = 0\mathclose{\text{.}} Its area is A=12πa2,A = \tfrac12\pi a^2\mathclose{\text{,}} and with f(x)=a2−x2f(x) = \sqrt{a^2 - x^2} and g(x)=0,g(x) = 0\mathclose{\text{,}}

yˉ=2πa2∫−aa12(a2−x2) dx=2πa2⋅12⋅4a33=4a3π≈0.424a.\begin{aligned} \bar y &= \frac{2}{\pi a^2}\int_{-a}^{a} \frac12\big(a^2 - x^2\big)\,dx \\ &= \frac{2}{\pi a^2}\cdot\frac12\cdot\frac{4a^3}{3} = \frac{4a}{3\pi} \approx 0.424a. \end{aligned}

A half-disc plate balances on a point 42% of the way up its radius, below the halfway mark, because more of its area lies near the straight edge.

Watch out

The formula for yˉ\bar y has 12(f2−g2),\tfrac12\big(f^2 - g^2\big)\mathclose{\text{,}} not 12(f−g)2;\tfrac12(f - g)^2\mathclose{\text{;}} and both coordinates are divided by the area (for a rod, by the mass). A quick check catches most slips: the centroid of a region lies between its leftmost and rightmost points and between its lowest and highest points.

8

Improper integrals

So far every integral has had a finite interval and a bounded integrand. Probabilities, and many questions in physics, need more: the area under y=1/x2y = 1/x^2 for all x≥1,x \ge 1\mathclose{\text{,}} or under y=1/xy = 1/\sqrt x for 0<x≤1,0 < x \le 1\mathclose{\text{,}} where the curve shoots up near 0. Such integrals are improper. They are defined as limits of ordinary integrals.

Infinite intervals

The area under y=1/x2y = 1/x^2 from 1 to tt is ∫1tx−2 dx=[−1x]1t=1−1t,\int_1^t x^{-2}\,dx = \big[-\tfrac1x\big]_1^t = 1 - \tfrac1t\mathclose{\text{,}} and the area under y=1/xy = 1/x is ∫1tx−1 dx=ln⁡t:\int_1^t x^{-1}\,dx = \ln t\mathclose{\text{:}}

tt∫1tdx/x2\int_1^t dx/x^2∫1tdx/x\int_1^t dx/x
10100.90.92.302592.30259
1001000.990.994.605174.60517
10410^{4}0.99990.99999.210349.21034
10610^{6}0.9999990.99999913.815513.8155

As t→∞,t \to \infty\mathclose{\text{,}} the first approaches 1, while the second grows without bound, slowly. The region under 1/x2,1/x^2\mathclose{\text{,}} infinitely long, has a finite area, 1; the region under 1/x1/x does not. The two curves look alike, but 1/x21/x^2 falls to 0 much faster.

Definition 12.7Improper integral over an infinite interval

Let ff be continuous on [a,∞).[a, \infty)\mathclose{\text{.}} Then

∫a∞f(x) dx=lim⁡t→∞∫atf(x) dx.\int_a^\infty f(x)\,dx = \lim_{t\to\infty}\int_a^t f(x)\,dx.

The improper integral converges if this limit exists (as a finite number), and diverges otherwise. In the same way, for ff continuous on (−∞,b],(-\infty, b]\mathclose{\text{,}} ∫−∞bf(x) dx=lim⁡t→−∞∫tbf(x) dx.\int_{-\infty}^b f(x)\,dx = \lim_{t\to-\infty}\int_t^b f(x)\,dx\mathclose{\text{.}} For ff continuous on R,\R\mathclose{\text{,}}

∫−∞∞f(x) dx=∫−∞cf(x) dx+∫c∞f(x) dx,\begin{aligned} \int_{-\infty}^{\infty} f(x)\,dx &= \int_{-\infty}^{c} f(x)\,dx \\ &\qquad + \int_{c}^{\infty} f(x)\,dx, \end{aligned}

for any number c,c\mathclose{\text{,}} provided both integrals on the right converge; if either diverges, so does the integral on the left.

∫−∞∞\int_{-\infty}^{\infty} reads “the integral from minus infinity to infinity”. The choice of cc does not matter: moving it moves an ordinary integral from one side to the other. The limits as t→±∞t \to \pm\infty are the limits at infinity of Module 3.

Example 12.16Integrals over infinite intervals✓ Checked

Evaluate (a) ∫0∞e−x dx,\displaystyle\int_0^\infty e^{-x}\,dx\mathclose{\text{,}} (b) ∫0∞xe−x dx\displaystyle\int_0^\infty xe^{-x}\,dx and (c) ∫−∞∞dx1+x2.\displaystyle\int_{-\infty}^{\infty} \frac{dx}{1 + x^2}\mathclose{\text{.}}

(a) ∫0te−x dx=[−e−x]0t=1−e−t→1\int_0^t e^{-x}\,dx = \big[-e^{-x}\big]_0^t = 1 - e^{-t} \to 1 as t→∞.t \to \infty\mathclose{\text{.}} The integral converges, to 1.

(b) Integration by parts (Module 11), with u=xu = x and dv=e−x dx,dv = e^{-x}\,dx\mathclose{\text{,}} gives the antiderivative −xe−x−e−x,-xe^{-x} - e^{-x}\mathclose{\text{,}} so ∫0txe−x dx=1−(t+1)e−t.\int_0^t xe^{-x}\,dx = 1 - (t + 1)e^{-t}\mathclose{\text{.}} As t→∞,t \to \infty\mathclose{\text{,}} te−t=t/et→0,te^{-t} = t/e^t \to 0\mathclose{\text{,}} because powers grow more slowly than exponentials (Theorem 7.7), and e−t→0.e^{-t} \to 0\mathclose{\text{.}} The integral converges, to 1.

(c) Split at c=0.c = 0\mathclose{\text{.}} As t→∞,t \to \infty\mathclose{\text{,}} ∫0tdx1+x2=arctan⁡t→π2\int_0^t \frac{dx}{1 + x^2} = \arctan t \to \frac{\pi}{2} (Module 6); and as t→−∞,t \to -\infty\mathclose{\text{,}} ∫t0dx1+x2=−arctan⁡t→π2.\int_t^0 \frac{dx}{1 + x^2} = -\arctan t \to \frac{\pi}{2}\mathclose{\text{.}} Both halves converge, so the integral converges, to π.\pi\mathclose{\text{.}}

Watch out

∫−∞∞x dx\int_{-\infty}^{\infty} x\,dx is not 0. It is true that ∫−ttx dx=0\int_{-t}^{t} x\,dx = 0 for every t,t\mathclose{\text{,}} but the definition takes the two halves separately, and ∫0∞x dx=lim⁡t→∞t2/2\int_0^\infty x\,dx = \lim_{t\to\infty} t^2/2 does not exist: the integral diverges. A symmetric limit can be finite when the integral diverges, so it cannot be used to evaluate ∫−∞∞.\int_{-\infty}^{\infty}\mathclose{\text{.}}

Unbounded integrands

Definition 12.8Improper integral of an unbounded function

Let ff be continuous on [a,b)[a, b) and unbounded near b.b\mathclose{\text{.}} Then

∫abf(x) dx=lim⁡t→b−∫atf(x) dx,\int_a^b f(x)\,dx = \lim_{t\to b^-}\int_a^t f(x)\,dx,

and the integral converges if the limit exists and diverges otherwise. Similarly, if ff is continuous on (a,b](a, b] and unbounded near a,a\mathclose{\text{,}} ∫abf(x) dx=lim⁡t→a+∫tbf(x) dx.\int_a^b f(x)\,dx = \lim_{t\to a^+}\int_t^b f(x)\,dx\mathclose{\text{.}} If ff is continuous on [a,b][a, b] except at a point cc inside it, near which it is unbounded, then ∫abf(x) dx=∫acf(x) dx+∫cbf(x) dx,\int_a^b f(x)\,dx = \int_a^c f(x)\,dx + \int_c^b f(x)\,dx\mathclose{\text{,}} which converges only if both integrals on the right do.

Example 12.17Unbounded integrands✓ Checked

Evaluate (a) ∫01dxx\displaystyle\int_0^1 \frac{dx}{\sqrt x} and (b) ∫01ln⁡x dx.\displaystyle\int_0^1 \ln x\,dx\mathclose{\text{.}}

(a) The integrand is unbounded near 0. For 0<t<1,0 < t < 1\mathclose{\text{,}} ∫t1x−1/2 dx=[2x]t1=2−2t,\int_t^1 x^{-1/2}\,dx = \big[2\sqrt x\big]_t^1 = 2 - 2\sqrt t\mathclose{\text{,}} which approaches 2 as t→0+.t \to 0^+\mathclose{\text{.}} The integral converges, to 2.

(b) ln⁡x→−∞\ln x \to -\infty as x→0+.x \to 0^+\mathclose{\text{.}} An antiderivative of ln⁡x\ln x is xln⁡x−xx\ln x - x (by parts, Module 11), so

∫t1ln⁡x dx=(0−1)−(tln⁡t−t)=−1−tln⁡t+t.\begin{aligned} \int_t^1 \ln x\,dx &= (0 - 1) - (t\ln t - t) \\ &= -1 - t\ln t + t. \end{aligned}

As t→0+,t \to 0^+\mathclose{\text{,}} tln⁡t→0t\ln t \to 0 (Example 7.15), so the integral converges, to −1.-1\mathclose{\text{.}} The region between the graph and the xx-axis is infinitely deep, yet its area is 1; the integral is negative because the region lies below the axis.

Watch out

An unbounded integrand can hide inside the interval. Applying the Fundamental Theorem blindly,

∫−11dxx2=?[−1x]−11=−1−1=−2,\int_{-1}^{1}\frac{dx}{x^2} \overset{?}{=} \Big[-\frac1x\Big]_{-1}^{1} = -1 - 1 = -2,

which cannot be right: the integrand is positive. The Fundamental Theorem needs the integrand to be continuous on [−1,1],[-1, 1]\mathclose{\text{,}} and 1/x21/x^2 is not even defined at 0. The integral is improper at 0, and its right half diverges: ∫t1x−2 dx=1t−1→∞\int_t^1 x^{-2}\,dx = \tfrac1t - 1 \to \infty as t→0+.t \to 0^+\mathclose{\text{.}} So the integral diverges. Before integrating, look for points where the integrand blows up.

The pp-integrals

The examples so far suggest one family of integrals to measure others against.

Theorem 12.2The pp-integrals

Let pp be a real number.

(a) ∫1∞dxxp\displaystyle\int_1^\infty \frac{dx}{x^p} converges if p>1,p > 1\mathclose{\text{,}} to 1p−1,\dfrac{1}{p - 1}\mathclose{\text{,}} and diverges if p≤1.p \le 1\mathclose{\text{.}}

(b) ∫01dxxp\displaystyle\int_0^1 \frac{dx}{x^p} converges if p<1,p < 1\mathclose{\text{,}} to 11−p,\dfrac{1}{1 - p}\mathclose{\text{,}} and diverges if p≥1.p \ge 1\mathclose{\text{.}}

Proof

For p≠1,p \ne 1\mathclose{\text{,}} an antiderivative of x−px^{-p} is x1−p1−p\dfrac{x^{1-p}}{1-p} (the power rule, Module 10).

(a) For t>1,t > 1\mathclose{\text{,}} ∫1tx−p dx=t1−p−11−p.\int_1^t x^{-p}\,dx = \dfrac{t^{1-p} - 1}{1 - p}\mathclose{\text{.}} If p>1,p > 1\mathclose{\text{,}} then 1−p<01 - p < 0 and t1−p=1/tp−1→0t^{1-p} = 1/t^{p-1} \to 0 as t→∞,t \to \infty\mathclose{\text{,}} so the integral approaches −11−p=1p−1.\dfrac{-1}{1 - p} = \dfrac{1}{p - 1}\mathclose{\text{.}} If p<1,p < 1\mathclose{\text{,}} then t1−p→∞,t^{1-p} \to \infty\mathclose{\text{,}} and the integral diverges. If p=1,p = 1\mathclose{\text{,}} ∫1tdx/x=ln⁡t→∞.\int_1^t dx/x = \ln t \to \infty\mathclose{\text{.}}

(b) For 0<t<1,0 < t < 1\mathclose{\text{,}} ∫t1x−p dx=1−t1−p1−p.\int_t^1 x^{-p}\,dx = \dfrac{1 - t^{1-p}}{1 - p}\mathclose{\text{.}} If p<1,p < 1\mathclose{\text{,}} t1−p→0t^{1-p} \to 0 as t→0+,t \to 0^+\mathclose{\text{,}} and the integral approaches 11−p.\dfrac{1}{1 - p}\mathclose{\text{.}} If p>1,p > 1\mathclose{\text{,}} t1−p=1/tp−1→∞,t^{1-p} = 1/t^{p-1} \to \infty\mathclose{\text{,}} and it diverges. If p=1,p = 1\mathclose{\text{,}} ∫t1dx/x=−ln⁡t→∞.\int_t^1 dx/x = -\ln t \to \infty\mathclose{\text{.}}

∎

For p≤0p \le 0 the integral in (b) is an ordinary integral, since x−px^{-p} is continuous on [0,1],[0, 1]\mathclose{\text{,}} and the formula 1/(1−p)1/(1 - p) still gives its value.

Key idea

Near infinity, 1/xp1/x^p must fall faster than 1/x1/x for the area to be finite; near 0, it must grow more slowly than 1/x.1/x\mathclose{\text{.}} The borderline function 1/x1/x fails at both ends, so ∫0∞dx/xp\int_0^\infty dx/x^p diverges for every p:p\mathclose{\text{:}} one of its two halves always does.

Comparison

Most improper integrals cannot be evaluated exactly, but you can often decide whether they converge by comparing them with one you know.

Theorem 12.3The comparison test

Let ff and gg be continuous on [a,∞),[a, \infty)\mathclose{\text{,}} with 0≤f(x)≤g(x)0 \le f(x) \le g(x) for all x≥a.x \ge a\mathclose{\text{.}}

(a) If ∫a∞g(x) dx\int_a^\infty g(x)\,dx converges, so does ∫a∞f(x) dx,\int_a^\infty f(x)\,dx\mathclose{\text{,}} and ∫a∞f(x) dx≤∫a∞g(x) dx.\int_a^\infty f(x)\,dx \le \int_a^\infty g(x)\,dx\mathclose{\text{.}}

(b) If ∫a∞f(x) dx\int_a^\infty f(x)\,dx diverges, so does ∫a∞g(x) dx.\int_a^\infty g(x)\,dx\mathclose{\text{.}}

The same holds for integrals that are improper because the integrands are unbounded near an endpoint.

The condition f≥0f \ge 0 matters: f(x)=−1f(x) = -1 and g(x)=1/x2g(x) = 1/x^2 satisfy f≤gf \le g on [1,∞),[1, \infty)\mathclose{\text{,}} and ∫1∞g\int_1^\infty g converges, but ∫1∞f\int_1^\infty f diverges.

Proof

(a) Let F(t)=∫atf(x) dxF(t) = \int_a^t f(x)\,dx for t≥a,t \ge a\mathclose{\text{,}} and let G=∫a∞g(x) dx.G = \int_a^\infty g(x)\,dx\mathclose{\text{.}} Since f≥0,f \ge 0\mathclose{\text{,}} FF is increasing: making tt larger adds the integral of a non-negative function. In the same way ∫atg(x) dx\int_a^t g(x)\,dx increases with t,t\mathclose{\text{,}} towards its limit G,G\mathclose{\text{,}} so it is at most G.G\mathclose{\text{.}} Since f≤g,f \le g\mathclose{\text{,}} the comparison theorem for integrals (Module 9) gives

F(t)≤∫atg(x) dx≤GF(t) \le \int_a^t g(x)\,dx \le G

for every t≥a.t \ge a\mathclose{\text{.}} So F(t)F(t) rises as tt grows but never passes G.G\mathclose{\text{.}} A function that increases and is bounded above has a limit as t→∞,t \to \infty\mathclose{\text{,}} no larger than the bound. This is a form of the completeness of the real numbers, the property that the number line has no gaps, which the proof of the Intermediate Value Theorem used in Module 3; Module 14 states it for sequences, as the Monotone Convergence Theorem. So ∫a∞f(x) dx=lim⁡t→∞F(t)\int_a^\infty f(x)\,dx = \lim_{t\to\infty} F(t) exists and is at most G.G\mathclose{\text{.}}

(b) If ∫a∞g\int_a^\infty g converged, then by (a) so would ∫a∞f.\int_a^\infty f\mathclose{\text{.}}

∎
Example 12.18Two comparisons✓ Checked

Decide whether (a) ∫1∞e−x2 dx\displaystyle\int_1^\infty e^{-x^2}\,dx and (b) ∫2∞dxln⁡x\displaystyle\int_2^\infty \frac{dx}{\ln x} converge.

(a) For x≥1,x \ge 1\mathclose{\text{,}} x2≥x,x^2 \ge x\mathclose{\text{,}} so −x2≤−x-x^2 \le -x and 0<e−x2≤e−x.0 < e^{-x^2} \le e^{-x}\mathclose{\text{.}} As in Example 12.16(a), ∫1∞e−x dx=lim⁡t→∞(e−1−e−t)=e−1,\int_1^\infty e^{-x}\,dx = \lim_{t\to\infty}\big(e^{-1} - e^{-t}\big) = e^{-1}\mathclose{\text{,}} which converges. By the comparison test, ∫1∞e−x2 dx\int_1^\infty e^{-x^2}\,dx converges, and its value is at most 1/e≈0.368.1/e \approx 0.368\mathclose{\text{.}} (Its value, found numerically, is about 0.1394.)

(b) The function x−ln⁡xx - \ln x has derivative 1−1/x>01 - 1/x > 0 for x>1x > 1 and value 1 at x=1,x = 1\mathclose{\text{,}} so it is positive for x≥1:x \ge 1\mathclose{\text{:}} ln⁡x<x.\ln x < x\mathclose{\text{.}} For x≥2,x \ge 2\mathclose{\text{,}} then, 0<ln⁡x<x0 < \ln x < x and 1ln⁡x>1x>0.\frac{1}{\ln x} > \frac1x > 0\mathclose{\text{.}} Since ∫2∞dx/x=lim⁡t→∞(ln⁡t−ln⁡2)\int_2^\infty dx/x = \lim_{t\to\infty}(\ln t - \ln 2) diverges, so does ∫2∞dx/ln⁡x,\int_2^\infty dx/\ln x\mathclose{\text{,}} by the comparison test (b).

Part (a) settles a question that matters below: ∫−∞∞e−x2 dx\int_{-\infty}^{\infty} e^{-x^2}\,dx converges. The interval [1,∞)[1, \infty) is part (a), [0,1][0, 1] gives an ordinary integral, and e−x2e^{-x^2} is even, so the negative half behaves like the positive half.

Watch out

A comparison must go the right way. To show that ∫1∞dxx+1\int_1^\infty \frac{dx}{\sqrt x + 1} diverges, comparing with 1x\frac{1}{\sqrt x} proves nothing: 1x+1≤1x,\frac{1}{\sqrt x + 1} \le \frac{1}{\sqrt x}\mathclose{\text{,}} and a function below one whose integral diverges may have an integral that converges or diverges. Compare from below instead: for x≥1,x \ge 1\mathclose{\text{,}} x+1≤2x,\sqrt x + 1 \le 2\sqrt x\mathclose{\text{,}} so 1x+1≥12x,\frac{1}{\sqrt x + 1} \ge \frac{1}{2\sqrt x}\mathclose{\text{,}} whose integral diverges (p=12).p = \tfrac12\mathclose{\text{).}}

Finding the right inequality takes some care. Often it is easier to compare the behaviour for large x:x\mathclose{\text{:}}

Theorem 12.4Limit comparison

Let ff and gg be continuous and positive on [a,∞),[a, \infty)\mathclose{\text{,}} with f(x)/g(x)→Lf(x)/g(x) \to L as x→∞,x \to \infty\mathclose{\text{,}} where 0<L<∞.0 < L < \infty\mathclose{\text{.}} Then ∫a∞f(x) dx\int_a^\infty f(x)\,dx and ∫a∞g(x) dx\int_a^\infty g(x)\,dx either both converge or both diverge.

Proof

Since f(x)/g(x)→L>0,f(x)/g(x) \to L > 0\mathclose{\text{,}} the ratio lies between L2\tfrac{L}{2} and 3L2\tfrac{3L}{2} for all large enough x,x\mathclose{\text{,}} say for x≥N,x \ge N\mathclose{\text{,}} where N≥a;N \ge a\mathclose{\text{;}} so L2g(x)≤f(x)≤3L2g(x)\tfrac{L}{2}g(x) \le f(x) \le \tfrac{3L}{2}g(x) there. If ∫a∞g\int_a^\infty g converges, then ∫N∞f\int_N^\infty f converges by comparison with 3L2g.\tfrac{3L}{2}g\mathclose{\text{.}} If ∫a∞g\int_a^\infty g diverges, so does ∫N∞g,\int_N^\infty g\mathclose{\text{,}} and then ∫N∞f\int_N^\infty f diverges by comparison with L2g.\tfrac{L}{2}g\mathclose{\text{.}} Adding the ordinary integral ∫aNf\int_a^N f does not change whether the integral converges.

∎

For the pitfall above, 1/(x+1)1/x=xx+1→1,\dfrac{1/(\sqrt x + 1)}{1/\sqrt x} = \dfrac{\sqrt x}{\sqrt x + 1} \to 1\mathclose{\text{,}} so ∫1∞dxx+1\int_1^\infty \frac{dx}{\sqrt x + 1} diverges with ∫1∞dxx,\int_1^\infty \frac{dx}{\sqrt x}\mathclose{\text{,}} with no inequality to find.

Gabriel’s horn

Example 12.19Gabriel’s horn✓ Checked

Rotate the region under y=1/x,y = 1/x\mathclose{\text{,}} x≥1,x \ge 1\mathclose{\text{,}} about the xx-axis. The solid, a horn that grows thinner without end, is called Gabriel’s horn. Find its volume.

By discs, with an improper integral,

V=π∫1∞(1x)2 dx=π∫1∞dxx2=π⋅1=π,\begin{aligned} V &= \pi\int_1^\infty \Big(\frac1x\Big)^2\,dx = \pi\int_1^\infty \frac{dx}{x^2} \\ &= \pi \cdot 1 = \pi, \end{aligned}

by Theorem 12.2 with p=2.p = 2\mathclose{\text{.}} The horn has a finite volume, π\pi cubic units, although the region that sweeps it out has infinite area: ∫1∞dx/x\int_1^\infty dx/x diverges.

Going deeperThe horn’s surface area

When the graph of f≥0,f \ge 0\mathclose{\text{,}} with f′f' continuous on [a,b],[a, b]\mathclose{\text{,}} rotates about the xx-axis, it sweeps out a surface of area

S=2π∫abf(x)1+f′(x)2 dx.S = 2\pi\int_a^b f(x)\sqrt{1 + f'(x)^2}\,dx.

The idea of the proof: each chord of the polygon of Section 12.5 sweeps out a band, the curved side of a cone with its tip cut off. Cutting the band open and flattening it shows that its area is π(r1+r2)ℓ,\pi(r_1 + r_2)\ell\mathclose{\text{,}} where r1r_1 and r2r_2 are the radii of its two ends and ℓ\ell is its slant length, here the length of the chord, 1+f′(xi∗)2 Δx.\sqrt{1 + f'(x_i^*)^2}\,\Delta x\mathclose{\text{.}} With r1+r2≈2f(xi∗),r_1 + r_2 \approx 2f(x_i^*)\mathclose{\text{,}} the bands add up to approximately a Riemann sum of 2πf(x)1+f′(x)2.2\pi f(x)\sqrt{1 + f'(x)^2}\mathclose{\text{.}} (Module 20 treats the area of surfaces in general.) A check: for a ball of radius a,a\mathclose{\text{,}} f(x)=a2−x2f(x) = \sqrt{a^2 - x^2} gives f(x)1+f′(x)2=af(x)\sqrt{1 + f'(x)^2} = a for −a<x<a.-a < x < a\mathclose{\text{.}} The formula needs f′f' continuous, and f′f' is unbounded near ±a,\pm a\mathclose{\text{,}} so take the band of the sphere between x=−bx = -b and x=b,x = b\mathclose{\text{,}} for 0<b<a:0 < b < a\mathclose{\text{:}} its area is 2π⋅a⋅2b=4πab,2\pi \cdot a \cdot 2b = 4\pi ab\mathclose{\text{,}} which approaches 4πa2,4\pi a^2\mathclose{\text{,}} the familiar area of a sphere, as b→a.b \to a\mathclose{\text{.}}

For the horn, f(x)=1/xf(x) = 1/x and f′(x)=−1/x2,f'(x) = -1/x^2\mathclose{\text{,}} so the integrand is

2πx1+1x4≥2πx,\frac{2\pi}{x}\sqrt{1 + \frac{1}{x^4}} \ge \frac{2\pi}{x},

and ∫1∞2π dx/x\int_1^\infty 2\pi\,dx/x diverges, so by the comparison test the horn’s surface area is infinite. The horn holds π\pi cubic units of paint, yet no finite amount of paint could cover its outside with a coat of a fixed thickness d,d\mathclose{\text{,}} which would need about S dS\,d of paint. There is no contradiction: far along the horn, the paint that fills it forms a layer thinner than any fixed d.d\mathclose{\text{.}}

Compute itImproper integrals with SymPy

SymPy’s integrate accepts sp.oo, infinity, as a limit, and answers oo when an integral diverges to infinity:

Python
import sympy as sp
x = sp.symbols('x')
print(sp.integrate(1/x**2, (x, 1, sp.oo)))
print(sp.integrate(1/x, (x, 1, sp.oo)))
print(sp.integrate(sp.exp(-x**2), (x, -sp.oo, sp.oo)))
print(sp.integrate(1/x**2, (x, -1, 1)))
Output
1
oo
sqrt(pi)
oo

The last line is the pitfall of Section 12.8: SymPy notices the trouble at 0 inside the interval. Your own use of an antiderivative does not:

Python
F = sp.integrate(1/x**2, x)
print(F, F.subs(x, 1) - F.subs(x, -1))
Output
-1/x -2

With a symbol for the power, SymPy states when the pp-integral converges:

Python
p = sp.symbols('p', positive=True)
print(sp.integrate(x**(-p), (x, 1, sp.oo)))
Output
Piecewise((1/(p - 1), p > 1), (Integral(x**(-p), (x, 1, oo)), True))

A Piecewise result reads like a definition by cases: 1/(p−1)1/(p - 1) when p>1,p > 1\mathclose{\text{,}} and otherwise the integral, left unevaluated: for p≤1p \le 1 it diverges, so there is no value to give.

9

Probability

Probability densities

Some quantities are random: the time until the next request reaches a web server, the lifetime of a component, the error of a measurement. Their values cannot be predicted, but their probabilities can. The probability of an event, P(event),P(\text{event})\mathclose{\text{,}} is a number from 0 to 1, the fraction of the time the event happens in a long run of repetitions; 1 means certain. A random variable XX is a quantity whose value is decided by chance. A waiting time or a lifetime can take any value in an interval, so its probabilities cannot be listed value by value; a curve describes them instead.

Measure such an XX many times and draw a histogram in which the area of each bar is the fraction of the measurements in its bin. With more measurements and narrower bins, the tops of the bars settle onto a curve y=f(x),y = f(x)\mathclose{\text{,}} and the fraction of the values between aa and bb settles onto the area under the curve from aa to b.b\mathclose{\text{.}}

Definition 12.9Probability density function

A probability density function is a function ff with f(x)≥0f(x) \ge 0 for every xx and

∫−∞∞f(x) dx=1.\int_{-\infty}^{\infty} f(x)\,dx = 1.

A random variable XX has density ff if, for all numbers a≤b,a \le b\mathclose{\text{,}}

P(a≤X≤b)=∫abf(x) dx.P(a \le X \le b) = \int_a^b f(x)\,dx.

A random variable with a density is called continuous.

The total area 1 says that XX is certain to take some value. A density may jump, as the exponential density below does at 0; split the integrals at the jumps. Two consequences: a single value has probability P(X=a)=∫aaf(x) dx=0,P(X = a) = \int_a^a f(x)\,dx = 0\mathclose{\text{,}} so it does not matter whether the inequalities are strict (<)<\mathclose{\text{)}} or not (≤);\le\mathclose{\text{);}} and f(x)f(x) is not a probability but a probability per unit length, P(x≤X≤x+Δx)≈f(x) ΔxP(x \le X \le x + \Delta x) \approx f(x)\,\Delta x for a small Δx,\Delta x\mathclose{\text{,}} so f(x)f(x) can be larger than 1.

The simplest density is the uniform density on [0,1],[0, 1]\mathclose{\text{,}} equal to 1 there and 0 elsewhere: for 0≤a≤b≤1,0 \le a \le b \le 1\mathclose{\text{,}} P(a≤X≤b)=b−a,P(a \le X \le b) = b - a\mathclose{\text{,}} the length of the interval. A computer’s random-number generator, such as Python’s random.random(), imitates it.

Example 12.20A density on an interval✓ Checked

Find the constant cc for which f(x)=cx(2−x)f(x) = cx(2 - x) for 0≤x≤2,0 \le x \le 2\mathclose{\text{,}} and f(x)=0f(x) = 0 otherwise, is a probability density function. Then find P(X≤12)P\big(X \le \tfrac12\big) for a random variable XX with this density.

For c≥0,c \ge 0\mathclose{\text{,}} f≥0,f \ge 0\mathclose{\text{,}} since x(2−x)≥0x(2 - x) \ge 0 on [0,2].[0, 2]\mathclose{\text{.}} The total area must be 1:

∫02cx(2−x) dx=c[x2−x33]02=c(4−83)=4c3=1,\begin{aligned} &\int_0^2 cx(2 - x)\,dx = c\Big[x^2 - \frac{x^3}{3}\Big]_0^2 \\ &\qquad= c\Big(4 - \frac83\Big) = \frac{4c}{3} = 1, \end{aligned}

so c=34.c = \tfrac34\mathclose{\text{.}} Then, since f=0f = 0 to the left of 0,

P(X≤12)=34∫01/2(2x−x2) dx=34(14−124)=532≈0.156.\begin{aligned} P\Big(X \le \frac12\Big) &= \frac34\int_0^{1/2} \big(2x - x^2\big)\,dx \\ &= \frac34\Big(\frac14 - \frac{1}{24}\Big) \\ &= \frac{5}{32} \approx 0.156. \end{aligned}

Expected value

Average many values of X.X\mathclose{\text{.}} About the fraction f(x) Δxf(x)\,\Delta x of them lie in a thin slice near x,x\mathclose{\text{,}} and they contribute about x⋅f(x) Δxx \cdot f(x)\,\Delta x to the average. Adding the slices and taking the limit gives the expected value.

Definition 12.10Expected value

The expected value, or mean, of a random variable XX with density ff is

μ=E(X)=∫−∞∞x f(x) dx,\mu = E(X) = \int_{-\infty}^{\infty} x\,f(x)\,dx,

provided the integral converges. (μ\mu is the Greek letter “mu”.)

This is the centre of mass of a rod (Definition 12.5) with density ff and total mass 1: the mean is the point where the graph of the density would balance. The density of Example 12.20 is symmetric about x=1,x = 1\mathclose{\text{,}} so its mean is 1, and the integral agrees: 34∫02x2(2−x) dx=34⋅43=1.\tfrac34\int_0^2 x^2(2 - x)\,dx = \tfrac34 \cdot \tfrac43 = 1\mathclose{\text{.}}

Watch out

Not every density has a mean. The function f(x)=1π(1+x2)f(x) = \dfrac{1}{\pi(1 + x^2)} is a density (Example 12.16(c) shows that its total area is 1), and its graph is symmetric about 0. But, with the substitution u=1+x2,u = 1 + x^2\mathclose{\text{,}}

∫0txπ(1+x2) dx=ln⁡(1+t2)2π→∞,\int_0^t \frac{x}{\pi(1 + x^2)}\,dx = \frac{\ln(1 + t^2)}{2\pi} \to \infty,

so the integral for the mean diverges, and this random variable (it follows the Cauchy distribution) has no expected value. Symmetry gives the mean only when the integral converges.

The exponential distribution

Some events happen at random times, independently of one another, at a steady average rate of λ\lambda per unit of time (λ\lambda is the Greek letter “lambda”): the decays of the atoms in a radioactive sample, or requests arriving at a busy server. The waiting time XX for the next such event is modelled by the exponential density with rate λ>0,\lambda > 0\mathclose{\text{,}}

f(x)={λe−λxif x≥0,0if x<0.f(x) = \begin{cases} \lambda e^{-\lambda x} & \text{if } x \ge 0, \\ 0 & \text{if } x < 0. \end{cases}

It is a density: f≥0,f \ge 0\mathclose{\text{,}} and ∫0∞λe−λx dx=lim⁡t→∞(1−e−λt)=1.\int_0^\infty \lambda e^{-\lambda x}\,dx = \lim_{t\to\infty}\big(1 - e^{-\lambda t}\big) = 1\mathclose{\text{.}} In the same way, for t≥0,t \ge 0\mathclose{\text{,}}

P(X>t)=∫t∞λe−λx dx=e−λt:P(X > t) = \int_t^\infty \lambda e^{-\lambda x}\,dx = e^{-\lambda t}:

the chance of waiting longer than tt decays exponentially (Module 6). For the mean, substitute u=λxu = \lambda x and use Example 12.16(b):

E(X)=∫0∞x λe−λx dx=1λ∫0∞ue−u du=1λ.\begin{aligned} E(X) &= \int_0^\infty x\,\lambda e^{-\lambda x}\,dx \\ &= \frac{1}{\lambda}\int_0^\infty ue^{-u}\,du = \frac1\lambda. \end{aligned}

At an average of λ\lambda events per second, the average wait is 1/λ1/\lambda seconds.

Example 12.21Waiting for a request✓ Checked

Suppose requests reach a server at random at an average rate of 2 per second (a hypothetical server), so that the waiting time X,X\mathclose{\text{,}} in seconds, for the next request has the exponential density with λ=2\lambda = 2 (Figure 12.5, left). Find (a) P(X>1),P(X > 1)\mathclose{\text{,}} (b) P(0.5≤X≤1),P(0.5 \le X \le 1)\mathclose{\text{,}} (c) the mean wait and (d) the median wait, the time mm with P(X≤m)=12.P(X \le m) = \tfrac12\mathclose{\text{.}}

(a) P(X>1)=e−2⋅1=e−2≈0.135.P(X > 1) = e^{-2 \cdot 1} = e^{-2} \approx 0.135\mathclose{\text{.}}

(b) P(0.5≤X≤1)=P(X≥0.5)−P(X>1)=e−1−e−2≈0.233.P(0.5 \le X \le 1) = P(X \ge 0.5) - P(X > 1) = e^{-1} - e^{-2} \approx 0.233\mathclose{\text{.}}

(c) E(X)=1/λ=0.5E(X) = 1/\lambda = 0.5 s.

(d) P(X≤m)=1−e−2m=12P(X \le m) = 1 - e^{-2m} = \tfrac12 gives e−2m=12,e^{-2m} = \tfrac12\mathclose{\text{,}} so −2m=ln⁡12=−ln⁡2,-2m = \ln\tfrac12 = -\ln 2\mathclose{\text{,}} and m=12ln⁡2≈0.347m = \tfrac12\ln 2 \approx 0.347 s. Half the waits are shorter than 0.347 s, although the mean is 0.5 s: the rare long waits pull the mean up. For radioactive atoms, the median lifetime ln⁡2/λ\ln 2/\lambda is the half-life of exponential decay (Module 6).

Probabilities are areas under a density. Left: the exponential density f(x) = 2e^{-2x} of Example 12.21; the shaded area is P(0.5 le X le 1) = e^{-1} - e^{-2} approx 0.233. The filled dot shows f(0) = 2: a density can exceed 1. Right: the standard normal density varphi, introduced below; the shaded area, P(-1 le Z le 1) approx 0.683, is the probability of landing within one standard deviation of the mean.
Figure 12.5

Probabilities are areas under a density. Left: the exponential density f(x)=2e−2xf(x) = 2e^{-2x} of Example 12.21; the shaded area is P(0.5≤X≤1)=e−1−e−2≈0.233.P(0.5 \le X \le 1) = e^{-1} - e^{-2} \approx 0.233\mathclose{\text{.}} The filled dot shows f(0)=2:f(0) = 2\mathclose{\text{:}} a density can exceed 1. Right: the standard normal density φ,\varphi\mathclose{\text{,}} introduced below; the shaded area, P(−1≤Z≤1)≈0.683,P(-1 \le Z \le 1) \approx 0.683\mathclose{\text{,}} is the probability of landing within one standard deviation of the mean.

The exponential distribution has a striking property. The conditional probability P(A∣B),P(A \mid B)\mathclose{\text{,}} read “the probability of A given B”, is the probability that AA happens among the occasions on which BB happens:

P(A∣B)=P(A and B)P(B),for P(B)>0.P(A \mid B) = \frac{P(A \text{ and } B)}{P(B)}, \quad\text{for } P(B) > 0.
Theorem 12.5The exponential distribution has no memory

If XX has the exponential density with rate λ,\lambda\mathclose{\text{,}} then for all s≥0s \ge 0 and t≥0,t \ge 0\mathclose{\text{,}}

P(X>s+t∣X>s)=P(X>t).P(X > s + t \mid X > s) = P(X > t).
Proof

If X>s+tX > s + t then X>s,X > s\mathclose{\text{,}} so the event “X>s+tX > s + t and X>sX > s” is the event X>s+t.X > s + t\mathclose{\text{.}} Therefore

P(X>s+t∣X>s)=P(X>s+t)P(X>s)=e−λ(s+t)e−λs=e−λt=P(X>t).\begin{aligned} &P(X > s + t \mid X > s) \\ &\quad= \frac{P(X > s + t)}{P(X > s)} = \frac{e^{-\lambda(s + t)}}{e^{-\lambda s}} \\ &\quad= e^{-\lambda t} = P(X > t). \end{aligned}
∎

Having waited ss seconds for a request does not bring the next one any closer: the remaining wait has the same distribution as a fresh one. As a model of lifetimes, the exponential distribution describes things that do not wear out, such as an atom that has not yet decayed; it is a poor model for things that age, such as tyres or people.

Watch out

The condition changes the answer. With λ=2,\lambda = 2\mathclose{\text{,}} the probability of waiting more than 1.5 s in all, given that you have already waited 1 s, is P(X>0.5)=e−1≈0.368,P(X > 0.5) = e^{-1} \approx 0.368\mathclose{\text{,}} not P(X>1.5)=e−3≈0.050:P(X > 1.5) = e^{-3} \approx 0.050\mathclose{\text{:}} the second is the probability, before you start waiting, of waiting that long.

The normal distribution

The most important density in statistics is the bell-shaped standard normal density

φ(z)=12π e−z2/2,\varphi(z) = \frac{1}{\sqrt{2\pi}}\,e^{-z^2/2},

where φ\varphi is the Greek letter “phi” (Figure 12.5, right). Measurement errors, and many quantities that are the sum of many small independent effects, are distributed approximately like this, shifted and scaled; the reason, the central limit theorem of probability theory, is beyond this series.

Why the factor 1/2π?1/\sqrt{2\pi}\mathclose{\text{?}} The total area must be 1. Section 12.8 showed, after Example 12.18, that ∫−∞∞e−x2 dx\int_{-\infty}^{\infty} e^{-x^2}\,dx converges. Its value is the Gaussian integral

∫−∞∞e−x2 dx=π.\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{\pi}.

No antiderivative helps here, since e−x2e^{-x^2} has no elementary one (Module 11). This module quotes the value; Module 19 proves it, by squaring the integral, which turns it into a double integral, and evaluating that in polar coordinates. The substitution z=2 x,z = \sqrt2\,x\mathclose{\text{,}} with dz=2 dxdz = \sqrt2\,dx (Module 10; the infinite limits stay infinite), gives

∫−∞∞e−z2/2 dz=2∫−∞∞e−x2 dx=2π,\int_{-\infty}^{\infty} e^{-z^2/2}\,dz = \sqrt2\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt{2\pi},

so φ\varphi has total area 1. Its mean is 0: the integral ∫0∞ze−z2/2 dz\int_0^\infty z e^{-z^2/2}\,dz converges, to 1 (substitute u=z2/2),u = z^2/2\mathclose{\text{),}} and zφ(z)z\varphi(z) is odd, so the two halves of the integral for the mean cancel.

More generally, the normal distribution with mean μ\mu and standard deviation σ>0\sigma > 0 (the Greek “sigma”) has the density

f(x)=1σ2π e−(x−μ)2/(2σ2),f(x) = \frac{1}{\sigma\sqrt{2\pi}}\,e^{-(x - \mu)^2/(2\sigma^2)},

a bell centred at μ\mu whose width is proportional to σ.\sigma\mathclose{\text{.}} Exercise 12.12 shows that σ2\sigma^2 is the mean squared distance from the mean, and that the bell’s points of inflection are at μ±σ.\mu \pm \sigma\mathclose{\text{.}} The substitution z=(x−μ)/σz = (x - \mu)/\sigma turns ff into φ:\varphi\mathclose{\text{:}} if XX has this density and ZZ has the standard normal density, then

P(a≤X≤b)=P(a−μσ≤Z≤b−μσ).P(a \le X \le b) = P\Big(\frac{a - \mu}{\sigma} \le Z \le \frac{b - \mu}{\sigma}\Big).

The same substitution, x=μ+σzx = \mu + \sigma z with dx=σ dz,dx = \sigma\,dz\mathclose{\text{,}} shows that the mean of XX is μ,\mu\mathclose{\text{,}} as its name says, because φ\varphi has total area 1 and mean 0:

∫−∞∞xf(x) dx=∫−∞∞(μ+σz)φ(z) dz=μ⋅1+σ⋅0=μ.\begin{aligned} \int_{-\infty}^{\infty} x f(x)\,dx &= \int_{-\infty}^{\infty} (\mu + \sigma z)\varphi(z)\,dz \\ &= \mu \cdot 1 + \sigma \cdot 0 = \mu. \end{aligned}

One function, φ,\varphi\mathclose{\text{,}} serves every normal distribution.

Computing normal probabilities. Since φ\varphi has no elementary antiderivative, normal probabilities are computed numerically, for example with Simpson’s rule (Module 11), or with the error function of Module 11,

erf⁡(x)=2π∫0xe−t2 dt,\operatorname{erf}(x) = \frac{2}{\sqrt\pi}\int_0^x e^{-t^2}\,dt,

which calculators and programming languages provide (in Python, math.erf). Since φ\varphi is even, P(−c≤Z≤c)=2∫0cφ(z) dzP(-c \le Z \le c) = 2\int_0^c \varphi(z)\,dz for c>0,c > 0\mathclose{\text{,}} and the substitution z=2 tz = \sqrt2\,t turns this into an error function:

P(−c≤Z≤c)=22π∫0ce−z2/2 dz=2π∫0c/2e−t2 dt=erf⁡(c2).\begin{aligned} P(-c \le Z \le c) &= \frac{2}{\sqrt{2\pi}}\int_0^{c} e^{-z^2/2}\,dz \\ &= \frac{2}{\sqrt\pi}\int_0^{c/\sqrt2} e^{-t^2}\,dt \\ &= \operatorname{erf}\Big(\frac{c}{\sqrt2}\Big). \end{aligned}
ccP(−c≤Z≤c)=erf⁡(c/2)P(-c \le Z \le c) = \operatorname{erf}(c/\sqrt2)
110.68270.6827
1.6451.6450.90000.9000
1.961.960.95000.9500
220.95450.9545
2.5762.5760.99000.9900
330.99730.9973

The rows for 1, 2 and 3 are the 68–95–99.7 rule: a normal random variable lies within one standard deviation of its mean about 68% of the time, within two about 95% of the time, and within three about 99.7% of the time. The values 1.645, 1.96 and 2.576 give 90%, 95% and 99%; statisticians use them to state how precise an estimate is.

Example 12.22A sensor’s error✓ Checked

Suppose a thermometer’s error, its reading minus the true temperature, is normally distributed with mean 0 °C and standard deviation 0.4 °C (a hypothetical sensor). Find the probability that (a) a reading is within 0.5 °C of the true temperature, and (b) the error is more than 1 °C either way.

(a) Standardise with z=x/0.4:z = x/0.4\mathclose{\text{:}} 0.50.5 °C becomes z=1.25,z = 1.25\mathclose{\text{,}} so

P(−0.5≤X≤0.5)=P(−1.25≤Z≤1.25)=erf⁡(1.252)≈0.789.\begin{aligned} &P(-0.5 \le X \le 0.5) \\ &\qquad= P(-1.25 \le Z \le 1.25) \\ &\qquad= \operatorname{erf}\Big(\frac{1.25}{\sqrt2}\Big) \approx 0.789. \end{aligned}

(b) Now 1 °C becomes z=2.5,z = 2.5\mathclose{\text{,}} and the error is more than 1 °C either way exactly when it is not within 1 °C:

P(∣X∣>1)=1−P(−2.5≤Z≤2.5)=1−erf⁡(2.52)≈0.0124,\begin{aligned} P(\abs{X} > 1) &= 1 - P(-2.5 \le Z \le 2.5) \\ &= 1 - \operatorname{erf}\Big(\frac{2.5}{\sqrt2}\Big) \approx 0.0124, \end{aligned}

so about 1.2% of the readings are that far off.

Watch out

Standardise before you use the table or the error function. In Example 12.22, P(−0.5≤X≤0.5)P(-0.5 \le X \le 0.5) is not erf⁡(0.5/2)≈0.383:\operatorname{erf}(0.5/\sqrt2) \approx 0.383\mathclose{\text{:}} that would be the answer for a standard deviation of 1 °C, not 0.4 °C.

Compute itProbabilities by computer

Python’s math module has exp, log and erf, enough for the probabilities of Examples 12.21 and 12.22:

Python
import math
lam = 2.0
print("P(X > 1)         =", math.exp(-lam*1))
print("P(0.5 <= X <= 1) =", math.exp(-lam*0.5) - math.exp(-lam*1))
print("median wait      =", math.log(2)/lam)
print("P(|Z| <= 1.25)   =", math.erf(1.25/math.sqrt(2)))
Output
P(X > 1)         = 0.1353352832366127
P(0.5 <= X <= 1) = 0.23254415793482963
median wait      = 0.34657359027997264
P(|Z| <= 1.25)   = 0.7887004526662894

You can also watch probabilities emerge from simulated data. If UU is uniform on [0,1),[0, 1)\mathclose{\text{,}} then X=−ln⁡(1−U)/λX = -\ln(1 - U)/\lambda has the exponential density, because P(X>t)=P(1−U<e−λt)=e−λt.P(X > t) = P\big(1 - U < e^{-\lambda t}\big) = e^{-\lambda t}\mathclose{\text{.}} Simulate 100,000 waits (the seed fixes the random numbers, so you see the same output as here):

Python
import random
random.seed(2026)
waits = [-math.log(1 - random.random())/lam for _ in range(100_000)]
long_waits = [w for w in waits if w > 1]
longer = [w for w in long_waits if w > 1.5]
print("mean of the waits:   ", round(sum(waits)/len(waits), 4))
print("fraction over 1 s:   ", round(len(long_waits)/len(waits), 4))
print("of those, over 1.5 s:", round(len(longer)/len(long_waits), 4))
Output
mean of the waits:    0.498
fraction over 1 s:    0.1343
of those, over 1.5 s: 0.3658

The simulated mean is close to 1/λ=0.5,1/\lambda = 0.5\mathclose{\text{,}} the fraction of waits longer than 1 s is close to e−2≈0.135,e^{-2} \approx 0.135\mathclose{\text{,}} and, among those, the fraction that last at least another 0.5 s is close to e−1≈0.368:e^{-1} \approx 0.368\mathclose{\text{:}} the memoryless property, seen in data.

10

What you learned

  • Slice, approximate, add, take the limit. A quantity spread over [a,b][a, b] whose slice near xx holds about q(x) Δxq(x)\,\Delta x is ∫abq(x) dx.\int_a^b q(x)\,dx\mathclose{\text{.}} The true amount in each slice must lie between Δx\Delta x times the least and the greatest values of qq there; check the units of q(x) dx.q(x)\,dx\mathclose{\text{.}}
  • Areas: ∫ab(top−bottom) dx\int_a^b (\text{top} - \text{bottom})\,dx with vertical strips, ∫cd(right−left) dy\int_c^d (\text{right} - \text{left})\,dy with horizontal strips. Find where the curves meet, and split where they cross.
  • Volumes: ∫abA(x) dx\int_a^b A(x)\,dx for known cross-sections (a pyramid or cone is 13\tfrac13 base times height). For solids of revolution: discs π∫f2,\pi\int f^2\mathclose{\text{,}} washers π∫(R2−r2),\pi\int (R^2 - r^2)\mathclose{\text{,}} shells 2π∫(radius)(height),2\pi\int (\text{radius})(\text{height})\mathclose{\text{,}} with radii measured from the axis.
  • Arc length: L=∫ab1+f′(x)2 dx,L = \int_a^b \sqrt{1 + f'(x)^2}\,dx\mathclose{\text{,}} the limit of the lengths of inscribed polygons (Pythagoras and the Mean Value Theorem). Most arc length integrals need numerical evaluation.
  • Work: W=∫abF(x) dx,W = \int_a^b F(x)\,dx\mathclose{\text{,}} in joules when the force is in newtons and the distance in metres. A spring obeys F=kxF = kx (Hooke’s law); for ropes and tanks, slice the object and multiply each slice’s weight by its own distance.
  • Centre of mass: xˉ=∫xρ dx/∫ρ dx\bar x = \int x\rho\,dx \big/ \int \rho\,dx for a rod; for a plate, the centroid xˉ=1A∫x(f−g) dx,\bar x = \frac1A\int x(f - g)\,dx\mathclose{\text{,}} yˉ=1A∫12(f2−g2) dx,\bar y = \frac1A\int \tfrac12\big(f^2 - g^2\big)\,dx\mathclose{\text{,}} on any line of symmetry.
  • Improper integrals are limits of ordinary integrals, over infinite intervals or of unbounded integrands; they converge or diverge. ∫1∞dx/xp\int_1^\infty dx/x^p converges exactly when p>1,p > 1\mathclose{\text{,}} ∫01dx/xp\int_0^1 dx/x^p exactly when p<1.p < 1\mathclose{\text{.}} The comparison and limit comparison tests decide convergence without evaluating. Look for hidden infinities before using the Fundamental Theorem. Gabriel’s horn has volume π\pi but infinite surface area.
  • Probability: a density f≥0f \ge 0 with total area 1 gives P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx and mean μ=∫xf(x) dx\mu = \int x f(x)\,dx (when it converges). The exponential density λe−λx\lambda e^{-\lambda x} has P(X>t)=e−λt,P(X > t) = e^{-\lambda t}\mathclose{\text{,}} mean 1/λ1/\lambda and no memory. The normal density rests on the Gaussian integral ∫−∞∞e−x2 dx=π\int_{-\infty}^{\infty} e^{-x^2}\,dx = \sqrt\pi (proved in Module 19); its probabilities come from the error function or numerical integration: P(∣Z∣≤c)=erf⁡(c/2),P(\abs{Z} \le c) = \operatorname{erf}(c/\sqrt2)\mathclose{\text{,}} the 68–95–99.7 rule.
11

Exercises

Exercise 12.1★Curves that cross

Find the area of the region enclosed by the curves y=x3y = x^3 and y=x.y = x\mathclose{\text{.}} Explain why ∫−11(x−x3) dx\int_{-1}^{1} (x - x^3)\,dx is not the answer.

Show solution✓ Checked

The curves meet where x3=x,x^3 = x\mathclose{\text{,}} that is, x(x−1)(x+1)=0:x(x - 1)(x + 1) = 0\mathclose{\text{:}} at x=−1,x = -1\mathclose{\text{,}} 0 and 1. On [0,1],[0, 1]\mathclose{\text{,}} at x=12,x = \tfrac12\mathclose{\text{,}} the line gives 12\tfrac12 and the cubic 18,\tfrac18\mathclose{\text{,}} so the line is on top. On [−1,0],[-1, 0]\mathclose{\text{,}} at x=−12,x = -\tfrac12\mathclose{\text{,}} the cubic gives −18-\tfrac18 and the line −12,-\tfrac12\mathclose{\text{,}} so the cubic is on top. Split at the crossing:

A=∫−10(x3−x) dx+∫01(x−x3) dx=[x44−x22]−10+[x22−x44]01=14+14=12.\begin{aligned} A &= \int_{-1}^{0} \big(x^3 - x\big)\,dx \\ &\qquad + \int_0^1 \big(x - x^3\big)\,dx \\ &= \Big[\frac{x^4}{4} - \frac{x^2}{2}\Big]_{-1}^{0} \\ &\qquad + \Big[\frac{x^2}{2} - \frac{x^4}{4}\Big]_0^1 \\ &= \frac14 + \frac14 = \frac12. \end{aligned}

∫−11(x−x3) dx=0,\int_{-1}^{1}(x - x^3)\,dx = 0\mathclose{\text{,}} because on [−1,0][-1, 0] the line is below the cubic and that part counts as −14:-\tfrac14\mathclose{\text{:}} the integral is a net (signed) area, not the area. The region consists of two pieces, mirror images of each other through the origin, each of area 14.\tfrac14\mathclose{\text{.}}

Exercise 12.2★Discs and shells

The region under y=x,y = \sqrt x\mathclose{\text{,}} 0≤x≤4,0 \le x \le 4\mathclose{\text{,}} rotates (a) about the xx-axis and (b) about the yy-axis. Find both volumes, using shells in (b).

Show solution✓ Checked

(a) Discs of radius x:\sqrt x\mathclose{\text{:}}

V=π∫04(x)2 dx=π∫04x dx=π⋅162=8π≈25.13.\begin{aligned} V &= \pi\int_0^4 \big(\sqrt x\big)^2\,dx \\ &= \pi\int_0^4 x\,dx \\ &= \pi\cdot\frac{16}{2} = 8\pi \approx 25.13. \end{aligned}

(b) A strip at xx has radius xx and height x:\sqrt x\mathclose{\text{:}}

V=2π∫04xx dx=2π∫04x3/2 dx=2π⋅25⋅45/2=2π⋅25⋅32=128π5≈80.42.\begin{aligned} V &= 2\pi\int_0^4 x\sqrt x\,dx \\ &= 2\pi\int_0^4 x^{3/2}\,dx \\ &= 2\pi\cdot\frac25\cdot 4^{5/2} = 2\pi\cdot\frac25\cdot 32 \\ &= \frac{128\pi}{5} \approx 80.42. \end{aligned}

A check with washers: at height y,y\mathclose{\text{,}} for 0≤y≤2,0 \le y \le 2\mathclose{\text{,}} the region runs from x=y2x = y^2 to x=4,x = 4\mathclose{\text{,}} so R=4,R = 4\mathclose{\text{,}} r=y2,r = y^2\mathclose{\text{,}} and π∫02(16−y4) dy=π(32−325)=128π5.\pi\int_0^2 \big(16 - y^4\big)\,dy = \pi\big(32 - \tfrac{32}{5}\big) = \tfrac{128\pi}{5}\mathclose{\text{.}}

Exercise 12.3★A spring

A spring has a natural length of 20 cm. A force of 12 N holds it at a length of 25 cm. How much work does it take to stretch it from a length of 25 cm to a length of 35 cm?

Show solution✓ Checked

Work in metres. At 25 cm the spring is stretched 0.050.05 m, so Hooke’s law gives 12=k×0.0512 = k \times 0.05 and k=240k = 240 N/m. Stretching from 25 cm to 35 cm takes the stretch from 0.05 m to 0.15 m:

W=∫0.050.15240x dx=[120x2]0.050.15=120 (0.0225−0.0025)=2.4 J.\begin{aligned} W &= \int_{0.05}^{0.15} 240x\,dx \\ &= \big[120x^2\big]_{0.05}^{0.15} \\ &= 120\,(0.0225 - 0.0025) \\ &= 2.4 \text{ J}. \end{aligned}

The common wrong answer integrates over the lengths, from 0.25 to 0.35, and gets 120(0.1225−0.0625)=7.2120(0.1225 - 0.0625) = 7.2 J; but Hooke’s law is about the stretch beyond the natural length, not the length itself.

Exercise 12.4★Converge or diverge?

Decide whether each integral converges. In (a) to (d), find its value if it does; in (e) and (f), use a comparison.

  • (a) ∫1∞dxx3/2\displaystyle\int_1^\infty \frac{dx}{x^{3/2}}
  • (b) ∫01dxx3/2\displaystyle\int_0^1 \frac{dx}{x^{3/2}}
  • (c) ∫0∞e−3x dx\displaystyle\int_0^\infty e^{-3x}\,dx
  • (d) ∫04dx4−x\displaystyle\int_0^4 \frac{dx}{\sqrt{4 - x}}
  • (e) ∫1∞cos⁡2xx2 dx\displaystyle\int_1^\infty \frac{\cos^2 x}{x^2}\,dx
  • (f) ∫1∞xx3+1 dx\displaystyle\int_1^\infty \frac{x}{\sqrt{x^3 + 1}}\,dx
Show solution✓ Checked

(a) A pp-integral with p=32>1:p = \tfrac32 > 1\mathclose{\text{:}} it converges, to 13/2−1=2.\dfrac{1}{3/2 - 1} = 2\mathclose{\text{.}} Directly: ∫1tx−3/2 dx=2−2t→2.\int_1^t x^{-3/2}\,dx = 2 - \dfrac{2}{\sqrt t} \to 2\mathclose{\text{.}}

(b) Near 0 the pp-integral needs p<1,p < 1\mathclose{\text{,}} and p=32:p = \tfrac32\mathclose{\text{:}} it diverges. Directly: ∫t1x−3/2 dx=2t−2→∞\int_t^1 x^{-3/2}\,dx = \dfrac{2}{\sqrt t} - 2 \to \infty as t→0+.t \to 0^+\mathclose{\text{.}}

(c) ∫0te−3x dx=[−e−3x3]0t=1−e−3t3→13:\int_0^t e^{-3x}\,dx = \Big[-\dfrac{e^{-3x}}{3}\Big]_0^t = \dfrac{1 - e^{-3t}}{3} \to \dfrac13\mathclose{\text{:}} it converges, to 13.\tfrac13\mathclose{\text{.}}

(d) The integrand is unbounded near x=4.x = 4\mathclose{\text{.}} An antiderivative of (4−x)−1/2(4 - x)^{-1/2} is −24−x-2\sqrt{4 - x} (substitute u=4−x),u = 4 - x\mathclose{\text{),}} so for 0<t<40 < t < 4

∫0tdx4−x=4−24−t,\int_0^t \frac{dx}{\sqrt{4 - x}} = 4 - 2\sqrt{4 - t},

which approaches 4 as t→4−.t \to 4^-\mathclose{\text{.}} It converges, to 4.

(e) For every x,x\mathclose{\text{,}} 0≤cos⁡2x≤1,0 \le \cos^2 x \le 1\mathclose{\text{,}} so for x≥1x \ge 1

0≤cos⁡2xx2≤1x2.0 \le \frac{\cos^2 x}{x^2} \le \frac{1}{x^2}.

The pp-integral ∫1∞dx/x2\int_1^\infty dx/x^2 converges (p=2),p = 2\mathclose{\text{),}} so by the comparison test the integral converges, to a number at most 1. (Its value, found numerically, is about 0.327.)

(f) For large xx the integrand behaves like x/x3/2=1/x,x/x^{3/2} = 1/\sqrt x\mathclose{\text{,}} whose integral diverges, so look for a bound from below. For x≥1,x \ge 1\mathclose{\text{,}} x3≥1,x^3 \ge 1\mathclose{\text{,}} so x3+1≤2x3x^3 + 1 \le 2x^3 and x3+1≤2 x3/2.\sqrt{x^3 + 1} \le \sqrt2\,x^{3/2}\mathclose{\text{.}} Hence

xx3+1≥x2 x3/2=12 x>0.\begin{aligned} \frac{x}{\sqrt{x^3 + 1}} &\ge \frac{x}{\sqrt2\,x^{3/2}} \\ &= \frac{1}{\sqrt2\,\sqrt x} > 0. \end{aligned}

∫1tdx2 x=2(t−1)→∞,\int_1^t \frac{dx}{\sqrt2\,\sqrt x} = \sqrt2\big(\sqrt t - 1\big) \to \infty\mathclose{\text{,}} so by the comparison test (b) the integral diverges. The limit comparison test gives the same in one line, as x→∞:x \to \infty\mathclose{\text{:}}

x/x3+11/x=x3/2x3+1→1.\frac{x/\sqrt{x^3 + 1}}{1/\sqrt x} = \frac{x^{3/2}}{\sqrt{x^3 + 1}} \to 1.

The bound x/x3+1≤1/xx/\sqrt{x^3 + 1} \le 1/\sqrt x is true, but it proves nothing: it puts the integrand below a function whose integral diverges.

Exercise 12.5★★Horizontal strips

Find the area of the region enclosed by the parabola x=y2−4x = y^2 - 4 and the line x+y=2.x + y = 2\mathclose{\text{.}} Why would vertical strips make this harder?

Show solution✓ Checked

Write the line as x=2−y.x = 2 - y\mathclose{\text{.}} The curves meet where y2−4=2−y,y^2 - 4 = 2 - y\mathclose{\text{,}} that is, y2+y−6=0,y^2 + y - 6 = 0\mathclose{\text{,}} or (y+3)(y−2)=0:(y + 3)(y - 2) = 0\mathclose{\text{:}} at y=−3y = -3 and y=2,y = 2\mathclose{\text{,}} the points (5,−3)(5, -3) and (0,2).(0, 2)\mathclose{\text{.}} At y=0y = 0 the line is at x=2x = 2 and the parabola at x=−4,x = -4\mathclose{\text{,}} so the line is on the right. Right minus left is (2−y)−(y2−4)=6−y−y2,(2 - y) - (y^2 - 4) = 6 - y - y^2\mathclose{\text{,}} and

A=∫−32(6−y−y2) dy=[6y−y22−y33]−32=223−(−272)=1256≈20.83.\begin{aligned} A &= \int_{-3}^{2} \big(6 - y - y^2\big)\,dy \\ &= \Big[6y - \frac{y^2}{2} - \frac{y^3}{3}\Big]_{-3}^{2} \\ &= \frac{22}{3} - \Big(-\frac{27}{2}\Big) \\ &= \frac{125}{6} \approx 20.83. \end{aligned}

With vertical strips, the lower boundary is the lower half of the parabola, y=−x+4,y = -\sqrt{x + 4}\mathclose{\text{,}} all the way, but the upper boundary changes at x=0:x = 0\mathclose{\text{:}} for −4≤x≤0-4 \le x \le 0 it is the upper half of the parabola, y=x+4,y = \sqrt{x + 4}\mathclose{\text{,}} and for 0≤x≤50 \le x \le 5 it is the line y=2−x.y = 2 - x\mathclose{\text{.}} That means two integrals, both with square roots.

Exercise 12.6★★Two arc lengths
  • (a) Find the exact length of y=x24−ln⁡x2y = \dfrac{x^2}{4} - \dfrac{\ln x}{2} for 1≤x≤e.1 \le x \le e\mathclose{\text{.}} (Hint: 1+f′(x)21 + f'(x)^2 is a perfect square.)
  • (b) Write down the integral for the length of y=x3,y = x^3\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} and estimate it with Simpson’s rule with n=4.n = 4\mathclose{\text{.}}
Show solution✓ Checked

(a) f′(x)=x2−12x,f'(x) = \dfrac{x}{2} - \dfrac{1}{2x}\mathclose{\text{,}} so

1+f′(x)2=1+x24−12+14x2=x24+12+14x2=(x2+12x)2.\begin{aligned} 1 + f'(x)^2 &= 1 + \frac{x^2}{4} - \frac12 + \frac{1}{4x^2} \\ &= \frac{x^2}{4} + \frac12 + \frac{1}{4x^2} \\ &= \Big(\frac{x}{2} + \frac{1}{2x}\Big)^2. \end{aligned}

For x>0x > 0 the bracket is positive, so the square root is x2+12x,\dfrac{x}{2} + \dfrac{1}{2x}\mathclose{\text{,}} and

L=∫1e(x2+12x) dx=[x24+ln⁡x2]1e=e24+12−14=e2+14≈2.097.\begin{aligned} L &= \int_1^e \Big(\frac{x}{2} + \frac{1}{2x}\Big)\,dx \\ &= \Big[\frac{x^2}{4} + \frac{\ln x}{2}\Big]_1^e \\ &= \frac{e^2}{4} + \frac12 - \frac14 \\ &= \frac{e^2 + 1}{4} \approx 2.097. \end{aligned}

(b) f′(x)=3x2,f'(x) = 3x^2\mathclose{\text{,}} so L=∫011+9x4 dx.L = \int_0^1 \sqrt{1 + 9x^4}\,dx\mathclose{\text{.}} Use Simpson’s rule with n=4n = 4 and Δx=0.25.\Delta x = 0.25\mathclose{\text{.}} For g(x)=1+9x4,g(x) = \sqrt{1 + 9x^4}\mathclose{\text{,}} the values are g(0)=1,g(0) = 1\mathclose{\text{,}} g(0.25)≈1.01743,g(0.25) \approx 1.01743\mathclose{\text{,}} g(0.5)=1.25,g(0.5) = 1.25\mathclose{\text{,}} g(0.75)≈1.96154g(0.75) \approx 1.96154 and g(1)=10≈3.16228.g(1) = \sqrt{10} \approx 3.16228\mathclose{\text{.}} Simpson’s rule gives

S4=0.253[1+4(1.01743)+2(1.25)+4(1.96154)+3.16228]≈1.5482.\begin{aligned} S_4 &= \frac{0.25}{3}\big[1 + 4(1.01743) \\ &\qquad + 2(1.25) + 4(1.96154) \\ &\qquad + 3.16228\big] \approx 1.5482. \end{aligned}

A more accurate value is L≈1.5479.L \approx 1.5479\mathclose{\text{.}}

Exercise 12.7★★Pumping water

A cylindrical tank with a vertical axis has radius 1 m and height 3 m. It holds water to a depth of 2 m. How much work does it take to pump all the water out over the top of the tank? (Water has density 1000 kg/m³; take g=9.8g = 9.8 m/s².)

Show solution✓ Checked

Let yy be the height above the bottom. The layer of water between heights yy and y+Δy,y + \Delta y\mathclose{\text{,}} for 0≤y≤2,0 \le y \le 2\mathclose{\text{,}} is a disc of radius 1 m and thickness Δy:\Delta y\mathclose{\text{:}} volume π Δy\pi\,\Delta y m³, mass 1000π Δy1000\pi\,\Delta y kg, weight 9800π Δy9800\pi\,\Delta y N. It is lifted 3−y3 - y metres, to the top of the tank. So

W=∫029800π(3−y) dy=9800π[3y−y22]02=9800π(6−2)=39 200π≈1.23×105 J.\begin{aligned} W &= \int_0^2 9800\pi(3 - y)\,dy \\ &= 9800\pi\Big[3y - \frac{y^2}{2}\Big]_0^2 \\ &= 9800\pi(6 - 2) = 39\,200\pi \\ &\approx 1.23 \times 10^5 \text{ J}. \end{aligned}

A check with the centre of mass: the water has mass 2000π2000\pi kg, and its centre of mass is 1 m above the bottom. Every layer ends up at the top, 3 m up, so on average the water rises 2 m, and 2000π×9.8×2=39 200π2000\pi \times 9.8 \times 2 = 39\,200\pi J. Two slips to avoid: the distance is 3−y,3 - y\mathclose{\text{,}} to the top of the tank, not 2−y,2 - y\mathclose{\text{,}} to the surface of the water; and the limits are 0 and 2, where the water is, not 0 and 3.

Exercise 12.8★★A centroid

Find the centroid of the region between y=xy = x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} and check that it lies inside the region.

Show solution✓ Checked

For 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} x≥x2,x \ge x^2\mathclose{\text{,}} so f(x)=xf(x) = x and g(x)=x2.g(x) = x^2\mathclose{\text{.}} The area is A=∫01(x−x2) dx=12−13=16.A = \int_0^1 (x - x^2)\,dx = \tfrac12 - \tfrac13 = \tfrac16\mathclose{\text{.}} Then

xˉ=6∫01x(x−x2) dx=6(13−14)=12,yˉ=6∫0112(x2−x4) dx=3(13−15)=25.\begin{aligned} \bar x &= 6\int_0^1 x\big(x - x^2\big)\,dx \\ &= 6\Big(\frac13 - \frac14\Big) = \frac12, \\ \bar y &= 6\int_0^1 \frac12\big(x^2 - x^4\big)\,dx \\ &= 3\Big(\frac13 - \frac15\Big) = \frac25. \end{aligned}

The centroid is (12,25).\big(\tfrac12, \tfrac25\big)\mathclose{\text{.}} At x=12x = \tfrac12 the region runs from y=14y = \tfrac14 to y=12,y = \tfrac12\mathclose{\text{,}} and 25=0.4\tfrac25 = 0.4 lies between them, so the centroid is inside the region.

Exercise 12.9★★How long does a component last?

The lifetime, in hours, of a type of electronic component has the exponential density with mean 2000 hours (hypothetical figures).

  • (a) Find λ,\lambda\mathclose{\text{,}} and the probability that a component lasts more than 3000 hours.
  • (b) A component has already worked for 1000 hours. Find the probability that it lasts at least another 3000 hours.
  • (c) Find the median lifetime.
Show solution✓ Checked

(a) The mean is 1/λ=2000,1/\lambda = 2000\mathclose{\text{,}} so λ=12000\lambda = \tfrac{1}{2000} per hour, and P(X>3000)=e−3000/2000=e−1.5≈0.223.P(X > 3000) = e^{-3000/2000} = e^{-1.5} \approx 0.223\mathclose{\text{.}}

(b) By the memoryless property (Theorem 12.5) with s=1000s = 1000 and t=3000,t = 3000\mathclose{\text{,}}

P(X>4000∣X>1000)=P(X>3000)≈0.223.\begin{aligned} &P(X > 4000 \mid X > 1000) \\ &\qquad= P(X > 3000) \approx 0.223. \end{aligned}

Directly: P(X>4000)P(X>1000)=e−2e−0.5=e−1.5.\dfrac{P(X > 4000)}{P(X > 1000)} = \dfrac{e^{-2}}{e^{-0.5}} = e^{-1.5}\mathclose{\text{.}} The component’s past 1000 hours make no difference.

(c) 1−e−m/2000=121 - e^{-m/2000} = \tfrac12 gives e−m/2000=12,e^{-m/2000} = \tfrac12\mathclose{\text{,}} so m=2000ln⁡2≈1386m = 2000\ln 2 \approx 1386 hours, well below the mean.

Exercise 12.10★★★Volumes from centroids
  • (a) A region between y=g(x)y = g(x) and y=f(x),y = f(x)\mathclose{\text{,}} a≤x≤b,a \le x \le b\mathclose{\text{,}} with 0≤g(x)≤f(x),0 \le g(x) \le f(x)\mathclose{\text{,}} rotates about the xx-axis. Show that the volume of the solid is V=2πyˉA,V = 2\pi\bar yA\mathclose{\text{,}} where AA is the area of the region and yˉ\bar y the height of its centroid: the area times the distance the centroid travels.
  • (b) Check (a) for the region of Exercise 12.8.
  • (c) A torus, the shape of a ring doughnut, is swept out when a disc of radius aa rotates about a line in its plane at distance R>aR > a from its centre. Find its volume with (a), and check the result with washers.
Show solution✓ Checked

(a) By washers, with outer radius f(x)f(x) and inner radius g(x),g(x)\mathclose{\text{,}} V=π∫ab(f(x)2−g(x)2) dx.V = \pi\int_a^b \big(f(x)^2 - g(x)^2\big)\,dx\mathclose{\text{.}} By the definition of the centroid (Definition 12.6),

yˉA=∫ab12(f(x)2−g(x)2) dx=V2π,\begin{aligned} \bar yA &= \int_a^b \frac12\big(f(x)^2 - g(x)^2\big)\,dx \\ &= \frac{V}{2\pi}, \end{aligned}

so V=2πyˉA.V = 2\pi\bar yA\mathclose{\text{.}} The centroid travels round a circle of radius yˉ,\bar y\mathclose{\text{,}} of length 2πyˉ.2\pi\bar y\mathclose{\text{.}}

(b) A=16A = \tfrac16 and yˉ=25,\bar y = \tfrac25\mathclose{\text{,}} so 2πyˉA=2π⋅25⋅16=2π15.2\pi\bar yA = 2\pi \cdot \tfrac25 \cdot \tfrac16 = \tfrac{2\pi}{15}\mathclose{\text{.}} By washers, π∫01(x2−x4) dx=π(13−15)=2π15.\pi\int_0^1 \big(x^2 - x^4\big)\,dx = \pi\big(\tfrac13 - \tfrac15\big) = \tfrac{2\pi}{15}\mathclose{\text{.}}

(c) Put the axis along the xx-axis and the centre of the disc at (0,R).(0, R)\mathclose{\text{.}} The disc is symmetric about its centre, so its centroid is the centre, yˉ=R,\bar y = R\mathclose{\text{,}} and A=πa2.A = \pi a^2\mathclose{\text{.}} So

V=2πR⋅πa2=2π2Ra2.V = 2\pi R \cdot \pi a^2 = 2\pi^2Ra^2.

With washers: the disc is x2+(y−R)2≤a2,x^2 + (y - R)^2 \le a^2\mathclose{\text{,}} so at xx it runs from y=R−a2−x2y = R - \sqrt{a^2 - x^2} to y=R+a2−x2,y = R + \sqrt{a^2 - x^2}\mathclose{\text{,}} and both are at least R−a>0.R - a > 0\mathclose{\text{.}} The difference of the squared radii is (R+a2−x2)2−(R−a2−x2)2=4Ra2−x2,\big(R + \sqrt{a^2 - x^2}\big)^2 - \big(R - \sqrt{a^2 - x^2}\big)^2 = 4R\sqrt{a^2 - x^2}\mathclose{\text{,}} so

V=π∫−aa4Ra2−x2 dx=4πR⋅πa22=2π2Ra2,\begin{aligned} V &= \pi\int_{-a}^{a} 4R\sqrt{a^2 - x^2}\,dx \\ &= 4\pi R \cdot \frac{\pi a^2}{2} = 2\pi^2Ra^2, \end{aligned}

because ∫−aaa2−x2 dx\int_{-a}^{a} \sqrt{a^2 - x^2}\,dx is the area of a half disc of radius a.a\mathclose{\text{.}}

Exercise 12.11★★★Shells and washers agree

Let ff be strictly decreasing on [0,b],[0, b]\mathclose{\text{,}} with f′f' continuous, f(0)=hf(0) = h and f(b)=0,f(b) = 0\mathclose{\text{,}} and let gg be its inverse function (Module 1). The region under y=f(x),y = f(x)\mathclose{\text{,}} 0≤x≤b,0 \le x \le b\mathclose{\text{,}} rotates about the yy-axis.

  • (a) Explain why slicing perpendicular to the axis gives V=π∫0hg(y)2 dy.V = \pi\int_0^h g(y)^2\,dy\mathclose{\text{.}}
  • (b) Substitute y=f(x),y = f(x)\mathclose{\text{,}} then integrate by parts, to show that this equals 2π∫0bx f(x) dx,2\pi\int_0^b x\,f(x)\,dx\mathclose{\text{,}} the shell formula.
  • (c) Check both formulas with f(x)=1−x2f(x) = 1 - x^2 on [0,1].[0, 1]\mathclose{\text{.}}
Show solution✓ Checked

(a) Slice at height y,y\mathclose{\text{,}} 0≤y≤h.0 \le y \le h\mathclose{\text{.}} Since ff is strictly decreasing, f(x)≥yf(x) \ge y exactly when x≤g(y),x \le g(y)\mathclose{\text{,}} so the region at height yy is the segment 0≤x≤g(y).0 \le x \le g(y)\mathclose{\text{.}} Rotating about the yy-axis, it sweeps out a disc of radius g(y),g(y)\mathclose{\text{,}} of area πg(y)2,\pi g(y)^2\mathclose{\text{,}} so V=π∫0hg(y)2 dy.V = \pi\int_0^h g(y)^2\,dy\mathclose{\text{.}}

(b) Substitute y=f(x),y = f(x)\mathclose{\text{,}} dy=f′(x) dxdy = f'(x)\,dx (Module 10). When x=0,x = 0\mathclose{\text{,}} y=h;y = h\mathclose{\text{;}} when x=b,x = b\mathclose{\text{,}} y=0;y = 0\mathclose{\text{;}} and g(y)=g(f(x))=x.g(y) = g\big(f(x)\big) = x\mathclose{\text{.}} So

π∫0hg(y)2 dy=−π∫h0g(y)2 dy=−π∫0bx2f′(x) dx.\begin{aligned} &\pi\int_0^h g(y)^2\,dy \\ &\quad= -\pi\int_h^0 g(y)^2\,dy \\ &\quad= -\pi\int_0^b x^2f'(x)\,dx. \end{aligned}

Integrate by parts (Module 11) with u=x2u = x^2 and dv=f′(x) dx,dv = f'(x)\,dx\mathclose{\text{,}} so du=2x dxdu = 2x\,dx and v=f(x):v = f(x)\mathclose{\text{:}}

∫0bx2f′(x) dx=[x2f(x)]0b−∫0b2x f(x) dx=−2∫0bx f(x) dx,\begin{aligned} &\int_0^b x^2f'(x)\,dx \\ &\quad= \big[x^2f(x)\big]_0^b - \int_0^b 2x\,f(x)\,dx \\ &\quad= -2\int_0^b x\,f(x)\,dx, \end{aligned}

because b2f(b)=0b^2f(b) = 0 and 02f(0)=0.0^2f(0) = 0\mathclose{\text{.}} Therefore π∫0hg(y)2 dy=2π∫0bx f(x) dx.\pi\int_0^h g(y)^2\,dy = 2\pi\int_0^b x\,f(x)\,dx\mathclose{\text{.}}

(c) Here h=1h = 1 and g(y)=1−y.g(y) = \sqrt{1 - y}\mathclose{\text{.}} Slicing: π∫01(1−y) dy=π2.\pi\int_0^1 (1 - y)\,dy = \tfrac{\pi}{2}\mathclose{\text{.}} Shells: 2π∫01x(1−x2) dx=2π(12−14)=π2.2\pi\int_0^1 x\big(1 - x^2\big)\,dx = 2\pi\big(\tfrac12 - \tfrac14\big) = \tfrac{\pi}{2}\mathclose{\text{.}}

Exercise 12.12★★★The spread of the normal distribution

Let φ(z)=12πe−z2/2.\varphi(z) = \dfrac{1}{\sqrt{2\pi}}e^{-z^2/2}\mathclose{\text{.}}

  • (a) Show that φ′′(z)=(z2−1)φ(z),\varphi''(z) = (z^2 - 1)\varphi(z)\mathclose{\text{,}} and deduce that the graph of φ\varphi changes concavity (Module 8) at z=±1.z = \pm1\mathclose{\text{.}} Where are the points of inflection of the normal density with mean μ\mu and standard deviation σ?\sigma\mathclose{\text{?}}
  • (b) Integrate by parts, with u=zu = z and dv=zφ(z) dz,dv = z\varphi(z)\,dz\mathclose{\text{,}} to show that ∫−∞∞z2φ(z) dz=1.\int_{-\infty}^{\infty} z^2\varphi(z)\,dz = 1\mathclose{\text{.}} You may use the Gaussian integral.
  • (c) Deduce that, for the normal density ff with mean μ\mu and standard deviation σ,\sigma\mathclose{\text{,}} ∫−∞∞(x−μ)2f(x) dx=σ2.\int_{-\infty}^{\infty} (x - \mu)^2f(x)\,dx = \sigma^2\mathclose{\text{.}} (This mean squared distance from the mean is called the variance.)
Show solution✓ Checked

(a) By the chain rule, φ′(z)=−zφ(z).\varphi'(z) = -z\varphi(z)\mathclose{\text{.}} By the product rule,

φ′′(z)=−φ(z)−zφ′(z)=−φ(z)+z2φ(z)=(z2−1)φ(z).\begin{aligned} \varphi''(z) &= -\varphi(z) - z\varphi'(z) \\ &= -\varphi(z) + z^2\varphi(z) \\ &= \big(z^2 - 1\big)\varphi(z). \end{aligned}

Since φ(z)>0,\varphi(z) > 0\mathclose{\text{,}} φ′′\varphi'' has the sign of z2−1:z^2 - 1\mathclose{\text{:}} negative for ∣z∣<1\abs{z} < 1 (concave down) and positive for ∣z∣>1\abs{z} > 1 (concave up). So the concavity changes at z=±1,z = \pm1\mathclose{\text{,}} the points of inflection. The normal density is f(x)=1σφ(x−μσ),f(x) = \tfrac1\sigma\varphi\big(\tfrac{x - \mu}{\sigma}\big)\mathclose{\text{,}} so by the chain rule f′′(x)=1σ3φ′′(x−μσ),f''(x) = \tfrac{1}{\sigma^3}\varphi''\big(\tfrac{x - \mu}{\sigma}\big)\mathclose{\text{,}} which changes sign where x−μσ=±1:\tfrac{x - \mu}{\sigma} = \pm1\mathclose{\text{:}} at x=μ±σ.x = \mu \pm \sigma\mathclose{\text{.}}

(b) With u=zu = z and dv=zφ(z) dz,dv = z\varphi(z)\,dz\mathclose{\text{,}} du=dzdu = dz and v=−φ(z)v = -\varphi(z) (by (a), φ′=−zφ).\varphi' = -z\varphi\mathclose{\text{).}} For t>0,t > 0\mathclose{\text{,}}

∫0tz2φ(z) dz=[−zφ(z)]0t+∫0tφ(z) dz=−tφ(t)+∫0tφ(z) dz.\begin{aligned} &\int_0^t z^2\varphi(z)\,dz \\ &\quad= \big[-z\varphi(z)\big]_0^t + \int_0^t \varphi(z)\,dz \\ &\quad= -t\varphi(t) + \int_0^t \varphi(z)\,dz. \end{aligned}

As t→∞,t \to \infty\mathclose{\text{,}} tφ(t)→0:t\varphi(t) \to 0\mathclose{\text{:}} for t≥2,t \ge 2\mathclose{\text{,}} t2/2≥t,t^2/2 \ge t\mathclose{\text{,}} so 0<te−t2/2≤te−t,0 < te^{-t^2/2} \le te^{-t}\mathclose{\text{,}} which approaches 0 (Theorem 7.7). And ∫0tφ→12,\int_0^t \varphi \to \tfrac12\mathclose{\text{,}} half the total area 1, since φ\varphi is even. So ∫0∞z2φ(z) dz=12,\int_0^\infty z^2\varphi(z)\,dz = \tfrac12\mathclose{\text{,}} and since z2φ(z)z^2\varphi(z) is even, ∫−∞∞z2φ(z) dz=1.\int_{-\infty}^{\infty} z^2\varphi(z)\,dz = 1\mathclose{\text{.}}

(c) Substitute z=(x−μ)/σ,z = (x - \mu)/\sigma\mathclose{\text{,}} so x−μ=σzx - \mu = \sigma z and dx=σ dz:dx = \sigma\,dz\mathclose{\text{:}}

∫−∞∞(x−μ)2 1σφ(x−μσ) dx=∫−∞∞σ2z2φ(z) dz=σ2.\begin{aligned} &\int_{-\infty}^{\infty} (x - \mu)^2\,\frac1\sigma\varphi\Big(\frac{x - \mu}{\sigma}\Big)\,dx \\ &\qquad= \int_{-\infty}^{\infty} \sigma^2z^2\varphi(z)\,dz = \sigma^2. \end{aligned}
12

Check yourself

1
The area of the region between y=xy = x and y=x2y = x^2 for 0≤x≤10 \le x \le 1 is
2
The region between y=x2y = x^2 and y=2,y = 2\mathclose{\text{,}} for 0≤x≤2,0 \le x \le \sqrt2\mathclose{\text{,}} rotates about the xx-axis. Its volume is
3
The region between y=xy = x and y=x2,y = x^2\mathclose{\text{,}} 0≤x≤1,0 \le x \le 1\mathclose{\text{,}} rotates about the line x=2.x = 2\mathclose{\text{.}} By shells, its volume is
4
Which integral is the length of the curve y=x3y = x^3 from x=0x = 0 to x=1?x = 1\mathclose{\text{?}}
5
A chain 10 m long, with a mass of 2 kg per metre, hangs from a winch. How much work does it take to wind it all up? (Take g=9.8g = 9.8 m/s².)
6
Which of these improper integrals converges?
7
Calls to a help desk arrive at random, and the waiting time in minutes for the next call has the exponential density with λ=0.1\lambda = 0.1 (a mean of 10 minutes). You have already waited 5 minutes. The probability that you wait more than 10 further minutes is
8
A quantity XX is normally distributed with mean 50 and standard deviation 10. P(X≤70)P(X \le 70) is about
Finished this module?