Chapter VII · Additional theorems in the differential and integral calculus

Definite integrals and areas

§§161–162 40 min

Upper and lower sums squeeze a single number between them when ff is continuous; that number is the area under the graph, and the definite integral.

Why this matters

In §148 Hardy proved that the area under a curve has derivative f(x)f(x), and used this to compute areas. But that argument assumed that a curved region has an area at all. Rectangles and polygons have areas by elementary geometry; nothing so far tells us what the area of a region bounded by a curve even means. §161 fills this gap: it defines the area as the common limit of two families of rectangle sums and proves that the limit exists whenever ff is continuous. §162 then names the result the definite integral. Everything later in the book that rests on an integral (the logarithm in Chapter IX, the measure of angles in the next lesson, the remainder in Taylor’s theorem) rests on this construction.

The idea

Cut the interval [a,b][a, b] into pieces. On each piece, build two rectangles: a short one whose height is the least value of ff on the piece, and a tall one whose height is the greatest value. The short rectangles fit inside the region under the curve; the tall ones cover it. So whatever the area is, it must lie between the total of the short rectangles, the lower sum ss, and the total of the tall ones, the upper sum SS.

If the area is to be a well-defined number, the gap between the two must close as the pieces get finer. The widget lets you test this, one division point at a time.

Explore Squeeze the area between two sums

Try this. Click anywhere in the upper plot to add a division point there, or use the buttons. Watch ss and SS after each new point. Then press “New partition” and build a quite different partition: compare its sums with the ones you made before.

f(x)=1.5+sin⁡2x+0.4sin⁡5xf(x) = 1.5 + \sin 2x + 0.4\sin 5x on [0,3][0, 3], divided into 11 piece
xy
  • y = f(x)
  • lower sum s: height m_v, the least value on the piece
  • upper sum S: height M_v, the greatest value
  • division points (click the plot to add one)
Function
s=0.405303s = 0.405303, S=7.78369S = 7.78369, gap S−s=7.378S - s = 7.378.
Longest piece 33; largest oscillation max⁡(Mv−mv)=2.46\max(M_v - m_v) = 2.46, so S−s≤(b−a)max⁡(Mv−mv)=7.378S - s \le (b-a)\max(M_v-m_v) = 7.378.
Every sum you have made so far
partitions tried, in ordervalue
  • lower sums s
  • upper sums S
  • the area (what both close in on)
  • a new partition was started
Largest lower sum so far 0.4053030.405303; smallest upper sum so far 7.783697.78369. Every lower sum is still below every upper sum.
What to notice

A new point never lowers ss and never raises SS: on a smaller piece the least value can only be larger and the greatest value only smaller. In the lower plot, every blue dot (a lower sum) stays below every ochre dot (an upper sum), even across different partitions. And the gap S−sS - s is controlled by the largest oscillation on a single piece, which shrinks once every piece is short.

Three facts are visible in the experiment, and they are exactly the three steps of Hardy’s proof.

  1. Refining helps. Adding points can only raise ss and lower SS.
  2. Lower never beats upper. Any lower sum is at most any upper sum, even for two unrelated partitions. The trick is to compare both with the partition that uses all the points of both.
  3. Continuity closes the gap. For a continuous function, the oscillation on a short enough piece is as small as we please, uniformly along the interval; so S−sS - s is small once every piece is short.

Steps 1 and 2 hold for any bounded function. Only step 3 uses continuity, and without it the gap may never close (see the third exercise).

Precise statements

Hardy writes (a,b)(a, b) for the closed interval, which we write [a,b][a, b].

Definition Partitions, lower and upper sums Hardy: §161

A partition of [a,b][a, b] is a finite set of points a=x0<x1<⋯<xn=ba = x_0 < x_1 < \dots < x_n = b. Write δv=xv+1−xv\delta_v = x_{v+1} - x_v for the length of the vv-th piece [xv,xv+1][x_v, x_{v+1}], and let mvm_v and MvM_v be the lower and upper bounds of ff on that piece. The lower sum and upper sum of the partition are

s=∑v=0n−1mv δv,S=∑v=0n−1Mv δv.s = \sum_{v=0}^{n-1} m_v\,\delta_v, \qquad S = \sum_{v=0}^{n-1} M_v\,\delta_v .

If mm and MM are the bounds of ff on the whole of [a,b][a, b], then m(b−a)≤s≤S≤M(b−a)m(b-a) \le s \le S \le M(b-a) for every partition. So the set of all lower sums has a least upper bound, which we call jj, and the set of all upper sums has a greatest lower bound, JJ.

