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

Module 9Area and the definite integral

Find areas and distances by adding up thin rectangles, and make the idea exact. You will compute Riemann sums by hand and by computer, find areas exactly as limits of sums, define the definite integral, and evaluate and estimate integrals with their properties, with geometry and with symmetry.

⏱ 270 minYou need: Modules 1 to 8, in particular limits (Module 2), continuity and the Extreme Value Theorem (Module 3) and velocity (Module 4)

In this module you will

  • Write sums in sigma notation, and prove and use the formulas for 1+2+⋯+n1 + 2 + \dots + n and for the sums of the squares and of the cubes of 1,2,…,n1, 2, \dots, n
  • Compute left, right and midpoint Riemann sums, and estimate a distance from speed readings
  • Define the definite integral, and find integrals exactly as limits of Riemann sums
  • Interpret an integral as a signed area, and evaluate integrals with geometry and symmetry
  • Use the properties of the integral to combine, compare and bound integrals
  • Find the average value of a function, and use the Mean Value Theorem for integrals
1

Areas and distances

Module 1 posed two problems (Section 1.1). The tangent problem asked for the slope of a curve at a point, and Part II solved it with the derivative. The area problem asked for the area under a curve, and Figure 1.1 suggested a way in: fill the region with thin rectangles, add up their areas, and see what number the totals approach as the rectangles get thinner. This module carries out that plan. Its answer is the definite integral, the second great idea of calculus.

The area problem

You know the area of a rectangle (width times height) and of a triangle (half the base times the height), and every polygon can be cut into triangles. A region with a curved side is different: no cutting turns it into triangles. Take the simplest example, the region under the parabola y=x2y = x^2 from x=0x = 0 to x=1,x = 1\mathclose{\text{,}} enclosed by the curve, the xx-axis and the line x=1.x = 1\mathclose{\text{.}} Call its area A.A\mathclose{\text{.}}

You cannot compute AA yet, but you can trap it. The idea is old: Archimedes, in the 3rd century BC, found areas with the method of exhaustion, filling a region more and more completely with simpler shapes, an ancestor of the sums in this module. Cut [0,1][0, 1] into four strips of width 14.\tfrac14\mathclose{\text{.}} The curve rises across each strip, so a rectangle as tall as the curve at the strip’s left end fits under the curve, and a rectangle as tall as the curve at its right end covers the strip’s part of the region (Figure 9.1, left).

Example 9.1Trapping an area between two sums✓ Checked

Find a lower and an upper estimate of the area AA under y=x2y = x^2 from 0 to 1, with four strips.

The strips are [0,14],\big[0, \tfrac14\big]\mathclose{\text{,}} [14,12],\big[\tfrac14, \tfrac12\big]\mathclose{\text{,}} [12,34]\big[\tfrac12, \tfrac34\big] and [34,1],\big[\tfrac34, 1\big]\mathclose{\text{,}} each of width 14.\tfrac14\mathclose{\text{.}} At their left ends the curve has the heights 02,0^2\mathclose{\text{,}} (14)2,\big(\tfrac14\big)^2\mathclose{\text{,}} (12)2\big(\tfrac12\big)^2 and (34)2,\big(\tfrac34\big)^2\mathclose{\text{,}} that is, 0,0\mathclose{\text{,}} 116,\tfrac{1}{16}\mathclose{\text{,}} 416\tfrac{4}{16} and 916.\tfrac{9}{16}\mathclose{\text{.}} So the rectangles under the curve have the total area

14(0+116+416+916)=1464=0.21875.\begin{aligned} &\frac14\Big(0 + \frac{1}{16} + \frac{4}{16} + \frac{9}{16}\Big) \\ &\quad= \frac{14}{64} = 0.21875. \end{aligned}

At the right ends the heights are 116,\tfrac{1}{16}\mathclose{\text{,}} 416,\tfrac{4}{16}\mathclose{\text{,}} 916\tfrac{9}{16} and 1,1\mathclose{\text{,}} so the covering rectangles have the total area

14(116+416+916+1616)=3064=0.46875.\begin{aligned} &\frac14\Big(\frac{1}{16} + \frac{4}{16} + \frac{9}{16} + \frac{16}{16}\Big) \\ &\quad= \frac{30}{64} = 0.46875. \end{aligned}

The region contains the first four rectangles and lies inside the second four, so

0.21875<A<0.46875.0.21875 < A < 0.46875.

The two totals differ by 0.25.0.25\mathclose{\text{.}} Each height except the first and the last appears in both totals, so the difference is 14(1−0):\tfrac14\big(1 - 0\big)\mathclose{\text{:}} the strip width times the difference between the heights at the two ends of [0,1].[0, 1]\mathclose{\text{.}}

Four strips leave a wide gap, but thinner strips close it. With 100 strips the two totals are 0.32835 and 0.33835 (Section 9.3 computes them), and the gap is only 1100.\tfrac{1}{100}\mathclose{\text{.}} They close in on 13,\tfrac13\mathclose{\text{,}} and Section 9.3 proves that A=13.A = \tfrac13\mathclose{\text{.}}

The distance problem

A car that drives at a constant 20 m/s for 10 seconds covers 20×10=20020 \times 10 = 200 metres. On a graph of speed against time, the speed is a horizontal line at height 20, and the distance is the area of the rectangle under it: width 10 seconds, height 20 metres per second. The units multiply as well, seconds times metres per second giving metres.

When the speed changes, the area under the speed graph is still the distance. The falling ball of Module 1 has the speed v(t)=9.8tv(t) = 9.8t m/s after tt seconds (Section 4.1). Its speed graph is a straight line through the origin, so the region under it from time 0 to time tt is a triangle with base tt and height 9.8t,9.8t\mathclose{\text{,}} of area

12⋅t⋅9.8t=4.9t2.\frac12 \cdot t \cdot 9.8t = 4.9t^2.

That is exactly the distance s(t)=4.9t2s(t) = 4.9t^2 that the ball has fallen (Section 1.3). This is no coincidence: Section 9.4 explains why, and Module 10 proves it.

Usually there is no formula for the speed, only readings.

Example 9.2Distance from a speedometer✓ Checked

Suppose a passenger reads a car’s speedometer every 2 seconds as the car speeds up from rest, and converts the readings to metres per second. The numbers are made up:

Time tt (s) Speed vv (m/s)
0 0
2 6
4 11
6 15
8 18
10 20

Estimate the distance the car covers in these 10 seconds.

The car speeds up throughout, so during each 2-second interval its speed lies between the reading at the start of the interval and the reading at the end. At speeds between mm and MM for Δt\Delta t seconds, a car covers between m Δtm\,\Delta t and M ΔtM\,\Delta t metres. (The Mean Value Theorem of Module 8 makes this precise: the distance covered from t1t_1 to t2t_2 is v(c)(t2−t1)v(c)(t_2 - t_1) for some time cc in between.) Adding up over the five intervals, the distance is at least

2(0+6+11+15+18)=2×50=100 m\begin{aligned} &2(0 + 6 + 11 + 15 + 18) \\ &\quad= 2 \times 50 = 100 \text{ m} \end{aligned}

and at most

2(6+11+15+18+20)=2×70=140 m.\begin{aligned} &2(6 + 11 + 15 + 18 + 20) \\ &\quad= 2 \times 70 = 140 \text{ m}. \end{aligned}

So the car covers between 100 and 140 metres. The average of the two, 120 m, is a reasonable single estimate; Module 11 studies it under the name of the trapezoidal rule.

The two estimates differ by 40 m. The readings at 2, 4, 6 and 8 seconds appear in both sums, so the difference is 2×(20−0):2 \times (20 - 0)\mathclose{\text{:}} the time step times the change in speed from the first reading to the last. Reading the speedometer every second would halve the gap, to 20 m.

The two problems are one. Left: the area under y = x^2 from 0 to 1 lies between the total of the blue rectangles, 0.21875, and the total of the orange ones, 0.46875 (Example 9.1). Right: the speed readings of Example 9.2 (dots); the distance covered lies between the blue total, 100 m, and the orange total, 140 m.
Figure 9.1

The two problems are one. Left: the area under y=x2y = x^2 from 0 to 1 lies between the total of the blue rectangles, 0.21875, and the total of the orange ones, 0.46875 (Example 9.1). Right: the speed readings of Example 9.2 (dots); the distance covered lies between the blue total, 100 m, and the orange total, 140 m.

Key idea

The area problem and the distance problem are the same problem. Cut the interval into short pieces; on each piece, replace the changing height (or speed) by a constant one; add up the areas of the rectangles, height times width (or speed times time); then let the pieces shrink. The totals approach the exact answer. The rest of this module turns these steps into a definition, the definite integral, and into ways to compute it.

Watch out

The readings at the left ends give the lower estimate only because the speed increases. For a car that slows down, they give the upper estimate (Exercise 9.3). For a speed that rises and then falls, neither sum need be a lower or an upper estimate (Exercise 9.9).

2

Sigma notation

The sums of Section 9.1 had four or five terms. Thinner strips give longer sums, of a thousand terms, or of nn terms for an unknown n.n\mathclose{\text{.}} They need a compact notation.

Definition 9.1Sigma notation

For whole numbers m≤nm \le n and numbers am,am+1,…,an,a_m, a_{m+1}, \dots, a_n\mathclose{\text{,}}

∑i=mnai=am+am+1+⋯+an.\sum_{i=m}^{n} a_i = a_m + a_{m+1} + \dots + a_n.

The symbol ∑\sum is the Greek capital sigma, for “sum”, and the left side reads “the sum of aia_i for ii from mm to nn”. The letter ii is the index of summation, and mm and nn are the lower and upper limits of the sum.

The index runs through the whole numbers m,m+1,…,n,m, m + 1, \dots, n\mathclose{\text{,}} and each value gives one term, so there are n−m+1n - m + 1 terms. (The word “limit” here means an end of the range, not a limit in the sense of Module 2.) For example,

∑i=15i2=1+4+9+16+25=55,∑k=032k=1+2+4+8=15,∑i=141i=1+12+13+14=2512.\begin{aligned} \sum_{i=1}^{5} i^2 &= 1 + 4 + 9 + 16 + 25 = 55, \\[5pt] \sum_{k=0}^{3} 2^k &= 1 + 2 + 4 + 8 = 15, \\[5pt] \sum_{i=1}^{4} \frac{1}{i} &= 1 + \frac12 + \frac13 + \frac14 = \frac{25}{12}. \end{aligned}

The index is a dummy variable: its name does not matter, so ∑i=15i2\sum_{i=1}^{5} i^2 and ∑k=15k2\sum_{k=1}^{5} k^2 are the same number, 55, and neither depends on ii or k.k\mathclose{\text{.}} To go the other way, from a sum to sigma notation, find a formula for the term with index i.i\mathclose{\text{.}} The odd numbers 1,3,5,…1, 3, 5, \dots are 2i−12i - 1 for i=1,2,3,…,i = 1, 2, 3, \dots\mathclose{\text{,}} and 2i−1=992i - 1 = 99 at i=50,i = 50\mathclose{\text{,}} so

1+3+5+⋯+99=∑i=150(2i−1).1 + 3 + 5 + \dots + 99 = \sum_{i=1}^{50} (2i - 1).

If viv_i is the speed reading of Example 9.2 at time t=2i,t = 2i\mathclose{\text{,}} the two estimates there are ∑i=042vi=100\sum_{i=0}^{4} 2v_i = 100 and ∑i=152vi=140.\sum_{i=1}^{5} 2v_i = 140\mathclose{\text{.}}

Theorem 9.1Rules for sums

For numbers aia_i and bi,b_i\mathclose{\text{,}} a constant cc and whole numbers m≤nm \le n (with n≥1n \ge 1 in the third rule),

∑i=mnc ai=c∑i=mnai,∑i=mn(ai+bi)=∑i=mnai+∑i=mnbi,∑i=1nc=nc.\begin{aligned} \sum_{i=m}^{n} c\,a_i &= c\sum_{i=m}^{n} a_i, \\[5pt] \sum_{i=m}^{n} \big(a_i + b_i\big) &= \sum_{i=m}^{n} a_i + \sum_{i=m}^{n} b_i, \\[5pt] \sum_{i=1}^{n} c &= nc. \end{aligned}

The second rule also holds with −- in place of +.+\mathclose{\text{.}}

Proof

Write the sums out. The first rule is the distributive law: cam+⋯+can=c(am+⋯+an).ca_m + \dots + ca_n = c(a_m + \dots + a_n)\mathclose{\text{.}} The second regroups the terms, which addition allows: (am+bm)+⋯+(an+bn)=(am+⋯+an)+(bm+⋯+bn).(a_m + b_m) + \dots + (a_n + b_n) = (a_m + \dots + a_n) + (b_m + \dots + b_n)\mathclose{\text{.}} In the third, the term cc does not depend on i,i\mathclose{\text{,}} so the sum is c+c+⋯+cc + c + \dots + c with nn terms, which is nc.nc\mathclose{\text{.}} The rule with −- follows from the first two, with c=−1.c = -1\mathclose{\text{.}}

∎
Watch out

Sums do not multiply term by term: ∑aibi\sum a_i b_i is not (∑ai)(∑bi).\big(\sum a_i\big)\big(\sum b_i\big)\mathclose{\text{.}} With ai=bi=ia_i = b_i = i and n=2,n = 2\mathclose{\text{,}} ∑i=12i⋅i=1+4=5,\sum_{i=1}^{2} i \cdot i = 1 + 4 = 5\mathclose{\text{,}} while (1+2)(1+2)=9.(1 + 2)(1 + 2) = 9\mathclose{\text{.}} Nor do sums divide term by term, or go under square roots. And a constant summed nn times is nc,nc\mathclose{\text{,}} not c:c\mathclose{\text{:}} ∑i=1103=30.\sum_{i=1}^{10} 3 = 30\mathclose{\text{.}}

Sums of powers

The Riemann sums of x,x\mathclose{\text{,}} x2x^2 and x3x^3 (Sections 9.3 and 9.4, and Exercise 9.5) lead to the sum of the whole numbers from 1 to n,n\mathclose{\text{,}} and to the sums of their squares and of their cubes. Each has a closed form.

Theorem 9.2Sums of powers

For every whole number n≥1,n \ge 1\mathclose{\text{,}} the sums of the whole numbers from 1 to n,n\mathclose{\text{,}} of their squares and of their cubes are

∑i=1ni=n(n+1)2,∑i=1ni2=n(n+1)(2n+1)6,∑i=1ni3=(n(n+1)2)2.\begin{aligned} \sum_{i=1}^{n} i &= \frac{n(n + 1)}{2}, \\[5pt] \sum_{i=1}^{n} i^2 &= \frac{n(n + 1)(2n + 1)}{6}, \\[5pt] \sum_{i=1}^{n} i^3 &= \left(\frac{n(n + 1)}{2}\right)^2. \end{aligned}

The three proofs below use three different ideas, each worth knowing.

Proof of the sum of the whole numbers from 1 to nn

This is the pairing argument usually named after Gauss. Write the sum S=1+2+⋯+nS = 1 + 2 + \dots + n forwards and backwards, and add the two lines column by column:

S=1+2+⋯+n,S=n+(n−1)+⋯+1,2S=(n+1)+⋯+(n+1).\begin{aligned} S &= 1 + 2 + \dots + n, \\ S &= n + (n - 1) + \dots + 1, \\ 2S &= (n + 1) + \dots + (n + 1). \end{aligned}

In each column the two numbers add up to n+1,n + 1\mathclose{\text{,}} because as one goes up by 1 the other goes down by 1; and there are nn columns. So 2S=n(n+1),2S = n(n + 1)\mathclose{\text{,}} and S=n(n+1)2.S = \dfrac{n(n + 1)}{2}\mathclose{\text{.}}

∎
Proof of the sum of the squares

Expanding (i+1)3=i3+3i2+3i+1(i + 1)^3 = i^3 + 3i^2 + 3i + 1 gives, for every i,i\mathclose{\text{,}}

(i+1)3−i3=3i2+3i+1.(i + 1)^3 - i^3 = 3i^2 + 3i + 1.

Add these equations for i=1,2,…,n.i = 1, 2, \dots, n\mathclose{\text{.}} On the left almost everything cancels:

∑i=1n[(i+1)3−i3]=(23−13)+(33−23)+…+((n+1)3−n3)=(n+1)3−1,\begin{aligned} &\sum_{i=1}^{n}\big[(i + 1)^3 - i^3\big] \\[5pt] &\quad= (2^3 - 1^3) + (3^3 - 2^3) + \dots \\[5pt] &\qquad + \big((n + 1)^3 - n^3\big) \\[5pt] &\quad= (n + 1)^3 - 1, \end{aligned}

because every cube except (n+1)3(n + 1)^3 and 131^3 appears once with a plus sign and once with a minus sign. A sum that collapses like this, like a folding telescope, is called telescoping. On the right, with S=∑i=1ni2,S = \sum_{i=1}^{n} i^2\mathclose{\text{,}} the rules for sums and the first formula give

∑i=1n(3i2+3i+1)=3S+3n(n+1)2+n.\begin{aligned} &\sum_{i=1}^{n}\big(3i^2 + 3i + 1\big) \\[5pt] &\quad= 3S + \frac{3n(n + 1)}{2} + n. \end{aligned}

So 3S=(n+1)3−1−n−3n(n+1)2.3S = (n + 1)^3 - 1 - n - \tfrac{3n(n + 1)}{2}\mathclose{\text{.}} Since −1−n=−(n+1),-1 - n = -(n + 1)\mathclose{\text{,}} every term on the right contains the factor n+1;n + 1\mathclose{\text{;}} take it out and simplify:

