© 2026 NeckPinch · www.neckpinch.com · All rights reserved.
Course 2Book 2A: Numbers, Limits and the IntegralChapter 11
The Riemann Integral
Upper and lower sums, the fundamental theorem, integration by parts, and where Riemann’s integral fails.
Read with Tao, Analysis I, chapter "The Riemann integral" (partitions, piecewise constant functions, upper and lower Riemann integrals, basic properties, integrability of continuous and monotone functions, a non-integrable function, Riemann–Stieltjes integrals, the fundamental theorems of calculus, integration by parts and change of variables). The Riemann–Stieltjes section can be skimmed.
In this chapter · 6 sections
Derivatives measure rates. Integrals measure totals: area under a curve, distance from speed, work from force, mass from density. This last chapter of Book 2A defines the integral as Riemann did in 1854, by squeezing the area between sums of rectangles from below and above. It proves that continuous functions can be integrated, and proves the fundamental theorem of calculus, which says that integration and differentiation undo each other.
Two consequences of the fundamental theorem matter more than any other for this guidebook. Integration by parts is the single most-used computation from here to Perelman: every energy estimate for the heat equation and every monotonicity formula for Ricci flow is an integration by parts. And the chapter ends by showing where Riemann's integral breaks down. It does not cope with limits, and that failure is the starting point of Course 3.
By the end of this chapter you will be able to:
- define the Riemann integral by upper and lower sums, and prove a function is or isn't integrable;
- prove that continuous and monotone functions are integrable;
- prove and use both halves of the fundamental theorem of calculus;
- integrate by parts and change variables, and use integration by parts to prove that an energy decreases;
- explain, with examples, why the Riemann integral is not good enough for analysis with limits.
Area by rectangles
The idea is ancient. Archimedes, in the third century BCE, found the area of a parabolic segment by filling it with triangles and summing a geometric series (2A.7 Series). What Riemann supplied in 1854, in the same habilitation thesis as his rearrangement theorem, was a precise definition that works for a large class of functions at once.
Work on a closed interval with a bounded function . A partition of cuts it into finitely many subintervals with . On each piece, the smallest and largest heights of are and . Rectangles of those heights give an area that is certainly too small and one that is certainly too big:
Refining a partition (adding points) can only raise and lower , and every lower sum is at most every upper sum (Exercise 11.10). So the following definition makes sense.
The lower and upper Riemann integrals of a bounded on are
Always . If they are equal, is Riemann integrable, and the common value is , or .
The two integrals exist because of the least upper bound property (2A.4 The Real Numbers), which keeps appearing. The working criterion is a single ε statement: is integrable if and only if for every there is a partition with . In words, the thin strips in Figure 11.1 can be given total area as small as you like.
With equal pieces of , the function is increasing, so on the -th piece and . Using ,
Both tend to , and the gap can be made as small as you like. So , Archimedes' result, now from a definition.
Which functions are integrable
Every continuous function on is Riemann integrable.
Proof. By Heine–Cantor (2A.9 Continuous Functions), is uniformly continuous: given there is with whenever . Take a partition into pieces shorter than . On each piece the maximum and minimum (which are attained, by the maximum principle) differ by at most , so .
Here is the payoff of uniform continuity: one for the whole interval means one mesh size controls every strip at once. With mere continuity, the mesh needed would vary from place to place, and the argument would fail.
Monotone functions are integrable too, even with jumps: for equal pieces of an increasing function, , because the strips telescope (Exercise 11.11). And a bounded function with finitely many discontinuities is integrable, by putting the discontinuities in tiny intervals.
But not every bounded function is integrable.
Let if is rational and if not, on . Every interval, however small, contains rationals and irrationals (2A.4 The Real Numbers), so on every piece of every partition and . Every lower sum is and every upper sum is , so .
Riemann's integral cannot assign an area to this function. That would be a curiosity, except that the function arises naturally as a limit of perfectly good integrable functions, as the last section of this chapter shows.
Basic properties
For integrable and on :
- Linearity: and .
- Monotonicity: if then . In particular (and is integrable).
- Additivity: for , .
- Products and compositions: is integrable, and so is for continuous .
Each is proved by comparing upper and lower sums. The second property gives the estimate used constantly: if on , then .
A car's distance travelled is the integral of its speed over time, . A GPS tracker that logs speed once a second and adds up "speed × one second" is computing a Riemann sum for this integral, with each piece lasting one second. If the speed is continuous (it is, for a real car), Theorem 11.3 guarantees that these sums converge to the true distance as the logging interval shrinks. The same reasoning turns a fuel-flow rate into fuel used, a power reading into energy (kilowatt-hours are the integral of kilowatts over hours), and a river's flow rate into the volume that passed a gauge.
The fundamental theorem of calculus
Let be Riemann integrable on .
- The function is Lipschitz (hence continuous) on . At every point where is continuous, is differentiable with .
- If is any function on with (an antiderivative), then .
Proof. (1) For , , and with this is at most in absolute value. At a continuity point , given choose with for . For ,
(2) Take any partition . On each piece, the mean value theorem (2A.10 Derivatives) gives a point with . Summing, the left side telescopes: , which lies between and . Since this holds for every , lies between the lower and upper integrals, which are equal.
Part 1 says that integration produces antiderivatives, and part 2 says that antiderivatives compute integrals. That the slope problem and the area problem are inverse to each other was the great discovery of Newton and Leibniz in the 1660s–1680s. The proofs above, using only the definitions, show how much the 19th-century foundations of 2A.4 The Real Numbers and 2A.9 Continuous Functions were needed to make it rigorous.
Integration by parts
If and are differentiable on with integrable derivatives, then
Proof. by the product rule (2A.10 Derivatives). Integrate both sides and use part 2 of the fundamental theorem on the left.
The formula moves a derivative from one factor to the other at the cost of a boundary term. When the boundary term vanishes, as it does for periodic functions or for functions that vanish at the ends, the derivative simply moves across with a change of sign. That one move drives a remarkable amount of mathematics. Here is the first example.
Let be twice continuously differentiable on , with and taking the same values at and (for example, periodic). Then
Proof. Integrate by parts with and : . The boundary term is by the hypothesis.
Why "energy"? If is the temperature in a ring of metal, it obeys the heat equation . Differentiating under the integral sign (justified later, in 3A.3 The Lebesgue Integral) and applying the proposition at each time gives
The quantity can only decrease, and it stays constant only if , that is, when the temperature is uniform. This is the first monotonicity formula of the guidebook: a quantity that changes in one direction only, with a rate given by a square that vanishes exactly in the equilibrium state. It is proved by integration by parts. Fourier's solution of the heat equation (2B.7 Fourier Series and the First Heat Equation) shows the same decay frequency by frequency.
Every monotonicity formula in this guidebook is this proposition in disguise: differentiate an integral, integrate by parts on a space without boundary, and recognise a sum of squares. On a closed Riemannian manifold, integration by parts reads , with no boundary term (8A.8 Differential Forms and Stokes’ Theorem, 9A.6 The Laplacian and the Bochner Formula). Perelman's -functional (12A.2 Ricci Flow as a Gradient Flow) satisfies
and the computation behind it is a page of integrations by parts that turns a mess of curvature terms into one perfect square. The structure is the same as Proposition 11.7: monotone, with equality exactly at the special solutions (here, steady solitons).
Change of variables
If is continuously differentiable and is continuous on an interval containing , then
Proof. Let be an antiderivative of (part 1 of the fundamental theorem). By the chain rule, is an antiderivative of . Apply part 2 to both sides: each equals .
The factor records how much the substitution stretches lengths. In several variables it becomes the Jacobian determinant (1A.9 Multiple Integrals and Change of Variables, 3A.5 Product Measures and Change of Variables), and on a manifold it becomes the way volumes transform under a change of coordinates (8A.8 Differential Forms and Stokes’ Theorem).
Sums and integrals
Integrals and sums can be compared directly, which settles the question left open in 2A.7 Series about how fast the harmonic series grows.
Let be positive and decreasing on . Then for every ,
So converges if and only if stays bounded as .
Proof. On , because is decreasing. Integrate over and sum over .
For , define , which is the natural logarithm (2B.6 Power Series, Exponentials and Bump Functions shows it agrees with the inverse of the exponential). The integral test gives . The difference is decreasing and bounded below by , so by monotone convergence (2A.6 Sequences) it converges. Its limit is the Euler–Mascheroni constant , which explains the estimate used in 2A.7 Series.
Most integrals that arise in engineering can't be done in closed form, and are computed numerically from function values. The trapezoid rule replaces on each of equal pieces by the straight line through its endpoint values. If on , its error is at most (Exercise 11.14). Halving the step divides the error bound by four. This is a typical calculus fact with direct practical use: a bound on a derivative guarantees the accuracy of an approximation. Refinements of the same idea (Simpson's rule, Gaussian quadrature, adaptive methods that place more points where is large) are the workhorses of scientific computing.
Riemann–Stieltjes integrals, briefly
Tao's chapter includes a generalisation that is worth knowing exists, even if it can be skimmed now. Replace the length of each piece by the increase of an increasing function . The resulting weights different parts of the interval differently. If has a jump, that point gets a positive weight of its own.
An insurer models a claim size as a random quantity whose distribution has two parts: a probability of no claim at all (an atom at ), and a density for positive claims. A policy with deductible pays . Its expected cost is a Riemann–Stieltjes integral against the cumulative distribution . The jump of at contributes a term (no payout), and the continuous part contributes . One integral handles the discrete and the continuous parts together. That unification of sums and integrals is exactly what measure theory makes systematic (3A.4 Measures, Probability and Weights), where "integrating against " becomes "integrating against a measure".
Where Riemann's integral fails
Here is the problem that drives Course 3. Integrals and limits should be interchangeable in reasonable situations: if , we would like . Riemann's integral fails at this in two distinct ways.
The limit may not be integrable. List the rationals in as (2A.8 Infinite Sets), and let be at and elsewhere. Each differs from at finitely many points, so it is integrable with . The sequence increases to Dirichlet's function at every point, and Dirichlet's function has no Riemann integral at all (Example 11.4).
The integrals may not converge to the integral of the limit. Let be a narrow triangular spike of height on , peaking at , and zero elsewhere (Figure 11.6). For each fixed , eventually the spike has moved past (or , where every is ), so for every . But every spike has area . So
The area hasn't disappeared. It has concentrated into an ever thinner spike and escaped through the limit.
The second failure is not really the integral's fault. The spikes show something true about limits, which any integral must respect, and the theorems of 3A.3 The Lebesgue Integral say exactly when it can't happen: when the functions are dominated by a single integrable function. The first failure is the integral's fault, and it is fixed by building a better one.
Measure the distance between two integrable functions by . With this distance, the Riemann-integrable functions behave like the rationals of 2A.3 Integers and Rationals: there are Cauchy sequences with no limit among them. The increasing sequence above, built from the rationals, is one kind of example; there are worse ones. The remedy is the one used to build the reals from the rationals (2A.4 The Real Numbers): complete the space. The result is the space of Lebesgue-integrable functions (3A.3 The Lebesgue Integral), which contains the limits of all such Cauchy sequences, and in which the convergence theorems that analysis needs are true. So Book 2A ends where it began: a number system (here, a space of functions) that looks complete but has holes, and the same construction to fill them.
From five axioms we built the natural numbers, then the integers and rationals as quotients, then the reals as the completion of the rationals. With the logic of quantifiers in hand, we studied sequences (monotone convergence, Bolzano–Weierstrass, completeness), series (absolute and conditional convergence), infinite sets (countable and uncountable), continuous functions (the maximum principle and the intermediate value theorem, both resting on completeness), derivatives (the mean value theorem, Hamilton's trick, blow-up) and integrals (the fundamental theorem and integration by parts). Book 2B, starting with 2B.1 Metric Spaces, replaces the real line by general spaces, where distance, completeness and compactness become the main ideas.
Exercises
Show that if is obtained from by adding one point, then and . Deduce that every lower sum is at most every upper sum (compare both with their common refinement).
Let be increasing on . For the partition into equal pieces, show that . Conclude that is integrable, even if it has infinitely many jumps.
Solution
Because is increasing, on the -th piece and . The sum telescopes to , which tends to .
Compute . (Combine part 1 with the chain rule.)
Solution
With , the expression is , whose derivative is .
(a) Compute . (b) Show that by integrating by parts, and deduce that both equal . (Take the derivatives of , and for granted; they are constructed in 2B.6 Power Series, Exponentials and Bump Functions.)
Let be twice continuously differentiable on , and let . Show that by integrating by parts twice, and deduce . Summing over pieces of length gives the bound quoted in the chapter.
Show that is decreasing and that , so exists. Then show , which says how fast the estimate becomes accurate.
For each sequence on , find the pointwise limit and the limit of the integrals: (a) a spike of height on (this chapter); (b) a block of height on ; (c) a block of height on . In each case the area escapes, but in a different way: concentrating at a point, moving off to infinity, or spreading out thinly. 3A.3 The Lebesgue Integral names these three modes of escape. In Ricci flow, curvature that concentrates at a point as time increases is exactly a singularity forming (11B.4 Singularities).
Let be smooth and -periodic in , with . (a) Show that is non-increasing. (b) Show that is also non-increasing, by computing and integrating by parts. (c) Show that the mean is constant. Each is a small monotonicity formula, and all three are proved by integration by parts with no boundary terms. That is exactly the setting of a closed manifold, where Perelman's are proved.
Solution
(a) . (b) , integrating by parts once more. (c) by periodicity.
© 2026 NeckPinch (www.neckpinch.com). All content in the guidebook (text, mathematics, figures and exercises) is protected by copyright. All rights reserved. No part may be copied, republished or redistributed without written permission.