Lemma Refinement Hardy: §161 (1)

If a partition is refined by adding further points, its lower sum does not decrease and its upper sum does not increase.

Theorem No lower sum exceeds any upper sum Hardy: §161

If ss is the lower sum of one partition and S′S' the upper sum of another, then s≤S′s \le S'. Consequently j≤Jj \le J.

Theorem Existence of the area Hardy: §161

If ff is continuous on [a,b][a, b], then j=Jj = J. More precisely, for every ε>0\varepsilon > 0 there is a δ>0\delta > 0 such that

0≤J−s<ε,0≤S−J<ε0 \le J - s < \varepsilon, \qquad 0 \le S - J < \varepsilon

for every partition all of whose pieces are shorter than δ\delta. Thus ss and SS tend to the common value JJ as the pieces shrink, and the same is true of every sum σ=∑fv δv\sigma = \sum f_v\,\delta_v, where fvf_v is the value of ff at any point of the vv-th piece.

Definition The definite integral Hardy: §§161–162

For continuous ff, the common value JJ is the area under the graph between x=ax = a and x=bx = b, and is written

∫abf(x) dx.\int_a^b f(x)\,dx .

The numbers aa and bb are the lower and upper limits of the integral, f(x)f(x) is the integrand, and [a,b][a, b] the range of integration.

The sums σ\sigma with arbitrary sample points fvf_v are what are now called Riemann sums; the theorem says that the definite integral is their limit as the longest piece tends to 00. Notice also that ∫abf(x) dx\int_a^b f(x)\,dx is a number: it depends on aa, bb and the function ff, but not on xx. The letter xx is a dummy, and ∫abf(t) dt\int_a^b f(t)\,dt is the same number.

The indefinite integral

Now let the upper limit vary. §162 observes that the two kinds of integral are one idea seen from two sides.

Theorem The integral as a function of its upper limit Hardy: §162; §148

If ff is continuous on an interval containing aa, then F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt has derivative F′(x)=f(x)F'(x) = f(x). In particular FF is continuous, and if Φ\Phi is any function with Φ′=f\Phi' = f then ∫abf(x) dx=Φ(b)−Φ(a)\int_a^b f(x)\,dx = \Phi(b) - \Phi(a).

Hardy proved F′=fF' = f in §148, assuming the area existed; now the assumption is a theorem, so the proof stands. (We give it again, from the properties of the integral, in General properties of the definite integral.) The last sentence follows because Φ−F\Phi - F has zero derivative, hence is constant (§126).

Explore An area that defines a function

Try this. Drag xx along the axis and watch the shaded area under 1/t1/t (top) become the height of the graph below. Move xx to the left of 11.

F(x)=∫ax1t dtF(x) = \int_{a}^{x} \frac1t\,dt, a=1a = 1
tf(t)
xF(x)
  • f(t)
  • counts +
  • counts −
  • F(x)
  • x (drag)
F(2.5)=∫12.51t dt=0.91629F(2.5) = \int_{1}^{2.5} \frac1t\,dt = 0.91629. Slope of FF at xx: F′(x)=f(x)=0.4F'(x) = f(x) = 0.4.
What to notice

The lower graph is a function defined only by an area: nothing else tells us what it is. Its slope at xx is the height 1/x1/x above. For x<1x < 1 the area is counted negatively, because the integral runs from 11 down to xx. This function is log⁡x\log x, and this is the proof that it exists.

Hardy draws exactly this conclusion: since 1/t1/t is continuous for t>0t > 0, the function ∫1xdt/t\int_1^x dt/t exists, which justifies the logarithm that §131 had to take for granted. Chapter IX builds the whole theory of log⁡\log and exp⁡\exp on it.

Proofs

Proof Refinement
Strategy

Adding several points is the same as adding them one at a time, so it is enough to add one point ξ\xi inside one piece [xv,xv+1][x_v, x_{v+1}]. Only that piece’s term changes.

The old term

Before the new point, this piece contributes mv δvm_v\,\delta_v to ss, where mvm_v is the least value of ff on the whole piece.

The two new terms

After it, the piece is replaced by [xv,ξ][x_v, \xi] and [ξ,xv+1][\xi, x_{v+1}], with lower bounds m′m' and m′′m''. Each is a lower bound over a smaller set, so m′≥mvm' \ge m_v and m′′≥mvm'' \ge m_v.

Compare

