maths2u
Tier
⌕ Search ⌘K
Theorem

Uniform continuity on compact sets

T-042Home MU-201Threads space · change
Statement

Let \( K \subseteq \mathbb{R} \) be a compact set (equivalently, by the Heine–Borel theorem, closed and bounded), and let \( f : K \to \mathbb{R} \) be continuous at every point of \( K \). Then \( f \) is uniformly continuous on \( K \): for every \( \varepsilon \gt 0 \) there exists \( \delta \gt 0 \), depending on \( \varepsilon \) alone and not on any point of \( K \), such that \[ \forall x, y \in K : \quad |x - y| \lt \delta \implies |f(x) - f(y)| \lt \varepsilon . \] (The same statement, with the same proof, holds for a continuous map \( f : X \to Y \) between metric spaces with \( X \) compact; this is the Heine–Cantor theorem.)

Why it matters

Continuity is a local promise: at each point \( x \) you get a \( \delta \) that may depend on \( x \), and near a bad point (a steep wall like \( 1/x \) near \( 0 \), or wild oscillation like \( \sin(1/x) \)) those \( \delta \)'s can shrink to nothing. Uniform continuity is a global promise: one \( \delta \) works everywhere. This theorem says compactness converts the local promise into the global one — it is the archetype of the "local-to-global" upgrades that compactness buys.

Practically, it is the engine behind several pillars of the course: every continuous function on \( [a,b] \) is Riemann integrable; continuous functions on compacts can be uniformly approximated by piecewise-linear functions (and, further along, by polynomials); and change-of-variable and interchange-of-limit arguments repeatedly need a modulus of continuity that does not depend on the point. Whenever an argument needs "one \( \delta \) for the whole domain", this theorem is what supplies it.

Hypotheses
Hypothesis.\( K \) is compact (closed and bounded). Drop boundedness: \( f(x) = x^2 \) on \( \mathbb{R} \) is continuous but not uniformly continuous — take \( x_n = n \), \( y_n = n + \tfrac{1}{n} \); then \( |x_n - y_n| \to 0 \) but \( |f(x_n) - f(y_n)| = 2 + \tfrac{1}{n^2} \geq 2 \). Drop closedness: \( f(x) = \tfrac{1}{x} \) on the bounded set \( (0,1) \) is continuous but not uniformly continuous — take \( x_n = \tfrac{1}{n} \), \( y_n = \tfrac{1}{2n} \); then \( |x_n - y_n| \to 0 \) but \( |f(x_n) - f(y_n)| = n \to \infty \).
Hypothesis.\( f \) is continuous at every point of \( K \). Uniform continuity implies continuity, so any discontinuous function on a compact set already fails: on \( [0,1] \) let \( f(x) = 0 \) for \( x \lt \tfrac{1}{2} \) and \( f(x) = 1 \) for \( x \geq \tfrac{1}{2} \). Points \( x_n = \tfrac{1}{2} - \tfrac{1}{n} \), \( y_n = \tfrac{1}{2} \) satisfy \( |x_n - y_n| \to 0 \) yet \( |f(x_n) - f(y_n)| = 1 \) for all \( n \). Continuity is needed at every point — one bad point is enough to destroy the conclusion.
Hypothesis (hidden, metric version).Sequential compactness of the domain is what the standard proof actually consumes. In metric spaces compactness and sequential compactness coincide, so no gap arises; but in general topological spaces they diverge, and the correct general statement (via open covers or the Lebesgue number lemma) requires compactness in the covering sense and a uniform structure on the target. There is no hidden completeness hypothesis on the codomain: the proof never takes a limit in the target beyond limits guaranteed by continuity.
Proof

We argue by contradiction, using the sequential characterisation of compactness. Throughout, \( K \subseteq \mathbb{R} \) is compact and \( f : K \to \mathbb{R} \) is continuous on \( K \).

