Part VIII · Foundations Chapter 53 of 60
Rigorous analysis
A continuous function without a single tangent, a function that can’t be drawn, a limit of continuous functions with a jump. A bestiary of the monsters that made analysis rigorous, and the tools that tamed them.
Builds on: 52 · Infinities
You will learn
- build the real numbers from fractions and derive the theorems on monotone and Cauchy sequences from the completeness axiom
- prove the intermediate value theorem, the extreme value theorem and the theorem on uniform continuity rigorously
- tell pointwise convergence from uniform convergence and know what depends on the difference
The last chapter ended with a confession. We compared infinities, counted fractions and proved that a segment has more points than there are natural numbers, but we never said what a single point, a single real number, is. For two hundred years analysis got by perfectly well without an answer. Newton, Leibniz and Euler relied on a visual certainty: a number is a point on a line, a function is a curve that can be drawn, and whatever is true of the picture is true of the numbers.
In the second half of the nineteenth century this certainty collapsed. One after another, functions appeared that behaved in ways that “can’t happen” and refuted statements that had been considered proved for decades. Henri Poincaré greeted them without enthusiasm:
Logic sometimes makes monsters. For half a century we have seen a mass of bizarre functions which appear to be forced to resemble as little as possible honest functions which serve some purpose.
A few lines further on Poincaré calls the whole collection a teratological museum, a museum of freaks. We’ll choose an older genre. Medieval books about monsters were called bestiaries: for each beast they tell you where it lives, why it’s dangerous and how to overcome it. This chapter is built the same way. Each monster in the bestiary of analysis forced some notion to be made rigorous: the real number, continuity, convergence. Along the way we’ll pay the debts the course has been running up since the chapter on limits: theorems we called obvious or promised to prove later will get full proofs here.
Jagged all the way down
The Weierstrass function
Habitat: the whole number line.
Caught by: Karl Weierstrass, in a talk to the Berlin Academy of Sciences on 18 July 1872.
Refuted: “a continuous function has a derivative everywhere except at isolated points”.
Tamed: in the last section of the chapter.
Take a cosine wave, add to it a cosine wave three times as frequent and half as high, then another three times more frequent and half as high again, and so on without end:
Each term is a smooth wave with a tangent at every point. Any finite sum of such waves is smooth too. But Weierstrass proved that the infinite sum, for odd $b$ and $ab > 1 + \frac{3\pi}{2}$, has no derivative at any point, though the function itself is continuous everywhere. In 1916 Godfrey Hardy weakened the condition to $ab \ge 1$, so the pair $a = \frac12$, $b = 3$ from the example will do too.
Why was this a blow? Intuition says a continuous curve can break only here and there, like a polygonal line, and is smooth between the breaks. In 1806 André-Marie Ampère published a “proof” that a continuous function has a derivative everywhere except at isolated points, and many nineteenth-century textbooks repeated the conclusion. In chapter 26 we saw how a smooth graph straightens into its tangent under strong magnification. Let’s see what the Weierstrass function does under the magnifying glass.
However far you zoom, the picture never settles down: every window has as many jags as the whole graph. The key thing shows in the row of slopes. For a smooth function the slope of the secant almost stops changing and approaches the derivative. For the monster it jumps about and grows in absolute value, and it has no limit at all. And the derivative is exactly the limit of the slopes of secants.
Not everyone accepted such functions as lawful citizens of mathematics. Charles Hermite wrote to Thomas Stieltjes:
I turn away with fright and horror from this lamentable plague of continuous functions which have no derivatives.
There was only one way to argue with the Weierstrass function: find a mistake in the proof. There was no mistake. The mistake was in the picture on which the earlier reasoning relied: continuity defined through limits (chapter 25) turned out to be much broader than “a curve without breaks and with tangents”. The lesson of the first monster is to trust definitions, not drawings. We’ll tame it at the end of the chapter: we’ll prove that it’s continuous, and prove that a close relative, whose calculations are shorter, is nowhere differentiable.
Each term of a series is a smooth function, and the series converges at every point. What follows for the sum?
The smoothness of the terms doesn’t pass to the sum of an infinite series, and even continuity doesn’t always pass. What has to be added to make it pass we’ll find out in the section on Cauchy’s mistake: it’s uniform convergence.
A function without a graph
The Dirichlet function
Habitat: everywhere and nowhere.
Caught by: Peter Gustav Lejeune Dirichlet, in a paper on Fourier series, 1829.
Refuted: “a function is a curve that can be drawn”.
Tamed: by defining a function as a rule. The next chapter will find its integral.
The Dirichlet function equals $1$ at every rational point and $0$ at every irrational one: $D\bigl(\frac pq\bigr) = 1$, $D(\sqrt2) = D(\pi) = 0$.
It can’t be drawn: any tiny segment contains both fractions and irrational numbers, so the “graph” is two seemingly solid bands at heights $0$ and $1$, and at no point can you say where it goes next. Dirichlet himself spoke of two arbitrary constants $c$ and $d$; one and zero are a later convention. For the eighteenth century this wasn’t a function at all: Euler understood a function as an expression made up of the variable and numbers. Dirichlet insisted on something else: a function is any rule assigning a number to each $x$, and it doesn’t matter whether the rule has a formula or a graph. That’s how it’s defined today (chapter 9).
The Dirichlet function is discontinuous at every point of the number line.
The idea: next to any point there are neighbours of both kinds, and their values differ by one.
Take any $a$ and play the Sceptic from chapter 25 with tolerance $\varepsilon = \frac12$. Whatever window $(a - \delta,\ a + \delta)$ we’re offered, it contains a rational number $r$, by the density theorem (chapter 6). It contains an irrational one too: take another fraction $r'$ between $r$ and $a + \delta$. The number $t = r + \frac{r' - r}{\sqrt2}$ lies between $r$ and $r'$, and it’s irrational: if $t$ were a fraction, then $\sqrt2 = \frac{r' - r}{t - r}$ would be a fraction too. At the two points found, $D$ equals $1$ and $0$. The value $D(a)$ can’t be within $\frac12$ of both numbers, so the window doesn’t win. The limit of $D$ at the point $a$ isn’t $D(a)$: a discontinuity.
The Dirichlet function is discontinuous everywhere because every point has equal numbers of neighbours of both kinds: infinitely many. What if the jumps at fractions are made smaller the larger the denominator?
Thomae’s function, or “popcorn”
Habitat: the rational points, one kernel above each fraction.
Caught by: Carl Johannes Thomae, in a textbook on definite integrals, 1875.
Refuted: “if a function is discontinuous on a dense set, it can’t have any points of continuity”.
Tamed: by the theorem below, and by the Riemann integral, which, unlike the Dirichlet function, it has.
Thomae’s function at a point $x = \frac pq$, written as a fraction in lowest terms with $q \ge 1$, equals $\frac1q$, and at irrational points it equals zero. For example, $T\bigl(\frac12\bigr) = \frac12$, $T\bigl(\frac{3}{8}\bigr) = \frac18$, $T(0) = T\bigl(\frac01\bigr) = 1$, $T(\sqrt2) = 0$.
A kernel has popped up above each fraction: above a half to a height of $\frac12$, above the thirds to $\frac13$, and the smaller the fraction’s pieces, the lower. The function is periodic with period $1$: shifting by an integer doesn’t change the denominator. So it’s enough to study it on the segment $[0, 1]$.
Thomae’s function is continuous at every irrational point and discontinuous at every rational one.
The trick is that only finitely many kernels rise above any level, and an irrational number can always be fenced off from finitely many points.
It’s an amusing monster: it’s continuous where it “isn’t there” (on the axis) and breaks at every kernel. The reverse can’t happen: a theorem proved by Vito Volterra in 1881 implies that there’s no function continuous at every rational point and discontinuous at every irrational one. And popcorn does have an integral.
Thomae’s function is Riemann integrable on $[0, 1]$, and $\int_0^1 T(x)\,dx = 0$.
The same idea: there are finitely many tall kernels, and they can be hidden in narrow pieces of the partition. Let a tolerance $\varepsilon$ be named, and let $K$ be the number of points of the segment where $T \ge \varepsilon$. Take any partition of the segment into pieces shorter than $\delta = \frac{\varepsilon}{2K}$ and any points $\xi_i$ in the pieces. Each tall point lies in at most two pieces (two if it’s on their common boundary), so at most $2K$ pieces contain tall points. Their contribution to the Riemann sum is less than $2K \cdot \delta \cdot 1 = \varepsilon$, since $T \le 1$. On the other pieces $T < \varepsilon$, and their contribution is less than $\varepsilon \cdot 1$. So $0 \le \sum T(\xi_i)\,\Delta x_i < 2\varepsilon$ for any choice of points, and the sums approach zero (the definition of the integral, chapter 28).
Holes between the fractions
The rational line $\mathbb Q$
Habitat: every calculator, which stores only fractions.
Caught by: the Pythagoreans, fifth century BC.
Refuted: “since every segment contains fractions, the line is filled with them”.
Tamed: by Dedekind cuts, 1872.
We saw the holes in the rational line in chapter 6, and now we can see how costly they are for analysis. If there were only as many numbers as there are fractions, three main theorems would collapse. The sequence $1,\ 1.4,\ 1.41,\ 1.414,\ \ldots$ increases and never exceeds $2$, but it has no limit among the fractions. The function $x^2 - 2$ on the fractions of the segment $[1, 2]$ is continuous and changes sign, yet it’s zero nowhere. The function $-(x^2 - 2)^2$ on the same fractions is continuous and bounded but has no largest value: it never takes the value zero, yet comes as close to zero as you like.
So the “no holes” property has to be stated explicitly, and for that we have to say what a real number is without appealing to a picture. The definition from chapter 6, a number as an infinite decimal, is awkward for this: it’s unclear how to add and multiply infinite expansions if carries come “from infinity”. Richard Dedekind, by his own account, found a way out on 24 November 1858, while preparing lectures at the Zurich Polytechnic: he was uncomfortable proving the basic theorems of analysis by appealing to geometric intuition. He published his solution only in 1872, in the booklet Continuity and Irrational Numbers.
Dedekind’s idea is this. Cut the line somewhere: all the points to the left of the cut are the lower class, to the right the upper class. The continuity of the line means that a cut always falls at a point. For fractions that’s not so: cut them by the rule “$r < 0$ or $r^2 < 2$”, with everything to the left of $\sqrt2$ below and everything to the right above. There’s no point at the place of the cut. Dedekind proposed not to look for a point for such a cut but to declare the cut itself a number.
A Dedekind cut is a set of fractions $A \subset \mathbb Q$ with three properties: $A$ isn’t empty and isn’t all of $\mathbb Q$; together with each fraction $A$ contains all smaller fractions; and $A$ has no largest element. The fractions outside $A$ form the upper class. A real number, according to Dedekind, is a cut.
Each fraction $r$ gives a cut $\{x \in \mathbb Q : x < r\}$; its upper class has a smallest element, $r$ itself. That’s how the fractions take their places in the new world. The cut $\sqrt2 = \{r \in \mathbb Q : r < 0 \text{ or } r^2 < 2\}$ is different: there’s no largest fraction in the lower class and no smallest in the upper. Check for yourself: try to name the largest fraction whose square is less than two.
The machine uses one formula: $r \mapsto \frac{2r + 2}{r + 2}$. If $r > 0$ and $r^2 < 2$, the new fraction is larger: the difference is $\frac{2 - r^2}{r + 2} > 0$. And its square is still less than two: $\left(\frac{2r + 2}{r + 2}\right)^2 - 2 = \frac{2(r^2 - 2)}{(r + 2)^2} < 0$. For a fraction from the upper class the same calculation gives a smaller fraction whose square is still greater than two. Starting from one, the machine produces $\frac43$, $\frac75$, $\frac{24}{17}$, $\frac{41}{29}$, …, among them the convergents of $\sqrt2$ familiar from chapter 6.
Cuts are compared by inclusion: $A \le B$ if $A \subset B$. Any two cuts are comparable. If $A$ isn’t contained in $B$, take a fraction $a \in A$ outside $B$. Every fraction $b \in B$ is less than $a$: otherwise $a \le b$, and $a$ would lie in $B$ along with $b$. And since $b < a$, $b \in A$. So $B \subset A$. The sum is defined elementwise: $A + B = \{a + b : a \in A,\ b \in B\}$. Multiplication takes more fuss, as the signs have to be sorted out. Checking all the rules of arithmetic and inequalities for cuts is long and dull but honest; it’s done in full, for example, in the appendix to the first chapter of Walter Rudin’s Principles of Mathematical Analysis. The main property of cuts, though, takes three lines to check.
Let a non-empty family of cuts $A_i$ be bounded above: all the $A_i$ are contained in one cut $\Gamma$. Then their union $U = \bigcup_i A_i$ is a cut, and it’s the smallest of the cuts that are greater than or equal to all the $A_i$.
A cut is a ray of fractions extending to the left. A union of rays is again a ray, and none of them goes beyond it.
In the same year, 1872, Georg Cantor, and three years earlier Charles Méray, proposed another path: a number is a sequence of fractions that “converges in itself”, though it may have no limit among the fractions (below such sequences are called Cauchy sequences). Two such sequences are taken to be the same number if their difference tends to zero: that’s an equivalence relation from chapter 51, and a number is its class. Weierstrass too presented his own construction in his lectures. All the paths lead to the same result.
The completeness axiom
The scaffolding can come down. From now on we won’t need to remember what the real numbers are made of: the rules of arithmetic, the rules of inequalities and one property that distinguishes $\mathbb R$ from $\mathbb Q$ will be enough. Let’s state it without any cuts.
A number $M$ is an upper bound of a set $A$ if $a \le M$ for all $a \in A$. A set that has an upper bound is called bounded above. The least of the upper bounds is called the least upper bound, or supremum, and written $\sup A$. The lower bound and the greatest lower bound, or infimum, $\inf A$, are defined in the same way.
Every non-empty set of real numbers that’s bounded above has a least upper bound.
For cuts this isn’t an axiom but the theorem we’ve just proved: the union is the least upper bound. So by accepting the axiom we risk nothing: a model in which it holds has been built from fractions. For the fractions themselves it’s false: the set $\{r \in \mathbb Q : r^2 < 2\}$ has as many upper bounds among the fractions as you like, but no least one.
When a set has a largest element, that’s its least upper bound: $\sup [0, 1] = 1$. But the least upper bound is useful precisely when there’s no largest element: $\sup\,[0, 1) = 1$, and $1 \notin [0, 1)$. The first thing the axiom gives is a property we accepted without proof in chapter 25.
For every real number $x$ there’s a natural number $n > x$. As a consequence, $\frac1n \to 0$.
Suppose the contrary: all the natural numbers are at most $x$. Then $\mathbb N$ is bounded above, and by the completeness axiom it has a least upper bound $s$. The number $s - 1$ is less than $s$ and so isn’t an upper bound: there’s a natural $n > s - 1$. But then the natural number $n + 1 > s$, contrary to $s$ being an upper bound. The consequence: for a tolerance $\varepsilon$ choose a natural $N > \frac1\varepsilon$, and for $n > N$ we get $0 < \frac1n < \frac1N < \varepsilon$.
A set $A$ is bounded above, and $s = \sup A$. Which of these is always true?
That’s the second half of the definition: if $t < s$, then $t = s - \varepsilon$ with $\varepsilon = s - t > 0$, and some element is greater than $t$. The rest depends on the set.
Finding least upper bounds is a skill that will come in handy throughout what follows. The recipe is always the same: guess a candidate, check that it’s an upper bound, and show that elements come arbitrarily close to it.
Four faces of completeness
The axiom speaks about sets, while analysis speaks about sequences. The four theorems below translate it into the language of sequences, and each has its own role. The course has already used two of them as axioms: the nested intervals principle in chapter 25, and the theorem on monotone sequences in chapter 30. Now they’ll become theorems.
If a sequence is non-decreasing and bounded above, it converges, and its limit is the least upper bound of its terms.
There’s no need to search for the limit: the completeness axiom suggests it.
For a non-increasing sequence bounded below it’s the same with the greatest lower bound. The theorem pays the debt of chapter 12: the powers $2^{1.4} \approx 2.6390$, $2^{1.41} \approx 2.6574$, $2^{1.414} \approx 2.6647$, … grow with the exponents and don’t exceed $2^{1.5} \approx 2.8284$, so they have a limit. That limit, $2.66514\ldots$, is what’s called $2^{\sqrt2}$. The infinite decimals of chapter 30 get their values for the same reason.
If the segments $[a_1, b_1] \supset [a_2, b_2] \supset \ldots$ are nested inside one another, they have a common point. If moreover $b_n - a_n \to 0$, the common point is unique.
The idea: the common point will be given by the least upper bound of the left ends.
Nesting gives $a_1 \le a_2 \le \ldots$ and $b_1 \ge b_2 \ge \ldots$, and each left end is no further right than each right end: for $n \le m$ we have $a_n \le a_m \le b_m$, and for $n > m$ we have $a_n \le b_n \le b_m$. So each $b_m$ is an upper bound of the set of left ends, and that set has a least upper bound $c$. As an upper bound, $c \ge a_m$; as the least upper bound, $c \le b_m$. Altogether $c \in [a_m, b_m]$ for every $m$. If there were two common points, $c < c'$, all the segments would contain $[c, c']$, and their lengths couldn’t tend to zero: $b_n - a_n \ge c' - c > 0$.
Now the proof of the intermediate value theorem from chapter 25, which rested on this principle, is fully rigorous. The third face of completeness is about sequences that don’t tend anywhere.
A subsequence of a sequence $a_n$ is a sequence $a_{n_1}, a_{n_2}, a_{n_3}, \ldots$ with indices $n_1 < n_2 < n_3 < \ldots$: some terms have been struck out of the original, and the rest haven’t been rearranged.
Every bounded sequence has a convergent subsequence.
We’ll keep halving the segment the terms live in, each time keeping a half with infinitely many of them. The picture shows the sequence $a_n = \sin n$: it has no limit, and its terms turn up infinitely often in every little piece of the segment $[-1, 1]$, so either half will do; we stick with the one containing $0.3$.
The last face of completeness lets you learn that a limit exists without knowing what it is.
A sequence is called a Cauchy sequence if for every $\varepsilon > 0$ there’s an index $N$ such that $|a_m - a_n| < \varepsilon$ for all $m, n > N$: distant terms are arbitrarily close to one another.
A sequence of real numbers converges if and only if it’s a Cauchy sequence.
A convergent sequence is a Cauchy sequence. If $a_n \to a$, then for the tolerance $\frac\varepsilon2$ there’s an $N$ after which $|a_n - a| < \frac\varepsilon2$, and for $m, n > N$ the triangle inequality gives $|a_m - a_n| \le |a_m - a| + |a - a_n| < \varepsilon$.
Conversely, let the sequence be a Cauchy sequence. First, it’s bounded: for $\varepsilon = 1$ there’s an index $N_1$ after which all the terms differ from $a_{N_1 + 1}$ by less than $1$, and there are finitely many terms before it. By the Bolzano–Weierstrass theorem there’s a subsequence $a_{n_k} \to x$. Let’s show that the whole sequence tends to $x$. The Sceptic names $\varepsilon$; take $N$ from the Cauchy property for tolerance $\frac\varepsilon2$, and a term of the subsequence $a_{n_k}$ with index $n_k > N$ and $|a_{n_k} - x| < \frac\varepsilon2$. Then for $n > N$ we get $|a_n - x| \le |a_n - a_{n_k}| + |a_{n_k} - x| < \varepsilon$.
Cauchy’s criterion is the most portable form of completeness: it involves neither order nor least upper bounds, only distances. That’s why it’s taken as the definition of completeness where “greater” and “less” don’t exist: for complex numbers, vectors, functions (chapter 55). Among the fractions the sequence $1,\ 1.4,\ 1.41,\ \ldots$ is a Cauchy sequence but doesn’t converge: the same hole again.
Neighbouring terms of a sequence get closer: $a_{n+1} - a_n \to 0$. Does this mean the sequence converges?
Take the partial sums of the harmonic series $H_n = 1 + \frac12 + \ldots + \frac1n$ (chapter 30). Neighbours differ by $\frac1{n + 1} \to 0$, but $H_{2n} - H_n \ge n \cdot \frac1{2n} = \frac12$, and the sequence goes off to infinity. The steps get smaller, but the journey never ends.
Can it be done the other way round, with nested intervals as the axiom?
If an ordered field satisfies the Archimedean property and the nested intervals principle, it satisfies the completeness axiom too.
Let $A$ be non-empty and bounded above. Take an element $a_0 \in A$ and an upper bound $b_0$, and keep halving the segment $[a_0, b_0]$. If the midpoint is an upper bound of $A$, keep the left half; if not, the right half. This preserves two properties: the right end $b_k$ is an upper bound of $A$, and the segment $[a_k, b_k]$ contains an element of $A$ (in the first case the old one, in the second an element to the right of the midpoint). The lengths $\frac{b_0 - a_0}{2^k}$ tend to zero by the Archimedean property, and the segments have a unique common point $s$. If some $a \in A$ were greater than $s$, then once $b_k - a_k < a - s$ the right end $b_k \le s + (b_k - a_k) < a$ wouldn’t be an upper bound. And for any $\varepsilon > 0$, once $b_k - a_k < \varepsilon$, an element of $[a_k, b_k]$ is greater than $b_k - \varepsilon \ge s - \varepsilon$. So $s = \sup A$.
That’s why different textbooks state completeness differently, and they’re all right: nested intervals (with Archimedes), monotone sequences, Cauchy sequences (with Archimedes) and least upper bounds are one and the same property. Chapter 25 lost nothing by taking nested intervals as an axiom.
Paying the debts
Rigorous proofs were put off “until chapter 53” more than once in the course. Here’s the ledger of debts:
| Where promised | What was promised |
|---|---|
| chapters 25, 38 | a rigorous proof of the intermediate value theorem |
| chapters 27, 28, 38 | the extreme value theorem |
| chapter 25 | the continuity of roots and logarithms |
| chapter 27 | l’Hôpital’s rule in its strong form |
| chapters 28, 32, 33 | uniform continuity and the integrability of continuous functions |
| chapters 30, 31, 33 | uniform convergence and term-by-term differentiation of series |
Let’s start with the first row. In chapter 25 the intermediate value theorem was proved by halving, and that proof is now complete. Here’s a second one, in the spirit of this chapter: the root will be pointed out by a least upper bound.
If a function $f$ is continuous on a segment $[a, b]$ and $f(a) < 0 < f(b)$, there’s a point $c \in (a, b)$ with $f(c) = 0$.
Take the rightmost place up to which the function is still sometimes negative: the least upper bound of the set where $f < 0$.
The root found this way is special: to the right of it the function is never negative again. The next debt requires the Bolzano–Weierstrass theorem and one simple observation: a continuous function maps convergent sequences to convergent ones. If $x_k \to c$ and $f$ is continuous at $c$, then for a tolerance $\varepsilon$ continuity gives a window $\delta$, the terms $x_k$ fall into it from some index on, and from then on $|f(x_k) - f(c)| < \varepsilon$. We’ll also need the fact that the limit of terms from a segment $[a, b]$ lies in the same segment: if $x_k \to c > b$, then for the tolerance $c - b$ the terms would end up to the right of $b$.
A function continuous on a segment $[a, b]$ is bounded on it and attains its largest and smallest values on it.
We’ll apply the Bolzano–Weierstrass theorem twice: first to prove that the values are bounded, then to find a point where their least upper bound is attained.
Both conditions are needed, and the examples from chapter 27 show what happens without them: $\frac1x$ on $(0, 1]$ has unbounded values, and $x$ on $[0, 1)$ has no largest value. You can see it in the proof: where there’s no closed segment, the limit $c$ can drop out of the domain. And chapter 38 needed the theorem for functions on a sphere.
A set $K$ in $\mathbb R^n$ is called closed if it contains the limits of all its convergent sequences of points. A segment, a circle, a sphere are closed; the interval $(0, 1)$ isn’t: $\frac1n \to 0$, and zero isn’t in it.
A function continuous on a closed bounded set $K \subset \mathbb R^n$ attains its largest and smallest values on it.
The proof above relied on only two facts: a bounded sequence of points has a convergent subsequence, and its limit doesn’t leave the domain. The second is the closedness of $K$. The first is the Bolzano–Weierstrass theorem in $\mathbb R^n$: in a bounded sequence of points all the coordinates are bounded. Choose a subsequence in which the first coordinates converge, from it a subsequence in which the second ones converge too, and so on $n$ times; at the end all the coordinates converge, and with them the points themselves, because the distance $\sqrt{(x_1 - y_1)^2 + \ldots + (x_n - y_n)^2}$ is small when the differences of the coordinates are small. From there the proof is repeated word for word. The unit sphere from chapter 38 is bounded and closed: if $\|\mathbf x_k\| = 1$ and $\mathbf x_k \to \mathbf x$, then $\|\mathbf x\| = 1$, since the length of a vector depends continuously on its coordinates.
The next debt is to roots and logarithms. Their continuity follows from a general fact about inverse functions.
Let $f$ be continuous and strictly increasing on $[a, b]$. Then it takes each value in $[f(a), f(b)]$ exactly once, and the inverse function $g$ is continuous on that segment.
The function maps a window on the $x$-axis to a window on the $y$-axis, and all that remains is to take a smaller window.
The function $x^n$ is continuous and strictly increasing on any segment $[0, R]$, so the root $\sqrt[n]{y}$ is continuous on $[0, R^n]$, and hence on the whole ray $[0, +\infty)$. In the same way $\arcsin$ (the inverse of sine on $\bigl[-\frac\pi2, \frac\pi2\bigr]$) and $\arctan$ are continuous, and the logarithm is the inverse of the continuous exponential (chapter 29).
The debt of chapter 27 is l’Hôpital’s rule for the cases where derivatives at the point itself don’t help. We need a mean value theorem for two functions at once.
Let $f$ and $g$ be continuous on $[a, b]$, differentiable on $(a, b)$, with $g' \ne 0$ on $(a, b)$. Then there’s a $\xi \in (a, b)$ for which $\dfrac{f(b) - f(a)}{g(b) - g(a)} = \dfrac{f'(\xi)}{g'(\xi)}$.
Look at the pair of functions as a curve in the plane: then the left side of the equation is the slope of a chord, the right side the slope of a tangent, and the theorem says that somewhere they’re parallel.
Let $f$ and $g$ be differentiable on an interval $(a, a + r)$, with $g' \ne 0$ on it, $f(x) \to 0$ and $g(x) \to 0$ as $x \to a + 0$, and suppose the ratio of the derivatives has a limit: $\frac{f'(x)}{g'(x)} \to L$. Then $\frac{f(x)}{g(x)} \to L$ too. The same holds as $x \to a - 0$, and hence for the two-sided limit.
The idea: by Cauchy’s theorem the ratio of the functions equals the ratio of the derivatives at some intermediate point. Extend the definition by $f(a) = g(a) = 0$; now both functions are continuous on every segment $[a, x]$ with $x < a + r$. By Cauchy’s mean value theorem $\frac{f(x)}{g(x)} = \frac{f(x) - f(a)}{g(x) - g(a)} = \frac{f'(\xi_x)}{g'(\xi_x)}$ for some $\xi_x \in (a, x)$. The Sceptic names $\varepsilon$; by hypothesis there’s a $\delta$ for which $\left|\frac{f'(t)}{g'(t)} - L\right| < \varepsilon$ for all $t \in (a, a + \delta)$. If $a < x < a + \delta$, then $\xi_x$ lies in this interval too, and $\left|\frac{f(x)}{g(x)} - L\right| < \varepsilon$.
The simple case in chapter 27 required $g'(a) \ne 0$. Now we can do this: $\lim\limits_{x \to 0}\frac{x - \sin x}{x^3}$. The ratio of derivatives $\frac{1 - \cos x}{3x^2}$ is “zero over zero” again, so apply the rule to it: $\frac{\sin x}{6x} \to \frac16$. So $\frac{1 - \cos x}{3x^2} \to \frac16$ too, and $\frac{x - \sin x}{x^3} \to \frac16$. A numerical check: at $x = 0.1$ the fraction equals $0.16658\ldots$
One δ for everyone
The function $\sin\frac1x$ on $(0, 1]$
Habitat: right next to zero, where it isn’t allowed in.
Refuted: “if a function is continuous at every point, one fine grid works for it everywhere at once”.
Tamed: by the Heine–Cantor theorem: on a segment with its ends this can’t happen.
In the game with the Sceptic from chapter 25 the window $\delta$ is chosen after $\varepsilon$ and after the point $x$, so it can depend on both. For $x^2$ at a point $x_0$ with tolerance $\varepsilon$ a window of about $\frac{\varepsilon}{2x_0}$ will do: the further right the point, the steeper the graph and the narrower the window. For $\sin\frac1x$ right next to zero the windows shrink to almost nothing. For many purposes that’s bad. To draw up a table of values with guaranteed accuracy, draw a graph or compute an integral, you need one grid step that works at all points at once.
A function $f$ is uniformly continuous on a set $D$ if for every $\varepsilon > 0$ there’s a $\delta > 0$ such that $|f(x) - f(y)| < \varepsilon$ for any $x, y \in D$ with $|x - y| < \delta$.
The graph of $\sqrt x$ on $[0, 1]$ is vertical at zero, yet the function is uniformly continuous: $|\sqrt x - \sqrt y| \le \sqrt{|x - y|}$, and $\delta = \varepsilon^2$ will do. It’s not a matter of steepness but of whether the domain has its ends. That’s what the main theorem of this section says. Many textbooks call it the Heine–Cantor theorem, others simply Cantor’s theorem: Eduard Heine published it in 1872, and Dirichlet had proved it in lectures as early as 1854.
A function continuous on a segment $[a, b]$ is uniformly continuous on it.
If there were no single $\delta$, there would be pairs of points arbitrarily close to each other but with distant values. The Bolzano–Weierstrass theorem will herd them to one point, and continuity at that point won’t allow it.
The proof breaks down exactly where the theorem does. For $\sin\frac1x$ on $(0, 1]$ the pairs of points are herded towards zero, but zero isn’t in the domain, and continuity there can’t be used. Now we can pay the debt of chapter 28.
A function continuous on a segment $[a, b]$ is Riemann integrable on it.
One $\delta$ for the whole segment lets us make all the columns of the gap between the lower and upper sums low at once.
For continuous functions on a rectangle from chapter 32 the argument is the same: the Heine–Cantor theorem in $\mathbb R^2$ is proved in the same way, with the Bolzano–Weierstrass theorem for points of the plane, and cells take the place of pieces of a segment.
Cauchy’s mistake
The sequence $x^n$ on $[0, 1]$
Habitat: the right end of the segment.
Caught by: Niels Henrik Abel in 1826, in the guise of a series of sines.
Refuted: “a limit of continuous functions is continuous”, a theorem from Cauchy’s Cours d’analyse, 1821.
Tamed: by uniform convergence.
In his Cours d’analyse of 1821 Augustin Cauchy proved: if a series of continuous functions converges at every point, its sum is continuous. Five years later Abel, in a paper on the binomial series, cautiously remarked that the theorem seemed to have exceptions, and gave the series $\sin x - \frac12 \sin 2x + \frac13 \sin 3x - \ldots$: it converges for all $x$, its sum on the interval $(-\pi, \pi)$ is $\frac x2$, and at the point $\pi$ it’s zero. The sum of continuous sines jumps. A simpler example is to hand: the functions $x^n$ on $[0, 1]$ are continuous, but their limit is $0$ for $x < 1$ and $1$ at $x = 1$.
A sequence of functions $f_n$ converges pointwise to $f$ on a set $D$ if $f_n(x) \to f(x)$ at every point $x \in D$. It converges uniformly if for every $\varepsilon > 0$ there’s an index $N$ after which $|f_n(x) - f(x)| < \varepsilon$ at all points $x \in D$ at once.
If all the $f_n$ are continuous on $D$ and $f_n \to f$ uniformly on $D$, then $f$ is continuous on $D$.
Split the tolerance into three parts: two go on the distance from $f$ to $f_N$, one on the continuity of $f_N$ itself.
This shows why $x^n$ on $[0, 1]$ can’t converge uniformly: the limit is discontinuous. In Cauchy’s proof the index $N$ was tacitly chosen once for all points, that is, uniform convergence was used, though it wasn’t in his hypothesis. Historians still argue about what exactly Cauchy meant; his “infinitely small” quantities can be read in different ways. But the notion that fixes everything was singled out in the 1840s by Weierstrass in an unpublished manuscript and, independently, by Philipp Seidel and George Stokes, and in Weierstrass’s lectures it became standard. Uniform convergence is conveniently checked with one test.
Let $|u_k(x)| \le M_k$ for all $x \in D$, and let the numerical series $\sum M_k$ converge. Then the series $\sum u_k(x)$ converges uniformly on $D$.
At each point $x$ the series $\sum |u_k(x)|$ converges by the comparison test, and so the series itself converges (chapter 30); write $S(x)$ for its sum and $S_n(x)$ for a partial sum. The remainder is estimated by the triangle inequality, which for infinite sums follows from the finite ones by passing to the limit: $|S(x) - S_n(x)| = \left|\sum_{k > n} u_k(x)\right| \le \sum_{k > n} M_k$. On the right is the remainder of a convergent numerical series: it tends to zero and doesn’t depend on $x$. So $\sup_x |S(x) - S_n(x)| \to 0$.
The first debt to the monster is paid: the terms of the Weierstrass series are at most $a^n$ in absolute value, the series $\sum a^n$ converges, and the function $W$ is the uniform limit of continuous partial sums, so it’s continuous. The steps in chapters 31 and 33, where the limit of successive approximations or of a Fourier series turned out to be a continuous function, are justified the same way. What remains is term-by-term differentiation, which we allowed ourselves without proof in chapter 30.
Let the functions $f_n$ have continuous derivatives on $[a, b]$, let the numbers $f_n(a)$ converge to $A$, and let the derivatives $f_n'$ converge to $g$ uniformly on $[a, b]$. Then the $f_n$ converge uniformly to the function $f(x) = A + \int_a^x g(t)\,dt$, and $f' = g$ on $(a, b)$.
The idea: pass from derivatives to integrals, for which uniform convergence settles everything. The function $g$ is continuous as a uniform limit of continuous $f_n'$, and so it’s integrable. By the Newton–Leibniz formula (chapter 28) $f_n(x) = f_n(a) + \int_a^x f_n'(t)\,dt$. Subtract $f(x)$ and estimate the integral of the difference by the monotonicity of the integral, replacing the integrand by its largest absolute value: $|f_n(x) - f(x)| \le |f_n(a) - A| + (b - a)\sup_{[a,\,b]}|f_n' - g|$. The right-hand side tends to zero and doesn’t depend on $x$: the convergence is uniform. Finally, $g$ is continuous, and by the fundamental theorem of calculus the derivative of the integral $\int_a^x g$ with respect to its upper limit is $g(x)$ inside the segment. So $f' = g$.
If the series $\sum c_k (x - x_0)^k$ converges for $|x - x_0| < R$, then on this interval its sum is differentiable, and its derivative is $\sum k\,c_k (x - x_0)^{k - 1}$.
Take a point $x$ with $|x - x_0| < R$ and numbers $\rho < r$ between $|x - x_0|$ and $R$. At the point $x_0 + r$ the series converges, so its terms tend to zero and are bounded: $|c_k|\,r^k \le C$. On the segment $[x_0 - \rho,\ x_0 + \rho]$ the terms of the series of derivatives are estimated like this: $|k\,c_k (t - x_0)^{k - 1}| \le k\,|c_k|\,\rho^{k-1} \le \frac C\rho\,k\,q^k$, where $q = \frac\rho r < 1$. The series $\sum k q^k$ converges by the ratio test: the ratio of neighbouring terms $\frac{k + 1}{k}\,q \to q < 1$. By the Weierstrass M-test the series of derivatives converges uniformly on the segment, while the partial sums of the original series are polynomials with continuous derivatives, and they converge at the point $x_0 - \rho$. By the previous theorem the sum is differentiable inside the segment, in particular at the point $x$, and its derivative is the sum of the series of derivatives.
The functions $f_n$ are differentiable and converge to $f$ uniformly. Must $f$ be differentiable?
Take $f_n(x) = \sqrt{x^2 + \frac1n}$. They’re smooth, and $0 \le f_n(x) - |x| = \frac{1/n}{\sqrt{x^2 + 1/n} + |x|} \le \frac{1}{\sqrt n}$ for all $x$, so $f_n \to |x|$ uniformly. But $|x|$ has a corner at zero. The derivatives $f_n'$ converge to the sign of $x$, and not uniformly: hence the corner.
Taming
Back to the first monster. We’ve already proved its continuity with the Weierstrass M-test. Proving that $W$ has no derivative at any point requires long estimates of cosines. Let’s do the same for a relative that has saw-teeth instead of cosines. It was devised by the Japanese mathematician Teiji Takagi in 1903.
The terms of the series are at most $\frac{1}{2^{n+1}}$, so by the Weierstrass M-test $T$ is continuous. Its graph looks like an old-fashioned blancmange pudding, and English-language books call it the blancmange function. We’ll need one lemma about chords.
If $f$ has a derivative at the point $x$, the segments $[u_k, v_k]$ contain $x$, and their lengths tend to zero, then the slopes of the chords $\frac{f(v_k) - f(u_k)}{v_k - u_k}$ tend to $f'(x)$.
If $x$ coincides with an end of the segment, the slope of the chord is an ordinary difference quotient, and it tends to $f'(x)$ by the definition of the derivative. If $u_k < x < v_k$, write the slope of the chord as a weighted average of two difference quotients: $\frac{f(v_k) - f(u_k)}{v_k - u_k} = \lambda\,\frac{f(v_k) - f(x)}{v_k - x} + (1 - \lambda)\,\frac{f(x) - f(u_k)}{x - u_k}$, where $\lambda = \frac{v_k - x}{v_k - u_k}$ lies between zero and one. Each of the two quotients tends to $f'(x)$. Their weighted average differs from $f'(x)$ by no more than the larger of the two deviations, and so it tends to $f'(x)$ too.
The Takagi function is continuous on the whole line and has no derivative at any point.
Look at the chords over the dyadic segments containing the point $x$. Their slopes are integers, and neighbouring ones differ by exactly one, so they can’t approach a single number.
The final blow to intuition was dealt in 1931 by Stefan Banach and Stefan Mazurkiewicz. They proved independently that, in a precise sense, “almost all” continuous functions are nowhere differentiable, and smooth ones are a rare exception. The monsters turned out to be the majority, and Poincaré’s honest functions a nature reserve. Their descendants live in physics too: the path of a Brownian particle has, with probability one, no derivative anywhere (Paley, Wiener and Zygmund, 1933), and in the chapter on fractals, where jaggedness at every scale isn’t a defect but the object of study.
Every monster struck at a picture, not at logic. To deal with them took precise definitions (of the real number, continuity, convergence) and a single completeness axiom, from which all the “obvious” theorems of analysis are derived.
Where next
Thomae’s function is integrable, with integral zero, while the Dirichlet function isn’t Riemann integrable at all: every piece of any partition contains both fractions and irrational numbers, and the Riemann sums jump between $0$ and $b - a$. Yet the difference between them doesn’t seem deep. Both equal zero at all irrational points, and the fractions, as we found in chapter 52, are “few”: their set is countable, while the set of points of a segment isn’t. If the set of fractions on a segment weighs nothing, the integral of the Dirichlet function ought to be zero. What is the “length” of the set of rational points of the segment $[0, 1]$? And of the irrational ones, or of the Cantor set? To answer, we’ll have to define length afresh, and on the way we’ll meet pieces that can’t be measured at all, a ball from which two identical balls are assembled, and the final answer to the question about the circle and the square. That’s chapter 54.