3S=(n+1)[(n+1)2−1−3n2]=(n+1)(n2+n2)=n(n+1)(2n+1)2.\begin{aligned} 3S &= (n + 1)\Big[(n + 1)^2 - 1 - \frac{3n}{2}\Big] \\ &= (n + 1)\Big(n^2 + \frac{n}{2}\Big) \\ &= \frac{n(n + 1)(2n + 1)}{2}. \end{aligned}

Dividing by 3 gives the second formula.

∎

The third proof uses mathematical induction, the method that Exercise 5.10 used to prove the power rule. It proves a statement P(n)P(n) for every whole number n≥1n \ge 1 in two steps:

  • the base case: P(1)P(1) is true;
  • the inductive step: for every k≥1,k \ge 1\mathclose{\text{,}} if P(k)P(k) is true, then P(k+1)P(k + 1) is true.

Then P(1)P(1) is true; so is P(2),P(2)\mathclose{\text{,}} by the inductive step with k=1;k = 1\mathclose{\text{;}} so is P(3),P(3)\mathclose{\text{,}} with k=2;k = 2\mathclose{\text{;}} and so on, like a row of dominoes in which each one knocks over the next.

Proof of the sum of the cubes

Let P(n)P(n) be the statement ∑i=1ni3=n2(n+1)24.\sum_{i=1}^{n} i^3 = \dfrac{n^2(n + 1)^2}{4}\mathclose{\text{.}} For the base case, both sides are 1 when n=1.n = 1\mathclose{\text{.}} For the inductive step, suppose that P(k)P(k) is true for some k≥1.k \ge 1\mathclose{\text{.}} The sum up to k+1k + 1 is the sum up to kk plus one more term, so, taking out the common factor (k+1)2,(k + 1)^2\mathclose{\text{,}}

∑i=1k+1i3=k2(k+1)24+(k+1)3=(k+1)2(k2+4k+4)4=(k+1)2(k+2)24.\begin{aligned} \sum_{i=1}^{k+1} i^3 &= \frac{k^2(k + 1)^2}{4} + (k + 1)^3 \\[5pt] &= \frac{(k + 1)^2\big(k^2 + 4k + 4\big)}{4} \\[5pt] &= \frac{(k + 1)^2(k + 2)^2}{4}. \end{aligned}

That is P(k+1):P(k + 1)\mathclose{\text{:}} the formula with k+1k + 1 in place of n.n\mathclose{\text{.}} By induction, P(n)P(n) is true for every n≥1.{n \ge 1}\mathclose{\text{.}}

∎

The third formula says that 13+23+⋯+n3=(1+2+⋯+n)2:1^3 + 2^3 + \dots + n^3 = (1 + 2 + \dots + n)^2\mathclose{\text{:}} the sum of the cubes is the square of the sum.

Example 9.3Sums by formula✓ Checked

Find:

  • (a) ∑i=1100i\sum_{i=1}^{100} i
  • (b) ∑i=1n(2i−1),\sum_{i=1}^{n} (2i - 1)\mathclose{\text{,}} the sum of the first nn odd numbers
  • (c) ∑i=110(3i2−4i)\sum_{i=1}^{10} \big(3i^2 - 4i\big)
  • (d) ∑i=120i3\sum_{i=1}^{20} i^3

(a) With n=100:n = 100\mathclose{\text{:}} 100⋅1012=5050.\dfrac{100 \cdot 101}{2} = 5050\mathclose{\text{.}}

(b) By the rules for sums and the first formula,

∑i=1n(2i−1)=2∑i=1ni−∑i=1n1=n(n+1)−n=n2.\begin{aligned} \sum_{i=1}^{n} (2i - 1) &= 2\sum_{i=1}^{n} i - \sum_{i=1}^{n} 1 \\[5pt] &= n(n + 1) - n = n^2. \end{aligned}

The sum of the first nn odd numbers is n2:n^2\mathclose{\text{:}} 1+3=4,1 + 3 = 4\mathclose{\text{,}} 1+3+5=9,1 + 3 + 5 = 9\mathclose{\text{,}} and so on. With n=50,n = 50\mathclose{\text{,}} 1+3+⋯+99=2500.1 + 3 + \dots + 99 = 2500\mathclose{\text{.}}

(c) By the formulas with n=10,n = 10\mathclose{\text{,}} ∑i=110i2=10⋅11⋅216=385\sum_{i=1}^{10} i^2 = \dfrac{10 \cdot 11 \cdot 21}{6} = 385 and ∑i=110i=55.\sum_{i=1}^{10} i = 55\mathclose{\text{.}} So the sum is 3⋅385−4⋅55=935.3 \cdot 385 - 4 \cdot 55 = 935\mathclose{\text{.}}

(d) (20⋅212)2=2102=44,100.\Big(\dfrac{20 \cdot 21}{2}\Big)^2 = 210^2 = 44{,}100\mathclose{\text{.}}

Compute itSums with Python and SymPy

Python’s built-in sum adds up the numbers it is given, and range(1, n + 1) gives the whole numbers from 1 to n:n\mathclose{\text{:}}

Python
print(sum(range(1, 101)))                # 1 + 2 + ... + 100
print(sum(i**2 for i in range(1, 11)))   # 1 + 4 + ... + 100
print(sum(range(1, 100)))                # stops at 99
Output
5050
385
4950

range(a, b) stops before b, so the third line leaves out 100: a classic off-by-one slip. SymPy’s summation finds sums whose upper limit is a symbol. Declaring the symbols as positive integers tells it what kind of numbers ii and nn are:

Python
import sympy as sp
i, n = sp.symbols('i n', integer=True, positive=True)
S2 = sp.summation(i**2, (i, 1, n))
print(S2)
print(sp.factor(S2))
print(sp.factor(sp.summation(i**3, (i, 1, n))))
print(sp.summation(2*i - 1, (i, 1, n)))
Output
n**3/3 + n**2/2 + n/6
n*(n + 1)*(2*n + 1)/6
n**2*(n + 1)**2/4
n**2

SymPy returns the sum of the squares expanded; factor turns it into the form of Theorem 9.2.

3

Riemann sums

Here are the sums of Section 9.1 in general. Let ff be defined on [a,b],[a, b]\mathclose{\text{,}} and cut [a,b][a, b] into nn subintervals of equal width

Δx=b−an,\Delta x = \frac{b - a}{n},

read “delta x”. The cut points are xi=a+i Δxx_i = a + i\,\Delta x for i=0,1,…,n,i = 0, 1, \dots, n\mathclose{\text{,}} so that x0=ax_0 = a and xn=b,x_n = b\mathclose{\text{,}} and the iith subinterval is [xi−1,xi].[x_{i-1}, x_i]\mathclose{\text{.}} On each subinterval, take a height: the value of ff at its left end xi−1,x_{i-1}\mathclose{\text{,}} at its right end xi,x_i\mathclose{\text{,}} or at its midpoint

mi=xi−1+xi2=a+(i−12)Δx.m_i = \frac{x_{i-1} + x_i}{2} = a + \Big(i - \frac12\Big)\Delta x.
Definition 9.2Left, right and midpoint sums

With this notation, the left sum, the right sum and the midpoint sum of ff on [a,b][a, b] with nn subintervals are

Ln=∑i=1nf(xi−1) Δx,Rn=∑i=1nf(xi) Δx,Mn=∑i=1nf(mi) Δx.\begin{aligned} L_n &= \sum_{i=1}^{n} f(x_{i-1})\,\Delta x, \\[5pt] R_n &= \sum_{i=1}^{n} f(x_i)\,\Delta x, \\[5pt] M_n &= \sum_{i=1}^{n} f(m_i)\,\Delta x. \end{aligned}

They are examples of Riemann sums, named after Riemann, who defined the integral of Section 9.4 in 1854 (it was published in 1868).

Where ff is positive, each term is the area of a rectangle of width Δx;\Delta x\mathclose{\text{;}} where ff is negative, the term is negative, and Section 9.4 explains what such terms count. In Example 9.1 the two totals were L4=0.21875L_4 = 0.21875 and R4=0.46875R_4 = 0.46875 for f(x)=x2f(x) = x^2 on [0,1].[0, 1]\mathclose{\text{.}} For a positive increasing function, LnL_n is always a lower estimate of the area and RnR_n an upper one; for a positive decreasing function it is the other way round.

Example 9.4Three sums for 1/x1/x✓ Checked

Find L4,L_4\mathclose{\text{,}} R4R_4 and M4M_4 for f(x)=1/xf(x) = 1/x on [1,2],[1, 2]\mathclose{\text{,}} to four decimal places, and say what they tell you about the area under the graph.

Here Δx=2−14=14.\Delta x = \tfrac{2 - 1}{4} = \tfrac14\mathclose{\text{.}} The cut points are 1,1\mathclose{\text{,}} 54,\tfrac54\mathclose{\text{,}} 32,\tfrac32\mathclose{\text{,}} 74\tfrac74 and 2,2\mathclose{\text{,}} where ff takes the values 1,1\mathclose{\text{,}} 45,\tfrac45\mathclose{\text{,}} 23,\tfrac23\mathclose{\text{,}} 47\tfrac47 and 12.\tfrac12\mathclose{\text{.}} So

L4=14(1+45+23+47)=319420≈0.7595,R4=14(45+23+47+12)=533840≈0.6345.\begin{aligned} L_4 &= \frac14\Big(1 + \frac45 + \frac23 + \frac47\Big) \\ &= \frac{319}{420} \approx 0.7595, \\ R_4 &= \frac14\Big(\frac45 + \frac23 + \frac47 + \frac12\Big) \\ &= \frac{533}{840} \approx 0.6345. \end{aligned}

The midpoints are 98,\tfrac98\mathclose{\text{,}} 118,\tfrac{11}{8}\mathclose{\text{,}} 138\tfrac{13}{8} and 158,\tfrac{15}{8}\mathclose{\text{,}} where ff takes the values 89,\tfrac89\mathclose{\text{,}} 811,\tfrac{8}{11}\mathclose{\text{,}} 813\tfrac{8}{13} and 815:\tfrac{8}{15}\mathclose{\text{:}}

M4=14(89+811+813+815)≈0.6912.\begin{aligned} M_4 &= \frac14\Big(\frac89 + \frac{8}{11} + \frac{8}{13} + \frac{8}{15}\Big) \\ &\approx 0.6912. \end{aligned}

Since 1/x1/x decreases on [1,2],[1, 2]\mathclose{\text{,}} on each subinterval its value at the left end is its largest and its value at the right end its smallest. So the left rectangles cover the region and the right rectangles fit inside it (Figure 9.2): the area AA lies between R4≈0.6345R_4 \approx 0.6345 and L4≈0.7595.L_4 \approx 0.7595\mathclose{\text{.}} The midpoint sum lies between the two, since each midpoint height lies between the heights at the ends of its subinterval. It is also much closer to A:A\mathclose{\text{:}} each midpoint rectangle falls short of the graph over the left half of its subinterval and sticks out above it over the right half, and the two errors nearly cancel. Module 10 shows that A=ln⁡2≈0.693147,A = \ln 2 \approx 0.693147\mathclose{\text{,}} so M4M_4 is already within 0.002 of it.

Left, right and midpoint sums for f(x) = 1/x on [1, 2] with n = 4 (Example 9.4); the dots mark the points where the heights are taken. Since 1/x decreases, the left rectangles stick out above the graph and the right ones stay below it; the midpoint rectangles fall short of the graph over the left half of each subinterval and stick out above it over the right half.
Figure 9.2

Left, right and midpoint sums for f(x)=1/xf(x) = 1/x on [1,2][1, 2] with n=4n = 4 (Example 9.4); the dots mark the points where the heights are taken. Since 1/x1/x decreases, the left rectangles stick out above the graph and the right ones stay below it; the midpoint rectangles fall short of the graph over the left half of each subinterval and stick out above it over the right half.

How do the sums approach the area as nn grows? Here are the three sums for f(x)=x2f(x) = x^2 on [0,1]:[0, 1]\mathclose{\text{:}}

nnLnL_nRnR_nMnM_n
440.218750.218750.468750.468750.3281250.328125
10100.2850.2850.3850.3850.33250.3325
1001000.328350.328350.338350.338350.3333250.333325

All three close in on 13=0.3333…:\tfrac13 = 0.3333\ldots\mathclose{\text{:}} the left sums from below and the right sums from above, as for any increasing function, and the midpoint sums much faster than either. The error of an approximation is the exact value minus the approximation: positive when the approximation is too small, negative when it is too large. The errors show how fast:

nn13−Rn\tfrac13 - R_n13−Mn\tfrac13 - M_n
1010−0.05166667-0.051666670.000833330.00083333
2020−0.02541667-0.025416670.000208330.00020833
4040−0.01260417-0.012604170.000052080.00005208
8080−0.00627604-0.006276040.000013020.00001302

Each time nn doubles, the error of RnR_n is roughly halved, and so is that of Ln,L_n\mathclose{\text{,}} which is almost the same size with the opposite sign; the error of MnM_n is divided by exactly 4. The exact formulas found below explain this: the error of RnR_n is about −12n,-\tfrac{1}{2n}\mathclose{\text{,}} and that of MnM_n is exactly 112n2.\tfrac{1}{12n^2}\mathclose{\text{.}} So a thousand times more rectangles make the left and right sums about a thousand times more accurate, but the midpoint sum a million times. Module 11 explains why, and builds the midpoint sum, the trapezoidal rule and Simpson’s rule into practical methods of numerical integration.

Compute itRiemann sums in Python

A short function computes all three sums. It takes the heights at a+(i+shift) Δxa + (i + \text{shift})\,\Delta x for i=0,1,…,n−1,i = 0, 1, \dots, n - 1\mathclose{\text{,}} with the shift 0 for the left ends, 1 for the right ends and 12\tfrac12 for the midpoints:

Python
def riemann(f, a, b, n, rule):
    dx = (b - a)/n
    shift = {'left': 0, 'right': 1, 'mid': 0.5}[rule]
    return sum(f(a + (i + shift)*dx) for i in range(n))*dx

def f(x):
    return 1/x

for rule in ['left', 'right', 'mid']:
    print(rule, riemann(f, 1, 2, 4, rule))
Output
left 0.7595238095238095
right 0.6345238095238095
mid 0.6912198912198912

These are the three sums of Example 9.4. Now the errors of the midpoint sums, measured against ln⁡2,\ln 2\mathclose{\text{,}} the area that Module 10 will find:

Python
import math
prev = None
for n in [10, 20, 40, 80]:
    err = math.log(2) - riemann(f, 1, 2, n, 'mid')
    note = '' if prev is None else f'   previous/this = {prev/err:.3f}'
    print(f'n = {n:2d}   error = {err:.3e}{note}')
    prev = err
Output
n = 10   error = 3.118e-04
n = 20   error = 7.808e-05   previous/this = 3.993
n = 40   error = 1.953e-05   previous/this = 3.998
n = 80   error = 4.883e-06   previous/this = 4.000

The errors are positive: the midpoint sums of 1/x1/x are a little too small. Each doubling of nn divides the error by almost exactly 4, as for x2.x^2\mathclose{\text{.}}

Try it

Start with f(x)=x2f(x) = x^2 on [0,1],[0, 1]\mathclose{\text{,}} the left rule and n=4:n = 4\mathclose{\text{:}} you see the rectangles of Example 9.1 and L4=0.21875.L_4 = 0.21875\mathclose{\text{.}} Switch to the right rule and to the midpoint rule, and compare with the first table above. Press Double n a few times and watch the table of errors: for the left and right rules each doubling roughly halves the error, for the midpoint rule it divides the error by about 4. Then choose 1/x,1/x\mathclose{\text{,}} for Example 9.4, and sin⁡x\sin x on [0,π],[0, \pi]\mathclose{\text{,}} where the area is 2 (Module 10 proves it). There the left and right sums are equal, because sin⁡0=sin⁡π,\sin 0 = \sin \pi\mathclose{\text{,}} and each doubling divides their error by about 4: Module 11 shows why. Type pi and 2pi as the ends of the interval for sin⁡x,\sin x\mathclose{\text{,}} and the rectangles hang below the axis: Section 9.4 explains what they count. The trapezoid and Simpson rules belong to Module 11.

Watch out

Three slips with Riemann sums. First, Δx\Delta x is b−an,\tfrac{b - a}{n}\mathclose{\text{,}} not 1n:\tfrac1n\mathclose{\text{:}} on [1,3][1, 3] with n=4,n = 4\mathclose{\text{,}} Δx=0.5.\Delta x = 0.5\mathclose{\text{.}} Second, nn subintervals have n+1n + 1 cut points x0,…,xn;x_0, \dots, x_n\mathclose{\text{;}} the left sum uses the first nn of them and the right sum the last n,n\mathclose{\text{,}} so each sum has nn terms, not n+1.n + 1\mathclose{\text{.}} Third, the midpoints are the middles of the subintervals, not of [a,b]:[a, b]\mathclose{\text{:}} M4M_4 on [1,2][1, 2] takes its heights at 98,\tfrac98\mathclose{\text{,}} 118,\tfrac{11}{8}\mathclose{\text{,}} 138\tfrac{13}{8} and 158.\tfrac{15}{8}\mathclose{\text{.}}

Exact areas as limits

The table suggests that the area under y=x2y = x^2 from 0 to 1 is 13.\tfrac13\mathclose{\text{.}} The formula for the sum of the squares turns the suggestion into a proof.

Example 9.5The area under y=x2y = x^2✓ Checked

Show that the area AA under y=x2y = x^2 from 0 to 1 is exactly 13.\tfrac13\mathclose{\text{.}}