1
Suppose \( f \) is not uniformly continuous on \( K \). Then, negating the definition: \[ \exists\, \varepsilon_0 \gt 0 \ \forall \delta \gt 0 \ \exists\, x, y \in K : \ |x - y| \lt \delta \ \text{ and } \ |f(x) - f(y)| \geq \varepsilon_0 . \]
Formal negation of the \( \forall \varepsilon\, \exists \delta\, \forall x,y \) statement: the quantifiers flip and the final implication is negated to a conjunction. No analysis yet, pure logic. A
2
Fix such an \( \varepsilon_0 \gt 0 \). For each \( n \in \mathbb{N} \), apply the displayed statement with \( \delta = \tfrac{1}{n} \) to choose points \( x_n, y_n \in K \) with \[ |x_n - y_n| \lt \frac{1}{n} \quad \text{and} \quad |f(x_n) - f(y_n)| \geq \varepsilon_0 . \]
Instantiation of the existential quantifier at \( \delta = 1/n \) for each \( n \); this builds two sequences in \( K \) whose gap shrinks to \( 0 \) while their images stay \( \varepsilon_0 \)-separated. (Choosing one pair for each \( n \in \mathbb{N} \) uses only countable choice, which is standard throughout real analysis.) B
3
The sequence \( (x_n) \) lies in the compact set \( K \), so it has a convergent subsequence \[ x_{n_k} \to c \quad \text{as } k \to \infty, \qquad \text{with } c \in K . \]
Two ingredients, both named: \( K \) is bounded, so the Bolzano–Weierstrass theorem yields a subsequence \( x_{n_k} \) converging to some \( c \in \mathbb{R} \); and \( K \) is closed, so the limit of this sequence of points of \( K \) lies in \( K \). (Equivalently, in one stroke: compact subsets of a metric space are sequentially compact.) This is the step where compactness — and nothing weaker — is spent. C
4
The companion subsequence converges to the same limit: \[ |y_{n_k} - c| \leq |y_{n_k} - x_{n_k}| + |x_{n_k} - c| \lt \frac{1}{n_k} + |x_{n_k} - c| \to 0, \quad \text{so } y_{n_k} \to c . \]
Triangle inequality for the absolute value, plus the squeeze: both terms on the right tend to \( 0 \) (the first by Step 2 since \( n_k \geq k \to \infty \), the second by Step 3). A
5
\[ f(x_{n_k}) \to f(c) \quad \text{and} \quad f(y_{n_k}) \to f(c) \quad \text{as } k \to \infty . \]
Continuity of \( f \) at the point \( c \in K \), in its sequential form: if \( f \) is continuous at \( c \) and \( z_k \to c \) with \( z_k \in K \), then \( f(z_k) \to f(c) \). (The sequential criterion is equivalent to the \( \varepsilon \)–\( \delta \) definition for functions between metric spaces; this equivalence is proved in MU-201 when continuity is first defined.) Note we use continuity at the single point \( c \) only — but we had no control over which point \( c \) would appear, which is why continuity on all of \( K \) is required. B
6
\[ |f(x_{n_k}) - f(y_{n_k})| \leq |f(x_{n_k}) - f(c)| + |f(c) - f(y_{n_k})| \to 0 . \]
Triangle inequality and the algebra of limits applied to Step 5: a sum of two null sequences is null. A
7
But Step 2 guarantees \( |f(x_{n_k}) - f(y_{n_k})| \geq \varepsilon_0 \gt 0 \) for every \( k \) — a sequence cannot converge to \( 0 \) while staying \( \geq \varepsilon_0 \). Contradiction.
Order limit theorem: if \( a_k \geq \varepsilon_0 \) for all \( k \) and \( a_k \to L \), then \( L \geq \varepsilon_0 \), so \( L \neq 0 \). The assumption in Step 1 is therefore false. B
8
Hence \( f \) is uniformly continuous on \( K \). \( \blacksquare \)
Reductio ad absurdum: the negation in Step 1 led to contradiction, so the original statement holds. A

Remark on the proof's reach: nowhere did we use the order structure or completeness of the codomain — only the triangle inequality. Replacing \( |\cdot| \) by metrics \( d_X, d_Y \) verbatim proves: a continuous map from a sequentially compact metric space to any metric space is uniformly continuous. An alternative proof avoids sequences entirely: cover \( K \) by the sets \( U_x = B\!\left(x, \tfrac{\delta_x}{2}\right) \) where \( \delta_x \) witnesses continuity at \( x \) for \( \tfrac{\varepsilon}{2} \), extract a finite subcover by compactness, and take \( \delta = \tfrac{1}{2}\min_i \delta_{x_i} \gt 0 \) (a minimum of finitely many positive numbers — this is where finiteness of the subcover is essential). That route is the one that generalises to arbitrary compact topological spaces mapping into uniform spaces.

