Survey of Mathematics

1.5 The Riemann integral: area as a limit

The integral is the one number squeezed between all the lower sums and all the upper sums of rectangles. Continuous functions are squeezed tight, so they are integrable, and the fundamental theorem of calculus shows that integrating and differentiating undo each other.

Beyond the courseTaught in 375/376Abbott, Understanding Analysis, ch. 7Spivak, Calculus, ch. 13 and 14Rudin, Principles of Mathematical Analysis, ch. 6Apostol Vol. 1, ch. 1 (step functions)

In school, ∫abf(x) dx\int_a^b f(x)\,dx was “the area under the curve”, and you computed it by finding an antiderivative. That raises two questions. What is area, for a curve that is not a rectangle or a triangle? And why should an antiderivative, which comes from slopes, have anything to do with area? This chapter answers both. Area is defined by squeezing it between rectangles from below and rectangles from above. The fundamental theorem of calculus then says the squeeze and the antiderivative trick give the same number.

Before you start

Chapter 1.3: uniform continuity, the key to the proof that continuous functions are integrable. Chapter 1.1: supremum and infimum. Chapter 1.4: the derivative and the mean value theorem, used in the fundamental theorem.

Quick checkA function is continuous on [a,b][a, b]. Which statement does 1.3 guarantee?
Quick checkWhat are the supremum and infimum of f(x)=x2f(x) = x^2 on the interval [12,1][\tfrac12, 1]?
Quick checkFF is continuous on [a,b][a, b] and differentiable on (a,b)(a, b). The mean value theorem gives a point c∈(a,b)c \in (a, b) with:

The picture: squeeze the area between rectangles

Take f(x)=x2f(x) = x^2 on [0,1][0, 1] and cut [0,1][0, 1] into 44 equal pieces. On each piece draw a rectangle that just reaches the top of the curve (the supremum of ff on that piece), and another that stays under the curve (the infimum). Because x2x^2 is increasing, the top is at the right end of a piece and the bottom is at the left end.

PieceIntervalLowest value mim_iHighest value MiM_i
1[0,14][0, \frac14]00116\frac1{16}
2[14,12][\frac14, \frac12]116\frac1{16}14\frac14
3[12,34][\frac12, \frac34]14\frac14916\frac9{16}
4[34,1][\frac34, 1]916\frac9{16}11

Each piece has width 14\frac14. The outer rectangles have total area 14(116+416+916+1616)=3064=1532=0.46875\frac14\left(\frac1{16} + \frac4{16} + \frac9{16} + \frac{16}{16}\right) = \frac{30}{64} = \frac{15}{32} = 0.46875. The inner rectangles have total area 14⋅0+1+4+916=1464=732=0.21875\frac14 \cdot \frac{0 + 1 + 4 + 9}{16} = \frac{14}{64} = \frac7{32} = 0.21875. So the area under the curve, whatever it means, is between 0.218750.21875 and 0.468750.46875. With 1010 pieces the bounds close in to 0.2850.285 and 0.3850.385. With nn pieces the gap between them is exactly 1n\frac1n (proved below), so as nn grows the area is trapped in an ever smaller interval.

Why· The picture behind the whole chapter

Imagine the two staircases, one sitting inside the region under the curve and one covering it. The region has “an area” only if there is exactly one number that is at least every inner staircase and at most every outer staircase. For a nice curve, refining the pieces makes the two staircases hug the curve, and the number is forced. For a wild function such as the Dirichlet function below, the inner staircase stays at height 00 and the outer at height 11 however fine the pieces, so no single number is forced, and the function has no integral.

Where this came from· Who defined the integral, and why

Cauchy’s 1823 lecture notes (Résumé des leçons … sur le calcul infinitésimal) defined the integral of a continuous function as the limit of sums f(x0)Δx1+f(x1)Δx2+…f(x_0)\Delta x_1 + f(x_1)\Delta x_2 + \dots as the pieces shrink, and argued that this limit exists. Before that, an integral usually meant “an antiderivative”, so there was no way to talk about the area under a function that had no formula for its antiderivative. Bernhard Riemann wrote a more general definition into the essay he prepared for his habilitation at Göttingen (around 1853 and 1854). He wanted to know which functions can be represented by trigonometric series, discontinuous ones included, and that needed an integral for functions that are not continuous. The essay was published only in 1868, two years after his death. Gaston Darboux (1875) rephrased Riemann’s definition with the lower and upper sums used in this chapter.

The idea, in words

You know one way to find an area: cut it into pieces that are almost rectangles and add. A rectangle is the only shape whose area we trust (width times height), so every other area must be defined through rectangles. Rectangles inside give a number that is too small (or just right), rectangles outside give one that is too big (or just right). The integral is defined to be the number caught between them when the two bounds meet.

Three things must be shown to make this sensible. First, an inner total can never exceed an outer total, for any two ways of cutting, or the squeeze would make no sense. That is the refinement lemma. Second, we need a test for “the bounds meet” that does not require knowing the answer in advance. That is the Riemann–Darboux criterion, the same kind of tool as the Cauchy criterion of 1.2. Third, we want to know which functions pass the test. Continuous functions do, because of uniform continuity.

Why· How this connects to MATH 376 and Apostol

Apostol Vol. 1 defines the integral through step functions. A step function is constant on each open piece of some partition, like a staircase. Its integral is the sum of value times width on each piece. A function ff is integrable when there are step functions s≤f≤ts \le f \le t whose integrals are as close together as you like. A lower sum L(f,P)L(f, P) below is exactly the integral of the best staircase under ff that is constant on the pieces of PP, and U(f,P)U(f, P) is the same for the best staircase above. So the two definitions are the same idea in two vocabularies, and the section on step functions proves they give the same integral.

Definitions and theorems

Throughout, ff is a bounded function on a closed interval [a,b][a, b]. Bounded means there is BB with ∣f(x)∣≤B|f(x)| \le B for all xx. Boundedness guarantees that the supremum and infimum below exist, by the completeness axiom of 1.1.

Definition B

Partition of an interval

A partition of [a,b][a, b] (a special kind of the set partition of 0.4: the pieces overlap only at their end points) is a finite set P={x0,x1,…,xn}P = \{x_0, x_1, \dots, x_n\} with a=x0<x1<⋯<xn=ba = x_0 < x_1 < \dots < x_n = b. It cuts [a,b][a, b] into the pieces [xi−1,xi][x_{i-1}, x_i] of width Δxi=xi−xi−1\Delta x_i = x_i - x_{i-1}. A partition QQ refines PP if P⊆QP \subseteq Q: QQ has every cut of PP and perhaps more.

In one lineA finite list of points a=x0<x1<⋯<xn=ba = x_0 < x_1 < \dots < x_n = b cutting [a,b][a, b] into nn pieces [xi−1,xi][x_{i-1}, x_i].

Why it existsEvery rectangle approximation starts with a way of cutting the interval; the integral is about what happens to all possible cuttings.

For each piece ii write

Mi=sup⁡{f(x):xi−1≤x≤xi},mi=inf⁡{f(x):xi−1≤x≤xi}.M_i = \sup\{f(x) : x_{i-1} \le x \le x_i\}, \qquad m_i = \inf\{f(x) : x_{i-1} \le x \le x_i\}.

MiM_i is the height of the shortest rectangle on this piece that still covers the curve; mim_i is the height of the tallest rectangle on this piece that stays under the curve. (Sup and inf are used, not max and min, because a function with jumps need not reach its top.)

Definition B

Upper sum

The upper sum of ff for PP is U(f,P)=∑i=1nMi ΔxiU(f, P) = \sum_{i=1}^n M_i\,\Delta x_i.

In one lineU(f,P)=∑i=1nMi ΔxiU(f, P) = \sum_{i=1}^n M_i\,\Delta x_i: the total area of the outer rectangles.

Why it existsIt is an over-estimate of the area, and the best over-estimate we can make using the pieces of P.

Definition B

Lower sum

The lower sum of ff for PP is L(f,P)=∑i=1nmi ΔxiL(f, P) = \sum_{i=1}^n m_i\,\Delta x_i.

In one lineL(f,P)=∑i=1nmi ΔxiL(f, P) = \sum_{i=1}^n m_i\,\Delta x_i: the total area of the inner rectangles.

Why it existsIt is an under-estimate of the area, and the best under-estimate we can make using the pieces of P.

Since mi≤Mim_i \le M_i on every piece, L(f,P)≤U(f,P)L(f, P) \le U(f, P) for every partition PP. The real content comes next: the refinement lemma and its corollary show this stays true even when the lower sum and the upper sum use different partitions.

Quick checkFor f(x)=xf(x) = x on [0,1][0, 1] and P={0,12,1}P = \{0, \tfrac12, 1\}, what is U(f,P)U(f, P)?
Your answerNow take f(x)=x2f(x) = x^2 on [0,1][0, 1] and the same P={0,12,1}P = \{0, \tfrac12, 1\}. What is the gap U(f,P)−L(f,P)U(f, P) - L(f, P)?
Worked example
Find L(f,P)L(f, P) and U(f,P)U(f, P) for f(x)=x2f(x) = x^2 on [−1,1][-1, 1] with P={−1,0,1}P = \{-1, 0, 1\}. Then add the cut points −12-\tfrac12 and 12\tfrac12 and see what happens.

Solution.

  1. Find the sup and inf on each piece. On [−1,0][-1, 0] the function x2x^2 falls from 11 to 00, so M1=1M_1 = 1 and m1=0m_1 = 0. On [0,1][0, 1] it rises from 00 to 11, so M2=1M_2 = 1 and m2=0m_2 = 0. This function is not increasing on the whole interval, so the top is not always at the right end. Sketch the piece or find where the extreme values sit.
  2. Add up. Each width is 11. U(f,P)=1⋅1+1⋅1=2U(f, P) = 1\cdot 1 + 1\cdot 1 = 2 and L(f,P)=0+0=0L(f, P) = 0 + 0 = 0. Definition of the two sums.
  3. Refine. Let Q={−1,−12,0,12,1}Q = \{-1, -\frac12, 0, \frac12, 1\}, with four pieces of width 12\frac12. The values of (Mi,mi)(M_i, m_i) are (1,14)(1, \frac14), (14,0)(\frac14, 0), (14,0)(\frac14, 0), (1,14)(1, \frac14). On [−1,−12][-1, -\frac12] the function runs from 11 down to 14\frac14; on [−12,0][-\frac12, 0] from 14\frac14 down to 00; the right half mirrors the left.
  4. Add up again. U(f,Q)=12(1+14+14+1)=54U(f, Q) = \frac12\left(1 + \frac14 + \frac14 + 1\right) = \frac54 and L(f,Q)=12(14+0+0+14)=14L(f, Q) = \frac12\left(\frac14 + 0 + 0 + \frac14\right) = \frac14. Same definition, more pieces.
  5. Compare. 0≤14≤54≤20 \le \frac14 \le \frac54 \le 2, and the area under x2x^2, which turns out to be 23\frac23 (we compute it later), sits inside the shrinking window. UU fell from 22 to 54\frac54 and LL rose from 00 to 14\frac14. The refinement lemma below says this always happens when cut points are added.

Answer. L(f,P)=0L(f, P) = 0 and U(f,P)=2U(f, P) = 2. After refining, L(f,Q)=14L(f, Q) = \frac14 and U(f,Q)=54U(f, Q) = \frac54.

Lemma B Abbott Sec. 7.2

Refinement lemma

If QQ refines PP, then

L(f,P)≤L(f,Q)≤U(f,Q)≤U(f,P).L(f, P) \le L(f, Q) \le U(f, Q) \le U(f, P).