Here Δx=1n\Delta x = \tfrac1n and xi=in,x_i = \tfrac{i}{n}\mathclose{\text{,}} so f(xi)=i2n2.f(x_i) = \tfrac{i^2}{n^2}\mathclose{\text{.}} The factor 1n3\tfrac{1}{n^3} does not depend on i,i\mathclose{\text{,}} so it comes out of the sum (the first rule for sums), and Theorem 9.2 adds up the rest:

Rn=∑i=1ni2n2⋅1n=1n3∑i=1ni2=1n3⋅n(n+1)(2n+1)6=(n+1)(2n+1)6n2.\begin{aligned} R_n &= \sum_{i=1}^{n} \frac{i^2}{n^2}\cdot\frac1n = \frac{1}{n^3}\sum_{i=1}^{n} i^2 \\[5pt] &= \frac{1}{n^3}\cdot\frac{n(n + 1)(2n + 1)}{6} \\[5pt] &= \frac{(n + 1)(2n + 1)}{6n^2}. \end{aligned}

Expanding the top, (n+1)(2n+1)=2n2+3n+1,(n + 1)(2n + 1) = 2n^2 + 3n + 1\mathclose{\text{,}} and dividing each term by 6n2,6n^2\mathclose{\text{,}}

Rn=13+12n+16n2.R_n = \frac13 + \frac{1}{2n} + \frac{1}{6n^2}.

The left sum has the same heights except that f(x0)=0f(x_0) = 0 replaces f(xn)=1,f(x_n) = 1\mathclose{\text{,}} so Ln=Rn−1n:L_n = R_n - \tfrac1n\mathclose{\text{:}}

Ln=13−12n+16n2.L_n = \frac13 - \frac{1}{2n} + \frac{1}{6n^2}.

As n→∞,n \to \infty\mathclose{\text{,}} 1n\tfrac1n and 1n2\tfrac{1}{n^2} approach 0 (limits at infinity, Module 3, with nn running through the whole numbers), so

lim⁡n→∞Ln=lim⁡n→∞Rn=13.\lim_{n\to\infty} L_n = \lim_{n\to\infty} R_n = \frac13.

Since x2x^2 increases on [0,1],[0, 1]\mathclose{\text{,}} Ln≤A≤RnL_n \le A \le R_n for every n,n\mathclose{\text{,}} as in Example 9.1. So AA is a fixed number squeezed between two quantities that both approach 13,\tfrac13\mathclose{\text{,}} and by the squeeze theorem of Module 2, which holds for limits at infinity too (Module 3), A=13.A = \tfrac13\mathclose{\text{.}}

The midpoint sum yields to the same method. The midpoints are mi=(i−12)1n,m_i = \big(i - \tfrac12\big)\tfrac1n\mathclose{\text{,}} so f(mi) Δx=1n3(i−12)2.f(m_i)\,\Delta x = \tfrac{1}{n^3}\big(i - \tfrac12\big)^2\mathclose{\text{.}} Expand (i−12)2=i2−i+14,\big(i - \tfrac12\big)^2 = i^2 - i + \tfrac14\mathclose{\text{,}} use all three rules for sums and the first two formulas of Theorem 9.2, then expand the bracket and collect terms:

Mn=1n3∑i=1n(i2−i+14)=1n3(n(n+1)(2n+1)6−n(n+1)2+n4)=1n3(n33−n12)=13−112n2.\begin{aligned} M_n &= \frac{1}{n^3}\sum_{i=1}^{n}\Big(i^2 - i + \frac14\Big) \\[5pt] &= \frac{1}{n^3}\Big(\frac{n(n + 1)(2n + 1)}{6} \\[5pt] &\qquad - \frac{n(n + 1)}{2} + \frac{n}{4}\Big) \\[5pt] &= \frac{1}{n^3}\Big(\frac{n^3}{3} - \frac{n}{12}\Big) \\[5pt] &= \frac13 - \frac{1}{12n^2}. \end{aligned}

That is why the midpoint errors in the table are divided by exactly 4 when nn doubles.

The same steps work on [0,b][0, b] for any b>0.b > 0\mathclose{\text{.}} Now Δx=bn\Delta x = \tfrac{b}{n} and xi=ibn,x_i = \tfrac{ib}{n}\mathclose{\text{,}} so

Rn=∑i=1ni2b2n2⋅bn=b3n3∑i=1ni2=b3⋅(n+1)(2n+1)6n2,\begin{aligned} R_n &= \sum_{i=1}^{n}\frac{i^2b^2}{n^2}\cdot\frac{b}{n} = \frac{b^3}{n^3}\sum_{i=1}^{n} i^2 \\[5pt] &= b^3\cdot\frac{(n + 1)(2n + 1)}{6n^2}, \end{aligned}

which approaches b33,\tfrac{b^3}{3}\mathclose{\text{,}} while Ln=Rn−b3nL_n = R_n - \tfrac{b^3}{n} approaches the same number. The area under y=x2y = x^2 from 0 to bb is b33:\tfrac{b^3}{3}\mathclose{\text{:}} 83\tfrac83 for b=2b = 2 and 99 for b=3.b = 3\mathclose{\text{.}}

4

The definite integral

Left, right and midpoint sums take their heights in three particular ways, over subintervals of equal width. Nothing forces these choices. Any point of a subinterval gives a reasonable height, and the subintervals may have different widths: narrow where the graph changes fast, for example. The definite integral is defined so that these choices do not matter.

Definition 9.3Partitions and Riemann sums

Let a<b.a < b\mathclose{\text{.}} A partition PP of [a,b][a, b] is a list of points a=x0<x1<⋯<xn=b.a = x_0 < x_1 < \dots < x_n = b\mathclose{\text{.}} It cuts [a,b][a, b] into nn subintervals [xi−1,xi][x_{i-1}, x_i] of widths Δxi=xi−xi−1;\Delta x_i = x_i - x_{i-1}\mathclose{\text{;}} the largest width is the norm of P,P\mathclose{\text{,}} written ∥P∥.\norm{P}\mathclose{\text{.}} Choose a sample point xi∗,x_i^*\mathclose{\text{,}} read “x i star”, in each subinterval [xi−1,xi].[x_{i-1}, x_i]\mathclose{\text{.}} The Riemann sum of ff for PP and these sample points is

∑i=1nf(xi∗) Δxi.\sum_{i=1}^{n} f(x_i^*)\,\Delta x_i.

Figure 9.3 (left) shows one. The left, right and midpoint sums are the Riemann sums for the partition into nn equal parts, whose norm is b−an,\tfrac{b - a}{n}\mathclose{\text{,}} with the sample points at the left ends, the right ends or the midpoints.

Definition 9.4The definite integral

A function ff defined on [a,b][a, b] is integrable on [a,b][a, b] if there is a number II that its Riemann sums approach as the partitions get finer: for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that

∣∑i=1nf(xi∗) Δxi−I∣<ε\Big|\sum_{i=1}^{n} f(x_i^*)\,\Delta x_i - I\Big| < \varepsilon

for every partition PP of [a,b][a, b] with ∥P∥<δ\norm{P} < \delta and every choice of the sample points xi∗.x_i^*\mathclose{\text{.}} Then II is the definite integral of ff from aa to b,b\mathclose{\text{,}} written

∫abf(x) dx=lim⁡∥P∥→0∑i=1nf(xi∗) Δxi.\int_a^b f(x)\,dx = \lim_{\norm{P}\to0}\sum_{i=1}^{n} f(x_i^*)\,\Delta x_i.

The condition has the shape of the ε–δ definition of a limit in Module 2, with the Riemann sums in the role of the values f(x),f(x)\mathclose{\text{,}} and the norm ∥P∥\norm{P} in the role of the distance between xx and the point it approaches: however small a tolerance ε\varepsilon you set, every Riemann sum is within ε\varepsilon of II once the partition is fine enough, wherever the sample points are. It asks more than a limit of a function of one variable, because a Riemann sum is not determined by ∥P∥:\norm{P}\mathclose{\text{:}} many partitions have the same norm, and each allows many choices of sample points, and every one of these sums must be close to I.I\mathclose{\text{.}} The symbol lim⁡∥P∥→0,\lim_{\norm{P}\to0}\mathclose{\text{,}} read “the limit as the norm of PP approaches 0”, is shorthand for exactly this condition. There can be only one such number I:I\mathclose{\text{:}} two different numbers cannot both be within ε\varepsilon of the same Riemann sums when ε\varepsilon is less than half the distance between them.

Reading the notation. ∫abf(x) dx\int_a^b f(x)\,dx reads “the integral from aa to bb of ff of x,x\mathclose{\text{,}} dxdx”. The sign ∫,\int\mathclose{\text{,}} Leibniz’s notation (Module 1), is an elongated S, a reminder that an integral is a limit of sums. The function f(x)f(x) is the integrand, and aa and bb are the lower and upper limits of integration (ends of the interval again, not limits in the sense of Module 2). The dxdx recalls the widths Δxi,\Delta x_i\mathclose{\text{,}} so that f(x) dxf(x)\,dx echoes f(xi∗) Δxi,f(x_i^*)\,\Delta x_i\mathclose{\text{,}} and it names the variable. The integral is a number, not a function of x:x\mathclose{\text{:}} like the index of a sum, xx is a dummy variable, and

∫abf(x) dx=∫abf(t) dt=∫abf(u) du.\int_a^b f(x)\,dx = \int_a^b f(t)\,dt = \int_a^b f(u)\,du.

When ff is integrable and f(x)≥0f(x) \ge 0 on [a,b],[a, b]\mathclose{\text{,}} the integral is the area under the graph of ff from aa to b.b\mathclose{\text{.}} In fact the integral is now the definition of that area, and it gives the areas you already knew, as you will see below.

Which functions are integrable? Almost every function that you will meet.

Theorem 9.3Integrable functions

If ff is continuous on [a,b],[a, b]\mathclose{\text{,}} then ff is integrable on [a,b].[a, b]\mathclose{\text{.}} More generally, ff is integrable on [a,b][a, b] if it is bounded there (there is a number KK with ∣f(x)∣≤K\abs{f(x)} \le K for every xx in [a,b])[a, b]\mathclose{\text{)}} and has only finitely many discontinuities in [a,b],[a, b]\mathclose{\text{,}} such as jumps.

The proof, like that of the Extreme Value Theorem, needs the completeness of the real numbers, and belongs to a course in real analysis; this series uses the theorem without proof. It covers polynomials, sin⁡x,\sin x\mathclose{\text{,}} cos⁡x\cos x and exe^x on every interval [a,b],[a, b]\mathclose{\text{,}} 1/x1/x on every interval [a,b][a, b] that does not contain 0, and piecewise functions with finitely many jumps. Once you know that ff is integrable, you may compute its integral with whichever Riemann sums are convenient:

Theorem 9.4Integrals from equal subintervals

If ff is integrable on [a,b],[a, b]\mathclose{\text{,}} then

∫abf(x) dx=lim⁡n→∞Ln=lim⁡n→∞Rn=lim⁡n→∞Mn,\begin{aligned} \int_a^b f(x)\,dx &= \lim_{n\to\infty} L_n = \lim_{n\to\infty} R_n \\[5pt] &= \lim_{n\to\infty} M_n, \end{aligned}

and the same holds for every other choice of sample points in the nn equal subintervals.

Proof

Let I=∫abf(x) dxI = \int_a^b f(x)\,dx and ε>0,\varepsilon > 0\mathclose{\text{,}} and take a δ\delta as in Definition 9.4. The partition into nn equal parts has norm b−an,\tfrac{b - a}{n}\mathclose{\text{,}} which is less than δ\delta as soon as n>b−aδ.n > \tfrac{b - a}{\delta}\mathclose{\text{.}} For all such n,n\mathclose{\text{,}} every Riemann sum of that partition, Ln,L_n\mathclose{\text{,}} RnR_n and MnM_n among them, is within ε\varepsilon of I.I\mathclose{\text{.}} That is what lim⁡n→∞Ln=I\lim_{n\to\infty} L_n = I means, and the same for RnR_n and Mn.M_n\mathclose{\text{.}}

∎

So the area of Example 9.5 is an integral: x2x^2 is continuous, so it is integrable (Theorem 9.3), and by Theorem 9.4 its integral is the limit of the right sums. With the computation for [0,b],[0, b]\mathclose{\text{,}}

∫01x2 dx=13,∫0bx2 dx=b33(b>0).\int_0^1 x^2\,dx = \frac13, \qquad \int_0^b x^2\,dx = \frac{b^3}{3} \quad (b > 0).

The integral also gives the areas you already knew. The function xx is continuous, and its right sums on [0,b][0, b] are

∑i=1nibn⋅bn=b2n2⋅n(n+1)2=b22(1+1n),\sum_{i=1}^{n} \frac{ib}{n}\cdot\frac{b}{n} = \frac{b^2}{n^2}\cdot\frac{n(n + 1)}{2} = \frac{b^2}{2}\Big(1 + \frac1n\Big),

which approach b22:\tfrac{b^2}{2}\mathclose{\text{:}} the integral of xx from 0 to bb is the area of the triangle under its graph, with base bb and height b.b\mathclose{\text{.}} Every Riemann sum of a constant function c≥0c \ge 0 is c(b−a),c(b - a)\mathclose{\text{,}} because the widths add up to b−a:b - a\mathclose{\text{:}} the area of a rectangle. And Module 11 shows that the integral gives the area πr2\pi r^2 of a disc.

The hypothesis “ff is integrable” in Theorem 9.4 cannot be dropped: the Going deeper box below shows a function whose right sums have a limit although it is not integrable.

Example 9.6An integral as a limit of sums✓ Checked

Find ∫13x2 dx\displaystyle\int_1^3 x^2\,dx as the limit of right sums.

The integrand is continuous, so Theorem 9.4 lets you use Rn.R_n\mathclose{\text{.}} Here Δx=2n\Delta x = \tfrac2n and xi=1+2in,x_i = 1 + \tfrac{2i}{n}\mathclose{\text{,}} so

f(xi)=(1+2in)2=1+4in+4i2n2.f(x_i) = \Big(1 + \frac{2i}{n}\Big)^2 = 1 + \frac{4i}{n} + \frac{4i^2}{n^2}.

By the rules for sums, with the factors that do not depend on ii taken outside each sum,

Rn=∑i=1n(1+4in+4i2n2)2n=2n∑i=1n1+8n2∑i=1ni+8n3∑i=1ni2=2+8n2⋅n(n+1)2+8n3⋅n(n+1)(2n+1)6=2+4(n+1)n+4(n+1)(2n+1)3n2.\begin{aligned} R_n &= \sum_{i=1}^{n}\Big(1 + \frac{4i}{n} + \frac{4i^2}{n^2}\Big)\frac2n \\[5pt] &= \frac2n\sum_{i=1}^{n} 1 + \frac{8}{n^2}\sum_{i=1}^{n} i \\[5pt] &\qquad + \frac{8}{n^3}\sum_{i=1}^{n} i^2 \\[5pt] &= 2 + \frac{8}{n^2}\cdot\frac{n(n + 1)}{2} \\[5pt] &\qquad + \frac{8}{n^3}\cdot\frac{n(n + 1)(2n + 1)}{6} \\[5pt] &= 2 + \frac{4(n + 1)}{n} \\[5pt] &\qquad + \frac{4(n + 1)(2n + 1)}{3n^2}. \end{aligned}

As n→∞,n \to \infty\mathclose{\text{,}} n+1n=1+1n\tfrac{n + 1}{n} = 1 + \tfrac1n approaches 1 and (n+1)(2n+1)n2=2+3n+1n2\tfrac{(n + 1)(2n + 1)}{n^2} = 2 + \tfrac3n + \tfrac{1}{n^2} approaches 2, so

∫13x2 dx=2+4+83=263≈8.667.\int_1^3 x^2\,dx = 2 + 4 + \frac83 = \frac{26}{3} \approx 8.667.

Compare with the areas from 0: ∫03x2 dx=9\int_0^3 x^2\,dx = 9 and ∫01x2 dx=13,\int_0^1 x^2\,dx = \tfrac13\mathclose{\text{,}} and 9−13=263,9 - \tfrac13 = \tfrac{26}{3}\mathclose{\text{,}} as it should be, since the region from 1 to 3 is the region from 0 to 3 without the region from 0 to 1. Section 9.5 turns this subtraction into a rule.

Compute itLimits of Riemann sums with SymPy

SymPy can do the whole computation of Example 9.6: build the right sum with a symbolic n,n\mathclose{\text{,}} add it up with summation, and let n→∞n \to \infty with limit:

Python
import sympy as sp
i, n = sp.symbols('i n', integer=True, positive=True)
a, b = 1, 3
dx = sp.Integer(b - a)/n
xi = a + i*dx                         # the right ends
Rn = sp.summation(xi**2*dx, (i, 1, n))
print(sp.factor(Rn))
print(sp.limit(Rn, n, sp.oo))
Output
2*(13*n**2 + 12*n + 2)/(3*n**2)
26/3

The factored right sum is the formula of Example 9.6 over a common denominator. Change the function or the interval and run it again: for x3x^3 on [0,2],[0, 2]\mathclose{\text{,}} the limit is 4 (Exercise 9.5).

Going deeperFunctions that are not integrable

A first reading may skip this box. Theorem 9.3 asks for boundedness and for only finitely many discontinuities, and Theorem 9.4 asks for integrability. Two examples show why.

