© 2026 NeckPinch · www.neckpinch.com · All rights reserved.
Course 2Book 2A: Numbers, Limits and the IntegralChapter 9
Continuous Functions
Continuity, the intermediate value theorem, uniform continuity, and the first maximum principle.
Read with Tao, Analysis I, chapter "Continuous functions on R" (subsets of the real line, limiting values of functions, continuous functions, left and right limits, the maximum principle, the intermediate value theorem, monotonic functions, uniform continuity, limits at infinity).
A function is continuous if it has no jumps: small changes in the input cause small changes in the output. The precise definition is the ε–δ sentence of 2A.5 Quantifiers and the Shape of a Proof, and this chapter puts it to work. Its three main theorems sound almost too obvious to need proof:
- a continuous function on a closed interval attains a largest and a smallest value;
- a continuous function that is negative at one point and positive at another is zero somewhere in between;
- a continuous function on a closed interval is uniformly continuous.
Each one is false if the real numbers are replaced by the rationals, or the closed interval by an open one. So each proof must use, somewhere, completeness or compactness, and seeing exactly where is the point of the chapter.
The first theorem is called the maximum principle in Tao's book (his Section 9.6), and the name is apt. Every maximum principle for the heat equation and for Ricci flow, the main tools of Courses 6 and 11, begins with exactly this statement and the observation of what a function looks like at its maximum.
By the end of this chapter you will be able to:
- prove continuity and discontinuity from the definition, and with sequences;
- prove the maximum principle and the intermediate value theorem, and say which property of each uses;
- distinguish continuity from uniform continuity, and prove the Heine–Cantor theorem;
- explain why, at an interior maximum, the derivative vanishes and the second derivative is non-positive, and why that observation drives maximum principles for PDE.
Subsets of the real line
The behaviour of a function depends heavily on the set it is defined on, so we start there.
Let . A real number is adherent to if for every some point of lies within of . The closure is the set of all adherent points. is closed if , that is, if contains every point that can be approximated from inside it.
So : the endpoints are adherent to the open interval but not in it. Closed intervals are closed, and so are , and . The rationals are not: , by density (2A.4 The Real Numbers).
In terms of sequences: is adherent to exactly when some sequence of points of converges to . So a set is closed exactly when limits of convergent sequences in it stay in it.
For , the following are equivalent:
- is closed and bounded;
- every sequence in has a subsequence converging to a point of .
Proof. (1 ⇒ 2) A sequence in a bounded is bounded, so by Bolzano–Weierstrass (2A.6 Sequences) a subsequence converges to some ; and because is closed. (2 ⇒ 1) If were unbounded, there would be with , and no subsequence could converge. If weren't closed, there would be an adherent and a sequence in converging to ; every subsequence also converges to , which isn't in .
Property 2 is called (sequential) compactness, and closed bounded intervals are the model compact sets. In 2B.3 Compactness compactness is defined for general spaces, where "closed and bounded" no longer suffices. Property 2 is the one that survives.
Limits of functions and continuity
Let and let be adherent to . We say as in if for every there is such that for every with .
A function is continuous at if as in . That is,
It is continuous if it is continuous at every point of .
The definition reads as a tolerance contract (2A.5 Quantifiers and the Shape of a Proof): any output accuracy can be guaranteed by a sufficiently accurate input, . The most useful equivalent form uses sequences.
is continuous at if and only if for every sequence in converging to .
Proof. (⇒) Given , take from continuity, and with for . Then for .
(⇐) By contrapositive. If isn't continuous at , negating the definition (2A.5 Quantifiers and the Shape of a Proof) gives an such that for every some within of has . Taking gives points with staying away from .
The sequential form makes the algebra of continuous functions immediate from the limit laws of 2A.6 Sequences: sums, products and compositions of continuous functions are continuous, and so are quotients where the denominator is nonzero. Polynomials, rational functions, and are all continuous on their domains.
- A jump. The sign function ( for , at , for ) has different one-sided limits at : from the left , from the right .
- A removable discontinuity. for , with , has . Redefining repairs it.
- Oscillation. has no limit at : along it is , along it is .
- Everywhere. Dirichlet's function, on rationals and on irrationals, is discontinuous at every point, because every interval contains both kinds of number. It returns in 2A.11 The Riemann Integral as a function the Riemann integral can't handle.
The maximum principle
Let be continuous. Then is bounded, and it attains its maximum and its minimum: there are points with for every .
Proof (By contradiction and compactness). Bounded. This is the first instance of the contradiction–compactness template of 2A.5 Quantifiers and the Shape of a Proof. Suppose is not bounded above. Then for each there is with , a sequence of worse and worse counterexamples. By Heine–Borel some subsequence converges to a point . By continuity , a finite number; but . Contradiction.
Attained. Let , finite by the first part. For each , is not an upper bound, so there is with . Again a subsequence converges to some , and by continuity . Since also , we get . The minimum is the same argument applied to .
Both conclusions fail without compactness. On the open interval , the continuous function is unbounded; on , the function is bounded but has no maximum, since it gets arbitrarily close to without reaching it. On , is unbounded. And over the rationals, on has supremum , never attained, because is missing.
Engineering optimisation starts by asking whether an optimum exists at all, and the maximum principle is the basic tool for answering. Consider a cylindrical can that must hold a fixed volume . With radius and height , the metal used is proportional to its surface area
On the maximum principle doesn't apply directly: the interval isn't closed and bounded. But both as (tall thin cans) and as (flat wide ones). So any candidate for the minimum lies in some closed interval outside which is larger than, say, . On that compact interval a minimum exists. Calculus (2A.10 Derivatives) then locates it: at , where . The can of least surface area is as tall as it is wide. For that is cm and cm.
Real drinks cans are taller and narrower than this, because the model leaves things out: for instance, the ends of a can are typically made of thicker metal than its wall, which changes the cost to be minimised. The mathematical lesson stands. To prove a minimum exists, first trap it in a compact set, then use continuity. This is the direct method of the calculus of variations (4A.6 Weak Convergence and the Direct Method, 6A.9 Calculus of Variations and Gradient Flows), and the same move proves that Perelman's entropy has a minimiser (12A.3 The 𝓦-Entropy).
What a function looks like at its maximum
The maximum principle says that a maximum exists. The next chapter (2A.10 Derivatives) shows what happens at an interior maximum, but the fact is so central to this guidebook that it belongs here as a preview.
If a differentiable function attains its maximum at a point inside the interval, then , and if is twice differentiable, : the graph is flat and bends down there. Every maximum principle for differential equations uses this. For the heat equation on a closed interval, suppose the maximum of over space and time occurred for the first time at an interior point and a positive time. There , but , since has just risen to its maximum. With a little extra care this is impossible, and so a hot spot can never form spontaneously in the middle of a cooling rod (6A.4 Maximum Principles). Hamilton's maximum principle for Ricci flow (11A.4 Maximum Principles under Ricci Flow) runs the same argument for the curvature of a closed manifold, where a maximum is attained because the manifold is compact: the maximum principle of this chapter, one level up.
The intermediate value theorem
Let be continuous, and let be any number between and . Then for some .
Proof. We may assume (the case is the same with ). Let . It contains and is bounded by , so it has a supremum (2A.4 The Real Numbers). We show .
If : then , and by continuity for all in some interval , so points beyond belong to , contradicting that is an upper bound. If : then , and by continuity on some interval , so no point of that interval lies in , and would be a smaller upper bound. So .
The proof uses the least upper bound property and nothing else. Over the theorem fails: is negative at and positive at but has no rational zero (2A.3 Integers and Rationals). In a real sense, the intermediate value theorem is the completeness of the line, restated for functions.
At any instant, there are two diametrically opposite points on the equator with exactly the same temperature, provided temperature varies continuously along the equator. Measure position by the angle and let be the temperature. Consider
the difference between a point and its antipode. Then . So either and we are done, or and have opposite signs, and by the intermediate value theorem vanishes somewhere between: there . Nothing about weather was used except continuity. The same argument applies to air pressure, or altitude, along any great circle. In 7A.7 Smooth Topology a deeper theorem (Borsuk–Ulam) gives two antipodal points on the whole sphere at which temperature and pressure both agree.
A walker sets off up a mountain path at 7 a.m. and reaches the summit at 5 p.m. The next morning she starts down the same path at 7 a.m. and is home by 5 p.m. Is there a point on the path that she passes at the same time of day on both days? Yes. Let and be her distances along the path at time on the up and down days. Then is continuous, negative at 7 a.m. and positive at 5 p.m., so it is zero at some moment. (Picture both days happening at once: two walkers on the same path, one going up and one coming down, must meet.)
Monotone functions and inverses
A function is increasing if implies , and strictly increasing if it implies . Monotone functions are nearly continuous automatically: they can only have jump discontinuities, and only countably many of them (Exercise 9.15). A strictly monotone continuous function behaves especially well.
If is continuous and strictly increasing, then is a bijection from onto , and its inverse is continuous and strictly increasing.
Surjectivity onto is the intermediate value theorem, injectivity is strict monotonicity, and continuity of the inverse follows because an increasing function can only fail to be continuous by jumping, and the inverse can't jump over values its domain contains. This is how , and get their continuity: as inverses of continuous, strictly monotone functions.
A thermistor is a resistor whose resistance changes strongly and monotonically with temperature. A digital thermometer measures resistance and must report the temperature with , that is, evaluate . Because is continuous and strictly monotone over the working range, the inverse exists and is continuous, so a small error in measuring causes only a small error in the reported . Manufacturers supply the curve as a fitted formula, such as the Steinhart–Hart equation (1968), or as a table. The firmware inverts it, often by the bisection of 2A.6 Sequences.
Uniform continuity
Continuity allows the input tolerance to depend on the point. Uniform continuity asks for one that works everywhere (2A.5 Quantifiers and the Shape of a Proof).
is uniformly continuous if for every there is such that for all with .
is continuous on but not uniformly continuous: near the required shrinks to zero (2A.5 Quantifiers and the Shape of a Proof). On it is uniformly continuous, since there. A cleaner sufficient condition:
is Lipschitz with constant if for all . Lipschitz functions are uniformly continuous (take ).
The absolute value is Lipschitz with , and so is whenever and are (Exercise 9.16), even though such a maximum may have corners where it isn't differentiable. That fact matters later. In Ricci flow one studies the maximum of the curvature over the manifold, , which is typically not differentiable in but is Lipschitz. Hamilton's trick (11A.4 Maximum Principles under Ricci Flow) is the observation that at almost every time its derivative is evaluated at a point where the maximum is attained.
A continuous function on a closed bounded interval is uniformly continuous.
Proof (By contradiction and compactness). Suppose not. Negating the definition: there is such that for every there are points with but . By Heine–Borel a subsequence converges to some , and then too, since . By continuity at , both and converge to , so their difference tends to , contradicting .
The template again: assume the uniform statement fails, extract a sequence of counterexamples, use compactness to find a limit point, and get a contradiction from continuity there.
Digital audio records a continuous signal by sampling it at regular intervals, 44,100 times a second for a CD. Plotting software, lookup tables in engineering codes and graphics hardware all similarly replace a function by its values on a grid, joined by straight lines. When is that safe? If is uniformly continuous, then for any accuracy there is a spacing , the same everywhere, such that varies by at most across each grid cell. Then the piecewise-linear interpolation through the samples is within of at every point (Exercise 9.17). For a function like near , no fixed spacing works: however fine the grid, there are cells near in which the function swings from to . Signal processing makes the same point quantitatively with the Nyquist–Shannon sampling theorem: a signal can be recovered from its samples only if it doesn't oscillate faster than the sampling rate can capture.
Limits at infinity
Finally, as means: for every there is with for all . This is convergence of a sequence, with the index replaced by a real variable. All the limit laws carry over.
A function is continuous when it respects limits of sequences. On a closed bounded interval, continuous functions are bounded, attain their maximum and minimum (Tao's "maximum principle"), take every intermediate value, and are uniformly continuous. Each of these uses either the least upper bound property or Bolzano–Weierstrass, and fails over or on open intervals. At an interior maximum the derivative vanishes and the second derivative is non-positive. 2A.10 Derivatives proves this, and builds differential calculus on it.
Exercises
Prove directly from the ε–δ definition that is continuous on . (Hint: for , ; treat separately.) Is it uniformly continuous on ? Is it Lipschitz?
Solution
For take . At , when . It is uniformly continuous on : for all , so works everywhere. It is not Lipschitz: as .
Let be continuous. Show that for some . (Apply the intermediate value theorem to .) This is the one-dimensional Brouwer fixed point theorem (7A.4 The Fundamental Group).
Let be increasing on . Show that at each point the left and right limits exist, that is discontinuous exactly where they differ, and that this happens at only countably many points. (Hint: each jump contains a rational in the interval between the one-sided limits, and different jumps contain disjoint such intervals; use 2A.8 Infinite Sets.)
Show that if and are Lipschitz with constant , so is . Give an example where and are differentiable everywhere but is not.
Solution
For any : (the one of that is larger) minus (the same function at ) , since is at least either function's value at ; by symmetry . Example: , , , which has a corner at .
Suppose whenever . Let be the piecewise-linear function that agrees with at the grid points . Show that for every . (Can you improve this to ?)
For each statement, find a function showing it fails if one hypothesis is removed: (a) the maximum principle without continuity; (b) the maximum principle on ; (c) the intermediate value theorem without continuity; (d) Heine–Cantor on .
Let be continuous and strictly positive on . Prove, by the contradiction–compactness template, that there is with for all . Then show the conclusion fails for on . A uniform positive lower bound obtained from compactness is exactly the kind of statement used, for instance, to bound below the injectivity radius of a compact Riemannian manifold (9A.3 Geodesics and the Exponential Map), and its failure without compactness is what collapsing means (9B.3 Collapsing and Noncollapsing).
Solution
Suppose not: for each there is with . A subsequence converges to some , and by continuity , contradicting . (Alternatively: attains its minimum, which is positive.) On , is positive but .
© 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.