In one lineAdding cut points to a partition can only raise the lower sum and lower the upper sum.

Why it is trueA new cut splits a rectangle in two, and each half fits the curve at least as tightly as the whole did.

Why· Scratch work: where the proof comes from

We must compare sums over two partitions, and they have different numbers of pieces. Start with the simplest case: QQ has exactly one more point than PP. Then all pieces are shared except one, which QQ cuts in two. So the two sums differ in one term only, and we can compare that one term by hand. A general QQ is reached from PP by adding points one at a time, so we repeat the one-point case (this is where mathematical induction comes in).

ProofAbbott Sec. 7.2
The idea: Compare the sums after adding one point, which changes a single term. Then add points one at a time. The middle inequality L ≤ U holds for any one partition because each m_i ≤ M_i.
Suppose Q=P∪{y}Q = P \cup \{y\} with xk−1<y<xkx_{k-1} < y < x_k. Only the kk-th piece of PP is cut in two.
Induction on the number of added points: it is enough to treat one added point. Then adding the points of QQ that are not in PP one at a time goes from PP to QQ, and each step improves both sums.
Let M′=sup⁡[xk−1,y]fM' = \sup_{[x_{k-1}, y]} f, M′′=sup⁡[y,xk]fM'' = \sup_{[y, x_k]} f, and Mk=sup⁡[xk−1,xk]fM_k = \sup_{[x_{k-1}, x_k]} f. Then M′≤MkM' \le M_k and M′′≤MkM'' \le M_k.
Define the supremum and infimum of ff on each of the two new pieces.The two new pieces are smaller sets than the old piece, so their suprema can only be smaller or equal.
M′(y−xk−1)+M′′(xk−y)≤Mk(y−xk−1)+Mk(xk−y)=Mk ΔxkM'(y - x_{k-1}) + M''(x_k - y) \le M_k(y - x_{k-1}) + M_k(x_k - y) = M_k\,\Delta x_k.
The width splits as Δxk=(y−xk−1)+(xk−y)\Delta x_k = (y - x_{k-1}) + (x_k - y), and each part is multiplied by a height that is at most MkM_k.
So U(f,Q)≤U(f,P)U(f, Q) \le U(f, P).
All other terms of the two upper sums are identical. Replacing the kk-th term of U(f,P)U(f, P) by the smaller two-term version gives U(f,Q)U(f, Q).
In the same way L(f,Q)≥L(f,P)L(f, Q) \ge L(f, P). Repeating for each added point gives the outer inequalities.
The mirror image: infima on smaller sets are larger or equal, m′≥mkm' \ge m_k and m′′≥mkm'' \ge m_k.
The middle inequality L(f,Q)≤U(f,Q)L(f, Q) \le U(f, Q) holds because the lower sum of one partition is built from smaller heights than its upper sum. ■\blacksquare
Each mi≤Mim_i \le M_i, and widths are positive.
Quick checkQQ refines PP. Which statement does the refinement lemma give?
Corollary B Abbott Sec. 7.2

Every lower sum is at most every upper sum

For any partitions PP and QQ of [a,b][a, b]: L(f,P)≤U(f,Q)L(f, P) \le U(f, Q).

In one lineFor any two partitions PP and QQ of [a,b][a, b], L(f,P)≤U(f,Q)L(f, P) \le U(f, Q).

Why it is trueTwo different cuttings can be merged into one common refinement, and the lemma then compares both with it.

ProofAbbott Sec. 7.2
The idea: Merge the two partitions into P ∪ Q, which refines both, and chain the refinement lemma.
Let R=P∪QR = P \cup Q.
P∪QP \cup Q is a finite increasing list of points starting at aa and ending at bb, so it is a partition, and it contains PP and contains QQ.
L(f,P)≤L(f,R)≤U(f,R)≤U(f,Q)L(f, P) \le L(f, R) \le U(f, R) \le U(f, Q). ■\blacksquare
Refinement lemma applied twice: RR refines PP (lower sums rise) and RR refines QQ (upper sums fall).

Now the set of all lower sums is non-empty and bounded above (by any one upper sum), so by the completeness axiom it has a supremum. The set of all upper sums is non-empty and bounded below, so it has an infimum.

Definition B

Integrable

The lower integral is I‾=sup⁡PL(f,P)\underline{I} = \sup_P L(f, P) and the upper integral is I‾=inf⁡PU(f,P)\overline{I} = \inf_P U(f, P), both over all partitions PP of [a,b][a, b]. Every upper sum is an upper bound of the set of lower sums, so I‾≤U(f,Q)\underline{I} \le U(f, Q) for all QQ; hence I‾\underline{I} is a lower bound of the upper sums and I‾≤I‾\underline{I} \le \overline{I}. The function ff is integrable on [a,b][a, b] if I‾=I‾\underline{I} = \overline{I}, and this common value is written ∫abf\int_a^b f or ∫abf(x) dx\int_a^b f(x)\,dx. For every partition PP,

L(f,P)≤∫abf≤U(f,P).L(f, P) \le \int_a^b f \le U(f, P).

In one lineff is (Riemann) integrable if its lower integral sup⁡PL(f,P)\sup_P L(f, P) equals its upper integral inf⁡PU(f,P)\inf_P U(f, P); the common value is ∫abf\int_a^b f.

Why it existsIt says exactly one number fits between every lower sum and every upper sum, and that number is what we call the area.

Theorem B Abbott Sec. 7.2

Riemann–Darboux criterion

A bounded function ff on [a,b][a, b] is integrable if and only if

∀ε>0  ∃P:U(f,P)−L(f,P)<ε.\forall \varepsilon > 0\ \ \exists P:\quad U(f, P) - L(f, P) < \varepsilon.

In one lineA bounded ff is integrable if and only if for every ε>0\varepsilon > 0 there is a partition PP with U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon.

Why it is trueIt turns 'the sup of the lower sums equals the inf of the upper sums' into a test about one partition at a time, without knowing the value of the integral.

Why· Scratch work: reading the quantifiers

This is an “if and only if”, so there are two directions.

  • (Test passed, so integrable.) We must show I‾=I‾\underline{I} = \overline{I}. We already know I‾≤I‾\underline{I} \le \overline{I}, so we only need I‾−I‾≤\overline{I} - \underline{I} \le any positive number. Both I‾\underline{I} and I‾\overline{I} sit between L(f,P)L(f, P) and U(f,P)U(f, P), so they are at most U−L<εU - L < \varepsilon apart.
  • (Integrable, so test passed.) We are given one number II that is the sup of the lower sums and the inf of the upper sums. Given ε\varepsilon, we need ONE partition with both sums close to II. The approximation property of sup (1.1) gives a partition P1P_1 whose lower sum is close to II, and one for the upper sum, P2P_2. They are two different partitions, so we merge them. The refinement lemma says merging keeps both sums at least as good. The budget: give each of the two approximations ε/2\varepsilon/2.
ProofAbbott Sec. 7.2
The idea: (⇐) Both integrals lie between L(f,P) and U(f,P), so they differ by less than ε for every ε. (⇒) Take a partition close to the sup of the lower sums and one close to the inf of the upper sums, merge them, and use the refinement lemma.
Assume the test. Let ε>0\varepsilon > 0 and take PP with U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon.
Direction (⇐). Both I‾\underline{I} and I‾\overline{I} lie between L(f,P)L(f, P) and U(f,P)U(f, P) for every PP.
0≤I‾−I‾≤U(f,P)−L(f,P)<ε0 \le \overline{I} - \underline{I} \le U(f, P) - L(f, P) < \varepsilon.
I‾≥L(f,P)\underline{I} \ge L(f, P) because I‾\underline{I} is a sup, and I‾≤U(f,P)\overline{I} \le U(f, P) because I‾\overline{I} is an inf.This is the picture: two bounds trapped in a window of width less than ε.
This holds for every ε>0\varepsilon > 0, so I‾=I‾\overline{I} = \underline{I}, and ff is integrable.
A non-negative number smaller than every positive number is zero (used in 1.2).
Assume ff is integrable.
Direction (⇒). Let I=∫abfI = \int_a^b f be the common value, and let ε>0\varepsilon > 0.
Choose P1P_1 with L(f,P1)>I−ε2L(f, P_1) > I - \frac\varepsilon2.
Approximation property of the supremum I‾\underline{I} with tolerance ε/2\varepsilon/2: some lower sum exceeds I−ε/2I - \varepsilon/2.
Choose P2P_2 with U(f,P2)<I+ε2U(f, P_2) < I + \frac\varepsilon2.
Approximation property of the infimum I‾\overline{I} with tolerance ε/2\varepsilon/2.
Let P=P1∪P2P = P_1 \cup P_2. Then L(f,P1)≤L(f,P)≤U(f,P)≤U(f,P2)L(f, P_1) \le L(f, P) \le U(f, P) \le U(f, P_2).
PP refines both, so the refinement lemma applies to both comparisons.
U(f,P)−L(f,P)<(I+ε2)−(I−ε2)=εU(f, P) - L(f, P) < \left(I + \frac\varepsilon2\right) - \left(I - \frac\varepsilon2\right) = \varepsilon. ■\blacksquare
Combine: lower sum above I−ε2I - \frac\varepsilon2, upper sum below I+ε2I + \frac\varepsilon2.
Proof workshopRebuild the direction 'integrable implies small gap'