Result
\[ K \subseteq \mathbb{R} \ \text{compact}, \quad f : K \to \mathbb{R} \ \text{continuous} \ \implies \ f \ \text{uniformly continuous on } K \]

Reading. On a closed, bounded set, continuity automatically upgrades itself: one \( \delta \) can be chosen to work at every point simultaneously. You never need to prove uniform continuity from scratch on a compact set — ordinary continuity is enough.

Scope. Applies to any compact \( K \subseteq \mathbb{R} \) (closed bounded intervals \( [a,b] \), finite unions of such, Cantor-type sets) and, verbatim, to continuous maps between metric spaces with compact domain. It says nothing when the domain is not compact: on \( (0,1) \), \( [0,\infty) \), or \( \mathbb{R} \), continuous functions may or may not be uniformly continuous, and each case needs its own argument. The converse direction (uniformly continuous \( \Rightarrow \) domain compact) is false.

Corollaries & converses
  • Integrability. Every continuous \( f : [a,b] \to \mathbb{R} \) is Riemann integrable: uniform continuity gives a partition-independent bound on oscillations (see Worked Example 2). This is the theorem's single most-used consequence in Year 2.
  • Uniform approximation. Every continuous \( f : [a,b] \to \mathbb{R} \) is a uniform limit of piecewise-linear functions (interpolate on a mesh finer than \( \delta \)); this is the first step toward Weierstrass approximation.
  • Restriction. If \( f \) is continuous on a compact \( K \), its restriction to any subset \( S \subseteq K \) is uniformly continuous on \( S \) — e.g. \( x \mapsto x^2 \) is uniformly continuous on every bounded set, because every bounded set sits inside some \( [-M, M] \).
  • Converse is false. Uniform continuity does not force compactness of the domain: \( f(x) = x \) is uniformly continuous on all of \( \mathbb{R} \) (take \( \delta = \varepsilon \)), and \( \mathbb{R} \) is not compact. Even "every continuous function on \( X \) is uniformly continuous" does not force \( X \) compact: on \( \mathbb{N} \) with the usual metric, every function is uniformly continuous (take \( \delta = \tfrac{1}{2} \)), yet \( \mathbb{N} \) is unbounded. Spaces with this property are the Atsuji (UC) spaces, strictly between compact and complete.
  • Partial converse that does hold. A uniformly continuous function on a bounded set \( S \subseteq \mathbb{R} \) is bounded, and maps Cauchy sequences to Cauchy sequences — two shadows of compactness that survive.
Fails without
  • Bounded but not closed (compactness dropped): \( f(x) = \dfrac{1}{x} \) on \( (0, 1] \) is continuous but not uniformly continuous. Witness: \( x_n = \tfrac{1}{n} \), \( y_n = \tfrac{1}{2n} \) give \( |x_n - y_n| = \tfrac{1}{2n} \to 0 \) but \( |f(x_n) - f(y_n)| = n \to \infty \). The proof breaks at Step 3: \( x_n \to 0 \notin (0,1] \), so the subsequential limit escapes the domain and continuity can never be applied there.
  • Bounded but not closed, with bounded image: \( f(x) = \sin\!\left(\tfrac{1}{x}\right) \) on \( (0,1) \) is continuous and bounded, yet not uniformly continuous: \( x_n = \tfrac{1}{2\pi n + \pi/2} \) and \( y_n = \tfrac{1}{2\pi n} \) satisfy \( |x_n - y_n| \to 0 \) but \( |f(x_n) - f(y_n)| = 1 \). Boundedness of \( f \) is no substitute for compactness of the domain.
  • Closed but not bounded (compactness dropped): \( f(x) = x^2 \) on \( \mathbb{R} \): with \( x_n = n \), \( y_n = n + \tfrac{1}{n} \) we get \( |x_n - y_n| \to 0 \) but \( |f(x_n) - f(y_n)| \gt 2 \). Here Step 3 fails because Bolzano–Weierstrass needs boundedness: \( (x_n) \) has no convergent subsequence at all.
  • Continuity dropped: the step function \( f = \mathbf{1}_{[1/2,\,1]} \) on the compact set \( [0,1] \) is not uniformly continuous (pairs straddling \( \tfrac{1}{2} \) at distance \( \to 0 \) have image gap \( 1 \)); uniform continuity implies continuity, so any discontinuity is fatal.