m′(ξ−xv)+m′′(xv+1−ξ)≥mv(ξ−xv)+mv(xv+1−ξ)=mv δvm'(\xi - x_v) + m''(x_{v+1} - \xi) \ge m_v(\xi - x_v) + m_v(x_{v+1} - \xi) = m_v\,\delta_v. So ss does not decrease. The same argument with upper bounds, which can only fall on a smaller set, shows that SS does not increase.

Proof No lower sum exceeds any upper sum
Strategy

Two arbitrary partitions cannot be compared directly, because their pieces do not line up. So compare each of them with their common refinement: the partition whose points are all the points of both.

Form the common refinement

Let PP have sums s,Ss, S and P′P' have sums s′,S′s', S'. Let P\mathbf{P} consist of every point of PP and every point of P′P', with sums s,S\mathbf{s}, \mathbf{S}.

Apply the lemma twice

P\mathbf{P} refines PP, so s≤ss \le \mathbf{s}. It also refines P′P', so S≤S′\mathbf{S} \le S'.

Within one partition, lower is below upper

On every piece mv≤Mvm_v \le M_v, so s≤S\mathbf{s} \le \mathbf{S}. Chaining, s≤s≤S≤S′s \le \mathbf{s} \le \mathbf{S} \le S'.

Pass to the bounds: j≤Jj \le J

Suppose j>Jj > J. By the definitions of upper and lower bounds there is a lower sum s>12(j+J)s > \tfrac12(j + J) and an upper sum S<12(j+J)S < \tfrac12(j + J), and then s>Ss > S, contradicting what we have just proved. (The two sums need not come from the same partition, which is why we needed the general statement.)

Proof Existence of the area for continuous ff
Strategy

Make S−sS - s small by making every oscillation Mv−mvM_v - m_v small, which continuity allows once the pieces are short. Then split S−sS - s into three non-negative parts, one of which is the fixed number J−jJ - j; a fixed non-negative number smaller than every ε\varepsilon is 00.

Uniform control of oscillation

Let ε>0\varepsilon > 0. Because ff is continuous on the closed interval [a,b][a, b], there is a δ>0\delta > 0 such that ff varies by less than ε/(b−a)\varepsilon/(b-a) on every subinterval shorter than δ\delta (§107, Theorem II: continuity on a closed interval is uniform). So if every δv<δ\delta_v < \delta, then Mv−mv<ε/(b−a)M_v - m_v < \varepsilon/(b-a) for every vv. (Hardy’s δ\delta here is our mesh bound; his δv\delta_v are the piece lengths.)

The gap is small

For such a partition, S−s=∑(Mv−mv) δv<εb−a∑δv=εS - s = \sum (M_v - m_v)\,\delta_v < \dfrac{\varepsilon}{b-a}\sum \delta_v = \varepsilon.

Split the gap

S−s=(S−J)+(J−j)+(j−s)S - s = (S - J) + (J - j) + (j - s). Each bracket is ≥0\ge 0: S≥JS \ge J because JJ is a lower bound of the upper sums, J≥jJ \ge j by the previous theorem, and j≥sj \ge s because jj is an upper bound of the lower sums. So each is less than ε\varepsilon.

Conclude j=Jj = J

J−jJ - j does not depend on ε\varepsilon, and it is less than every positive ε\varepsilon; so J−j=0J - j = 0. The other two brackets give 0≤J−s<ε0 \le J - s < \varepsilon and 0≤S−J<ε0 \le S - J < \varepsilon whenever all pieces are shorter than δ\delta.

Riemann sums with any sample points

On each piece mv≤fv≤Mvm_v \le f_v \le M_v, so s≤σ≤Ss \le \sigma \le S, and σ\sigma is trapped in the interval [s,S][s, S], which contains JJ and has length less than ε\varepsilon. Hence ∣σ−J∣<ε|\sigma - J| < \varepsilon.

Worked examples and exercises

Exercise The sums for x2x^2 ●○○ Hardy: §161

Divide [0,1][0, 1] into nn equal pieces and compute the lower and upper sums of f(x)=x2f(x) = x^2 exactly. Show that both tend to 13\tfrac13 and that S−s=1/nS - s = 1/n.

Hint
Since x2x^2 is increasing on [0,1][0, 1], the least value on a piece is at its left end and the greatest at its right end.
Hint
You need 12+22+⋯+k2=16k(k+1)(2k+1)1^2 + 2^2 + \dots + k^2 = \tfrac16 k(k+1)(2k+1).

Solution

The pieces are [r/n,(r+1)/n][r/n, (r+1)/n] for r=0,…,n−1r = 0, \dots, n-1, each of length 1/n1/n, with mr=r2/n2m_r = r^2/n^2 and Mr=(r+1)2/n2M_r = (r+1)^2/n^2. Hence