Tap the lines in the order a proof would write them. Each line can only use what is already above it.

    Computing an integral from the definition

    Now we use the criterion on the function from the picture.

    Worked example Spivak ch. 13
    Prove that f(x)=x2f(x) = x^2 is integrable on [0,1][0, 1] and that ∫01x2 dx=13\int_0^1 x^2\,dx = \tfrac13, using the definition.

    Solution.

    1. Pick a partition for a given ε\varepsilon. Let ε>0\varepsilon > 0. Choose nn with n>1εn > \frac1\varepsilon and let PnP_n be the partition into nn equal pieces. The criterion needs one partition with U−L<εU - L < \varepsilon. The visualizer shows Un−Ln=1nU_n - L_n = \frac1n, so we need 1n<ε\frac1n < \varepsilon, and n>1εn > \frac1\varepsilon is possible by the Archimedean property of 1.1.
    2. Check the gap. U(f,Pn)−L(f,Pn)=1n<εU(f, P_n) - L(f, P_n) = \frac1n < \varepsilon. This is the computation of the visualizer.
    3. So it is integrable. By the Riemann–Darboux criterion, ff is integrable. The test holds for an arbitrary ε\varepsilon.
    4. Find the value. For every nn, both ∫01x2\int_0^1 x^2 and 13\frac13 lie in [Ln,Un][L_n, U_n]. The integral lies between every lower and upper sum by the definition. The number 13\frac13 lies there because Ln=13−12n+16n2≤13L_n = \frac13 - \frac1{2n} + \frac1{6n^2} \le \frac13 (as 16n2≤12n\frac1{6n^2} \le \frac1{2n}) and Un≥13U_n \ge \frac13.
    5. Squeeze. So ∣∫01x2−13∣≤Un−Ln=1n\left|\int_0^1 x^2 - \frac13\right| \le U_n - L_n = \frac1n for every nn, and therefore the difference is 00. A non-negative number below 1n\frac1n for every nn is 00.

    Answer. ∫01x2 dx=13\int_0^1 x^2\,dx = \frac13. ■\blacksquare (The fundamental theorem below gets the same answer in one line.)

    Your answerUse the formula Un=(n+1)(2n+1)6n2U_n = \frac{(n+1)(2n+1)}{6n^2} for x2x^2 on [0,1][0, 1]. What is the upper sum U100U_{100} with 100100 equal pieces? (Give a decimal or a fraction.)

    The connection with step functions (MATH 376)

    Definition T

    Step function

    A step function ss on [a,b][a, b] is one for which there is a partition a=x0<⋯<xn=ba = x_0 < \dots < x_n = b with ss constant, say equal to cic_i, on each open interval (xi−1,xi)(x_{i-1}, x_i). Its integral is ∫abs=∑i=1nci Δxi\int_a^b s = \sum_{i=1}^n c_i\,\Delta x_i (the values at the cut points do not matter).

    In one lineA function that is constant on each open piece of some partition, like a staircase; its integral is the sum of value times width.

    Why it existsStep functions are the simplest functions whose area nobody doubts, so Apostol builds every other integral from them.

    Apostol’s definition: A‾(f)=sup⁡{∫s:s a step function,s≤f}\underline{A}(f) = \sup\{\int s : s \text{ a step function}, s \le f\} and A‾(f)=inf⁡{∫t:t a step function,t≥f}\overline{A}(f) = \inf\{\int t : t \text{ a step function}, t \ge f\}. Here s≤fs \le f means s(x)≤f(x)s(x) \le f(x) at every xx of [a,b][a, b]. The function is integrable when these are equal.

    Theorem B Apostol Vol. 1, ch. 1; Abbott Sec. 7.2

    Darboux sums are integrals of step functions

    For bounded ff on [a,b][a, b]: A‾(f)=I‾(f)\underline{A}(f) = \underline{I}(f) and A‾(f)=I‾(f)\overline{A}(f) = \overline{I}(f). In particular the two definitions of “integrable” and of ∫abf\int_a^b f agree.

    In one lineThe sup of the lower sums equals the sup of the integrals of step functions below ff, and likewise for upper sums, so Apostol's integral and the Darboux integral agree.

    Why it is trueA lower sum is the integral of a step function under f, and a step function under f is no better than the lower sum for a fine enough partition.

    ProofApostol Vol. 1, ch. 1; Abbott Sec. 7.2
    The idea: (≥) The step function equal to m_i on the i-th open piece lies below f and has integral L(f,P). (≤) Given a step function s ≤ f, refine its partition by tiny pieces around the cut points; away from them f ≥ s, and the tiny pieces cost almost nothing because f is bounded.
    Given a partition PP, let sPs_P equal mim_i on (xi−1,xi)(x_{i-1}, x_i) and at each interior cut point xix_i equal min⁡(mi,mi+1)\min(m_i, m_{i+1}) (at the two ends aa and bb use m1m_1 and mnm_n).
    Define the staircase that is as high as possible under ff and constant on the pieces of PP.
    Then sP≤fs_P \le f everywhere, and ∫sP=∑mi Δxi=L(f,P)\int s_P = \sum m_i\,\Delta x_i = L(f, P). So A‾(f)≥L(f,P)\underline{A}(f) \ge L(f, P) for every PP, hence A‾(f)≥I‾(f)\underline{A}(f) \ge \underline{I}(f).
    mim_i is the infimum of ff over the closed piece [xi−1,xi][x_{i-1}, x_i], so it is at most f(x)f(x) for xx in the piece, including the cut points.
    Let η>0\eta > 0 be smaller than half the shortest piece of ss. Let QQ consist of the cut points zjz_j together with the points zj±ηz_j \pm \eta that lie in [a,b][a, b].
    Now the other direction. Let s≤fs \le f be any step function, with cut points a=z0<⋯<zK=ba = z_0 < \dots < z_K = b and value cjc_j on (zj−1,zj)(z_{j-1}, z_j). Let BB be a number with ∣s∣≤B|s| \le B and ∣f∣≤B|f| \le B everywhere (both are bounded).
    On those “big” pieces, mi≥cjm_i \ge c_j. The other pieces are the “tiny” ones, of width η\eta, next to a cut point. There are at most 2K2K of them. On a tiny piece mi≥−Bm_i \ge -B, while s≤Bs \le B.
    A piece of QQ that lies inside one open piece (zj−1,zj)(z_{j-1}, z_j) has f≥s=cjf \ge s = c_j on it, so its infimum is at least cjc_j.
    Hence L(f,Q)≥∫s−2Bη⋅2KL(f, Q) \ge \int s - 2B\eta \cdot 2K. Since η\eta can be taken as small as we like, I‾(f)≥∫s\underline{I}(f) \ge \int s, and taking the sup over all step functions s≤fs \le f gives I‾(f)≥A‾(f)\underline{I}(f) \ge \underline{A}(f).
    Compare piece by piece with ∫s\int s: the big pieces contribute at least what ss does, and each tiny piece contributes at least −Bη-B\eta to L(f,Q)L(f, Q) while ss contributes at most BηB\eta to ∫s\int s, a difference of at most 2Bη2B\eta.
    The upper integrals agree in the same way. ■\blacksquare
    The upper statement is the lower one applied to −f-f (this swaps sup and inf and step functions below with step functions above).

    So when you met "∫abf\int_a^b f" in MATH 376 through step functions, it was the same number as the squeeze between L(f,P)L(f, P) and U(f,P)U(f, P) here.

    Worked example Apostol Vol. 1, step functions
    Show that f(x)=1f(x) = 1 on [0,12)[0, \tfrac12) and f(x)=2f(x) = 2 on [12,1][\tfrac12, 1] is integrable, and find ∫01f\int_0^1 f.

    Solution.

    1. Notice ff is itself a step function. It is constant on (0,12)(0, \frac12) and on (12,1)(\frac12, 1). Apostol’s integral of a step function is the sum of value times width, so we expect 1⋅12+2⋅12=321\cdot\frac12 + 2\cdot\frac12 = \frac32.
    2. Take a partition that isolates the jump. For 0<η<140 < \eta < \frac14 let P={0,12−η,12+η,1}P = \{0, \frac12 - \eta, \frac12 + \eta, 1\}. A bad piece costs its width times the height jump, so make the bad piece as thin as we like.
    3. Compute the sums. On [0,12−η][0, \frac12 - \eta]: M=m=1M = m = 1. On [12+η,1][\frac12 + \eta, 1]: M=m=2M = m = 2. On [12−η,12+η][\frac12 - \eta, \frac12 + \eta]: M=2M = 2, m=1m = 1. So U−L=(2−1)⋅2η=2ηU - L = (2 - 1)\cdot 2\eta = 2\eta. Only the piece containing the jump has M≠mM \ne m.
    4. Apply the criterion. Given ε>0\varepsilon > 0 take η=min⁡(ε4,18)\eta = \min\left(\frac\varepsilon4, \frac18\right). Then U−L≤ε2<εU - L \le \frac\varepsilon2 < \varepsilon. We need 2η<ε2\eta < \varepsilon, and η<14\eta < \frac14 keeps the partition valid.
    5. The value. L(f,P)=1⋅(12−η)+1⋅2η+2⋅(12−η)=32−ηL(f, P) = 1\cdot(\frac12 - \eta) + 1\cdot 2\eta + 2\cdot(\frac12 - \eta) = \frac32 - \eta and U(f,P)=32+ηU(f, P) = \frac32 + \eta. The integral lies between them for every η\eta, so it is 32\frac32.

    Answer. ff is integrable and ∫01f=32\int_0^1 f = \frac32. ■\blacksquare A single jump does no harm because it can be trapped in a piece as thin as we like. The same argument handles finitely many jumps.

    Python labUpper and lower sums for any function you like
    import math
    
    def sums(f, a, b, n, samples=200):
        """Lower and upper sums with n equal pieces. The min and max on each piece
        are estimated from many sample points, which is exact enough for a picture."""
        w = (b - a) / n
        L = U = 0.0
        for i in range(n):
            ys = [f(a + i*w + k*w/samples) for k in range(samples + 1)]
            L += min(ys) * w
            U += max(ys) * w
        return L, U
    
    f = lambda x: x**2
    for n in [1, 2, 4, 10, 100, 1000]:
        L, U = sums(f, 0, 1, n)
        print(f"n = {n:5d}   L = {L:.6f}   U = {U:.6f}   U - L = {U - L:.6f}")
    print("exact area 1/3 =", 1/3)

    Try this. Replace f by lambda x: x**3 on [0,2][0, 2] (the exact area is 44) and check that U−LU - L is exactly 16n\frac{16}{n}: for an increasing function the gap is (width of a piece) times (total rise f(b)−f(a)f(b) - f(a)), here 2n⋅8\frac2n \cdot 8. You will need to call sums(f, 0, 2, n). Then try lambda x: math.sin(1/x) if x > 0 else 0 on [0,1][0, 1], which wiggles infinitely often near 00 but is still integrable.

    Which functions are integrable?

    Continuous functions

    Theorem B Abbott Sec. 7.2

    Continuous functions are integrable

    If ff is continuous on [a,b][a, b], then ff is integrable on [a,b][a, b].

    In one lineIf ff is continuous on [a,b][a, b], then ff is integrable on [a,b][a, b].

    Why it is trueUniform continuity makes f vary by less than a fixed ε on every piece narrower than one δ, so the outer and inner rectangles differ by at most ε times the total width.

    Why· Scratch work: where the proof comes from

    By the criterion we need one partition with U−L<εU - L < \varepsilon. Write the gap piece by piece:

    U(f,P)−L(f,P)=∑i=1n(Mi−mi) Δxi.U(f, P) - L(f, P) = \sum_{i=1}^n (M_i - m_i)\,\Delta x_i.

    Each term is “height gap on piece ii” times “width of piece ii”. Suppose every height gap is at most a small number ε′\varepsilon'. Then the sum is at most ε′∑Δxi=ε′(b−a)\varepsilon' \sum \Delta x_i = \varepsilon'(b - a), because the widths add up to the whole interval. To make that at most ε/2\varepsilon/2 we want ε′=ε2(b−a)\varepsilon' = \dfrac{\varepsilon}{2(b - a)}. This is the budget split: ε\varepsilon is divided by the total width because every piece adds its share.

    Now, why would the height gap on a piece be small? On a piece, Mi−miM_i - m_i measures how far ff moves within that piece. If the piece is narrower than δ\delta, and δ\delta is a uniform continuity δ\delta for tolerance ε′\varepsilon', then any two points of the piece have values within ε′\varepsilon'. One δ\delta for the whole interval is exactly what we need, since we want to use equal pieces everywhere. That is why the theorem needs uniform continuity (1.3) and not merely continuity at each point. The factor 22 is there because a supremum and an infimum are only approached, so we get Mi−mi≤ε′M_i - m_i \le \varepsilon' (not strict), and we still want a strict inequality at the end.

    ProofAbbott Sec. 7.2
    The idea: f is bounded (extreme value theorem), so the sums exist. Uniform continuity gives δ for tolerance ε/(2(b − a)). Cut [a,b] into equal pieces narrower than δ; then every M_i − m_i is at most ε/(2(b − a)) and U − L is at most ε/2.
    Let ε>0\varepsilon > 0. The function ff is bounded on [a,b][a, b].
    The extreme value theorem (1.3): a continuous function on [a,b][a, b] is bounded, so MiM_i and mim_i exist.
    There is δ>0\delta > 0 such that ∣x−y∣<δ|x - y| < \delta implies ∣f(x)−f(y)∣<ε2(b−a)|f(x) - f(y)| < \frac{\varepsilon}{2(b-a)} for all x,y∈[a,b]x, y \in [a, b].
    Heine–Cantor (1.3): continuous on [a,b][a, b] implies uniformly continuous. Tolerance ε′=ε2(b−a)\varepsilon' = \frac{\varepsilon}{2(b-a)}, the budget from the scratch work.
    Choose nn with b−an<δ\frac{b-a}{n} < \delta and let PP cut [a,b][a, b] into nn equal pieces.
    Archimedean property: we may choose nn as large as we like. Then each piece has width b−an<δ\frac{b-a}{n} < \delta.
    On each piece, Mi−mi≤ε2(b−a)M_i - m_i \le \dfrac{\varepsilon}{2(b-a)}.
    For x,yx, y in the same piece, ∣x−y∣≤b−an<δ|x - y| \le \frac{b-a}{n} < \delta, so f(x)−f(y)<ε2(b−a)f(x) - f(y) < \frac{\varepsilon}{2(b-a)} for all such x,yx, y. Fix yy and take the sup over xx, then take the inf over yy.Sup and inf are limits of values, so strict inequalities become non-strict. That is why we left room with the factor 2.
    U(f,P)−L(f,P)=∑i=1n(Mi−mi) Δxi≤ε2(b−a)∑i=1nΔxi=ε2(b−a)(b−a)=ε2<εU(f, P) - L(f, P) = \sum_{i=1}^n (M_i - m_i)\,\Delta x_i \le \dfrac{\varepsilon}{2(b-a)} \sum_{i=1}^n \Delta x_i = \dfrac{\varepsilon}{2(b-a)}(b - a) = \dfrac\varepsilon2 < \varepsilon.
    Multiply by Δxi\Delta x_i and add; the widths add to b−ab - a.
    So ff is integrable. ■\blacksquare
    The Riemann–Darboux criterion.
    Why· The picture behind the proof

    Look at the table of the picture again. Each piece has an inner and an outer rectangle, and the gap between them on piece ii is a thin sliver of height Mi−miM_i - m_i and width Δxi\Delta x_i. Uniform continuity says that slivers can all be made thinner than ε′\varepsilon' at the same time by using narrow enough pieces. The total area of all slivers is then at most ε′\varepsilon' times the width b−ab - a. For x2x^2 on [0,1][0, 1] the slivers have height 2i−1n2\frac{2i - 1}{n^2} and width 1n\frac1n, and they stack to total area 1n\frac1n, matching the visualizer.

    Proof workshopGive the reason for each line: continuous implies integrable

    Each line of the proof is shown in order. Choose the reason that justifies it, then press Check.

    1. Let ε>0\varepsilon > 0. ff is bounded on [a,b][a, b].
    2. There is δ\delta with ∣x−y∣<δ  ⟹  ∣f(x)−f(y)∣<ε2(b−a)|x - y| < \delta \implies |f(x) - f(y)| < \frac{\varepsilon}{2(b-a)}.
    3. Choose nn with b−an<δ\frac{b-a}{n} < \delta and cut into nn equal pieces.
    4. On each piece, Mi−mi≤ε2(b−a)M_i - m_i \le \frac{\varepsilon}{2(b-a)}.
    5. U−L≤ε2(b−a)∑Δxi=ε2<εU - L \le \frac{\varepsilon}{2(b-a)} \sum \Delta x_i = \frac\varepsilon2 < \varepsilon.
    6. So ff is integrable.
    Quick checkIn this proof, why do we need UNIFORM continuity, not just continuity at each point?
    Worked example Spivak ch. 13, in the spirit of the proof above
    How many equal pieces make U−L<0.01U - L < 0.01 for f(x)=sin⁡xf(x) = \sin x on [0,π][0, \pi]?

    Solution.

    1. Find a δ\delta for tolerance ε′\varepsilon'. By the mean value theorem, ∣sin⁡x−sin⁡y∣=∣cos⁡c∣ ∣x−y∣≤∣x−y∣|\sin x - \sin y| = |\cos c|\,|x - y| \le |x - y|. So δ=ε′\delta = \varepsilon' works. The derivative of sin⁡\sin is at most 11 in absolute value, which turns the mean value theorem into an explicit δ\delta (as in the “find delta” method of 1.3).

    2. Bound the gap per piece. On a piece of width h=πnh = \frac\pi n, any two points have values within hh, so Mi−mi≤hM_i - m_i \le h. Use the same sup/inf argument as the proof.

    3. Bound the total. U−L≤∑h⋅h=nh2=π2nU - L \le \sum h\cdot h = n h^2 = \dfrac{\pi^2}{n}. There are nn pieces, each contributing at most (height gap) times (width) ≤h⋅h\le h \cdot h.

    4. Solve. π2n<0.01\frac{\pi^2}{n} < 0.01 when n>100π2≈986.96n > 100\pi^2 \approx 986.96, so n=987n = 987 suffices. π2≈9.8696\pi^2 \approx 9.8696.

    5. A sharper count (optional). Take nn even, so that π2\frac\pi2 is a cut point. On [0,π2][0, \frac\pi2] the function rises, so Mi−mi=sin⁡xi−sin⁡xi−1M_i - m_i = \sin x_i - \sin x_{i-1}, and these add up (telescope) to sin⁡π2−sin⁡0=1\sin\frac\pi2 - \sin 0 = 1. On [π2,π][\frac\pi2, \pi] it falls and the gaps add up to 11 again. So U−L=πn⋅1+πn⋅1=2πnU - L = \frac\pi n\cdot 1 + \frac\pi n\cdot 1 = \frac{2\pi}{n}, and 2πn<0.01\frac{2\pi}{n} < 0.01 once n>628.3n > 628.3, so n=630n = 630 (the next even number) works, with U−L=0.00997U - L = 0.00997. Monotone pieces make the sum of gaps telescope. This uses the shape of sin⁡\sin and is much better than the general bound of step 3.

    Answer. 987987 equal pieces certainly make U−L<0.01U - L < 0.01. This is a guarantee, and a crude one. The sharper count shows 630630 pieces already do.

    The telescoping trick of step 5 works for any increasing function, so it is worth a clean example of its own. It is also the method for the first “prove” problem below.

    Worked example Abbott Sec. 7.2 style
    Show that f(x)=xf(x) = \sqrt x is integrable on [0,4][0, 4] by making the gap U−LU - L telescope.

    Solution.

    1. Notice that ff is increasing. If 0≤x<y0 \le x < y then x<y\sqrt x < \sqrt y. On every piece the lowest value is at the left end and the highest at the right end, so no search for the sup and inf is needed.
    2. Cut [0,4][0, 4] into nn equal pieces. Each has width h=4nh = \frac4n and the cut points are xi=4inx_i = \frac{4i}{n}. Equal widths let us pull hh out of the sum.
    3. Write the gap. U−L=∑i=1n(f(xi)−f(xi−1))hU - L = \sum_{i=1}^n \left(f(x_i) - f(x_{i-1})\right)h. Mi=f(xi)M_i = f(x_i) and mi=f(xi−1)m_i = f(x_{i-1}) by step 1.
    4. Telescope. ∑i=1n(f(xi)−f(xi−1))=f(xn)−f(x0)=f(4)−f(0)=2\sum_{i=1}^n \left(f(x_i) - f(x_{i-1})\right) = f(x_n) - f(x_0) = f(4) - f(0) = 2, so U−L=8nU - L = \frac{8}{n}. Each f(xi)f(x_i) appears once with a plus sign and once with a minus sign, so only the two ends survive.
    5. Meet the criterion. Given ε>0\varepsilon > 0 choose n>8εn > \frac8\varepsilon. Then U−L=8n<εU - L = \frac8n < \varepsilon. The Riemann–Darboux criterion needs one partition with gap below ε\varepsilon.

    Answer. x\sqrt x is integrable on [0,4][0, 4]. ■\blacksquare Nothing about square roots was used except that the function increases.

    Your answerWith the equal-pieces partition of [0,4][0, 4] for x\sqrt x, the gap is U−L=8nU - L = \frac8n. What is the smallest whole number nn that guarantees U−L<0.01U - L < 0.01?

    A function that is not integrable

    Worked example Abbott Sec. 7.1 (Dirichlet)
    Show that the Dirichlet function (f(x)=1f(x) = 1 if xx is rational, f(x)=0f(x) = 0 if xx is irrational) is not integrable on [0,1][0, 1].

    Solution.

    1. Look at one piece. Any piece [xi−1,xi][x_{i-1}, x_i] with xi−1<xix_{i-1} < x_i contains a rational number and an irrational number. The rationals are dense (1.1), and so are the irrationals (the density of the irrationals is a problem in 1.1, via 2\sqrt 2).
    2. Sup and inf of every piece. So Mi=1M_i = 1 (a rational is in the piece) and mi=0m_i = 0 (an irrational is in the piece). ff only takes the values 00 and 11, and both occur in every piece.
    3. Sums for every partition. U(f,P)=∑1⋅Δxi=1U(f, P) = \sum 1\cdot\Delta x_i = 1 and L(f,P)=∑0⋅Δxi=0L(f, P) = \sum 0\cdot\Delta x_i = 0, for every PP. The widths add to 11.
    4. The integrals disagree. Upper integral =1= 1, lower integral =0= 0. The inf of the constant 11 and the sup of the constant 00.

    Answer. I‾=0≠1=I‾\underline{I} = 0 \ne 1 = \overline{I}, so ff is not integrable. ■\blacksquare Every inner staircase stays at height 00 and every outer one at height 11 however fine the cutting; the area is not squeezed to one number. (The Lebesgue integral of 521 and 541’s measure theory will say this function has integral 00, because the rationals are a negligible set.)

    Quick checkWhich feature makes the Dirichlet function fail to be integrable?

    Linearity, monotonicity and additivity

    Theorem B Abbott Sec. 7.4

    Linearity and monotonicity of the integral

    Let f,gf, g be integrable on [a,b][a, b] and c∈Rc \in \mathbb R. Then f+gf + g and cfcf are integrable, and

    ∫ab(f+g)=∫abf+∫abg,∫abcf=c∫abf.\int_a^b (f + g) = \int_a^b f + \int_a^b g, \qquad \int_a^b cf = c\int_a^b f.

    If f(x)≤g(x)f(x) \le g(x) for all xx, then ∫abf≤∫abg\int_a^b f \le \int_a^b g.

    In one lineIf f,gf, g are integrable and cc is a constant, then f+gf + g and cfcf are integrable, with ∫(f+g)=∫f+∫g\int (f+g) = \int f + \int g, ∫cf=c∫f\int cf = c\int f, and f≤gf \le g implies ∫f≤∫g\int f \le \int g.

    Why it is trueOn each piece, the sup of a sum is at most the sum of the sups (and the inf of a sum is at least the sum of the infs), so the window for f + g fits inside the sum of the windows for f and g.

    ProofAbbott Sec. 7.4
    The idea: For a piece, sup(f+g) ≤ sup f + sup g and inf(f+g) ≥ inf f + inf g. So U(f+g,P) ≤ U(f,P) + U(g,P) and L(f+g,P) ≥ L(f,P) + L(g,P). Make one partition good for both f and g, and the gap for f+g is at most the sum of the two gaps.
    On every piece, Mi(f+g)≤Mi(f)+Mi(g)M_i(f+g) \le M_i(f) + M_i(g) and mi(f+g)≥mi(f)+mi(g)m_i(f+g) \ge m_i(f) + m_i(g).
    For any xx in the piece, f(x)+g(x)≤sup⁡f+sup⁡gf(x) + g(x) \le \sup f + \sup g; so sup⁡f+sup⁡g\sup f + \sup g is an upper bound of the values of f+gf + g, and the least upper bound is no larger.The inequality can be strict: f and g may reach their tops at different points.
    Hence U(f+g,P)≤U(f,P)+U(g,P)U(f+g, P) \le U(f, P) + U(g, P) and L(f+g,P)≥L(f,P)+L(g,P)L(f+g, P) \ge L(f, P) + L(g, P).
    Multiply by Δxi>0\Delta x_i > 0 and add over the pieces.
    Let ε>0\varepsilon > 0. Take a partition PP with U(f,P)−L(f,P)<ε2U(f, P) - L(f, P) < \frac\varepsilon2 and U(g,P)−L(g,P)<ε2U(g, P) - L(g, P) < \frac\varepsilon2.
    Criterion for ff and for gg, each with tolerance ε/2\varepsilon/2, then merge the two partitions. The refinement lemma says merging does not enlarge either gap.
    U(f+g,P)−L(f+g,P)≤[U(f,P)−L(f,P)]+[U(g,P)−L(g,P)]<εU(f+g, P) - L(f+g, P) \le \left[U(f, P) - L(f, P)\right] + \left[U(g, P) - L(g, P)\right] < \varepsilon. So f+gf + g is integrable.
    Subtract the inequalities of step 2 and add the two gaps.
    The window has width [U(f,P)−L(f,P)]+[U(g,P)−L(g,P)]<ε\left[U(f,P) - L(f,P)\right] + \left[U(g,P) - L(g,P)\right] < \varepsilon, so the two numbers differ by less than ε\varepsilon. Since ε\varepsilon is arbitrary, they are equal.
    Both ∫(f+g)\int (f+g) and ∫f+∫g\int f + \int g lie in the window [L(f,P)+L(g,P), U(f,P)+U(g,P)][L(f,P) + L(g,P),\ U(f,P) + U(g,P)].Whenever two numbers are trapped in a window narrower than every ε, they are equal.
    Constant multiple, c≥0c \ge 0. Then U(cf,P)=c U(f,P)U(cf, P) = c\,U(f, P) and L(cf,P)=c L(f,P)L(cf, P) = c\,L(f, P). So the gap of cfcf is cc times the gap of ff, which is small for a good PP (if c=0c = 0 everything is 00). Taking the sup over PP gives ∫cf=csup⁡PL(f,P)=c∫f\int cf = c\sup_P L(f, P) = c\int f.
    Multiplying by c≥0c \ge 0 keeps order, so sup⁡(cf)=csup⁡f\sup(cf) = c\sup f and inf⁡(cf)=cinf⁡f\inf(cf) = c\inf f on each piece. Add up with the widths.
    Constant multiple, c<0c < 0. Then U(cf,P)=c L(f,P)U(cf, P) = c\,L(f, P) and L(cf,P)=c U(f,P)L(cf, P) = c\,U(f, P). The gap of cfcf is ∣c∣|c| times the gap of ff, so cfcf is integrable, and ∫cf=sup⁡Pc U(f,P)=cinf⁡PU(f,P)=c∫f\int cf = \sup_P c\,U(f, P) = c\inf_P U(f, P) = c\int f.
    Multiplying by c<0c < 0 reverses order, so the sup of cfcf on a piece is cc times the inf of ff, and the inf of cfcf is cc times the sup of ff.
    For monotonicity: ∫f=sup⁡PL(f,P)≤sup⁡PL(g,P)=∫g\int f = \sup_P L(f, P) \le \sup_P L(g, P) = \int g. ■\blacksquare
    If f≤gf \le g then mi(f)≤mi(g)m_i(f) \le m_i(g) on each piece, so L(f,P)≤L(g,P)L(f, P) \le L(g, P) for every PP. Take the sup over PP.
    Theorem B Abbott Sec. 7.4

    Additivity of the integral over intervals

    If a<c<ba < c < b and ff is integrable on [a,c][a, c] and on [c,b][c, b], then ff is integrable on [a,b][a, b] and

    ∫abf=∫acf+∫cbf.\int_a^b f = \int_a^c f + \int_c^b f.

    In one lineIf a<c<ba < c < b and ff is integrable on [a,c][a, c] and on [c,b][c, b], then it is integrable on [a,b][a, b] and ∫abf=∫acf+∫cbf\int_a^b f = \int_a^c f + \int_c^b f.

    Why it is trueA partition of [a, c] glued to a partition of [c, b] is a partition of [a, b], and the sums add.

    ProofAbbott Sec. 7.4
    The idea: Glue good partitions of the two parts; the lower and upper sums add, so the gap is the sum of the two gaps, and both the whole integral and the sum of the two integrals sit in the same window.
    Let ε>0\varepsilon > 0. Take P1P_1 on [a,c][a, c] and P2P_2 on [c,b][c, b] with gaps less than ε2\frac\varepsilon2 each.
    Criterion on each part with tolerance ε/2\varepsilon/2.
    P=P1∪P2P = P_1 \cup P_2 is a partition of [a,b][a, b], with U(f,P)=U(f,P1)+U(f,P2)U(f, P) = U(f, P_1) + U(f, P_2) and L(f,P)=L(f,P1)+L(f,P2)L(f, P) = L(f, P_1) + L(f, P_2).
    Their union contains cc and cuts [a,b][a, b]; a piece lies entirely in [a,c][a, c] or entirely in [c,b][c, b].
    U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon, so ff is integrable on [a,b][a, b].
    Add the two gaps.
    So they differ by less than every ε\varepsilon, hence are equal. ■\blacksquare
    Both ∫abf\int_a^b f and ∫acf+∫cbf\int_a^c f + \int_c^b f lie in [L(f,P),U(f,P)][L(f, P), U(f, P)], a window of width less than ε\varepsilon.

    We also use two conventions that keep formulas tidy: ∫aaf=0\int_a^a f = 0 and ∫baf=−∫abf\int_b^a f = -\int_a^b f. And one bound: if m≤f≤Mm \le f \le M on [c,d][c, d], then m(d−c)≤∫cdf≤M(d−c)m(d - c) \le \int_c^d f \le M(d - c). This follows from the one-piece partition {c,d}\{c, d\}, since m(d−c)≤L(f,{c,d})≤∫cdf≤U(f,{c,d})≤M(d−c)m(d-c) \le L(f, \{c, d\}) \le \int_c^d f \le U(f, \{c,d\}) \le M(d-c).

    Worked example
    Use linearity and the value from the earlier example: find ∫01(3x2+2) dx\int_0^1 (3x^2 + 2)\,dx.

    Solution.

    1. Split the sum and pull out constants. ∫01(3x2+2) dx=3∫01x2 dx+∫012 dx\int_0^1 (3x^2 + 2)\,dx = 3\int_0^1 x^2\,dx + \int_0^1 2\,dx. Linearity: the integral of a sum is the sum of the integrals, and constants come out.
    2. Insert known values. ∫01x2 dx=13\int_0^1 x^2\,dx = \frac13 (proved above), and ∫012 dx=2⋅1=2\int_0^1 2\,dx = 2\cdot 1 = 2 (a rectangle of height 22 and width 11; every upper and lower sum equals 22). A constant function has Mi=mi=2M_i = m_i = 2.
    3. Add. 3⋅13+2=33\cdot\frac13 + 2 = 3. Arithmetic.

    Answer. 33. ■\blacksquare

    Quick checkWhich statement about sup⁡\sup is used to show U(f+g,P)≤U(f,P)+U(g,P)U(f+g, P) \le U(f, P) + U(g, P)?

    The fundamental theorem of calculus

    So far, computing an integral needed a formula for the sums (as for x2x^2). The fundamental theorem removes that work for many functions, by connecting the integral to the derivative from 1.4.

    Definition B

    Fundamental theorem of calculus

    The fundamental theorem of calculus has two parts, proved below.

    • Part 1. If ff is continuous on [a,b][a, b], the function F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt is differentiable and F′(x)=f(x)F'(x) = f(x). (Integrating then differentiating returns ff.)
    • Part 2. If FF is continuous on [a,b][a, b], differentiable on (a,b)(a, b), and F′=fF' = f is integrable, then ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a). (Differentiating then integrating returns FF up to its endpoint values.)

    In one lineDifferentiation and integration undo each other: (1) the derivative of x↦∫axfx \mapsto \int_a^x f is ff, and (2) ∫abF′=F(b)−F(a)\int_a^b F' = F(b) - F(a).

    Why it existsIt turns the hard problem of summing infinitely many thin rectangles into the easy problem of finding an antiderivative.

    Where this came from· Newton, Leibniz and the long way round

    Isaac Newton (in the mid 1660s) and Gottfried Leibniz (in the 1670s) each saw that finding the area under a curve and finding a tangent are inverse problems. Newton’s work circulated in manuscript before it was printed, and Leibniz published his differential calculus in 1684 and his integral calculus in 1686. The sign ∫\int is Leibniz’s, a long S for “sum” (summa); he began using it in a manuscript of 1675 and it first appeared in print in 1686. Their arguments used infinitely small quantities. The proof in this chapter replaces them with the nineteenth-century idea of Cauchy, Riemann and Darboux: the squeeze between sums takes the place of the infinitesimals, and the mean value theorem of 1.4 supplies the key step.

    Part 1: the area function has slope f

    Theorem B Abbott Sec. 7.5

    Fundamental theorem of calculus, part 1

    Let ff be continuous on [a,b][a, b] and F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt. Then FF is differentiable on [a,b][a, b] (one-sided at the ends) and F′(x)=f(x)F'(x) = f(x).

    In one lineIf ff is continuous on [a,b][a, b] and F(x)=∫axfF(x) = \int_a^x f, then F′(x)=f(x)F'(x) = f(x) for every xx.

    Why it is trueThe extra area from x to x + h is about a thin strip of height f(x) and width h; dividing by h leaves f(x).

    Why· Scratch work: where the proof comes from

    The derivative is the limit of F(x+h)−F(x)h\dfrac{F(x+h) - F(x)}{h}. The top is the extra area gained between xx and x+hx + h, a thin strip. By additivity, F(x+h)−F(x)=∫xx+hfF(x+h) - F(x) = \int_x^{x+h} f. A strip of width hh whose top is near height f(x)f(x) has area near f(x)⋅hf(x)\cdot h, so the quotient should be near f(x)f(x). To make “near” exact: continuity of ff at xx gives, for tolerance ε\varepsilon, a δ\delta such that ff stays between f(x)−εf(x) - \varepsilon and f(x)+εf(x) + \varepsilon on the whole strip when ∣h∣<δ|h| < \delta. The bound m(d−c)≤∫cdf≤M(d−c)m(d-c) \le \int_c^d f \le M(d-c) then squeezes the strip’s area between (f(x)−ε)∣h∣(f(x) - \varepsilon)|h| and (f(x)+ε)∣h∣(f(x) + \varepsilon)|h|. Dividing by ∣h∣|h| gives the answer. The only property used is continuity of ff at the single point xx.

    ProofAbbott Sec. 7.5
    The idea: Additivity turns the difference quotient into the average of f over a thin strip; continuity at x traps f within ε of f(x) on the strip, so the average is within ε of f(x).
    Fix xx and h≠0h \ne 0 with x+h∈[a,b]x + h \in [a, b]. Then F(x+h)−F(x)=∫xx+hfF(x+h) - F(x) = \int_x^{x+h} f (with the convention ∫xx+h=−∫x+hx\int_x^{x+h} = -\int_{x+h}^x if h<0h < 0).
    ff is continuous on every subinterval, so integrable there (continuous functions are integrable). Additivity of the integral over intervals.
    Let ε>0\varepsilon > 0. There is δ>0\delta > 0 with ∣f(t)−f(x)∣<ε|f(t) - f(x)| < \varepsilon whenever ∣t−x∣<δ|t - x| < \delta.
    Arbitrary tolerance, and continuity of ff at xx.
    Let II be the interval between xx and x+hx+h, of length ∣h∣|h|. Then (f(x)−ε)∣h∣≤∫If≤(f(x)+ε)∣h∣(f(x) - \varepsilon)|h| \le \int_I f \le (f(x) + \varepsilon)|h|.
    Take 0<∣h∣<δ0 < |h| < \delta. Every tt between xx and x+hx + h has ∣t−x∣<δ|t - x| < \delta, so f(x)−ε<f(t)<f(x)+εf(x) - \varepsilon < f(t) < f(x) + \varepsilon on the strip.
    In both cases F(x+h)−F(x)h=1∣h∣∫If\dfrac{F(x+h) - F(x)}{h} = \dfrac{1}{|h|}\int_I f.
    Check the sign: for h>0h > 0, ∫xx+hf=∫If\int_x^{x+h} f = \int_I f and we divide by h=∣h∣h = |h|. For h<0h < 0, F(x+h)−F(x)=−∫x+hxf=−∫IfF(x+h) - F(x) = -\int_{x+h}^{x} f = -\int_I f and we divide by h=−∣h∣h = -|h|, giving ∫If/∣h∣\int_I f / |h| again.
    So f(x)−ε≤F(x+h)−F(x)h≤f(x)+εf(x) - \varepsilon \le \dfrac{F(x+h) - F(x)}{h} \le f(x) + \varepsilon, that is, ∣F(x+h)−F(x)h−f(x)∣≤ε\left|\dfrac{F(x+h) - F(x)}{h} - f(x)\right| \le \varepsilon for 0<∣h∣<δ0 < |h| < \delta.
    Divide the bound of step 3 by ∣h∣>0|h| > 0.
    Hence lim⁡h→0F(x+h)−F(x)h=f(x)\displaystyle\lim_{h \to 0}\frac{F(x+h) - F(x)}{h} = f(x), that is, F′(x)=f(x)F'(x) = f(x). ■\blacksquare
    Definition of the limit of a function (1.3); an inequality ≤ε\le \varepsilon for every ε\varepsilon is as good as <ε< \varepsilon (apply it with ε/2\varepsilon/2).
    Worked example Spivak ch. 14
    Find ddx∫0x2sin⁡t dt\dfrac{d}{dx}\displaystyle\int_0^{x^2} \sin t\,dt.

    Solution.

    1. Name the area function. Let G(u)=∫0usin⁡t dtG(u) = \int_0^u \sin t\,dt. The expression is G(x2)G(x^2). Part 1 handles an upper limit that is a plain variable; here the upper limit is x2x^2, so use the chain rule.
    2. Differentiate GG. sin⁡\sin is continuous, so G′(u)=sin⁡uG'(u) = \sin u by part 1. Fundamental theorem, part 1.
    3. Chain rule. ddxG(x2)=G′(x2)⋅2x=2xsin⁡(x2)\frac{d}{dx}G(x^2) = G'(x^2)\cdot 2x = 2x\sin(x^2). Differentiating the outer function GG at x2x^2 and multiplying by the derivative 2x2x of the inner one (1.4).

    Answer. 2xsin⁡(x2)2x\sin(x^2). ■\blacksquare No antiderivative of sin⁡t\sin t was needed, and the same method works for integrands such as e−t2e^{-t^2} that have no elementary antiderivative.

    Worked example Spivak ch. 14
    Find ddx∫xx2e−t2 dt\dfrac{d}{dx}\displaystyle\int_{x}^{x^2} e^{-t^2}\,dt.

    Solution.

    1. Split at a constant. ∫xx2e−t2 dt=∫0x2e−t2 dt−∫0xe−t2 dt\int_x^{x^2} e^{-t^2}\,dt = \int_0^{x^2} e^{-t^2}\,dt - \int_0^{x} e^{-t^2}\,dt. Part 1 needs the variable in the upper limit only and a fixed lower limit. Additivity and the reversed-limits convention move the variable lower limit into an upper limit, with a minus sign.
    2. Name the area function. Let G(u)=∫0ue−t2 dtG(u) = \int_0^u e^{-t^2}\,dt. The expression is G(x2)−G(x)G(x^2) - G(x). Now each piece has the form of part 1.
    3. Differentiate GG. e−t2e^{-t^2} is continuous, so G′(u)=e−u2G'(u) = e^{-u^2}. Fundamental theorem, part 1.
    4. Chain rule on the first term. ddxG(x2)=G′(x2)⋅2x=2x e−x4\frac{d}{dx}G(x^2) = G'(x^2)\cdot 2x = 2x\,e^{-x^4}. Outer derivative at x2x^2 times inner derivative 2x2x; and (x2)2=x4(x^2)^2 = x^4.
    5. Second term. ddxG(x)=e−x2\frac{d}{dx}G(x) = e^{-x^2}, and it enters with a minus sign. The derivative of a difference is the difference of derivatives.

    Answer. 2x e−x4−e−x22x\,e^{-x^4} - e^{-x^2}. ■\blacksquare

    Your answerLet F(x)=∫0x2et dtF(x) = \int_0^{x^2} e^{t}\,dt. Use part 1 and the chain rule to find F′(1)F'(1).
    Quick checkIf ff is continuous and F(x)=∫axf(t) dtF(x) = \int_a^x f(t)\,dt, what is F′(x)F'(x)?

    Part 2: evaluate by an antiderivative

    Theorem B Abbott Sec. 7.5

    Fundamental theorem of calculus, part 2

    Let FF be continuous on [a,b][a, b] and differentiable on (a,b)(a, b) with F′=fF' = f on (a,b)(a, b), and suppose ff is integrable on [a,b][a, b]. Then

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

    In one lineIf FF is continuous on [a,b][a, b], differentiable on (a,b)(a, b), and F′=fF' = f is integrable, then ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a).

    Why it is trueThe mean value theorem puts a value of f between the lowest and highest height on each piece, so the telescoping sum F(b) − F(a) is trapped between the lower and upper sums.

    Why· Scratch work: where the proof comes from

    We know the integral is the one number between all lower and upper sums. So it is enough to show that the number F(b)−F(a)F(b) - F(a) is also between every lower and upper sum, because then both numbers lie in windows that shrink to nothing, and are equal (the same trick as in the linearity proof). Take a partition and look at one piece: F(xi)−F(xi−1)F(x_i) - F(x_{i-1}) is how much FF rose across it. The mean value theorem says this rise equals F′(ti)Δxi=f(ti)ΔxiF'(t_i)\Delta x_i = f(t_i)\Delta x_i for some tit_i inside the piece. The value f(ti)f(t_i) is between the infimum mim_i and the supremum MiM_i of ff on the piece. Adding over the pieces, the rises add to F(b)−F(a)F(b) - F(a), because all the middle values cancel (a telescoping sum).

    ProofAbbott Sec. 7.5
    The idea: On each piece the mean value theorem gives F(x_i) − F(x_{i−1}) = f(t_i)Δx_i, which lies between m_iΔx_i and M_iΔx_i. Summing, F(b) − F(a) lies between every lower and upper sum, as does the integral.
    Let P={x0,…,xn}P = \{x_0, \dots, x_n\} be any partition of [a,b][a, b].
    Any partition; we prove the claim for all of them.
    For each ii there is ti∈(xi−1,xi)t_i \in (x_{i-1}, x_i) with F(xi)−F(xi−1)=F′(ti) Δxi=f(ti) ΔxiF(x_i) - F(x_{i-1}) = F'(t_i)\,\Delta x_i = f(t_i)\,\Delta x_i.
    FF is continuous on [xi−1,xi][x_{i-1}, x_i] and differentiable on its interior, so the mean value theorem (1.4) applies on each piece.
    mi Δxi≤F(xi)−F(xi−1)≤Mi Δxim_i\,\Delta x_i \le F(x_i) - F(x_{i-1}) \le M_i\,\Delta x_i.
    tit_i lies in the piece, so f(ti)f(t_i) is between the infimum and supremum of ff on it.
    L(f,P)≤F(b)−F(a)≤U(f,P)L(f, P) \le F(b) - F(a) \le U(f, P).
    Add over i=1,…,ni = 1, \dots, n. The middle sum telescopes: (F(x1)−F(x0))+(F(x2)−F(x1))+…(F(x_1) - F(x_0)) + (F(x_2) - F(x_1)) + \dots leaves F(xn)−F(x0)F(x_n) - F(x_0).
    Also L(f,P)≤∫abf≤U(f,P)L(f, P) \le \int_a^b f \le U(f, P).
    The definition of the integral (it is also between L(f,P)L(f, P) and U(f,P)U(f, P) for every PP).
    Let ε>0\varepsilon > 0 and choose such a PP. Then ∣∫abf−(F(b)−F(a))∣<ε\left|\int_a^b f - (F(b) - F(a))\right| < \varepsilon.
    ff is integrable, so by the criterion some PP has U(f,P)−L(f,P)<εU(f, P) - L(f, P) < \varepsilon. Two numbers in a window of width less than ε\varepsilon.
    So ∫abf=F(b)−F(a)\int_a^b f = F(b) - F(a). ■\blacksquare
    ε\varepsilon was arbitrary.
    Proof workshopRebuild the proof of the fundamental theorem, part 2

    Tap the lines in the order a proof would write them. Each line can only use what is already above it.

      Worked example
      Compute ∫01x2 dx\displaystyle\int_0^1 x^2\,dx and ∫0πsin⁡x dx\displaystyle\int_0^\pi \sin x\,dx with the fundamental theorem.

      Solution.

      1. Find an antiderivative of x2x^2. F(x)=x33F(x) = \frac{x^3}{3} has F′(x)=x2F'(x) = x^2. The JEE method: find a function whose derivative is the integrand.
      2. Check the hypotheses and evaluate. FF is continuous and differentiable everywhere, x2x^2 is continuous (so integrable). So ∫01x2=F(1)−F(0)=13−0=13\int_0^1 x^2 = F(1) - F(0) = \frac13 - 0 = \frac13. Part 2. This agrees with the value found from the definition earlier, which took a full computation.
      3. Second integral. F(x)=−cos⁡xF(x) = -\cos x has F′=sin⁡F' = \sin. So ∫0πsin⁡x dx=−cos⁡π−(−cos⁡0)=1+1=2\int_0^\pi \sin x\,dx = -\cos\pi - (-\cos 0) = 1 + 1 = 2. Part 2 again.

      Answer. 13\frac13 and 22. ■\blacksquare This is the rule you used in JEE; now you know the theorem that makes it true and the conditions it needs.

      Your answerUse part 2 to compute ∫14x dx\displaystyle\int_1^4 \sqrt x\,dx.
      Quick checkPart 2 is used to compute ∫−11x−2 dx\int_{-1}^{1} x^{-2}\,dx with F(x)=−1xF(x) = -\frac1x, giving F(1)−F(−1)=−2F(1) - F(-1) = -2. What goes wrong?
      Beyond the course: for understanding· Existence of antiderivatives, and what part 1 gives you

      Part 1 says every continuous function has an antiderivative, namely F(x)=∫axfF(x) = \int_a^x f. This is not a formula. For f(t)=e−t2f(t) = e^{-t^2} no elementary function (polynomials, exponentials, logarithms, trigonometric functions and combinations) is an antiderivative, but F(x)=∫0xe−t2 dtF(x) = \int_0^x e^{-t^2}\,dt is a perfectly good differentiable function; it is, up to a constant factor, the error function, and it is how the normal distribution’s probabilities are tabulated.

      Where it is used

      Used inside maths· Inside maths: probability, series and multivariable integrals

      Chapter 1.6 uses this chapter twice: a uniform limit of continuous functions can be integrated term by term (because ∣∫fn−∫f∣≤(b−a)sup⁡∣fn−f∣\left|\int f_n - \int f\right| \le (b - a)\sup|f_n - f|, from monotonicity), and a power series can be differentiated term by term (proved there via part 1). In MATH 375 the double integral over a rectangle was built from step functions on rectangles in exactly the way this chapter builds the one-variable integral (Apostol Vol. 2, ch. 11). In MATH 431 a continuous random variable has a density f≥0f \ge 0 with ∫f=1\int f = 1, and P(a≤X≤b)=∫abfP(a \le X \le b) = \int_a^b f. For example f(x)=6x(1−x)f(x) = 6x(1 - x) on [0,1][0, 1] has antiderivative 3x2−2x33x^2 - 2x^3, so ∫01f=3−2=1\int_0^1 f = 3 - 2 = 1 and P(14≤X≤34)=(3⋅916−2⋅2764)−(3⋅116−2⋅164)=2732−532=1116=0.6875P\left(\frac14 \le X \le \frac34\right) = \left(3\cdot\frac9{16} - 2\cdot\frac{27}{64}\right) - \left(3\cdot\frac1{16} - 2\cdot\frac1{64}\right) = \frac{27}{32} - \frac5{32} = \frac{11}{16} = 0.6875.

      Used in the real world· Real world: numerical integration, and work

      When there is no antiderivative, computers apply the sums of this chapter, with tricks that make the error shrink fast. The trapezoid rule replaces each rectangle by a trapezoid; for nn pieces of width h=b−anh = \frac{b - a}{n} its error is at most (b−a)h212max⁡∣f′′∣\frac{(b - a)h^2}{12}\max|f''|. Simpson’s rule fits parabolas and has error at most (b−a)h4180max⁡∣f(4)∣\frac{(b - a)h^4}{180}\max|f^{(4)}|. (These error bounds are standard results, proved with the mean value theorem; we state them.) Test on ∫01ex dx=e−1=1.718282\int_0^1 e^x\,dx = e - 1 = 1.718282: the trapezoid rule with n=4n = 4 gives 1.7272221.727222, an error of 8.9×10−38.9 \times 10^{-3} (the bound is e12⋅16=1.4×10−2\frac{e}{12\cdot 16} = 1.4 \times 10^{-2}). Doubling to n=8n = 8 cuts the error to 2.2×10−32.2 \times 10^{-3}, a factor of 44, as h2h^2 predicts. Simpson with n=4n = 4 gives 1.7183191.718319, an error of only 3.7×10−53.7 \times 10^{-5} (bound e180⋅256=5.9×10−5\frac{e}{180\cdot 256} = 5.9 \times 10^{-5}), and with n=8n = 8 the error falls to 2.3×10−62.3 \times 10^{-6}, a factor of about 1616, as h4h^4 predicts. Work: a spring that exerts force F=kxF = kx is stretched 0.30.3 m, with k=200k = 200 N/m; the work done is the integral of force over distance, ∫00.3200x dx=100x2∣00.3=9\int_0^{0.3} 200x\,dx = 100x^2\big|_0^{0.3} = 9 joules. The reason this is an integral is the same squeeze: force is nearly constant on a thin enough piece, so work is nearly (force times width), summed.

      Worked example
      How many equal pieces guarantee that the trapezoid rule for ∫01ex dx\displaystyle\int_0^1 e^x\,dx has error below 10−310^{-3}?

      Solution.

      1. Write the error bound. Error ≤(b−a)h212max⁡∣f′′∣\le \dfrac{(b - a)h^2}{12}\max|f''| with b−a=1b - a = 1 and h=1nh = \frac1n. This is the stated bound of the box above.
      2. Find max⁡∣f′′∣\max|f''|. For f(x)=exf(x) = e^x, f′′(x)=exf''(x) = e^x, which is largest at x=1x = 1 on [0,1][0, 1], where it equals ee. exe^x is increasing, so its maximum on the interval is at the right end.
      3. Put the bound together. Error ≤e12n2\le \dfrac{e}{12n^2}. Substitute h2=1n2h^2 = \frac1{n^2} and max⁡∣f′′∣=e\max|f''| = e.
      4. Solve the inequality. e12n2<10−3\dfrac{e}{12n^2} < 10^{-3} means n2>1000 e12=226.5n^2 > \dfrac{1000\,e}{12} = 226.5, so n>15.05n > 15.05. Multiply both sides by 12n212n^2 and divide by 10−310^{-3}; then take square roots.
      5. Take the next whole number. n=16n = 16. n=15n = 15 is not enough, because it gives the bound e12⋅225=1.007×10−3\frac{e}{12\cdot 225} = 1.007 \times 10^{-3}, just above 10−310^{-3}.

      Answer. 1616 pieces guarantee error below 10−310^{-3} (the bound at n=16n = 16 is 8.8×10−48.8 \times 10^{-4}).

      Traps

      Watch out· The integral is not 'the antiderivative'

      An antiderivative is a function FF with F′=fF' = f; the integral ∫abf\int_a^b f is a number defined by sums. They are connected only through the fundamental theorem, and only when its hypotheses hold. If ff has no antiderivative (the jump function does not: a derivative cannot jump, by the intermediate value property of derivatives, a result usually proved with the mean value theorem), the integral still exists.

      Watch out· The fundamental theorem needs a bounded integrand and a continuous F

      The computation ∫−11x−2dx=−2\int_{-1}^1 x^{-2}dx = -2 is wrong: x−2x^{-2} is unbounded near 00, so there are no upper sums, and the Riemann integral does not exist. The condition ”ff integrable” in part 2 is also not automatic for a derivative: F(x)=x2sin⁡(1/x2)F(x) = x^2\sin(1/x^2) (with F(0)=0F(0) = 0) is differentiable everywhere, but F′F' is unbounded near 00, so it is not Riemann integrable and part 2 cannot be applied.

      Watch out· Integrable does not mean continuous

      A function with finitely many jumps is integrable (the step example). Even some functions with infinitely many discontinuities are (a stretch problem). But the Dirichlet function, discontinuous everywhere, is not. Integrability is about the discontinuities being few enough to trap in thin pieces; continuity is sufficient, not necessary.

      Watch out· M_i is a supremum over the piece, not the value at the right end

      For x2x^2 on [0,1][0, 1] the top of each piece is at its right end only because x2x^2 is increasing. For sin⁡\sin on [0,π][0, \pi], the piece containing π2\frac\pi2 has its top inside the piece. Computing UU from right-end values is correct only for increasing functions. (Values at arbitrary points of the pieces give a Riemann sum, which always lies between LL and UU; see the last stretch problem.)

      Problems

      check

      For f(x)=xf(x) = x on [0,1][0, 1] and P={0,12,1}P = \{0, \tfrac12, 1\}, compute L(f,P)L(f, P) and U(f,P)U(f, P).

      Solution

      Piece [0,12][0, \frac12]: m=0m = 0, M=12M = \frac12. Piece [12,1][\frac12, 1]: m=12m = \frac12, M=1M = 1. Each width is 12\frac12. L=0⋅12+12⋅12=14L = 0\cdot\frac12 + \frac12\cdot\frac12 = \frac14 and U=12⋅12+1⋅12=34U = \frac12\cdot\frac12 + 1\cdot\frac12 = \frac34. The integral 12\frac12 lies between them.

      check

      Can adding a cut point to a partition ever increase the upper sum? Can it decrease the lower sum?

      Solution

      No to both. By the refinement lemma, adding points can only lower UU and raise LL. Intuitively, a new cut turns one tall rectangle into two that fit the curve at least as tightly.

      check

      Evaluate ddx∫1xet2 dt\displaystyle\frac{d}{dx}\int_1^x e^{t^2}\,dt and ∫023x2 dx\displaystyle\int_0^2 3x^2\,dx.

      Solution

      The first is ex2e^{x^2} by part 1 (et2e^{t^2} is continuous). The second: F(x)=x3F(x) = x^3, so ∫023x2 dx=8−0=8\int_0^2 3x^2\,dx = 8 - 0 = 8 by part 2.

      useAbbott Sec. 7.2 style

      For f(x)=x2f(x) = x^2 on [0,2][0, 2] with nn equal pieces, find UnU_n, LnL_n and Un−LnU_n - L_n, and deduce ∫02x2 dx\int_0^2 x^2\,dx.

      Solution

      Pieces have width 2n\frac2n and xi=2inx_i = \frac{2i}{n}. Since x2x^2 is increasing, Mi=4i2n2M_i = \frac{4i^2}{n^2} and mi=4(i−1)2n2m_i = \frac{4(i-1)^2}{n^2}. Un=8n3∑i2=8n3⋅n(n+1)(2n+1)6=4(n+1)(2n+1)3n2U_n = \frac{8}{n^3}\sum i^2 = \frac{8}{n^3}\cdot\frac{n(n+1)(2n+1)}{6} = \frac{4(n+1)(2n+1)}{3n^2} and Ln=4(n−1)(2n−1)3n2L_n = \frac{4(n-1)(2n-1)}{3n^2}. Their difference is 43n2[(2n2+3n+1)−(2n2−3n+1)]=43n2⋅6n=8n\frac{4}{3n^2}\left[(2n^2 + 3n + 1) - (2n^2 - 3n + 1)\right] = \frac{4}{3n^2}\cdot 6n = \frac8n. Both tend to 83\frac83 (the leading term 4⋅2n23n2\frac{4\cdot 2n^2}{3n^2}), and Un−Ln→0U_n - L_n \to 0, so ∫02x2 dx=83\int_0^2 x^2\,dx = \frac83. Check with part 2: 233=83\frac{2^3}{3} = \frac83.

      use

      Find ddx∫xx3cos⁡(t2) dt\dfrac{d}{dx}\displaystyle\int_x^{x^3}\cos(t^2)\,dt.

      Solution

      Split at a constant: ∫xx3=∫0x3−∫0x\int_x^{x^3} = \int_0^{x^3} - \int_0^{x} (additivity and the convention for reversed limits). With G(u)=∫0ucos⁡(t2) dtG(u) = \int_0^u \cos(t^2)\,dt, G′(u)=cos⁡(u2)G'(u) = \cos(u^2) by part 1. The expression is G(x3)−G(x)G(x^3) - G(x), with derivative 3x2cos⁡(x6)−cos⁡(x2)3x^2\cos(x^6) - \cos(x^2).

      use

      How many equal pieces guarantee the trapezoid rule error is below 10−410^{-4} for ∫12dxx\int_1^2 \frac{dx}{x}? (Use the error bound (b−a)h212max⁡∣f′′∣\frac{(b-a)h^2}{12}\max|f''|.)

      Solution

      f(x)=1xf(x) = \frac1x, f′′(x)=2x3f''(x) = \frac2{x^3}, and on [1,2][1, 2] the maximum of ∣f′′∣|f''| is 22 (at x=1x = 1). The error is at most 1⋅h212⋅2=h26\frac{1\cdot h^2}{12}\cdot 2 = \frac{h^2}{6}. We need h26<10−4\frac{h^2}6 < 10^{-4}, i.e. h2<6×10−4h^2 < 6\times 10^{-4}, i.e. h<0.02449h < 0.02449. With h=1nh = \frac1n this means n>40.8n > 40.8, so n=41n = 41 pieces. (The integral is ln⁡2\ln 2.)

      use

      Use linearity and part 2 to compute ∫0π(sin⁡x+2x) dx\displaystyle\int_0^\pi (\sin x + 2x)\,dx.

      Solution

      By linearity this is ∫0πsin⁡x dx+2∫0πx dx\int_0^\pi \sin x\,dx + 2\int_0^\pi x\,dx. The first is 22 (earlier example). For the second, F(x)=x22F(x) = \frac{x^2}2 has F′=xF' = x, so ∫0πx dx=π22\int_0^\pi x\,dx = \frac{\pi^2}2. Total: 2+2⋅π22=2+π2≈11.872 + 2\cdot\frac{\pi^2}{2} = 2 + \pi^2 \approx 11.87.

      proveAbbott Sec. 7.2 exercises

      Prove that every increasing function f:[a,b]→Rf: [a, b] \to \mathbb R is integrable.

      Solution

      An increasing function is bounded: f(a)≤f(x)≤f(b)f(a) \le f(x) \le f(b). Let ε>0\varepsilon > 0 and cut [a,b][a, b] into nn equal pieces of width h=b−anh = \frac{b-a}{n}. Since ff is increasing, Mi=f(xi)M_i = f(x_i) and mi=f(xi−1)m_i = f(x_{i-1}). So U−L=∑i=1n(f(xi)−f(xi−1))h=h(f(b)−f(a))U - L = \sum_{i=1}^n \left(f(x_i) - f(x_{i-1})\right)h = h\left(f(b) - f(a)\right) (the sum telescopes). Choose nn with (b−a)(f(b)−f(a))n<ε\frac{(b-a)(f(b) - f(a))}{n} < \varepsilon. Then U−L<εU - L < \varepsilon, so ff is integrable by the criterion. (Example: the jump function; no continuity needed.)

      prove

      Prove: if ff is continuous on [a,b][a, b], f≥0f \ge 0, and ∫abf=0\int_a^b f = 0, then f(x)=0f(x) = 0 for all x∈[a,b]x \in [a, b].

      Solution

      Suppose f(c)>0f(c) > 0 for some cc. By continuity (take ε=f(c)2\varepsilon = \frac{f(c)}2) there is δ>0\delta > 0 with f(x)>f(c)2f(x) > \frac{f(c)}2 for ∣x−c∣<δ|x - c| < \delta, x∈[a,b]x \in [a, b]. Choose p<qp < q with [p,q]⊆(c−δ,c+δ)∩[a,b][p, q] \subseteq (c - \delta, c + \delta) \cap [a, b]. Take the partition PP with points a,p,q,ba, p, q, b (dropping duplicates). On [p,q][p, q] the infimum is at least f(c)2\frac{f(c)}{2}, and on the other pieces mi≥0m_i \ge 0. So L(f,P)≥f(c)2(q−p)>0L(f, P) \ge \frac{f(c)}{2}(q - p) > 0. Then ∫abf≥L(f,P)>0\int_a^b f \ge L(f, P) > 0, a contradiction.

      proveAbbott Sec. 7.4

      Prove: if ff is integrable on [a,b][a, b], then ∣f∣|f| is integrable and ∣∫abf∣≤∫ab∣f∣\left|\int_a^b f\right| \le \int_a^b |f|.

      Solution

      For any x,yx, y in one piece: ∣∣f(x)∣−∣f(y)∣∣≤∣f(x)−f(y)∣≤Mi(f)−mi(f)\big||f(x)| - |f(y)|\big| \le |f(x) - f(y)| \le M_i(f) - m_i(f) (reverse triangle inequality). The left side can be made as close as we like to Mi(∣f∣)−mi(∣f∣)M_i(|f|) - m_i(|f|) by choosing xx and yy, so Mi(∣f∣)−mi(∣f∣)≤Mi(f)−mi(f)M_i(|f|) - m_i(|f|) \le M_i(f) - m_i(f). Hence U(∣f∣,P)−L(∣f∣,P)≤U(f,P)−L(f,P)U(|f|, P) - L(|f|, P) \le U(f, P) - L(f, P), which is below ε\varepsilon for a suitable PP. So ∣f∣|f| is integrable. Now −∣f∣≤f≤∣f∣-|f| \le f \le |f|, so by monotonicity and linearity −∫∣f∣≤∫f≤∫∣f∣-\int |f| \le \int f \le \int |f|, i.e. ∣∫f∣≤∫∣f∣\left|\int f\right| \le \int |f|.

      proveSpivak ch. 13 (mean value theorem for integrals)

      Prove: if ff is continuous on [a,b][a, b], there is c∈[a,b]c \in [a, b] with ∫abf=f(c)(b−a)\int_a^b f = f(c)(b - a) (the average value of ff is attained).

      Solution

      By the extreme value theorem, ff has a minimum mm and a maximum MM on [a,b][a, b]. By the bound after additivity, m(b−a)≤∫abf≤M(b−a)m(b - a) \le \int_a^b f \le M(b - a), so the average 1b−a∫abf\frac{1}{b-a}\int_a^b f lies between mm and MM. By the intermediate value theorem (applied between the points where ff equals mm and MM), ff takes every value between mm and MM, so some cc has f(c)=1b−a∫abff(c) = \frac{1}{b-a}\int_a^b f.

      proveAbbott Sec. 7.5

      Prove: if ff is integrable on [a,b][a, b] with ∣f∣≤B|f| \le B, then F(x)=∫axfF(x) = \int_a^x f satisfies ∣F(y)−F(x)∣≤B∣y−x∣|F(y) - F(x)| \le B|y - x|, so FF is continuous. Give an integrable ff for which FF is not differentiable at some point.

      Solution

      For x<yx < y, additivity gives F(y)−F(x)=∫xyfF(y) - F(x) = \int_x^y f, and the bound −B≤f≤B-B \le f \le B gives ∣F(y)−F(x)∣≤B(y−x)|F(y) - F(x)| \le B(y - x). Given ε\varepsilon, take δ=εB\delta = \frac{\varepsilon}{B} (for B>0B > 0); this is uniform continuity of FF. For the example, let f=0f = 0 on [0,12)[0, \frac12) and f=1f = 1 on [12,1][\frac12, 1] (integrable by the jump example). Then F(x)=0F(x) = 0 for x≤12x \le \frac12 and F(x)=x−12F(x) = x - \frac12 for x≥12x \ge \frac12, whose graph has a corner at 12\frac12: the left derivative is 00 and the right derivative is 11. Part 1 does not apply because ff is not continuous at 12\frac12.

      stretchAbbott Sec. 7.3 (Thomae)

      Let f(x)=1qf(x) = \frac1q if x=pqx = \frac pq in lowest terms (q≥1q \ge 1), and f(x)=0f(x) = 0 if xx is irrational. Prove ff is integrable on [0,1][0, 1] with ∫01f=0\int_0^1 f = 0, even though ff is discontinuous at every rational.

      Solution

      Every piece contains an irrational, so mi=0m_i = 0 and L(f,P)=0L(f, P) = 0 for every PP. Let ε>0\varepsilon > 0. The set S={x∈[0,1]:f(x)≥ε2}S = \{x \in [0, 1] : f(x) \ge \frac\varepsilon2\} is finite: it consists of fractions pq\frac pq with q≤2εq \le \frac2\varepsilon, and for each qq there are at most q+1q + 1 choices of pp. Say SS has KK points. Cut [0,1][0, 1] into nn equal pieces with n>4Kεn > \frac{4K}{\varepsilon}. Each point of SS lies in at most 22 pieces, so at most 2K2K pieces contain a point of SS, and on each of those Mi≤1M_i \le 1. Every other piece has Mi≤ε2M_i \le \frac\varepsilon2. So U≤2K⋅1n⋅1+ε2⋅1<ε2+ε2=εU \le 2K\cdot\frac1n\cdot 1 + \frac\varepsilon2\cdot 1 < \frac\varepsilon2 + \frac\varepsilon2 = \varepsilon (the first part is below ε2\frac\varepsilon2 because n>4Kεn > \frac{4K}{\varepsilon}). Thus U−L<εU - L < \varepsilon, so ff is integrable, and 0=L≤∫f≤U<ε0 = L \le \int f \le U < \varepsilon for every ε\varepsilon gives ∫f=0\int f = 0.

      stretchSpivak ch. 14, problem on Cauchy's definition

      (Riemann sums.) For a partition PP, a Riemann sum chooses any point tit_i in each piece and forms R=∑f(ti)ΔxiR = \sum f(t_i)\Delta x_i. Show that for any such choice, L(f,P)≤R≤U(f,P)L(f, P) \le R \le U(f, P). Deduce that if ff is integrable and U(f,Pn)−L(f,Pn)→0U(f, P_n) - L(f, P_n) \to 0, then every Riemann sum on PnP_n tends to ∫f\int f. This is the definition used in most calculus courses (and by Cauchy).

      Solution

      Since tit_i is in the ii-th piece, mi≤f(ti)≤Mim_i \le f(t_i) \le M_i; multiply by Δxi\Delta x_i and add to get L≤R≤UL \le R \le U. The integral also lies in [L(f,Pn),U(f,Pn)][L(f, P_n), U(f, P_n)], and this window has width U−L→0U - L \to 0, so ∣R−∫f∣≤U(f,Pn)−L(f,Pn)→0|R - \int f| \le U(f, P_n) - L(f, P_n) \to 0.

      Summary

      • Idea: area is whatever number is squeezed between inner staircases (lower sums) and outer staircases (upper sums) of rectangles, taken over all partitions.
      • Refinement lemma: more cuts raise lower sums and lower upper sums; so every lower sum is at most every upper sum. The lower integral (sup of LL) is at most the upper integral (inf of UU).
      • Criterion: ff is integrable iff for every ε\varepsilon some partition has U−L<εU - L < \varepsilon. Both directions are the ε/2\varepsilon/2 split plus the refinement lemma.
      • Continuous implies integrable: uniform continuity gives equal pieces on which Mi−mi≤ε2(b−a)M_i - m_i \le \frac{\varepsilon}{2(b-a)}, so U−L≤ε2U - L \le \frac\varepsilon2. Monotone and finitely-many-jumps functions are integrable too; the Dirichlet function is not.
      • Linearity, monotonicity, additivity: the integral behaves as expected, each proved by trapping two numbers in a window narrower than every ε\varepsilon.
      • Fundamental theorem: part 1 (F′=fF' = f for F(x)=∫axfF(x) = \int_a^x f) uses continuity at one point; part 2 (∫abF′=F(b)−F(a)\int_a^b F' = F(b) - F(a)) uses the mean value theorem on each piece and a telescoping sum.
      • MATH 376 link: lower and upper sums are integrals of the best step functions under and over ff, so Apostol’s integral equals the Darboux integral.
      • Applications: numerical rules (trapezoid error proportional to h2h^2, Simpson to h4h^4), work, and probability densities with ∫f=1\int f = 1.

      Watch and read

      The same ideas explained by someone else. Use these when an explanation here does not land.

      Where this sits

      Comes from
      1.3 Limits and continuity with epsilon and delta
      1.4 The derivative as best linear approximation
      Leads to
      1.6 Series, power series, and uniform convergence
      Same idea elsewhere
      JEE / CBSE: You computed $\int_a^b f$ by finding an antiderivative and subtracting. This chapter defines the integral without antiderivatives, as a limit of sums, and then proves why the antiderivative trick works.
      MATH 376: Apostol defines the integral through step functions: $f$ is squeezed between step functions $s \le f \le t$. Lower and upper sums are exactly the integrals of the best step functions below and above $f$. See the section on step functions below.
      MATH 431: A probability density is a function with $\int f = 1$, and $P(a \le X \le b) = \int_a^b f$. The continuous distributions of 431 rest on this chapter.
      MATH 521: 521 proves the Riemann criterion, the continuous case, linearity and the fundamental theorem. The later Lebesgue integral changes how the sums are formed and keeps the same squeeze idea.