Too many discontinuities. On [0,1],[0, 1]\mathclose{\text{,}} let D(x)=1D(x) = 1 when xx is rational and D(x)=0D(x) = 0 when xx is irrational. Every subinterval of every partition, however narrow, contains both rational and irrational numbers. Choose all the sample points rational, and every term is 1⋅Δxi,1 \cdot \Delta x_i\mathclose{\text{,}} so the Riemann sum is the total width of the subintervals, 1; choose them all irrational, and it is 0. However small ∥P∥\norm{P} is, some Riemann sums are 1 and others are 0, so no number II is within ε=12\varepsilon = \tfrac12 of all of them: DD is not integrable on [0,1].[0, 1]\mathclose{\text{.}} Yet its right sums are all 1, because the right ends in\tfrac{i}{n} are rational, so lim⁡n→∞Rn=1\lim_{n\to\infty} R_n = 1 exists. A limit of equal-width sums alone does not make a function integrable. (DD is discontinuous at every point of [0,1].)[0, 1]\mathclose{\text{.)}}

Unbounded. Let f(x)=1/xf(x) = 1/\sqrt{x} for 0<x≤10 < x \le 1 and f(0)=0.f(0) = 0\mathclose{\text{.}} In every partition of [0,1],[0, 1]\mathclose{\text{,}} the first subinterval [0,x1][0, x_1] contains points as close to 0 as you like, where 1/x1/\sqrt{x} is as large as you like. Choosing x1∗x_1^* close enough to 0 makes the single term f(x1∗) Δx1,f(x_1^*)\,\Delta x_1\mathclose{\text{,}} and with it the whole Riemann sum (the other terms are positive), larger than any number you name. The Riemann sums approach no number, and ff is not integrable on [0,1].[0, 1]\mathclose{\text{.}} The same argument shows that every integrable function is bounded. Module 12 gives some integrals of unbounded functions a meaning, as improper integrals; this one will turn out to be 2.

Signed area

Where ff is negative, the terms f(xi∗) Δxif(x_i^*)\,\Delta x_i of a Riemann sum are negative: they are areas of rectangles with a minus sign. So the integral counts area above the xx-axis as positive and area below it as negative:

∫abf(x) dx=(area above the axis)−(area below the axis).\begin{aligned} \int_a^b f(x)\,dx &= (\text{area above the axis}) \\[5pt] &\quad - (\text{area below the axis}). \end{aligned}

This is the net area, or signed area, between the graph of ff and the xx-axis. The total area between the graph and the axis counts every part as positive: it is the area above the axis plus the area below it. Since the graph of ∣f∣\abs{f} turns the parts below the axis over, the total area is ∫ab∣f(x)∣ dx.\int_a^b \abs{f(x)}\,dx\mathclose{\text{.}} In Figure 9.3 (right) the two parts cancel exactly: the net area is 0, but the total area is not.

Left: a Riemann sum for a partition x0 < x1 < dots < x5 with unequal widths Delta xi and a sample point xi^ (dot) anywhere in each subinterval. Right: the signed area of Example 9.7. The graph of x^2 - 2x encloses an area of tfrac43 below the axis, on [0, 2], and an area of tfrac43 above it, on [2, 3], so the integral from 0 to 3 is 0.
Figure 9.3

Left: a Riemann sum for a partition x0<x1<⋯<x5x_0 < x_1 < \dots < x_5 with unequal widths Δxi\Delta x_i and a sample point xi∗x_i^* (dot) anywhere in each subinterval. Right: the signed area of Example 9.7. The graph of x2−2xx^2 - 2x encloses an area of 43\tfrac43 below the axis, on [0,2],[0, 2]\mathclose{\text{,}} and an area of 43\tfrac43 above it, on [2,3],[2, 3]\mathclose{\text{,}} so the integral from 0 to 3 is 0.

Example 9.7A signed area✓ Checked

Find ∫03(x2−2x) dx\displaystyle\int_0^3 \big(x^2 - 2x\big)\,dx as the limit of right sums.

The integrand is continuous, so Theorem 9.4 applies. Here Δx=3n\Delta x = \tfrac3n and xi=3in,x_i = \tfrac{3i}{n}\mathclose{\text{,}} so f(xi)=9i2n2−6inf(x_i) = \tfrac{9i^2}{n^2} - \tfrac{6i}{n} and

Rn=∑i=1n(9i2n2−6in)3n=27n3∑i=1ni2−18n2∑i=1ni=9(n+1)(2n+1)2n2−9(n+1)n.\begin{aligned} R_n &= \sum_{i=1}^{n}\Big(\frac{9i^2}{n^2} - \frac{6i}{n}\Big)\frac3n \\[5pt] &= \frac{27}{n^3}\sum_{i=1}^{n} i^2 - \frac{18}{n^2}\sum_{i=1}^{n} i \\[5pt] &= \frac{9(n + 1)(2n + 1)}{2n^2} - \frac{9(n + 1)}{n}. \end{aligned}

Over the common denominator 2n2,2n^2\mathclose{\text{,}} the top is 9(n+1)[(2n+1)−2n]=9(n+1),9(n + 1)\big[(2n + 1) - 2n\big] = 9(n + 1)\mathclose{\text{,}} so

Rn=9(n+1)2n2=92n+92n2,R_n = \frac{9(n + 1)}{2n^2} = \frac{9}{2n} + \frac{9}{2n^2},

which approaches 0. So ∫03(x2−2x) dx=0.\int_0^3 (x^2 - 2x)\,dx = 0\mathclose{\text{.}}

The integral is 0, but the graph is not the xx-axis. Since x2−2x=x(x−2),x^2 - 2x = x(x - 2)\mathclose{\text{,}} the integrand is negative on (0,2)(0, 2) and positive on (2,3):(2, 3)\mathclose{\text{:}} the area below the axis equals the area above it. Example 9.8 finds them, 43\tfrac43 each.

Displacement and distance. For an object moving along a line, the velocity v(t)v(t) is negative while the object moves backwards. Over a short time Δt\Delta t its position changes by about v(ti∗) Δt:v(t_i^*)\,\Delta t\mathclose{\text{:}} forwards when v>0,v > 0\mathclose{\text{,}} backwards when v<0.v < 0\mathclose{\text{.}} These changes add up to a Riemann sum of v,v\mathclose{\text{,}} so ∫abv(t) dt\int_a^b v(t)\,dt is the displacement, the net change in position s(b)−s(a),s(b) - s(a)\mathclose{\text{,}} while the distance travelled, which counts every movement as positive, is ∫ab∣v(t)∣ dt.\int_a^b \abs{v(t)}\,dt\mathclose{\text{.}} Module 10 proves the first statement, as the net change theorem. For example, an object with velocity v(t)=2−tv(t) = 2 - t m/s, for 0≤t≤4,0 \le t \le 4\mathclose{\text{,}} moves forwards for 2 seconds and then backwards for 2 seconds. The graph of vv forms a triangle of area 2 above the axis, on [0,2],[0, 2]\mathclose{\text{,}} and one of area 2 below it, on [2,4].[2, 4]\mathclose{\text{.}} So the displacement is ∫04(2−t) dt=2−2=0\int_0^4 (2 - t)\,dt = 2 - 2 = 0 m, since the object ends where it started, but the distance travelled is 2+2=42 + 2 = 4 m.

Watch out

∫abf(x) dx\int_a^b f(x)\,dx is the area between the graph and the axis when f≥0f \ge 0 on [a,b].[a, b]\mathclose{\text{.}} Where ff is negative, the integral subtracts area: it is a net area, which can be 0, or negative, even when the region is large. To find the total area, split [a,b][a, b] where ff changes sign and add up the sizes of the pieces: for x2−2xx^2 - 2x on [0,3][0, 3] the total area is 43+43=83,\tfrac43 + \tfrac43 = \tfrac83\mathclose{\text{,}} not 0.

5

Properties of the integral

Riemann sums obey the rules for sums of Section 9.2. Letting the partitions shrink turns those rules into rules for integrals. First, two conventions make the rules work for every order of the limits of integration.

Definition 9.5Reversed and equal limits

For a<ba < b and ff integrable on [a,b],[a, b]\mathclose{\text{,}}

∫baf(x) dx=−∫abf(x) dx.\int_b^a f(x)\,dx = -\int_a^b f(x)\,dx.

For every number cc at which ff is defined, ∫ccf(x) dx=0.\displaystyle\int_c^c f(x)\,dx = 0\mathclose{\text{.}}

Going from bb back to a,a\mathclose{\text{,}} the widths Δx=a−bn\Delta x = \tfrac{a - b}{n} are negative, so every Riemann sum changes sign: that makes the first convention the natural one. The second says that a single point has no area.

Theorem 9.5Linearity

If ff and gg are integrable on [a,b][a, b] and cc is a constant, then f+g,f + g\mathclose{\text{,}} f−gf - g and cfcf are integrable on [a,b],[a, b]\mathclose{\text{,}} and

∫ab(f(x)+g(x)) dx=∫abf(x) dx+∫abg(x) dx,∫abc f(x) dx=c∫abf(x) dx,\begin{aligned} \int_a^b \big(f(x) + g(x)\big)\,dx &= \int_a^b f(x)\,dx \\[5pt] &\quad + \int_a^b g(x)\,dx, \\[5pt] \int_a^b c\,f(x)\,dx &= c\int_a^b f(x)\,dx, \end{aligned}

and the same holds with f−gf - g in place of f+g.f + g\mathclose{\text{.}} For a constant function, ∫abc dx=c(b−a).\displaystyle\int_a^b c\,dx = c(b - a)\mathclose{\text{.}}

Proof

For every partition and every choice of sample points, the Riemann sum of f+gf + g is the Riemann sum of ff plus that of g,g\mathclose{\text{,}} by the second rule for sums. Given ε>0,\varepsilon > 0\mathclose{\text{,}} take δ1\delta_1 for ff and δ2\delta_2 for g,g\mathclose{\text{,}} each for the tolerance ε2,\tfrac{\varepsilon}{2}\mathclose{\text{,}} as in Definition 9.4. If ∥P∥\norm{P} is less than both, the two Riemann sums are within ε2\tfrac{\varepsilon}{2} of ∫abf\int_a^b f and of ∫abg,\int_a^b g\mathclose{\text{,}} so their sum is within ε\varepsilon of ∫abf+∫abg.\int_a^b f + \int_a^b g\mathclose{\text{.}} That proves the first formula. For the second, the Riemann sum of cfcf is cc times that of f;f\mathclose{\text{;}} when the sum of ff is within ε∣c∣+1\tfrac{\varepsilon}{\abs{c} + 1} of ∫abf,\int_a^b f\mathclose{\text{,}} the sum of cfcf is within ∣c∣ ε∣c∣+1<ε\tfrac{\abs{c}\,\varepsilon}{\abs{c} + 1} < \varepsilon of c∫abf.c\int_a^b f\mathclose{\text{.}} For f−g,f - g\mathclose{\text{,}} combine the two formulas with c=−1.c = -1\mathclose{\text{.}} Finally, every Riemann sum of the constant function cc is ∑c Δxi=c(b−a),\sum c\,\Delta x_i = c(b - a)\mathclose{\text{,}} because the widths add up to b−a.b - a\mathclose{\text{.}}

∎

These are the arguments that proved the limit laws in Module 2. Additivity over intervals needs a little more care.

Theorem 9.6Additivity over intervals

Let ff be continuous, or bounded with finitely many discontinuities, on an interval that contains a,a\mathclose{\text{,}} bb and c.c\mathclose{\text{.}} Then

∫abf(x) dx+∫bcf(x) dx=∫acf(x) dx.\begin{aligned} &\int_a^b f(x)\,dx + \int_b^c f(x)\,dx \\[5pt] &\quad= \int_a^c f(x)\,dx. \end{aligned}
Proof

By Theorem 9.3, ff is integrable on every closed interval with ends among a,a\mathclose{\text{,}} bb and c.c\mathclose{\text{.}} Suppose first that a<b<c,a < b < c\mathclose{\text{,}} and let ε>0.\varepsilon > 0\mathclose{\text{.}} Definition 9.4 gives a δ\delta for each of the intervals [a,b],[a, b]\mathclose{\text{,}} [b,c][b, c] and [a,c];[a, c]\mathclose{\text{;}} let δ\delta be the smallest of the three. Then, for partitions of norm less than δ,\delta\mathclose{\text{,}} the Riemann sums for each of the three intervals are within ε\varepsilon of its integral. Take a partition of [a,b][a, b] and one of [b,c],[b, c]\mathclose{\text{,}} both of norm less than δ,\delta\mathclose{\text{,}} with any sample points, and let S1S_1 and S2S_2 be their Riemann sums. Together the two partitions form a partition of [a,c],[a, c]\mathclose{\text{,}} also of norm less than δ,\delta\mathclose{\text{,}} and its Riemann sum is S1+S2.S_1 + S_2\mathclose{\text{.}} So

∣∫acf−∫abf−∫bcf∣≤∣∫acf−(S1+S2)∣+∣S1−∫abf∣+∣S2−∫bcf∣<3ε.\begin{aligned} &\Big|\int_a^c f - \int_a^b f - \int_b^c f\Big| \\[5pt] &\quad\le \Big|\int_a^c f - (S_1 + S_2)\Big| \\[5pt] &\qquad + \Big|S_1 - \int_a^b f\Big| + \Big|S_2 - \int_b^c f\Big| \\[5pt] &\quad< 3\varepsilon. \end{aligned}

The left side is a fixed number, less than 3ε3\varepsilon for every ε>0,\varepsilon > 0\mathclose{\text{,}} so it is 0. Every other order of a,a\mathclose{\text{,}} bb and cc follows from this case with Definition 9.5. For instance, if a<c<b,a < c < b\mathclose{\text{,}} the case already proved gives ∫acf+∫cbf=∫abf,\int_a^c f + \int_c^b f = \int_a^b f\mathclose{\text{,}} so ∫acf=∫abf−∫cbf=∫abf+∫bcf.\int_a^c f = \int_a^b f - \int_c^b f = \int_a^b f + \int_b^c f\mathclose{\text{.}} If two of the three numbers are equal, the formula follows at once from Definition 9.5.

∎

(Additivity holds for every function integrable on the largest interval, but the proof that such a function is integrable on the smaller intervals belongs to real analysis.)

Example 9.8Splitting an integral✓ Checked

Find ∫02(x2−2x) dx\displaystyle\int_0^2 \big(x^2 - 2x\big)\,dx and ∫23(x2−2x) dx,\displaystyle\int_2^3 \big(x^2 - 2x\big)\,dx\mathclose{\text{,}} and the total area between the graph of y=x2−2xy = x^2 - 2x and the xx-axis from 0 to 3.

By linearity,

∫02(x2−2x) dx=∫02x2 dx−2∫02x dx.\begin{aligned} \int_0^2 \big(x^2 - 2x\big)\,dx &= \int_0^2 x^2\,dx \\[5pt] &\quad - 2\int_0^2 x\,dx. \end{aligned}

The first integral is 233=83\tfrac{2^3}{3} = \tfrac83 (Section 9.4). The second is the area of a triangle: the graph of y=xy = x from 0 to 2 runs from (0,0)(0, 0) to (2,2),(2, 2)\mathclose{\text{,}} so ∫02x dx=12⋅2⋅2=2.\int_0^2 x\,dx = \tfrac12 \cdot 2 \cdot 2 = 2\mathclose{\text{.}} So

∫02(x2−2x) dx=83−4=−43.\int_0^2 \big(x^2 - 2x\big)\,dx = \frac83 - 4 = -\frac43.

By additivity, the integrals over [0,2][0, 2] and [2,3][2, 3] add up to the integral over [0,3],[0, 3]\mathclose{\text{,}} which is 0 by Example 9.7, so

∫23(x2−2x) dx=0−(−43)=43.\int_2^3 \big(x^2 - 2x\big)\,dx = 0 - \Big(-\frac43\Big) = \frac43.

The region below the axis has area 43\tfrac43 and the region above has area 43:\tfrac43\mathclose{\text{:}} the total area is 83,\tfrac83\mathclose{\text{,}} while the integral from 0 to 3 is 0 (Figure 9.3).

Theorem 9.7Comparison

Let ff and gg be integrable on [a,b],[a, b]\mathclose{\text{,}} where a<b.a < b\mathclose{\text{.}}

  • (a) If f(x)≥0f(x) \ge 0 for every xx in [a,b],[a, b]\mathclose{\text{,}} then ∫abf(x) dx≥0.\displaystyle\int_a^b f(x)\,dx \ge 0\mathclose{\text{.}}
  • (b) If f(x)≤g(x)f(x) \le g(x) for every xx in [a,b],[a, b]\mathclose{\text{,}} then ∫abf(x) dx≤∫abg(x) dx.\displaystyle\int_a^b f(x)\,dx \le \int_a^b g(x)\,dx\mathclose{\text{.}}
  • (c) If m≤f(x)≤Mm \le f(x) \le M for every xx in [a,b],[a, b]\mathclose{\text{,}} then
    m(b−a)≤∫abf(x) dx≤M(b−a).\begin{aligned} m(b - a) &\le \int_a^b f(x)\,dx \\[5pt] &\le M(b - a). \end{aligned}
Proof

(a) Every Riemann sum ∑f(xi∗) Δxi\sum f(x_i^*)\,\Delta x_i adds up products of numbers that are at least 0, so it is at least 0. Suppose the integral II were negative. By Definition 9.4 with ε=∣I∣2,\varepsilon = \tfrac{\abs{I}}{2}\mathclose{\text{,}} the Riemann sums of every fine enough partition would lie within ∣I∣2\tfrac{\abs{I}}{2} of I,I\mathclose{\text{,}} and so would be negative, which is impossible. So I≥0.I \ge 0\mathclose{\text{.}}

(b) By linearity, g−fg - f is integrable and ∫abg−∫abf=∫ab(g−f),\int_a^b g - \int_a^b f = \int_a^b (g - f)\mathclose{\text{,}} which is at least 0 by (a), since g(x)−f(x)≥0.g(x) - f(x) \ge 0\mathclose{\text{.}}