Common errors
  • Quantifier scrambling. Writing the definition as \( \forall x\, \forall \varepsilon\, \exists \delta \dots \) — that is ordinary continuity. Uniform continuity is \( \forall \varepsilon\, \exists \delta\, \forall x, y \): the \( \delta \) is chosen before the points. The entire content of the theorem lives in this quantifier swap; if your written definition lets \( \delta \) see \( x \), you have proved nothing.
  • "Bounded domain is enough." It is not: \( \sin(1/x) \) on \( (0,1) \) is continuous on a bounded domain and fails. Closedness is doing real work (it keeps the limit \( c \) in Step 3 inside the domain).
  • "Bounded function is enough." Also \( \sin(1/x) \): the image is contained in \( [-1,1] \) and uniform continuity still fails. The hypothesis is on the domain, not on the image.
  • Upgrading the conclusion to Lipschitz. The theorem gives uniform continuity, not a Lipschitz bound: \( f(x) = \sqrt{x} \) on \( [0,1] \) is uniformly continuous (by this theorem) but not Lipschitz, since \( \frac{|\sqrt{x} - \sqrt{0}|}{|x - 0|} = \frac{1}{\sqrt{x}} \to \infty \) as \( x \to 0^+ \).
  • Misnegating the definition. The negation requires two sequences \( (x_n), (y_n) \) with \( |x_n - y_n| \to 0 \) and \( |f(x_n) - f(y_n)| \) bounded away from \( 0 \). Students often produce only one sequence, or let \( \varepsilon_0 \) vary with \( n \) — both negate the wrong statement.
  • Circular use in integrability proofs. When proving continuous \( \Rightarrow \) integrable on \( [a,b] \), the uniform \( \delta \) must be produced by this theorem; asserting "continuity gives \( \delta \) independent of the point" without citing it is exactly the gap the theorem exists to fill.
Discussion

The theorem is usually credited as the Heine–Cantor theorem. Eduard Heine published the statement and a proof for \( [a,b] \) in 1872, but the idea circulates earlier: Dirichlet had used the property in his 1854 Berlin lectures on definite integrals (published only in 1904), precisely because he needed it for integrability of continuous functions, and Weierstrass's school made the continuity/uniform-continuity distinction a centrepiece of the rigorisation of analysis. The distinction itself was one of the hard-won clarifications of the nineteenth century: Cauchy's 1821 Cours d'analyse does not separate the two notions, and several of his "theorems" (notably on limits of series of continuous functions) are correct only when continuity is silently read as uniform.

Conceptually, the result belongs to a family of local-to-global principles powered by compactness: continuous on compact \( \Rightarrow \) bounded and attains bounds (extreme value theorem), locally bounded on compact \( \Rightarrow \) bounded, pointwise equicontinuous on compact \( \Rightarrow \) uniformly equicontinuous (the lemma inside Arzelà–Ascoli). In each case a pointwise choice — here \( \delta_x \) at each \( x \) — is compressed into a single global choice by extracting a finite subcover or a convergent subsequence. The finite minimum \( \min_i \delta_{x_i} \gt 0 \) in the covering proof is the exact point where infinity is tamed: an infimum of infinitely many positive \( \delta_x \) could be \( 0 \), but a minimum of finitely many cannot.

The theorem also explains when uniform continuity can be rescued off compact sets. A continuous \( f : (a,b) \to \mathbb{R} \) is uniformly continuous precisely when it extends continuously to \( [a,b] \) (Problem 4): the failure modes are exactly "blow-up or oscillation at a missing endpoint". On \( [0,\infty) \), continuity plus a horizontal asymptote suffices (Problem 3): compactness handles an initial segment \( [0, M] \), and the asymptote flattens the tail. Both arguments use the theorem on a compact core and patch in the non-compact remainder by hand — a pattern worth internalising.

