From Continuity to Uniform Continuity

Ordinary continuity and uniform continuity

Two definitions that look alike

First, let us recall ordinary continuity of ff on an interval II, written with its quantifiers:

∀x∈I,  ∀ε>0,  ∃δ>0,  ∀y∈I,∣y−x∣≤δ  ⟹  ∣f(y)−f(x)∣≤ε\forall x \in I,\; \forall \varepsilon > 0,\; \exists \delta > 0,\; \forall y \in I,\quad \lvert y - x \rvert \leq \delta \implies \lvert f(y) - f(x) \rvert \leq \varepsilon

Uniform continuity on II moves a single quantifier, and that changes everything:

∀ε>0,  ∃δ>0,  ∀(x,y)∈I2,∣x−y∣≤δ  ⟹  ∣f(x)−f(y)∣≤ε\forall \varepsilon > 0,\; \exists \delta > 0,\; \forall (x, y) \in I^2,\quad \lvert x - y \rvert \leq \delta \implies \lvert f(x) - f(y) \rvert \leq \varepsilon

Where is the difference?

Notion Order of quantifiers What δ\delta depends on
Continuity on II ∀x,  ∀ε,  ∃δ\forall x,\; \forall \varepsilon,\; \exists \delta on ε\varepsilon and on xx
Uniform continuity on II ∀ε,  ∃δ,  ∀x\forall \varepsilon,\; \exists \delta,\; \forall x on ε\varepsilon only

In the second case, one and the same δ\delta must work everywhere on II: that is the meaning of the word "uniform". We immediately deduce the implication

f uniformly continuous on I  ⟹  f continuous on If \text{ uniformly continuous on } I \implies f \text{ continuous on } I

and the converse is false in general, as the following example shows.

Example: x↦x2x \mapsto x^2 is not uniformly continuous on R\mathbb{R}

Let f(x)=x2f(x) = x^2 and, for n≥1n \geq 1:

xn=nandyn=n+1nx_n = n \qquad \text{and} \qquad y_n = n + \frac{1}{n}

The two points get as close as we like, since ∣yn−xn∣=1n→0\lvert y_n - x_n \rvert = \dfrac{1}{n} \to 0. Yet their images stay apart:

∣f(yn)−f(xn)∣=(n+1n)2−n2=2+1n2≥2\lvert f(y_n) - f(x_n) \rvert = \left(n + \frac{1}{n}\right)^2 - n^2 = 2 + \frac{1}{n^2} \geq 2

With ε=1\varepsilon = 1, no δ>0\delta > 0 can work for all xx at once: it suffices to take nn such that 1n≤δ\dfrac{1}{n} \leq \delta to break the definition. The function is indeed continuous at every point, but far from the origin δ\delta must be chosen smaller and smaller, because the slope f′(x)=2xf'(x) = 2x blows up.

Classic pitfall

Never write "let δ\delta be associated with ε\varepsilon by the continuity of ff" before having fixed xx: this δ\delta depends on xx. If your proof then needs the same δ\delta for another point, you are silently using uniform continuity — which is exactly what Heine's theorem will allow, but only on a closed bounded interval.