(c) Apply (b) to the constant function mm and f,f\mathclose{\text{,}} and to ff and the constant function M,M\mathclose{\text{,}} and use ∫abm dx=m(b−a)\int_a^b m\,dx = m(b - a) (Theorem 9.5).

∎

When f≥0f \ge 0 is continuous, take for mm and MM its smallest and largest values on [a,b],[a, b]\mathclose{\text{,}} which exist by the Extreme Value Theorem (Module 3). Then part (c) says that the area under the graph lies between the areas of two rectangles on [a,b],[a, b]\mathclose{\text{,}} one as high as the lowest point of the graph and one as high as the highest.

Part (b) also compares the net area with the total area of Section 9.4. Let ff be continuous, or bounded with finitely many discontinuities, so that ∣f∣\abs{f} is too, and both are integrable. Since −∣f(x)∣≤f(x)≤∣f(x)∣,-\abs{f(x)} \le f(x) \le \abs{f(x)}\mathclose{\text{,}} part (b) and linearity give −∫ab∣f(x)∣ dx≤∫abf(x) dx≤∫ab∣f(x)∣ dx,-\int_a^b \abs{f(x)}\,dx \le \int_a^b f(x)\,dx \le \int_a^b \abs{f(x)}\,dx\mathclose{\text{,}} that is,

∣∫abf(x) dx∣≤∫ab∣f(x)∣ dx.\Big|\int_a^b f(x)\,dx\Big| \le \int_a^b \abs{f(x)}\,dx.

In size, the net area is never more than the total area: for x2−2xx^2 - 2x on [0,3],[0, 3]\mathclose{\text{,}} 0 against 83.\tfrac83\mathclose{\text{.}}

Example 9.9Bounding an integral with no formula✓ Checked

Show that ∫01e−x2 dx\displaystyle\int_0^1 e^{-x^2}\,dx lies between 0.36 and 1, and then that it lies between 0.57 and 0.89.

The integrand is continuous, so the integral exists (Theorem 9.3). The shortcut of Module 10 cannot evaluate it, because no formula built from the familiar functions has the derivative e−x2e^{-x^2} (Module 11), but the comparison theorem bounds it. On [0,1],[0, 1]\mathclose{\text{,}} x2x^2 increases from 0 to 1, so −x2-x^2 decreases from 0 to −1,-1\mathclose{\text{,}} and e−x2e^{-x^2} decreases from e0=1e^0 = 1 to e−1.e^{-1}\mathclose{\text{.}} So e−1≤e−x2≤1e^{-1} \le e^{-x^2} \le 1 on [0,1],[0, 1]\mathclose{\text{,}} and Theorem 9.7(c), with b−a=1,b - a = 1\mathclose{\text{,}} gives

e−1≤∫01e−x2 dx≤1.e^{-1} \le \int_0^1 e^{-x^2}\,dx \le 1.

Since e−1≈0.3679,e^{-1} \approx 0.3679\mathclose{\text{,}} the integral lies between 0.36 and 1.

To do better, split [0,1][0, 1] at 12\tfrac12 (additivity) and bound each half. On [0,12],\big[0, \tfrac12\big]\mathclose{\text{,}} e−1/4≤e−x2≤1;e^{-1/4} \le e^{-x^2} \le 1\mathclose{\text{;}} on [12,1],\big[\tfrac12, 1\big]\mathclose{\text{,}} e−1≤e−x2≤e−1/4.e^{-1} \le e^{-x^2} \le e^{-1/4}\mathclose{\text{.}} Each half has width 12,\tfrac12\mathclose{\text{,}} so

e−1/4+e−12≤∫01e−x2 dx≤1+e−1/42,\frac{e^{-1/4} + e^{-1}}{2} \le \int_0^1 e^{-x^2}\,dx \le \frac{1 + e^{-1/4}}{2},

where the bounds are about 0.57330.5733 and 0.8894:0.8894\mathclose{\text{:}} the integral lies between 0.57 and 0.89. These two bounds are R2R_2 and L2.L_2\mathclose{\text{.}} The same argument works for any continuous decreasing ff and any n:n\mathclose{\text{:}} on each subinterval, ff lies between its values at the right end and at the left end, so Theorem 9.7(c) bounds the integral over each subinterval, and adding the nn results (additivity) gives Rn≤∫abf(x) dx≤Ln.R_n \le \int_a^b f(x)\,dx \le L_n\mathclose{\text{.}} For a continuous increasing f,f\mathclose{\text{,}} Ln≤∫abf(x) dx≤Rn.L_n \le \int_a^b f(x)\,dx \le R_n\mathclose{\text{.}} The gap between the bounds, ∣Ln−Rn∣=Δx ∣f(a)−f(b)∣,\abs{L_n - R_n} = \Delta x\,\abs{f(a) - f(b)}\mathclose{\text{,}} shrinks as nn grows.

(For this integrand the bounds are strict, because it equals each bound only at single points; Exercise 9.12 shows how to prove such strict inequalities.)

Compute itA number with no formula yet

Midpoint sums pin the value down. Print each sum to nine decimal places:

Python
import math

def midpoint(f, a, b, n):
    dx = (b - a)/n
    return sum(f(a + (i + 0.5)*dx) for i in range(n))*dx

def g(x):
    return math.exp(-x**2)

for n in [2, 10, 100, 1000]:
    print(f"{n} {midpoint(g, 0, 1, n):.9f}")
Output
2 0.754597944
10 0.747130878
100 0.746827198
1000 0.746824163

The digits settle down: to six decimal places, ∫01e−x2 dx≈0.746824,\int_0^1 e^{-x^2}\,dx \approx 0.746824\mathclose{\text{,}} inside the bounds of Example 9.9. Integrals of e−x2e^{-x^2} are at the heart of probability: Module 12 meets them again with the normal distribution.

Watch out

Integrals do not multiply: ∫abf(x)g(x) dx\int_a^b f(x)g(x)\,dx is not ∫abf(x) dx⋅∫abg(x) dx.\int_a^b f(x)\,dx \cdot \int_a^b g(x)\,dx\mathclose{\text{.}} For example, ∫01x⋅x dx=∫01x2 dx=13,\int_0^1 x \cdot x\,dx = \int_0^1 x^2\,dx = \tfrac13\mathclose{\text{,}} while (∫01x dx)2=(12)2=14.\big(\int_0^1 x\,dx\big)^2 = \big(\tfrac12\big)^2 = \tfrac14\mathclose{\text{.}} Nor do they divide. And the comparison theorem needs a<b:a < b\mathclose{\text{:}} with the limits reversed, the inequalities turn round, since ∫101 dx=−1\int_1^0 1\,dx = -1 although 1>0.1 > 0\mathclose{\text{.}}

6

Integrals from geometry and symmetry

Limits of Riemann sums take work. When the region under a graph is made of familiar shapes, or has a symmetry, the integral comes faster.

Geometry

When a graph is made of straight segments and arcs of circles, its integral is a sum of the areas of rectangles, triangles, trapezoids and parts of discs, with a minus sign for each piece below the axis. Recall that a trapezoid whose parallel sides have lengths pp and q,q\mathclose{\text{,}} a distance ww apart, has area (p+q)w2,\tfrac{(p + q)w}{2}\mathclose{\text{,}} and a disc of radius rr has area πr2.\pi r^2\mathclose{\text{.}}

Example 9.10Integrals as familiar areas✓ Checked

Evaluate:

  • (a) ∫03(2x+1) dx\displaystyle\int_0^3 (2x + 1)\,dx
  • (b) ∫−12∣x∣ dx\displaystyle\int_{-1}^{2} \abs{x}\,dx
  • (c) ∫044x−x2 dx\displaystyle\int_0^4 \sqrt{4x - x^2}\,dx
  • (d) ∫03(x−1) dx\displaystyle\int_0^3 (x - 1)\,dx

(a) The graph is a line, above the axis on [0,3],[0, 3]\mathclose{\text{,}} and the region under it is a trapezoid with parallel sides f(0)=1f(0) = 1 and f(3)=7,f(3) = 7\mathclose{\text{,}} a distance 3 apart. The integral is (1+7)⋅32=12.\tfrac{(1 + 7) \cdot 3}{2} = 12\mathclose{\text{.}}

(b) The graph of ∣x∣\abs{x} is a V. The region consists of two triangles: one over [−1,0][-1, 0] with base 1 and height 1, of area 12,\tfrac12\mathclose{\text{,}} and one over [0,2][0, 2] with base 2 and height 2, of area 2. The integral is 12+2=52.\tfrac12 + 2 = \tfrac52\mathclose{\text{.}}

(c) Complete the square: 4x−x2=4−(x−2)2.4x - x^2 = 4 - (x - 2)^2\mathclose{\text{.}} So y=4x−x2y = \sqrt{4x - x^2} means that y≥0y \ge 0 and (x−2)2+y2=4:{(x - 2)^2 + y^2 = 4}\mathclose{\text{:}} the graph is the upper half of the circle of radius 2 centred at (2,0),(2, 0)\mathclose{\text{,}} which runs from x=0x = 0 to x=4.x = 4\mathclose{\text{.}} The region is a half disc, of area 12π⋅22=2π\tfrac12\pi \cdot 2^2 = 2\pi (Figure 9.4, left).

(d) The line y=x−1y = x - 1 is below the axis on [0,1],[0, 1]\mathclose{\text{,}} forming a triangle of area 12,\tfrac12\mathclose{\text{,}} and above it on [1,3],[1, 3]\mathclose{\text{,}} forming a triangle with base 2 and height 2, of area 2. The integral is the signed area 2−12=32.2 - \tfrac12 = \tfrac32\mathclose{\text{.}}

Symmetry

Recall from Section 1.4 that ff is even if f(−x)=f(x),f(-x) = f(x)\mathclose{\text{,}} and odd if f(−x)=−f(x),f(-x) = -f(x)\mathclose{\text{,}} for every xx in its domain. For example, x2,x^2\mathclose{\text{,}} cos⁡x\cos x and ∣x∣\abs{x} are even, and x3,x^3\mathclose{\text{,}} sin⁡x\sin x and 1x\tfrac1x are odd. Over an interval [−a,a],[-a, a]\mathclose{\text{,}} symmetric about 0, the graph of an even function has two halves that are mirror images, and the graph of an odd function has two halves that are mirror images turned upside down (Figure 9.4).

Theorem 9.8Integrals of even and odd functions

Let a>0,a > 0\mathclose{\text{,}} and let ff be continuous, or bounded with finitely many discontinuities, on [−a,a].[-a, a]\mathclose{\text{.}}

  • (a) If ff is even, then ∫−aaf(x) dx=2∫0af(x) dx.\displaystyle\int_{-a}^{a} f(x)\,dx = 2\int_0^a f(x)\,dx\mathclose{\text{.}}
  • (b) If ff is odd, then ∫−aaf(x) dx=0.\displaystyle\int_{-a}^{a} f(x)\,dx = 0\mathclose{\text{.}}
Proof

By additivity, ∫−aaf=∫−a0f+∫0af,\int_{-a}^{a} f = \int_{-a}^{0} f + \int_0^a f\mathclose{\text{,}} and both integrals exist by Theorem 9.3. Compare the two pieces through their Riemann sums. Take a partition 0=x0<x1<⋯<xn=a0 = x_0 < x_1 < \dots < x_n = a of [0,a][0, a] with sample points xi∗.x_i^*\mathclose{\text{.}} Its mirror image, −a=−xn<⋯<−x1<−x0=0,-a = -x_n < \dots < -x_1 < -x_0 = 0\mathclose{\text{,}} is a partition of [−a,0][-a, 0] with the same widths, and so the same norm; take the points −xi∗-x_i^* as its sample points. Its Riemann sum is

∑i=1nf(−xi∗) Δxi.\sum_{i=1}^{n} f(-x_i^*)\,\Delta x_i.

If ff is even, this equals ∑f(xi∗) Δxi,\sum f(x_i^*)\,\Delta x_i\mathclose{\text{,}} the Riemann sum of the partition of [0,a];[0, a]\mathclose{\text{;}} if ff is odd, it equals −∑f(xi∗) Δxi.-\sum f(x_i^*)\,\Delta x_i\mathclose{\text{.}} As the norm shrinks to 0, the sum for [−a,0][-a, 0] approaches ∫−a0f\int_{-a}^{0} f and the sum for [0,a][0, a] approaches ∫0af\int_0^a f (Definition 9.4). So ∫−a0f=∫0af\int_{-a}^{0} f = \int_0^a f if ff is even, and ∫−a0f=−∫0af\int_{-a}^{0} f = -\int_0^a f if ff is odd. Adding ∫0af\int_0^a f gives (a) and (b).

∎
Left: int0^4 sqrt{4x - x^2},dx is the area of a half disc of radius 2, that is, 2pi (Example 9.10). Centre: the odd function x^3 - 3x on [-2, 2]; each region has a mirror image on the other side of the origin with the opposite sign, so the integral is 0. Right: an even function; its two halves have the same area A, so its integral over [-a, a] is twice its integral over [0, a].
Figure 9.4

Left: ∫044x−x2 dx\int_0^4 \sqrt{4x - x^2}\,dx is the area of a half disc of radius 2, that is, 2π2\pi (Example 9.10). Centre: the odd function x3−3xx^3 - 3x on [−2,2];[-2, 2]\mathclose{\text{;}} each region has a mirror image on the other side of the origin with the opposite sign, so the integral is 0. Right: an even function; its two halves have the same area A,A\mathclose{\text{,}} so its integral over [−a,a][-a, a] is twice its integral over [0,a].[0, a]\mathclose{\text{.}}

Example 9.11Using symmetry✓ Checked

Evaluate:

  • (a) ∫−22(x3−4x+sin⁡x) dx\displaystyle\int_{-2}^{2} \big(x^3 - 4x + \sin x\big)\,dx
  • (b) ∫−11(3x2+5x3−2) dx\displaystyle\int_{-1}^{1} \big(3x^2 + 5x^3 - 2\big)\,dx
  • (c) ∫−ππx2sin⁡x dx\displaystyle\int_{-\pi}^{\pi} x^2\sin x\,dx
  • (d) ∫−33∣x∣ dx\displaystyle\int_{-3}^{3} \abs{x}\,dx

(a) Every term changes sign with x:x\mathclose{\text{:}} (−x)3−4(−x)+sin⁡(−x)=−(x3−4x+sin⁡x).(-x)^3 - 4(-x) + \sin(-x) = -\big(x^3 - 4x + \sin x\big)\mathclose{\text{.}} The integrand is odd, so the integral is 0. You do not even need to know how to integrate sin⁡x.\sin x\mathclose{\text{.}}

(b) Split the integrand into an even part and an odd part, by linearity:

∫−11(3x2+5x3−2) dx=∫−11(3x2−2) dx+5∫−11x3 dx.\begin{aligned} &\int_{-1}^{1} \big(3x^2 + 5x^3 - 2\big)\,dx \\[5pt] &\quad= \int_{-1}^{1} \big(3x^2 - 2\big)\,dx + 5\int_{-1}^{1} x^3\,dx. \end{aligned}

The second integral is 0, since x3x^3 is odd. The first integrand is even, so the first integral is 2∫01(3x2−2) dx=2(3⋅13−2⋅1)=2(1−2)=−2.2\int_0^1 \big(3x^2 - 2\big)\,dx = 2\big(3 \cdot \tfrac13 - 2 \cdot 1\big) = 2(1 - 2) = -2\mathclose{\text{.}} The integral is −2.-2\mathclose{\text{.}}

(c) (−x)2sin⁡(−x)=−x2sin⁡x,(-x)^2\sin(-x) = -x^2\sin x\mathclose{\text{,}} so the integrand is odd and the integral is 0. In general, a product of an even function and an odd function is odd.

(d) ∣x∣\abs{x} is even, so the integral is 2∫03x dx=2⋅92=9,2\int_0^3 x\,dx = 2 \cdot \tfrac92 = 9\mathclose{\text{,}} the area of a triangle with base 3 and height 3 doubled.

Watch out

Symmetry needs an interval symmetric about 0: ∫01x3 dx\int_0^1 x^3\,dx is not 0 but 14\tfrac14 (Exercise 9.5), because on [0,1][0, 1] the odd function x3x^3 is positive. And an integral of 0 over [−a,a][-a, a] does not make a function odd: ∫−11(x2−13) dx=23−23=0,\int_{-1}^{1} \big(x^2 - \tfrac13\big)\,dx = \tfrac23 - \tfrac23 = 0\mathclose{\text{,}} but x2−13x^2 - \tfrac13 is even.

7

The average value of a function

The average of nn numbers y1,…,yny_1, \dots, y_n is y1+⋯+ynn.\tfrac{y_1 + \dots + y_n}{n}\mathclose{\text{.}} But what is the average temperature over a day, when the temperature takes infinitely many values? Sample it. Take the right ends x1,…,xnx_1, \dots, x_n of the nn equal subintervals of [a,b][a, b] and average the values of ff there. Multiplying and dividing by b−a,b - a\mathclose{\text{,}} and using Δx=b−an,\Delta x = \tfrac{b - a}{n}\mathclose{\text{,}}

f(x1)+⋯+f(xn)n=1b−a∑i=1nf(xi) b−an=Rnb−a.\begin{aligned} &\frac{f(x_1) + \dots + f(x_n)}{n} \\[5pt] &\quad= \frac{1}{b - a}\sum_{i=1}^{n} f(x_i)\,\frac{b - a}{n} = \frac{R_n}{b - a}. \end{aligned}