In modern language the natural habitat of the statement is uniform spaces: a continuous map from a compact topological space into a uniform space is automatically uniformly continuous, and indeed a compact Hausdorff space carries a unique uniformity compatible with its topology — so on compacta the distinction between topology and uniform structure evaporates, which is the deepest reading of the theorem. The metric-space proof via the Lebesgue number lemma (every open cover of a compact metric space admits \( \lambda \gt 0 \) such that every set of diameter \( \lt \lambda \) lies inside one cover element) isolates the quantitative kernel: apply it to the cover \( \{ f^{-1}(B(f(x), \varepsilon/2)) : x \in X \} \) and take \( \delta = \lambda \). Constructively, the picture shifts: over Bishop-style constructive mathematics the classical proof's Bolzano–Weierstrass step is unavailable, and "continuous on a compact interval" is often defined to mean uniformly continuous, since the pointwise notion is too weak to develop analysis (Brouwer's fan theorem is what recovers the classical equivalence).

Common misconceptions. Uniform continuity is a property of the pair (function, domain), not of a formula: \( x^2 \) is uniformly continuous on \( [0, 10] \), on every bounded set, but not on \( \mathbb{R} \). And it is a global property with no pointwise meaning — "\( f \) is uniformly continuous at \( c \)" is not a sentence. Finally, the theorem is one-directional: plenty of non-compact domains support uniformly continuous functions, and even domains on which all continuous functions are uniformly continuous need not be compact.

Worked examples

Example 1. \( f(x) = \sqrt{x} \) is uniformly continuous on \( [0, 1] \), but not Lipschitz — so the theorem gives strictly more than differentiability arguments can.