s=1n3∑r=0n−1r2=(n−1)n(2n−1)6n3,S=1n3∑r=1nr2=n(n+1)(2n+1)6n3.s = \frac{1}{n^3}\sum_{r=0}^{n-1} r^2 = \frac{(n-1)n(2n-1)}{6n^3}, \qquad S = \frac{1}{n^3}\sum_{r=1}^{n} r^2 = \frac{n(n+1)(2n+1)}{6n^3}.

Dividing out, s=13(1−1/n)(1−12n)s = \tfrac13(1 - 1/n)(1 - \tfrac{1}{2n}) and S=13(1+1/n)(1+12n)S = \tfrac13(1 + 1/n)(1 + \tfrac{1}{2n}), and both tend to 13\tfrac13. Finally S−s=n2/n3=1/nS - s = n^2/n^3 = 1/n: the two sums differ only by the last tall rectangle against the first short one, (12−02)⋅1n(1^2 - 0^2)\cdot\tfrac1n.

Exercise Monotone functions ●○○ Hardy: §161, Fig. 45

Let ff be increasing on [a,b][a, b] and divide [a,b][a, b] into nn equal pieces. Show that S−s={f(b)−f(a)}(b−a)/nS - s = \{f(b) - f(a)\}(b - a)/n, and draw the picture that makes this obvious.

Hint
For an increasing function, mv=f(xv)m_v = f(x_v) and Mv=f(xv+1)M_v = f(x_{v+1}).

Solution

With δv=(b−a)/n\delta_v = (b-a)/n for every vv,

S−s=b−an∑v=0n−1{f(xv+1)−f(xv)}=b−an{f(b)−f(a)},S - s = \frac{b-a}{n}\sum_{v=0}^{n-1}\{f(x_{v+1}) - f(x_v)\} = \frac{b-a}{n}\{f(b) - f(a)\},

because the sum telescopes. In the picture (Hardy’s Fig. 45), the strips by which the tall rectangles exceed the short ones can be slid sideways into a single column of width (b−a)/n(b-a)/n and height f(b)−f(a)f(b) - f(a). This proves the existence of the integral of a monotone function directly, even a discontinuous one.

Exercise When the gap never closes ●●○ Hardy: §161

Let f(x)=1f(x) = 1 when xx is rational and f(x)=0f(x) = 0 when xx is irrational, on [0,1][0, 1]. Find every lower sum and every upper sum. What are jj and JJ? Which step of the existence proof fails?

Hint
Every interval of positive length contains both rational and irrational numbers (Chapter I).

Solution