As nn grows, these sample averages approach 1b−a∫abf(x) dx,\tfrac{1}{b - a}\int_a^b f(x)\,dx\mathclose{\text{,}} by Theorem 9.4.

Definition 9.6Average value

The average value of a function ff integrable on [a,b],[a, b]\mathclose{\text{,}} where a<b,a < b\mathclose{\text{,}} is

favg=1b−a∫abf(x) dx,f_{\text{avg}} = \frac{1}{b - a}\int_a^b f(x)\,dx,

read “f average”.

Rearranged, favg(b−a)=∫abf(x) dx:f_{\text{avg}}(b - a) = \int_a^b f(x)\,dx\mathclose{\text{:}} when f≥0,f \ge 0\mathclose{\text{,}} the rectangle of height favgf_{\text{avg}} on [a,b][a, b] has the same area as the region under the graph (Figure 9.5). For example, the average value of x2x^2 on [0,1][0, 1] is 13,\tfrac13\mathclose{\text{,}} and on [0,2][0, 2] it is 12⋅83=43.\tfrac12 \cdot \tfrac83 = \tfrac43\mathclose{\text{.}}

Example 9.12The average velocity of a falling ball✓ Checked

Find the average value of the velocity v(t)=9.8tv(t) = 9.8t of the falling ball over [0,3][0, 3] and over [1,3],[1, 3]\mathclose{\text{,}} and compare with Module 1.

On [0,3][0, 3] the region under the graph of vv is a triangle with base 3 and height v(3)=29.4,v(3) = 29.4\mathclose{\text{,}} of area 12⋅3⋅29.4=44.1,\tfrac12 \cdot 3 \cdot 29.4 = 44.1\mathclose{\text{,}} so

vavg=13⋅44.1=14.7 m/s.v_{\text{avg}} = \frac13 \cdot 44.1 = 14.7 \text{ m/s}.

On [1,3][1, 3] the region is a trapezoid with parallel sides v(1)=9.8v(1) = 9.8 and v(3)=29.4,v(3) = 29.4\mathclose{\text{,}} a distance 2 apart, of area (9.8+29.4)⋅22=39.2,\tfrac{(9.8 + 29.4) \cdot 2}{2} = 39.2\mathclose{\text{,}} so vavg=39.22=19.6v_{\text{avg}} = \tfrac{39.2}{2} = 19.6 m/s.

Section 1.6 found that the ball falls s(3)−s(1)=39.2s(3) - s(1) = 39.2 m between t=1t = 1 and t=3,t = 3\mathclose{\text{,}} an average speed of 19.6 m/s: the same number. The average value of the velocity over an interval is the average velocity, displacement divided by time, as it should be.

The ball’s velocity takes the value 19.6 m/s at t=2,t = 2\mathclose{\text{,}} in the middle of [1,3]:[1, 3]\mathclose{\text{:}} the velocity reaches its average value. A continuous function always does.

Theorem 9.9The Mean Value Theorem for integrals

If ff is continuous on [a,b],[a, b]\mathclose{\text{,}} where a<b,a < b\mathclose{\text{,}} then there is a number cc in [a,b][a, b] such that

f(c)=1b−a∫abf(x) dx,f(c) = \frac{1}{b - a}\int_a^b f(x)\,dx,

that is, ∫abf(x) dx=f(c)(b−a).\int_a^b f(x)\,dx = f(c)(b - a)\mathclose{\text{.}}

Proof

Since ff is continuous, it is integrable (Theorem 9.3), and by the Extreme Value Theorem (Module 3) it has a minimum value m=f(d)m = f(d) and a maximum value M=f(e)M = f(e) on [a,b],[a, b]\mathclose{\text{,}} for some numbers dd and ee in [a,b].[a, b]\mathclose{\text{.}} Since m≤f(x)≤Mm \le f(x) \le M on [a,b],[a, b]\mathclose{\text{,}} the comparison theorem gives m(b−a)≤∫abf(x) dx≤M(b−a),m(b - a) \le \int_a^b f(x)\,dx \le M(b - a)\mathclose{\text{,}} and dividing by b−a>0,b - a > 0\mathclose{\text{,}}

m≤favg≤M.m \le f_{\text{avg}} \le M.

If favg=m,f_{\text{avg}} = m\mathclose{\text{,}} take c=d;c = d\mathclose{\text{;}} if favg=M,f_{\text{avg}} = M\mathclose{\text{,}} take c=e.c = e\mathclose{\text{.}} Otherwise favgf_{\text{avg}} lies strictly between f(d)f(d) and f(e),f(e)\mathclose{\text{,}} and ff is continuous on the closed interval with ends dd and e,e\mathclose{\text{,}} so the Intermediate Value Theorem (Module 3) gives a number cc strictly between dd and e,e\mathclose{\text{,}} and so in [a,b],[a, b]\mathclose{\text{,}} with f(c)=favg.f(c) = f_{\text{avg}}\mathclose{\text{.}}

∎

Continuity is needed, for both theorems of Module 3 that the proof uses. Without it the conclusion can fail: the function equal to 0 on [0,1)[0, 1) and to 1 on [1,2][1, 2] is integrable, with one jump, and its integral over [0,2][0, 2] is the area of a square of side 1. So its average value on [0,2][0, 2] is 12,\tfrac12\mathclose{\text{,}} a value it never takes.

The average value of f(x) = x^2 on [-2, 2] is tfrac43 (Example 9.13). The dashed rectangle of height tfrac43 on [-2, 2] has the same area, tfrac{16}{3}, as the shaded region under the graph: the parts of the region that rise above the rectangle have the same area as the parts of the rectangle that the region leaves empty. The graph reaches the height tfrac43 at two points, c = pmtfrac{2}{sqrt3}.
Figure 9.5

The average value of f(x)=x2f(x) = x^2 on [−2,2][-2, 2] is 43\tfrac43 (Example 9.13). The dashed rectangle of height 43\tfrac43 on [−2,2][-2, 2] has the same area, 163,\tfrac{16}{3}\mathclose{\text{,}} as the shaded region under the graph: the parts of the region that rise above the rectangle have the same area as the parts of the rectangle that the region leaves empty. The graph reaches the height 43\tfrac43 at two points, c=±23.c = \pm\tfrac{2}{\sqrt3}\mathclose{\text{.}}

Example 9.13Where the average is reached✓ Checked

Find the average value of f(x)=x2f(x) = x^2 on [−2,2],[-2, 2]\mathclose{\text{,}} and every number cc in [−2,2][-2, 2] with f(c)=favg.f(c) = f_{\text{avg}}\mathclose{\text{.}} Then do the same on [0,1].[0, 1]\mathclose{\text{.}}

The function x2x^2 is even, so by Theorem 9.8 and Section 9.4, ∫−22x2 dx=2∫02x2 dx=2⋅83=163.\int_{-2}^{2} x^2\,dx = 2\int_0^2 x^2\,dx = 2 \cdot \tfrac83 = \tfrac{16}{3}\mathclose{\text{.}} The interval has length 4, so favg=14⋅163=43.f_{\text{avg}} = \tfrac14 \cdot \tfrac{16}{3} = \tfrac43\mathclose{\text{.}} Solving c2=43c^2 = \tfrac43 gives c=±23≈±1.155,c = \pm\tfrac{2}{\sqrt3} \approx \pm1.155\mathclose{\text{,}} and both are in [−2,2].[-2, 2]\mathclose{\text{.}} The theorem promises at least one c;c\mathclose{\text{;}} here there are two.

On [0,1],[0, 1]\mathclose{\text{,}} favg=∫01x2 dx=13,f_{\text{avg}} = \int_0^1 x^2\,dx = \tfrac13\mathclose{\text{,}} and c2=13c^2 = \tfrac13 with cc in [0,1][0, 1] gives c=13≈0.577.c = \tfrac{1}{\sqrt3} \approx 0.577\mathclose{\text{.}} Notice that cc is not the midpoint 12\tfrac12 of the interval: the average value of x2x^2 on [0,1][0, 1] is not its value at the midpoint, which is 14.\tfrac14\mathclose{\text{.}}

Watch out

The average value of ff is not the average of its values at the ends of the interval. For x2x^2 on [0,1],[0, 1]\mathclose{\text{,}} f(0)+f(1)2=12,\tfrac{f(0) + f(1)}{2} = \tfrac12\mathclose{\text{,}} while favg=13.f_{\text{avg}} = \tfrac13\mathclose{\text{.}} The two agree for linear functions, such as the velocity 9.8t9.8t of Example 9.12, but not in general: the average value takes every value of ff into account.

8

A faster way is coming

Here are the exact integrals of this module, from 0 to b,b\mathclose{\text{,}} for b>0:b > 0\mathclose{\text{:}}

f(x)f(x) ∫0bf(x) dx\displaystyle\int_0^b f(x)\,dx Found in
xx b22\dfrac{b^2}{2} a triangle
x2x^2 b33\dfrac{b^3}{3} Section 9.3
x3x^3 b44\dfrac{b^4}{4} Exercise 9.5
9.8x9.8x 4.9b24.9b^2 a triangle, Section 9.1

Treat each answer as a function of the upper limit b,b\mathclose{\text{,}} and differentiate it with the power rule of Module 4: (b22)′=b,\big(\tfrac{b^2}{2}\big)' = b\mathclose{\text{,}} (b33)′=b2,\big(\tfrac{b^3}{3}\big)' = b^2\mathclose{\text{,}} (b44)′=b3\big(\tfrac{b^4}{4}\big)' = b^3 and (4.9b2)′=9.8b.\big(4.9b^2\big)' = 9.8b\mathclose{\text{.}} Each time the integrand comes back, with bb in place of x.x\mathclose{\text{.}} For the falling ball this is no surprise: the area under the velocity graph up to time bb is the distance fallen, s(b)=4.9b2,s(b) = 4.9b^2\mathclose{\text{,}} and the derivative of the distance is the velocity.

The pattern is the Fundamental Theorem of Calculus, the subject of Module 10: integration and differentiation undo each other, as the speedometer and odometer of Section 1.1 suggested. In its most used form it says that if ff is continuous on [a,b][a, b] and FF is a function with F′=fF' = f there, then

∫abf(x) dx=F(b)−F(a).\int_a^b f(x)\,dx = F(b) - F(a).

With it, ∫01x2 dx=133−033=13\int_0^1 x^2\,dx = \tfrac{1^3}{3} - \tfrac{0^3}{3} = \tfrac13 takes one line, with no sums and no limits. It also reaches integrals that this module could only estimate. Since (ln⁡x)′=1x(\ln x)' = \tfrac1x for x>0x > 0 (Module 6), ∫12dxx=ln⁡2−ln⁡1=ln⁡2≈0.693147,\int_1^2 \tfrac{dx}{x} = \ln 2 - \ln 1 = \ln 2 \approx 0.693147\mathclose{\text{,}} the number that the sums of Example 9.4 approached; and since (−cos⁡x)′=sin⁡x(-\cos x)' = \sin x (Module 5), ∫0πsin⁡x dx=−cos⁡π+cos⁡0=2.\int_0^\pi \sin x\,dx = -\cos\pi + \cos 0 = 2\mathclose{\text{.}}

Riemann sums remain essential all the same. They define the integral; they turn real problems (areas, distances, energy, averages, and in Module 12 volumes, work and probabilities) into integrals; and where FF has no formula built from the familiar functions, as for e−x2,e^{-x^2}\mathclose{\text{,}} they compute integrals numerically (Module 11).

9

What you learned

  • The area under a curve and the distance travelled at a changing speed are the same problem: cut the interval into short pieces, approximate each piece by a rectangle, add up, and let the pieces shrink.
  • Sigma notation writes am+⋯+ana_m + \dots + a_n as ∑i=mnai;\sum_{i=m}^{n} a_i\mathclose{\text{;}} sums split over ++ and −,-\mathclose{\text{,}} and constants come out. ∑i=n(n+1)2,\sum i = \tfrac{n(n+1)}{2}\mathclose{\text{,}} ∑i2=n(n+1)(2n+1)6\sum i^2 = \tfrac{n(n+1)(2n+1)}{6} and ∑i3=(n(n+1)2)2,\sum i^3 = \big(\tfrac{n(n+1)}{2}\big)^2\mathclose{\text{,}} proved by pairing, by a telescoping sum and by induction.
  • The left, right and midpoint sums Ln,L_n\mathclose{\text{,}} RnR_n and MnM_n take heights at the left ends, right ends or midpoints of nn equal subintervals of width Δx=b−an.\Delta x = \tfrac{b - a}{n}\mathclose{\text{.}} For a continuous increasing f,f\mathclose{\text{,}} Ln≤∫abf≤Rn;L_n \le \int_a^b f \le R_n\mathclose{\text{;}} for a continuous decreasing f,f\mathclose{\text{,}} the other way round. For x2x^2 on [0,1],[0, 1]\mathclose{\text{,}} the errors of LnL_n and RnR_n shrink like 1n\tfrac1n and that of MnM_n like 1n2.\tfrac{1}{n^2}\mathclose{\text{.}}
  • The definite integral ∫abf(x) dx\int_a^b f(x)\,dx is the limit of Riemann sums ∑f(xi∗) Δxi\sum f(x_i^*)\,\Delta x_i as the norm of the partition shrinks to 0, for every choice of sample points. Continuous functions, and bounded functions with finitely many discontinuities, are integrable, and then ∫abf=lim⁡Ln=lim⁡Rn=lim⁡Mn.\int_a^b f = \lim L_n = \lim R_n = \lim M_n\mathclose{\text{.}} Exact limits gave ∫0bx2 dx=b33.\int_0^b x^2\,dx = \tfrac{b^3}{3}\mathclose{\text{.}}
  • The integral is a signed area: area above the axis counts as positive, area below as negative. The total area is ∫ab∣f∣.\int_a^b \abs{f}\mathclose{\text{.}} The integral of a velocity is a displacement; the distance travelled is the integral of the speed ∣v∣.\abs{v}\mathclose{\text{.}}
  • The integral is linear, additive over intervals (∫abf+∫bcf=∫acf,\int_a^b f + \int_b^c f = \int_a^c f\mathclose{\text{,}} with ∫baf=−∫abf),\int_b^a f = -\int_a^b f\mathclose{\text{),}} and respects inequalities: m(b−a)≤∫abf≤M(b−a)m(b - a) \le \int_a^b f \le M(b - a) when m≤f≤Mm \le f \le M on [a,b],[a, b]\mathclose{\text{,}} a<b.a < b\mathclose{\text{.}}
  • Areas of triangles, trapezoids and discs give integrals directly; over [−a,a],[-a, a]\mathclose{\text{,}} odd functions integrate to 0 and even functions to twice their integral over [0,a].[0, a]\mathclose{\text{.}}
  • The average value of ff on [a,b][a, b] is 1b−a∫abf(x) dx,\tfrac{1}{b - a}\int_a^b f(x)\,dx\mathclose{\text{,}} and a continuous function takes its average value somewhere in [a,b][a, b] (the Mean Value Theorem for integrals).
  • Differentiating ∫0bx2 dx=b33\int_0^b x^2\,dx = \tfrac{b^3}{3} with respect to bb gives back b2:b^2\mathclose{\text{:}} a first sight of the Fundamental Theorem of Calculus, Module 10.
10

Exercises

Exercise 9.1★Sigma notation
  • (a) Write out and evaluate ∑i=15(2i+1)\sum_{i=1}^{5} (2i + 1) and ∑k=043k.\sum_{k=0}^{4} 3^k\mathclose{\text{.}}
  • (b) Write 2+4+6+⋯+1002 + 4 + 6 + \dots + 100 in sigma notation, and evaluate it with Theorem 9.2.
  • (c) Use the rules for sums and Theorem 9.2 to evaluate ∑i=110(i2−3i+2).\sum_{i=1}^{10} \big(i^2 - 3i + 2\big)\mathclose{\text{.}}
Show solution✓ Checked

(a) ∑i=15(2i+1)=3+5+7+9+11=35,\sum_{i=1}^{5} (2i + 1) = 3 + 5 + 7 + 9 + 11 = 35\mathclose{\text{,}} and ∑k=043k=1+3+9+27+81=121.\sum_{k=0}^{4} 3^k = 1 + 3 + 9 + 27 + 81 = 121\mathclose{\text{.}} The second sum has five terms, since kk starts at 0.

(b) The even number with index ii is 2i,2i\mathclose{\text{,}} and 2i=1002i = 100 at i=50,i = 50\mathclose{\text{,}} so the sum is ∑i=1502i.\sum_{i=1}^{50} 2i\mathclose{\text{.}} By the first rule for sums and Theorem 9.2,

∑i=1502i=2∑i=150i=2⋅50⋅512=2550.\begin{aligned} \sum_{i=1}^{50} 2i &= 2\sum_{i=1}^{50} i \\[5pt] &= 2 \cdot \frac{50 \cdot 51}{2} = 2550. \end{aligned}

(c) Split the sum and use Theorem 9.2 with n=10:n = 10\mathclose{\text{:}}

∑i=110(i2−3i+2)=∑i=110i2−3∑i=110i+∑i=1102=385−3⋅55+2⋅10=240.\begin{aligned} &\sum_{i=1}^{10} \big(i^2 - 3i + 2\big) \\[5pt] &\quad= \sum_{i=1}^{10} i^2 - 3\sum_{i=1}^{10} i + \sum_{i=1}^{10} 2 \\[5pt] &\quad= 385 - 3 \cdot 55 + 2 \cdot 10 = 240. \end{aligned}