1
\( [0,1] \) is compact.
It is bounded (contained in \( B(0,2) \)) and closed (its complement \( (-\infty, 0) \cup (1, \infty) \) is a union of open intervals, hence open); apply the Heine–Borel theorem. A
2
\( f(x) = \sqrt{x} \) is continuous at every point of \( [0,1] \).
At \( c \gt 0 \): \( |\sqrt{x} - \sqrt{c}| = \frac{|x - c|}{\sqrt{x} + \sqrt{c}} \leq \frac{|x - c|}{\sqrt{c}} \), so \( \delta = \varepsilon \sqrt{c} \) works. At \( c = 0 \): \( |\sqrt{x} - 0| \lt \varepsilon \) whenever \( 0 \leq x \lt \varepsilon^2 \), so \( \delta = \varepsilon^2 \) works. (Note how the pointwise \( \delta \)'s degenerate as \( c \to 0 \) — this is exactly what the theorem will repair.) B
3
Therefore \( f \) is uniformly continuous on \( [0,1] \).
Direct application of T-042: continuous function, compact domain. A
4
Yet \( f \) is not Lipschitz on \( [0,1] \): for any candidate constant \( L \gt 0 \), take \( x = \tfrac{1}{4L^2} \wedge 1 \) and \( y = 0 \); then \( \frac{|f(x) - f(y)|}{|x - y|} = \frac{1}{\sqrt{x}} \geq 2L \gt L . \)
The difference quotient \( \tfrac{1}{\sqrt{x}} \) is unbounded as \( x \to 0^+ \), so no single \( L \) can dominate it; Lipschitz fails while uniform continuity holds. This shows the implication "Lipschitz \( \Rightarrow \) uniformly continuous" is strict, and that T-042 applies where mean-value-theorem bounds cannot (here \( f'(x) = \tfrac{1}{2\sqrt{x}} \) is unbounded). B
\[ \sqrt{x} \ \text{is uniformly continuous on } [0,1], \ \text{though not Lipschitz there.} \]

Reading. Compactness delivers a uniform modulus of continuity even when the derivative blows up — something no bounded-derivative argument could produce.

Scope. The same two-line argument (continuity + compact domain) handles \( x^{1/3} \), \( x \log x \) extended by \( 0 \), and any other continuous formula on a closed bounded interval.

Example 2. Every continuous \( f : [a,b] \to \mathbb{R} \) is Riemann integrable. (The classical application: T-042 supplies the partition-independent oscillation bound that the Riemann criterion demands.)

1
Fix \( \varepsilon \gt 0 \). Since \( [a,b] \) is compact and \( f \) continuous, T-042 gives \( \delta \gt 0 \) with \[ \forall x, y \in [a,b] : \ |x - y| \lt \delta \implies |f(x) - f(y)| \lt \frac{\varepsilon}{b - a} . \]
Application of T-042 with tolerance \( \tfrac{\varepsilon}{b-a} \); the whole point is that this \( \delta \) does not depend on where in \( [a,b] \) we are. (We may assume \( a \lt b \); if \( a = b \) integrability is trivial.) B
2
Choose a partition \( P : a = t_0 \lt t_1 \lt \dots \lt t_n = b \) with mesh \( \max_i (t_i - t_{i-1}) \lt \delta \). On each subinterval \( [t_{i-1}, t_i] \), write \[ M_i = \sup_{[t_{i-1}, t_i]} f, \qquad m_i = \inf_{[t_{i-1}, t_i]} f . \]
Such a partition exists: take \( n \gt \tfrac{b-a}{\delta} \) equal subintervals. \( M_i, m_i \) exist as finite reals because \( f \) is continuous on the compact \( [t_{i-1}, t_i] \), hence bounded there (extreme value theorem — itself a sibling compactness result, cited not reproved). A
3
For each \( i \): \( M_i - m_i \leq \dfrac{\varepsilon}{b - a} \).
By the extreme value theorem \( f \) attains \( M_i \) and \( m_i \) at points \( u_i, v_i \in [t_{i-1}, t_i] \); then \( |u_i - v_i| \leq t_i - t_{i-1} \lt \delta \), so Step 1 gives \( M_i - m_i = |f(u_i) - f(v_i)| \lt \tfrac{\varepsilon}{b-a} \). (Without attainment one argues with suprema: for any \( \eta \gt 0 \) pick points within \( \eta \) of \( M_i \) and \( m_i \); the bound \( M_i - m_i \leq \tfrac{\varepsilon}{b-a} \) follows on letting \( \eta \to 0 \). Either route is rigorous; the attainment route is cleaner.) C
4
\[ U(f, P) - L(f, P) = \sum_{i=1}^{n} (M_i - m_i)(t_i - t_{i-1}) \leq \frac{\varepsilon}{b - a} \sum_{i=1}^{n} (t_i - t_{i-1}) = \frac{\varepsilon}{b-a}\,(b - a) = \varepsilon . \]
Definition of upper and lower Darboux sums; the oscillation bound from Step 3 factors out of the sum, and the subinterval lengths telescope to \( b - a \). A
5
Since \( \varepsilon \gt 0 \) was arbitrary, \( f \) satisfies the Riemann (Cauchy) criterion for integrability on \( [a,b] \).
Riemann's criterion: \( f \) bounded on \( [a,b] \) is integrable iff for every \( \varepsilon \gt 0 \) there is a partition \( P \) with \( U(f,P) - L(f,P) \lt \varepsilon \) (proved in the integration chapter of MU-201; we have exhibited such a \( P \) for every \( \varepsilon \), using \( 2\varepsilon \) if strictness is wanted). B
\[ f \in C([a,b]) \implies f \ \text{is Riemann integrable on } [a,b] \]

Reading. Continuity alone cannot control all subintervals of a partition at once; uniform continuity, bought by compactness of \( [a,b] \), controls them all with a single \( \delta \) — and the Riemann criterion follows in one line of telescoping.

Scope. Exactly the closed bounded interval. On \( (0,1] \), continuity does not imply Riemann integrability (e.g. \( 1/x \) is unbounded), which is precisely the compactness hypothesis failing.

Problems
  1. (Routine.) Show that \( f(x) = \dfrac{1}{1 + x^2} \) is uniformly continuous on \( [-10, 10] \). Then decide, with proof or counterexample, whether it is uniformly continuous on all of \( \mathbb{R} \).
    Solution On \( [-10,10] \): the set is closed and bounded, hence compact by Heine–Borel. \( f \) is continuous there ( quotient of continuous functions with denominator \( 1 + x^2 \geq 1 \gt 0 \) never vanishing), so T-042 applies directly: \( f \) is uniformly continuous on \( [-10, 10] \). On \( \mathbb{R} \): the theorem is silent (domain not compact), but \( f \) is nonetheless uniformly continuous, via a Lipschitz bound. For all \( x, y \in \mathbb{R} \), \[ |f(x) - f(y)| = \frac{|y^2 - x^2|}{(1+x^2)(1+y^2)} = \frac{|x + y|\,|x - y|}{(1+x^2)(1+y^2)} \leq \left( \frac{|x|}{1+x^2} + \frac{|y|}{1+y^2} \right) |x - y| \leq \left( \tfrac{1}{2} + \tfrac{1}{2} \right) |x - y| = |x - y|, \] using \( \frac{|t|}{1+t^2} \leq \frac{1}{2} \) for all real \( t \) (equivalent to \( (|t| - 1)^2 \geq 0 \)). So \( f \) is \( 1 \)-Lipschitz on \( \mathbb{R} \); given \( \varepsilon \gt 0 \) take \( \delta = \varepsilon \). Moral: off compact sets uniform continuity may still hold, but you must prove it by hand.
  2. (Routine, negation practice.) Prove directly from the definition that \( f(x) = \dfrac{1}{x} \) is not uniformly continuous on \( (0, 1) \). Explain in one sentence why this does not contradict T-042.
    Solution Take \( \varepsilon_0 = 1 \). We must show: for every \( \delta \gt 0 \) there exist \( x, y \in (0,1) \) with \( |x - y| \lt \delta \) and \( |f(x) - f(y)| \geq 1 \). Given \( \delta \gt 0 \), choose \( n \in \mathbb{N} \) with \( n \gt \max\!\left( 2, \tfrac{1}{\delta} \right) \), and set \( x = \tfrac{1}{n} \), \( y = \tfrac{1}{2n} \). Both lie in \( (0,1) \), and \[ |x - y| = \frac{1}{2n} \lt \frac{1}{n} \lt \delta, \qquad |f(x) - f(y)| = |n - 2n| = n \gt 1 . \] So the definition of uniform continuity fails with \( \varepsilon_0 = 1 \). No contradiction with T-042: \( (0,1) \) is not compact — it is bounded but not closed (the limit point \( 0 \) is missing), so the theorem's hypothesis fails and it asserts nothing here.
  3. (Moderate, compact core + tail.) Let \( f : [0, \infty) \to \mathbb{R} \) be continuous and suppose \( \lim_{x \to \infty} f(x) = L \in \mathbb{R} \). Prove \( f \) is uniformly continuous on \( [0, \infty) \).
    Solution Let \( \varepsilon \gt 0 \). Since \( f(x) \to L \), there is \( M \gt 0 \) such that \( |f(x) - L| \lt \tfrac{\varepsilon}{4} \) for all \( x \geq M \). Consequently, for all \( x, y \geq M \), \[ |f(x) - f(y)| \leq |f(x) - L| + |L - f(y)| \lt \tfrac{\varepsilon}{2} . \tag{i} \] The interval \( [0, M+1] \) is compact and \( f \) is continuous on it, so by T-042 there is \( \delta_1 \gt 0 \) such that \[ x, y \in [0, M+1], \ |x - y| \lt \delta_1 \implies |f(x) - f(y)| \lt \tfrac{\varepsilon}{2} . \tag{ii} \] Set \( \delta = \min(\delta_1, 1) \gt 0 \), and take any \( x, y \geq 0 \) with \( |x - y| \lt \delta \); say \( x \leq y \). Two cases exhaust all possibilities. If \( x \leq M \), then \( y \lt x + \delta \leq M + 1 \), so both points lie in \( [0, M+1] \) and (ii) gives \( |f(x) - f(y)| \lt \tfrac{\varepsilon}{2} \lt \varepsilon \). If \( x \gt M \), then also \( y \gt M \), and (i) gives \( |f(x) - f(y)| \lt \tfrac{\varepsilon}{2} \lt \varepsilon \). Either way \( |f(x) - f(y)| \lt \varepsilon \), so \( f \) is uniformly continuous on \( [0, \infty) \). (The overlap margin \( +1 \) and the cap \( \delta \leq 1 \) are what let the two regimes be glued without a gap.)
  4. (Harder, extension characterisation.) Let \( f : (a, b) \to \mathbb{R} \) be continuous. Prove that \( f \) is uniformly continuous on \( (a,b) \) if and only if \( f \) extends to a continuous function \( \tilde{f} : [a, b] \to \mathbb{R} \).
    Solution (\( \Leftarrow \)) If a continuous extension \( \tilde{f} : [a,b] \to \mathbb{R} \) exists, then \( \tilde{f} \) is uniformly continuous on the compact \( [a,b] \) by T-042, and the restriction of a uniformly continuous function to a subset is uniformly continuous (the same \( \delta \) works); so \( f = \tilde{f}\restriction_{(a,b)} \) is uniformly continuous. (\( \Rightarrow \)) Suppose \( f \) is uniformly continuous on \( (a,b) \). It suffices to show \( \lim_{x \to a^+} f(x) \) exists (the endpoint \( b \) is symmetric); then defining \( \tilde{f}(a), \tilde{f}(b) \) as these limits and \( \tilde{f} = f \) on \( (a,b) \) gives a function continuous at every interior point (locally equal to \( f \)) and at the endpoints (by construction of the limits). Claim: \( f \) maps Cauchy sequences to Cauchy sequences. Indeed, given \( \varepsilon \gt 0 \), uniform continuity yields \( \delta \gt 0 \) with \( |f(u) - f(v)| \lt \varepsilon \) whenever \( |u - v| \lt \delta \); if \( (z_n) \subseteq (a,b) \) is Cauchy, choose \( N \) with \( |z_n - z_m| \lt \delta \) for \( n, m \geq N \); then \( |f(z_n) - f(z_m)| \lt \varepsilon \) for \( n, m \geq N \). Now let \( (x_n) \subseteq (a,b) \) be any sequence with \( x_n \to a \). It is Cauchy (convergent sequences are Cauchy), so \( (f(x_n)) \) is Cauchy, hence converges to some \( \ell \in \mathbb{R} \) by completeness of \( \mathbb{R} \). The limit is independent of the sequence: if also \( y_n \to a \), interleave \( x_1, y_1, x_2, y_2, \dots \) — the interleaved sequence still tends to \( a \), so its image converges, and a convergent sequence has all subsequences sharing one limit, forcing \( \lim f(x_n) = \lim f(y_n) \). By the sequential characterisation of one-sided limits, \( \lim_{x \to a^+} f(x) = \ell \) exists. This completes the proof. (Note where each hypothesis worked: uniform continuity for the Cauchy-image claim, completeness of \( \mathbb{R} \) for convergence — and observe that \( 1/x \) and \( \sin(1/x) \) on \( (0,1) \) fail to extend, consistently with their failure of uniform continuity.)
  5. (Hard, metric version via covers.) Let \( (X, d_X) \) be a compact metric space, \( (Y, d_Y) \) a metric space, and \( f : X \to Y \) continuous. You may use the Lebesgue number lemma: for every open cover \( \mathcal{U} \) of a compact metric space \( X \) there exists \( \lambda \gt 0 \) such that every subset of \( X \) of diameter less than \( \lambda \) is contained in a single member of \( \mathcal{U} \). Prove that \( f \) is uniformly continuous.
    Solution Let \( \varepsilon \gt 0 \). For each \( p \in X \), continuity of \( f \) at \( p \) gives \( r_p \gt 0 \) such that \[ d_X(x, p) \lt r_p \implies d_Y\!\left( f(x), f(p) \right) \lt \tfrac{\varepsilon}{2} . \] The open balls \( U_p = B_X(p, r_p) \), \( p \in X \), form an open cover of \( X \) (each \( p \in U_p \)). By the Lebesgue number lemma there is \( \lambda \gt 0 \) such that every subset of \( X \) with diameter less than \( \lambda \) lies inside some single \( U_p \). Set \( \delta = \lambda \). Now take any \( x, y \in X \) with \( d_X(x, y) \lt \delta \). The two-point set \( \{x, y\} \) has diameter \( d_X(x,y) \lt \lambda \), so there exists \( p \in X \) with \( \{x, y\} \subseteq U_p \), i.e. \( d_X(x, p) \lt r_p \) and \( d_X(y, p) \lt r_p \). The defining property of \( r_p \) applies to both points: \[ d_Y\!\left( f(x), f(y) \right) \leq d_Y\!\left( f(x), f(p) \right) + d_Y\!\left( f(p), f(y) \right) \lt \tfrac{\varepsilon}{2} + \tfrac{\varepsilon}{2} = \varepsilon , \] using the triangle inequality in \( Y \). Since \( \varepsilon \) was arbitrary and \( \delta \) depends only on \( \varepsilon \) (through the cover and its Lebesgue number), \( f \) is uniformly continuous on \( X \). \( \blacksquare \) Remark: compare with the sequential proof of T-042 — here compactness is spent inside the Lebesgue number lemma rather than in Bolzano–Weierstrass, and the argument transfers to any compact topological space once "diameter" is replaced by the machinery of uniform structures.