On every piece, however short, ff takes both values 00 and 11, so mv=0m_v = 0 and Mv=1M_v = 1. Hence s=0s = 0 and S=∑δv=1S = \sum \delta_v = 1 for every partition, and j=0<1=Jj = 0 < 1 = J. Steps 1 and 2 of the proof (refinement, and s≤S′s \le S') still hold, as they must. What fails is the first step of the existence proof: the oscillation on every piece is 11, however short the pieces are, because ff is continuous nowhere. Such a function has no area in the sense of §161.

Exercise Bounding log⁡2\log 2 by rectangles ●○○ Hardy: §§161–162

Using the partition 1<32<21 < \tfrac32 < 2, show that 712<∫12dtt<56\tfrac{7}{12} < \int_1^2 \frac{dt}{t} < \tfrac56. Then use the partition into four equal pieces to improve both bounds.

Hint
1/t1/t is decreasing, so on each piece the greatest value is at the left end.

Solution

On [1,32][1, \tfrac32] and [32,2][\tfrac32, 2] the greatest values of 1/t1/t are 11 and 23\tfrac23, and the least are 23\tfrac23 and 12\tfrac12. So

s=12(23+12)=712,S=12(1+23)=56.s = \tfrac12\left(\tfrac23 + \tfrac12\right) = \tfrac{7}{12}, \qquad S = \tfrac12\left(1 + \tfrac23\right) = \tfrac56 .

The integral lies between them, and strictly, because 1/t1/t is not constant on any piece. With the points 1,54,32,74,21, \tfrac54, \tfrac32, \tfrac74, 2 the values are 1,45,23,47,121, \tfrac45, \tfrac23, \tfrac47, \tfrac12, and

s=14(45+23+47+12)=533840≈0.6345,S=14(1+45+23+47)=319420≈0.7595.s = \tfrac14\left(\tfrac45 + \tfrac23 + \tfrac47 + \tfrac12\right) = \tfrac{533}{840} \approx 0.6345, \qquad S = \tfrac14\left(1 + \tfrac45 + \tfrac23 + \tfrac47\right) = \tfrac{319}{420} \approx 0.7595 .

The integral is log⁡2=0.6931…\log 2 = 0.6931\ldots. By the monotone exercise, S−s=(1−12)⋅14=18S - s = (1 - \tfrac12)\cdot\tfrac14 = \tfrac18, and 319420−533840=105840=18\tfrac{319}{420} - \tfrac{533}{840} = \tfrac{105}{840} = \tfrac18 indeed.

Exercise Midpoints for a linear function ●○○ Hardy: §161

Show that for f(x)=xf(x) = x on [0,1][0, 1], the Riemann sum σ\sigma that uses the midpoint of each piece equals 12\tfrac12 for every partition, equal or not. Why does this not contradict the fact that s<12<Ss < \tfrac12 < S?

Hint
On a piece [xv,xv+1][x_v, x_{v+1}], the midpoint term is 12(xv+xv+1)(xv+1−xv)\tfrac12(x_v + x_{v+1})(x_{v+1} - x_v).

Solution

Each term is 12(xv+12−xv2)\tfrac12(x_{v+1}^2 - x_v^2), so the sum telescopes to 12(12−02)=12\tfrac12(1^2 - 0^2) = \tfrac12. There is no contradiction: σ\sigma always lies between ss and SS, and here it happens to land exactly on the limit, because the error of a midpoint rectangle is zero for a straight line (the triangle cut off on one side equals the one added on the other).

Check yourself

Check yourself Choose one

You add one division point to a partition. What can happen to the lower sum ss and the upper sum SS?

Why

On a smaller piece the least value of ff can only be larger and the greatest value only smaller, so the inner rectangles grow and the outer ones shrink. The number of rectangles is irrelevant. They can stay the same (for instance when ff is constant on the piece being split), but they never move the wrong way.

Check yourself True or false?

If PP and P′P' are any two partitions of [a,b][a, b] (not necessarily related), the lower sum of PP is at most the upper sum of P′P'.

Why

True, for every bounded function, continuous or not. The proof compares both with the common refinement P∪P′P \cup P': s(P)≤s(P∪P′)≤S(P∪P′)≤S(P′)s(P) \le s(P \cup P') \le S(P \cup P') \le S(P').

Check yourself Enter a number

For f(x)=x2f(x) = x^2 on [0,1][0, 1] divided into 44 equal pieces, what is S−sS - s?

Why

For an increasing function with nn equal pieces, S−s={f(b)−f(a)}(b−a)/n=1⋅1/4=0.25S - s = \{f(b) - f(a)\}(b - a)/n = 1 \cdot 1/4 = 0.25. Directly: S=3064S = \tfrac{30}{64} and s=1464s = \tfrac{14}{64}.

Check yourself True or false?

If ff is continuous on [a,b][a, b] and some partition has s=Ss = S, then ff is constant on [a,b][a, b].

Why

True. S−s=∑(Mv−mv)δvS - s = \sum (M_v - m_v)\delta_v is a sum of non-negative terms with every δv>0\delta_v > 0, so it is 00 only if Mv=mvM_v = m_v on every piece, that is, ff is constant on each piece. Neighbouring pieces share an endpoint, so the constants agree.

Check yourself Choose one

On which of these does the number ∫02x3 dx\int_0^2 x^3\,dx depend?

Why

The integral is a single number (44). The xx is a dummy: ∫02t3 dt\int_0^2 t^3\,dt is the same. It is defined as a limit, so it does not depend on any one partition, and any two antiderivatives differ by a constant, which cancels in F(2)−F(0)F(2) - F(0).

Hardy’s language

But nothing which we know so far provides us with a direct definition of the area of a figure bounded by curved lines.

— G. H. Hardy, §161

Summary

Summary
  • The lower sum ss (short rectangles) and upper sum SS (tall rectangles) bracket any reasonable notion of the area.
  • Refining a partition raises ss and lowers SS; through the common refinement, every lower sum is at most every upper sum, so sup⁡s=j≤J=inf⁡S\sup s = j \le J = \inf S.
  • For continuous ff, uniform continuity makes S−s<εS - s < \varepsilon once the pieces are short, so j=Jj = J: this number is the area, ∫abf(x) dx\int_a^b f(x)\,dx, and every Riemann sum tends to it.
  • ∫axf(t) dt\int_a^x f(t)\,dt has derivative f(x)f(x); this justifies §148 and proves that log⁡x=∫1xdt/t\log x = \int_1^x dt/t exists.