A common slip is to write ∑i=1102=2;\sum_{i=1}^{10} 2 = 2\mathclose{\text{;}} it is 2+2+⋯+2=20.2 + 2 + \dots + 2 = 20\mathclose{\text{.}} Check by another route: i2−3i+2=(i−1)(i−2),i^2 - 3i + 2 = (i - 1)(i - 2)\mathclose{\text{,}} whose values for i=1,…,10i = 1, \dots, 10 are 0,0,2,6,12,20,30,42,56,72,0, 0, 2, 6, 12, 20, 30, 42, 56, 72\mathclose{\text{,}} with sum 240.

Exercise 9.2★Riemann sums by hand

Let f(x)=4−x2f(x) = 4 - x^2 on [0,2].[0, 2]\mathclose{\text{.}}

  • (a) Compute L4,L_4\mathclose{\text{,}} R4R_4 and M4.M_4\mathclose{\text{.}}
  • (b) Which of them is certainly larger than the area under the graph, and which certainly smaller? Why?
  • (c) Use linearity and ∫0bx2 dx=b33\int_0^b x^2\,dx = \tfrac{b^3}{3} to find the area exactly. Which of the three sums is closest?
Show solution✓ Checked

(a) Δx=2−04=0.5.\Delta x = \tfrac{2 - 0}{4} = 0.5\mathclose{\text{.}} The cut points 0,0.5,1,1.5,20, 0.5, 1, 1.5, 2 give the values 4,3.75,3,1.75,0,4, 3.75, 3, 1.75, 0\mathclose{\text{,}} so

L4=0.5(4+3.75+3+1.75)=0.5⋅12.5=6.25,R4=0.5(3.75+3+1.75+0)=0.5⋅8.5=4.25.\begin{aligned} L_4 &= 0.5(4 + 3.75 + 3 + 1.75) \\ &= 0.5 \cdot 12.5 = 6.25, \\ R_4 &= 0.5(3.75 + 3 + 1.75 + 0) \\ &= 0.5 \cdot 8.5 = 4.25. \end{aligned}

The midpoints 0.25,0.75,1.25,1.750.25, 0.75, 1.25, 1.75 give the values 3.9375,3.4375,2.4375,0.9375,3.9375, 3.4375, 2.4375, 0.9375\mathclose{\text{,}} with sum 10.75,10.75\mathclose{\text{,}} so M4=0.5⋅10.75=5.375.M_4 = 0.5 \cdot 10.75 = 5.375\mathclose{\text{.}}

(b) On [0,2],[0, 2]\mathclose{\text{,}} x2x^2 increases, so 4−x24 - x^2 decreases. On each subinterval its value at the left end is its largest, so L4=6.25L_4 = 6.25 is larger than the area, and its value at the right end is its smallest, so R4=4.25R_4 = 4.25 is smaller. This argument says nothing about M4.M_4\mathclose{\text{.}}

(c) By linearity,

∫02(4−x2) dx=∫024 dx−∫02x2 dx=8−83=163≈5.333.\begin{aligned} &\int_0^2 \big(4 - x^2\big)\,dx \\[5pt] &\quad= \int_0^2 4\,dx - \int_0^2 x^2\,dx \\[5pt] &\quad= 8 - \frac83 = \frac{16}{3} \approx 5.333. \end{aligned}

M4=5.375M_4 = 5.375 is the closest, too large by 438−163=124≈0.042;\tfrac{43}{8} - \tfrac{16}{3} = \tfrac{1}{24} \approx 0.042\mathclose{\text{;}} L4L_4 is too large by 1112≈0.917,\tfrac{11}{12} \approx 0.917\mathclose{\text{,}} and R4R_4 too small by 1312≈1.083.\tfrac{13}{12} \approx 1.083\mathclose{\text{.}} The midpoint sum overestimates here because the graph bends downwards; Module 11 explains the connection.

Exercise 9.3★A car slowing down

A driver brakes, and a passenger reads the speedometer every 5 seconds until the car stops. The readings, converted to metres per second, are made up:

Time tt (s) Speed vv (m/s)
0 20
5 18
10 15
15 11
20 6
25 0
  • (a) Find the left and right sums. Which of them is an upper estimate of the braking distance, and why?
  • (b) How often would the speedometer have to be read for the two estimates to differ by at most 20 m?
Show solution✓ Checked

(a) With Δt=5\Delta t = 5 s,

L=5(20+18+15+11+6)=5⋅70=350 m,R=5(18+15+11+6+0)=5⋅50=250 m.\begin{aligned} L &= 5(20 + 18 + 15 + 11 + 6) \\ &= 5 \cdot 70 = 350 \text{ m}, \\ R &= 5(18 + 15 + 11 + 6 + 0) \\ &= 5 \cdot 50 = 250 \text{ m}. \end{aligned}

The car slows down throughout, so during each interval its speed is at most the reading at the start of the interval and at least the reading at the end. So the left sum, 350 m, is the upper estimate, and the right sum, 250 m, the lower one: the braking distance is between 250 m and 350 m. This is the opposite of Example 9.2, where the car sped up.

(b) As in Example 9.2, every reading except the first and the last appears in both sums, so with readings every Δt\Delta t seconds

L−R=Δt (v(0)−v(25))=20 Δt.\begin{aligned} L - R &= \Delta t\,\big(v(0) - v(25)\big) \\ &= 20\,\Delta t. \end{aligned}

This is at most 20 m when Δt≤1:\Delta t \le 1\mathclose{\text{:}} the speedometer must be read at least every second.

Exercise 9.4★Integrals from areas

Evaluate each integral by interpreting it as a signed area, or with symmetry.

  • (a) ∫14(3−x) dx\displaystyle\int_1^4 (3 - x)\,dx
  • (b) ∫−24∣x∣ dx\displaystyle\int_{-2}^{4} \abs{x}\,dx
  • (c) ∫039−x2 dx\displaystyle\int_0^3 \sqrt{9 - x^2}\,dx
  • (d) ∫−22(xcos⁡x+3) dx\displaystyle\int_{-2}^{2} \big(x\cos x + 3\big)\,dx
Show solution✓ Checked

(a) The line y=3−xy = 3 - x is above the axis on [1,3)[1, 3) and below it on (3,4].(3, 4]\mathclose{\text{.}} Above: a triangle with base 2 and height f(1)=2,f(1) = 2\mathclose{\text{,}} of area 2. Below: a triangle with base 1 and height ∣f(4)∣=1,\abs{f(4)} = 1\mathclose{\text{,}} of area 12.\tfrac12\mathclose{\text{.}} The integral is 2−12=32.2 - \tfrac12 = \tfrac32\mathclose{\text{.}}

(b) Two triangles: over [−2,0],[-2, 0]\mathclose{\text{,}} base 2 and height 2, area 2; over [0,4],[0, 4]\mathclose{\text{,}} base 4 and height 4, area 8. The integral is 2+8=10.2 + 8 = 10\mathclose{\text{.}}

(c) y=9−x2y = \sqrt{9 - x^2} is the upper half of the circle x2+y2=9,x^2 + y^2 = 9\mathclose{\text{,}} of radius 3. From x=0x = 0 to x=3x = 3 it bounds a quarter disc, of area 14π⋅32=9π4≈7.069.\tfrac14\pi \cdot 3^2 = \tfrac{9\pi}{4} \approx 7.069\mathclose{\text{.}}

(d) By linearity the integral is ∫−22xcos⁡x dx+∫−223 dx.\int_{-2}^{2} x\cos x\,dx + \int_{-2}^{2} 3\,dx\mathclose{\text{.}} The function xcos⁡xx\cos x is odd, since (−x)cos⁡(−x)=−xcos⁡x(-x)\cos(-x) = -x\cos x (cosine is even), so its integral over [−2,2][-2, 2] is 0. The second integral is 3⋅4=12.3 \cdot 4 = 12\mathclose{\text{.}} The answer is 12.

Exercise 9.5★★The integral of x3x^3
  • (a) Show that the right sum of f(x)=x3f(x) = x^3 on [0,2][0, 2] with nn subintervals is Rn=4(1+1n)2.R_n = 4\big(1 + \tfrac1n\big)^2\mathclose{\text{.}}
  • (b) Deduce that ∫02x3 dx=4.\displaystyle\int_0^2 x^3\,dx = 4\mathclose{\text{.}}
  • (c) Show in the same way that ∫0bx3 dx=b44\displaystyle\int_0^b x^3\,dx = \frac{b^4}{4} for every b>0,b > 0\mathclose{\text{,}} and find ∫01x3 dx\displaystyle\int_0^1 x^3\,dx and ∫12x3 dx.\displaystyle\int_1^2 x^3\,dx\mathclose{\text{.}}
Show solution✓ Checked

(a) Δx=2n\Delta x = \tfrac2n and xi=2in,x_i = \tfrac{2i}{n}\mathclose{\text{,}} so f(xi)=8i3n3.f(x_i) = \tfrac{8i^3}{n^3}\mathclose{\text{.}} By the first rule for sums and the formula for ∑i3,\sum i^3\mathclose{\text{,}}

Rn=∑i=1n8i3n3⋅2n=16n4∑i=1ni3=16n4⋅n2(n+1)24=4(n+1)2n2=4(1+1n)2.\begin{aligned} R_n &= \sum_{i=1}^{n}\frac{8i^3}{n^3}\cdot\frac2n = \frac{16}{n^4}\sum_{i=1}^{n} i^3 \\[5pt] &= \frac{16}{n^4}\cdot\frac{n^2(n + 1)^2}{4} \\[5pt] &= \frac{4(n + 1)^2}{n^2} = 4\Big(1 + \frac1n\Big)^2. \end{aligned}

(b) x3x^3 is continuous, so it is integrable on [0,2][0, 2] (Theorem 9.3), and by Theorem 9.4 its integral is lim⁡n→∞Rn=4⋅(1+0)2=4.\lim_{n\to\infty} R_n = 4 \cdot (1 + 0)^2 = 4\mathclose{\text{.}}

(c) Now Δx=bn\Delta x = \tfrac{b}{n} and xi=ibn,x_i = \tfrac{ib}{n}\mathclose{\text{,}} so

Rn=b4n4∑i=1ni3=b4n4⋅n2(n+1)24=b44(1+1n)2,\begin{aligned} R_n &= \frac{b^4}{n^4}\sum_{i=1}^{n} i^3 \\[5pt] &= \frac{b^4}{n^4}\cdot\frac{n^2(n + 1)^2}{4} \\[5pt] &= \frac{b^4}{4}\Big(1 + \frac1n\Big)^2, \end{aligned}

which approaches b44.\tfrac{b^4}{4}\mathclose{\text{.}} With b=1,b = 1\mathclose{\text{,}} ∫01x3 dx=14.\int_0^1 x^3\,dx = \tfrac14\mathclose{\text{.}} By additivity, ∫12x3 dx=∫02x3 dx−∫01x3 dx=4−14=154.\int_1^2 x^3\,dx = \int_0^2 x^3\,dx - \int_0^1 x^3\,dx = 4 - \tfrac14 = \tfrac{15}{4}\mathclose{\text{.}}

Exercise 9.6★★A signed area two ways
  • (a) Find ∫14(2x−3) dx\displaystyle\int_1^4 (2x - 3)\,dx as the limit of right sums.
  • (b) Check your answer with geometry: sketch the graph and find the areas of the triangles that it forms with the xx-axis. What is the total area between the graph and the axis?
Show solution✓ Checked

(a) Δx=3n\Delta x = \tfrac3n and xi=1+3in,x_i = 1 + \tfrac{3i}{n}\mathclose{\text{,}} so f(xi)=2+6in−3=6in−1,f(x_i) = 2 + \tfrac{6i}{n} - 3 = \tfrac{6i}{n} - 1\mathclose{\text{,}} and

Rn=∑i=1n(6in−1)3n=18n2∑i=1ni−3n∑i=1n1=18n2⋅n(n+1)2−3=9(n+1)n−3.\begin{aligned} R_n &= \sum_{i=1}^{n}\Big(\frac{6i}{n} - 1\Big)\frac3n \\[5pt] &= \frac{18}{n^2}\sum_{i=1}^{n} i - \frac3n\sum_{i=1}^{n} 1 \\[5pt] &= \frac{18}{n^2}\cdot\frac{n(n + 1)}{2} - 3 \\[5pt] &= \frac{9(n + 1)}{n} - 3. \end{aligned}

As n→∞,n \to \infty\mathclose{\text{,}} n+1n→1,\tfrac{n + 1}{n} \to 1\mathclose{\text{,}} so ∫14(2x−3) dx=9−3=6.\int_1^4 (2x - 3)\,dx = 9 - 3 = 6\mathclose{\text{.}}

(b) The line y=2x−3y = 2x - 3 crosses the axis at x=32.x = \tfrac32\mathclose{\text{.}} On [1,32]\big[1, \tfrac32\big] it is below the axis, forming a triangle with base 12\tfrac12 and height ∣f(1)∣=1,\abs{f(1)} = 1\mathclose{\text{,}} of area 14.\tfrac14\mathclose{\text{.}} On [32,4]\big[\tfrac32, 4\big] it is above, forming a triangle with base 52\tfrac52 and height f(4)=5,f(4) = 5\mathclose{\text{,}} of area 254.\tfrac{25}{4}\mathclose{\text{.}} The signed area is 254−14=6,\tfrac{25}{4} - \tfrac14 = 6\mathclose{\text{,}} as in (a). The total area is 254+14=132.\tfrac{25}{4} + \tfrac14 = \tfrac{13}{2}\mathclose{\text{.}}

Exercise 9.7★★There and back again

The particle of Example 4.10 has position s(t)=t3−6t2+9ts(t) = t^3 - 6t^2 + 9t metres and velocity v(t)=3t2−12t+9v(t) = 3t^2 - 12t + 9 m/s; it is at rest at t=1t = 1 and t=3,t = 3\mathclose{\text{,}} and moves backwards in between.

  • (a) Use linearity with ∫0bt2 dt=b33\int_0^b t^2\,dt = \tfrac{b^3}{3} and ∫0bt dt=b22\int_0^b t\,dt = \tfrac{b^2}{2} to find ∫0bv(t) dt\int_0^b v(t)\,dt for b>0.b > 0\mathclose{\text{.}} Compare it with s(b)−s(0).s(b) - s(0)\mathclose{\text{.}}
  • (b) Use additivity to find ∫01v(t) dt,\int_0^1 v(t)\,dt\mathclose{\text{,}} ∫13v(t) dt\int_1^3 v(t)\,dt and ∫34v(t) dt.\int_3^4 v(t)\,dt\mathclose{\text{.}} Find the displacement and the distance travelled in the first 4 seconds, and compare with Module 4.
Show solution✓ Checked

(a) By linearity, with ∫0b9 dt=9b,\int_0^b 9\,dt = 9b\mathclose{\text{,}}

∫0bv(t) dt=3∫0bt2 dt−12∫0bt dt+∫0b9 dt=3⋅b33−12⋅b22+9b=b3−6b2+9b.\begin{aligned} &\int_0^b v(t)\,dt \\[5pt] &\quad= 3\int_0^b t^2\,dt - 12\int_0^b t\,dt \\[5pt] &\qquad + \int_0^b 9\,dt \\[5pt] &\quad= 3\cdot\frac{b^3}{3} - 12\cdot\frac{b^2}{2} + 9b \\[5pt] &\quad= b^3 - 6b^2 + 9b. \end{aligned}

That is s(b),s(b)\mathclose{\text{,}} and s(0)=0:s(0) = 0\mathclose{\text{:}} the integral of the velocity from 0 to bb is the displacement s(b)−s(0),s(b) - s(0)\mathclose{\text{,}} as Section 9.4 said.

(b) Write F(b)=∫0bv(t) dt=b3−6b2+9b,F(b) = \int_0^b v(t)\,dt = b^3 - 6b^2 + 9b\mathclose{\text{,}} so that F(1)=4,F(1) = 4\mathclose{\text{,}} F(3)=0F(3) = 0 and F(4)=4.F(4) = 4\mathclose{\text{.}} By additivity, ∫pqv=F(q)−F(p)\int_p^q v = F(q) - F(p) for 0≤p<q,0 \le p < q\mathclose{\text{,}} so

∫01v dt=4,∫13v dt=0−4=−4,∫34v dt=4−0=4.\begin{aligned} \int_0^1 v\,dt &= 4, \\[5pt] \int_1^3 v\,dt &= 0 - 4 = -4, \\[5pt] \int_3^4 v\,dt &= 4 - 0 = 4. \end{aligned}

The displacement over [0,4][0, 4] is 4−4+4=44 - 4 + 4 = 4 m. The velocity is negative only on (1,3),(1, 3)\mathclose{\text{,}} so the distance travelled is ∫04∣v∣ dt=4+4+4=12\int_0^4 \abs{v}\,dt = 4 + 4 + 4 = 12 m. These are the numbers of Example 4.10: the particle goes forwards 4 m, back 4 m and forwards 4 m again, covering 12 m of ground and ending 4 m from where it started.

Exercise 9.8★★Bounds and average values
  • (a) Show that 1≤∫011+x2 dx≤2.1 \le \displaystyle\int_0^1 \sqrt{1 + x^2}\,dx \le \sqrt2\mathclose{\text{.}}
  • (b) Find the average value of f(x)=3x2f(x) = 3x^2 on [0,2],[0, 2]\mathclose{\text{,}} and the number cc in [0,2][0, 2] with f(c)=favg.f(c) = f_{\text{avg}}\mathclose{\text{.}}
  • (c) Find the average value of g(x)=4−x2g(x) = \sqrt{4 - x^2} on [−2,2],[-2, 2]\mathclose{\text{,}} and every cc in [−2,2][-2, 2] with g(c)=gavg.g(c) = g_{\text{avg}}\mathclose{\text{.}}
Show solution✓ Checked

(a) For xx in [0,1],[0, 1]\mathclose{\text{,}} 0≤x2≤1,0 \le x^2 \le 1\mathclose{\text{,}} so 1≤1+x2≤2,1 \le 1 + x^2 \le 2\mathclose{\text{,}} and since the square root is increasing, 1≤1+x2≤2.1 \le \sqrt{1 + x^2} \le \sqrt2\mathclose{\text{.}} Theorem 9.7(c) with b−a=1b - a = 1 gives 1≤∫011+x2 dx≤2≈1.414.1 \le \int_0^1 \sqrt{1 + x^2}\,dx \le \sqrt2 \approx 1.414\mathclose{\text{.}}

(b) ∫023x2 dx=3⋅83=8,\int_0^2 3x^2\,dx = 3 \cdot \tfrac83 = 8\mathclose{\text{,}} so favg=82=4.f_{\text{avg}} = \tfrac82 = 4\mathclose{\text{.}} Then 3c2=43c^2 = 4 gives c2=43;c^2 = \tfrac43\mathclose{\text{;}} the root in [0,2][0, 2] is c=23≈1.155.c = \tfrac{2}{\sqrt3} \approx 1.155\mathclose{\text{.}}

(c) ∫−224−x2 dx\int_{-2}^{2} \sqrt{4 - x^2}\,dx is the area of a half disc of radius 2, which is 2π.2\pi\mathclose{\text{.}} The interval has length 4, so gavg=2π4=π2≈1.571.g_{\text{avg}} = \tfrac{2\pi}{4} = \tfrac{\pi}{2} \approx 1.571\mathclose{\text{.}} Solve 4−c2=π2:\sqrt{4 - c^2} = \tfrac{\pi}{2}\mathclose{\text{:}} squaring, 4−c2=π24,4 - c^2 = \tfrac{\pi^2}{4}\mathclose{\text{,}} so c=±4−π24≈±1.238.c = \pm\sqrt{4 - \tfrac{\pi^2}{4}} \approx \pm1.238\mathclose{\text{.}} Both are in [−2,2],[-2, 2]\mathclose{\text{,}} and both satisfy the equation, since the square root of π24\tfrac{\pi^2}{4} is π2.\tfrac{\pi}{2}\mathclose{\text{.}}

Exercise 9.9★★Energy from a power log

A program logs a GPU’s power draw every 10 seconds during a one-minute job. The readings are made up:

Time tt (s) Power PP (W)
0 120
10 180
20 250
30 260
40 240
50 200
60 150

Energy is power accumulated over time: one watt for one second is one joule (J), so the job uses E=∫060P(t) dtE = \int_0^{60} P(t)\,dt joules.

  • (a) Estimate EE with the left sum and with the right sum.
  • (b) Can you conclude that EE lies between the two? Explain.
  • (c) Estimate the average power during the job, and the energy in watt-hours, from the average of the two sums (11 Wh =3600= 3600 J).
Show solution✓ Checked

(a) With Δt=10\Delta t = 10 s,

L=10(120+180+250+260+240+200)=10⋅1250=12,500 J,R=10(180+250+260+240+200+150)=10⋅1280=12,800 J.\begin{aligned} L &= 10(120 + 180 + 250 \\ &\qquad + 260 + 240 + 200) \\ &= 10 \cdot 1250 = 12{,}500 \text{ J}, \\ R &= 10(180 + 250 + 260 \\ &\qquad + 240 + 200 + 150) \\ &= 10 \cdot 1280 = 12{,}800 \text{ J}. \end{aligned}

(b) No. The power rises during the first 30 seconds and falls afterwards. Where it rises, the left reading of an interval is the lower one; where it falls, the left reading is the higher one. So the left sum mixes underestimates with overestimates, and so does the right sum, and neither is guaranteed to be below or above E.E\mathclose{\text{.}} Worse, ten-second readings say nothing about short spikes between them. Without knowing more about PP between the readings (for example, that it rises or falls steadily within each interval), the readings do not bound the energy.

(c) The average of the two sums is 12,65012{,}650 J. The average power is 160∫060P(t) dt≈12,65060≈210.8\tfrac{1}{60}\int_0^{60} P(t)\,dt \approx \tfrac{12{,}650}{60} \approx 210.8 W, and the energy is about 12,6503600≈3.51\tfrac{12{,}650}{3600} \approx 3.51 Wh.

Exercise 9.10★★★Sums by induction and by telescoping
  • (a) Prove the formula ∑i=1ni2=n(n+1)(2n+1)6\sum_{i=1}^{n} i^2 = \dfrac{n(n + 1)(2n + 1)}{6} by induction.
  • (b) Show that i(i+1)(i+2)−(i−1)i(i+1)=3i(i+1),i(i + 1)(i + 2) - (i - 1)i(i + 1) = 3i(i + 1)\mathclose{\text{,}} and use it to prove that
    ∑i=1ni(i+1)=n(n+1)(n+2)3.\sum_{i=1}^{n} i(i + 1) = \frac{n(n + 1)(n + 2)}{3}.
  • (c) Use (b) and the formula for ∑i\sum i to give a third proof of the formula for ∑i2.\sum i^2\mathclose{\text{.}}
Show solution✓ Checked

(a) Base case. For n=1n = 1 both sides are 1: 1⋅2⋅36=1.\tfrac{1 \cdot 2 \cdot 3}{6} = 1\mathclose{\text{.}}

Inductive step. Suppose the formula holds for some k≥1.k \ge 1\mathclose{\text{.}} Adding the next term and taking out the common factor k+1,k + 1\mathclose{\text{,}}

∑i=1k+1i2=k(k+1)(2k+1)6+(k+1)2=k+16[k(2k+1)+6(k+1)]=k+16(2k2+7k+6)=(k+1)(k+2)(2k+3)6.\begin{aligned} &\sum_{i=1}^{k+1} i^2 \\[5pt] &= \frac{k(k + 1)(2k + 1)}{6} + (k + 1)^2 \\[5pt] &= \frac{k + 1}{6}\big[k(2k + 1) + 6(k + 1)\big] \\[5pt] &= \frac{k + 1}{6}\big(2k^2 + 7k + 6\big) \\[5pt] &= \frac{(k + 1)(k + 2)(2k + 3)}{6}. \end{aligned}

This is the formula with n=k+1,n = k + 1\mathclose{\text{,}} since 2(k+1)+1=2k+3.2(k + 1) + 1 = 2k + 3\mathclose{\text{.}} By induction it holds for every n≥1.n \ge 1\mathclose{\text{.}}

(b) Both products on the left contain the factor i(i+1):i(i + 1)\mathclose{\text{:}}

i(i+1)(i+2)−(i−1)i(i+1)=i(i+1)[(i+2)−(i−1)]=3i(i+1).\begin{aligned} &i(i + 1)(i + 2) - (i - 1)i(i + 1) \\ &\quad= i(i + 1)\big[(i + 2) - (i - 1)\big] \\ &\quad= 3i(i + 1). \end{aligned}

Add this for i=1,…,n.i = 1, \dots, n\mathclose{\text{.}} The left side telescopes: the term i(i+1)(i+2)i(i + 1)(i + 2) of each ii cancels the term −(i′−1)i′(i′+1)-(i' - 1)i'(i' + 1) of i′=i+1,i' = i + 1\mathclose{\text{,}} which is the same product, so only the last positive term and the first negative term remain:

∑i=1n[i(i+1)(i+2)−(i−1)i(i+1)]=n(n+1)(n+2)−0⋅1⋅2.\begin{aligned} &\sum_{i=1}^{n}\big[i(i + 1)(i + 2) \\[5pt] &\qquad - (i - 1)i(i + 1)\big] \\[5pt] &\quad= n(n + 1)(n + 2) - 0 \cdot 1 \cdot 2. \end{aligned}

So 3∑i=1ni(i+1)=n(n+1)(n+2),3\sum_{i=1}^{n} i(i + 1) = n(n + 1)(n + 2)\mathclose{\text{,}} which is the formula.

(c) Since i2=i(i+1)−i,i^2 = i(i + 1) - i\mathclose{\text{,}} the rules for sums make the sum of the squares equal to the sum in (b) minus ∑i=1ni.\sum_{i=1}^{n} i\mathclose{\text{.}} So, by (b) and Theorem 9.2,

∑i=1ni2=n(n+1)(n+2)3−n(n+1)2=n(n+1)[2(n+2)−3]6=n(n+1)(2n+1)6.\begin{aligned} &\sum_{i=1}^{n} i^2 \\[5pt] &\quad= \frac{n(n + 1)(n + 2)}{3} \\[5pt] &\qquad - \frac{n(n + 1)}{2} \\[5pt] &\quad= \frac{n(n + 1)\big[2(n + 2) - 3\big]}{6} \\[5pt] &\quad= \frac{n(n + 1)(2n + 1)}{6}. \end{aligned}
Exercise 9.11★★★The integral of exe^x
  • (a) Show that, for every number r≠1r \ne 1 and whole number n≥1,n \ge 1\mathclose{\text{,}}
    ∑i=0n−1ri=rn−1r−1.\sum_{i=0}^{n-1} r^i = \frac{r^n - 1}{r - 1}.
    (Multiply the sum by r−1.)r - 1\mathclose{\text{.)}}
  • (b) Show that the left sum of exe^x on [0,1][0, 1] with nn subintervals is
    Ln=(e−1) 1/ne1/n−1.L_n = (e - 1)\,\frac{1/n}{e^{1/n} - 1}.
  • (c) Use lim⁡h→0eh−1h=1\lim_{h\to0} \dfrac{e^h - 1}{h} = 1 to show that ∫01ex dx=e−1≈1.718.\displaystyle\int_0^1 e^x\,dx = e - 1 \approx 1.718\mathclose{\text{.}} Why is that limit 1?
Show solution✓ Checked

(a) Multiply out: (r−1)(1+r+⋯+rn−1)=(r+r2+⋯+rn)−(1+r+⋯+rn−1).(r - 1)\big(1 + r + \dots + r^{n-1}\big) = \big(r + r^2 + \dots + r^n\big) - \big(1 + r + \dots + r^{n-1}\big)\mathclose{\text{.}} Every power from rr to rn−1r^{n-1} appears once with each sign and cancels: the difference telescopes to rn−1.r^n - 1\mathclose{\text{.}} Since r≠1,r \ne 1\mathclose{\text{,}} divide by r−1.r - 1\mathclose{\text{.}}

(b) Here Δx=1n,\Delta x = \tfrac1n\mathclose{\text{,}} and the left ends are xi=inx_i = \tfrac{i}{n} for i=0,…,n−1,i = 0, \dots, n - 1\mathclose{\text{,}} so

Ln=∑i=0n−1ei/n⋅1n=1n∑i=0n−1(e1/n)i.\begin{aligned} L_n &= \sum_{i=0}^{n-1} e^{i/n}\cdot\frac1n \\[5pt] &= \frac1n\sum_{i=0}^{n-1}\big(e^{1/n}\big)^i. \end{aligned}

This is the sum of (a) with r=e1/n,r = e^{1/n}\mathclose{\text{,}} which is not 1 because 1n≠0,\tfrac1n \ne 0\mathclose{\text{,}} and rn=e.r^n = e\mathclose{\text{.}} So Ln=1n⋅e−1e1/n−1,L_n = \tfrac1n \cdot \tfrac{e - 1}{e^{1/n} - 1}\mathclose{\text{,}} which is the formula.

(c) Put h=1n.h = \tfrac1n\mathclose{\text{.}} Then

1/ne1/n−1=heh−1=1(eh−1)/h.\begin{aligned} \frac{1/n}{e^{1/n} - 1} &= \frac{h}{e^h - 1} \\[5pt] &= \frac{1}{(e^h - 1)/h}. \end{aligned}

As n→∞,n \to \infty\mathclose{\text{,}} h→0+,h \to 0^+\mathclose{\text{,}} and eh−1h=e0+h−e0h\tfrac{e^h - 1}{h} = \tfrac{e^{0+h} - e^0}{h} is the difference quotient of exe^x at 0. Its limit is the derivative of exe^x at 0, which is e0=1e^0 = 1 (Module 6). So Ln→(e−1)⋅11=e−1.L_n \to (e - 1) \cdot \tfrac11 = e - 1\mathclose{\text{.}} Since exe^x is continuous, it is integrable, and by Theorem 9.4

∫01ex dx=lim⁡n→∞Ln=e−1≈1.718.\begin{aligned} \int_0^1 e^x\,dx &= \lim_{n\to\infty} L_n \\[5pt] &= e - 1 \approx 1.718. \end{aligned}
Exercise 9.12★★★A zero integral

Let ff be continuous on [a,b],[a, b]\mathclose{\text{,}} where a<b,a < b\mathclose{\text{,}} with f(x)≥0f(x) \ge 0 for every xx in [a,b].[a, b]\mathclose{\text{.}}

  • (a) Prove that if f(c)>0f(c) > 0 for some cc in [a,b],[a, b]\mathclose{\text{,}} then ∫abf(x) dx>0.\int_a^b f(x)\,dx > 0\mathclose{\text{.}} (Hint: by continuity, f(x)>f(c)2f(x) > \tfrac{f(c)}{2} for every xx in [a,b][a, b] close enough to c.)c\mathclose{\text{.)}}
  • (b) Deduce that if ∫abf(x) dx=0,\int_a^b f(x)\,dx = 0\mathclose{\text{,}} then f(x)=0f(x) = 0 for every xx in [a,b].[a, b]\mathclose{\text{.}}
  • (c) Show that (b) fails without continuity: find a function g≥0g \ge 0 on [0,1],[0, 1]\mathclose{\text{,}} integrable, with ∫01g(x) dx=0,\int_0^1 g(x)\,dx = 0\mathclose{\text{,}} that is not 0 everywhere.
Show solution✓ Checked

(a) Let ε=f(c)2>0.\varepsilon = \tfrac{f(c)}{2} > 0\mathclose{\text{.}} Since ff is continuous at c,c\mathclose{\text{,}} there is a δ>0\delta > 0 such that ∣f(x)−f(c)∣<f(c)2,\abs{f(x) - f(c)} < \tfrac{f(c)}{2}\mathclose{\text{,}} and so f(x)>f(c)2,f(x) > \tfrac{f(c)}{2}\mathclose{\text{,}} for every xx in [a,b][a, b] with ∣x−c∣<δ.\abs{x - c} < \delta\mathclose{\text{.}} Let p=max⁡(a,c−δ2)p = \max\big(a, c - \tfrac{\delta}{2}\big) and q=min⁡(b,c+δ2).q = \min\big(b, c + \tfrac{\delta}{2}\big)\mathclose{\text{.}} Then p<qp < q (because a<ba < b and δ>0),\delta > 0\mathclose{\text{),}} [p,q][p, q] lies in [a,b],[a, b]\mathclose{\text{,}} and f(x)>f(c)2f(x) > \tfrac{f(c)}{2} on [p,q].[p, q]\mathclose{\text{.}} By additivity,

∫abf=∫apf+∫pqf+∫qbf.\int_a^b f = \int_a^p f + \int_p^q f + \int_q^b f.

The first and last integrals are at least 0 by Theorem 9.7(a), since f≥0f \ge 0 (or are 0, if p=ap = a or q=b).q = b\mathclose{\text{).}} The middle one is at least f(c)2(q−p)>0\tfrac{f(c)}{2}(q - p) > 0 by Theorem 9.7(c). So ∫abf>0.\int_a^b f > 0\mathclose{\text{.}}

(b) Suppose ∫abf=0.\int_a^b f = 0\mathclose{\text{.}} If ff were not 0 everywhere on [a,b],[a, b]\mathclose{\text{,}} there would be a cc with f(c)>0,f(c) > 0\mathclose{\text{,}} since f≥0,f \ge 0\mathclose{\text{,}} and (a) would give ∫abf>0,\int_a^b f > 0\mathclose{\text{,}} not 0. So f(x)=0f(x) = 0 for every xx in [a,b].[a, b]\mathclose{\text{.}}

(c) Let g(12)=1g(\tfrac12) = 1 and g(x)=0g(x) = 0 for every other xx in [0,1].[0, 1]\mathclose{\text{.}} It is bounded and has one discontinuity, so it is integrable (Theorem 9.3). In a Riemann sum, only the subintervals that contain 12\tfrac12 (at most two of them) can have a sample point where gg is not 0, and each has width at most ∥P∥.\norm{P}\mathclose{\text{.}} So every Riemann sum lies between 0 and 2∥P∥,2\norm{P}\mathclose{\text{,}} and the sums approach 0: ∫01g(x) dx=0,\int_0^1 g(x)\,dx = 0\mathclose{\text{,}} although g(12)=1.g(\tfrac12) = 1\mathclose{\text{.}}

11

Check yourself

1
∑i=14i2\displaystyle\sum_{i=1}^{4} i^2 equals
2
The right sum R3R_3 of f(x)=xf(x) = x on [0,3][0, 3] is
3
If ff is continuous and decreasing on [a,b],[a, b]\mathclose{\text{,}} then for every nn
4
∫−22x3 dx\displaystyle\int_{-2}^{2} x^3\,dx equals
5
∫03(x−1) dx\displaystyle\int_0^3 (x - 1)\,dx equals
6
If ∫04f(x) dx=7\int_0^4 f(x)\,dx = 7 and ∫01f(x) dx=2,\int_0^1 f(x)\,dx = 2\mathclose{\text{,}} then ∫14f(x) dx\int_1^4 f(x)\,dx equals
7
The average value of f(x)=2xf(x) = 2x on [0,3][0, 3] is
8
Which of these functions is integrable on [0,2]?[0, 2]\mathclose{\text{?}}
Finished this module?