Problem 203
Medium Limits and Functions

If a function f(z) is continuous on a closed and bounded…

If a function $f(z)$ is continuous on a closed and bounded (compact) region, then it is uniformly continuous there. Prove this.

Explanation of Method

Argue by contradiction: if uniform continuity fails, build two sequences that get arbitrarily close together yet whose images stay $\varepsilon_0$ apart. Compactness lets us extract a convergent subsequence, and ordinary continuity at its limit then forces the images together — a contradiction.

Setup

Let $D\subset\mathbb C$ be compact (closed and bounded — equivalent to compact in $\mathbb C$ by Heine–Borel), and let $f:D\to\mathbb C$ be continuous at every point of $D$. Recall: continuity at $z_0$ allows $\delta=\delta(\varepsilon,z_0)$ to depend on the point; uniform continuity demands a single $\delta=\delta(\varepsilon)$ that works for every pair of points in $D$ simultaneously.

Step 1 · Assume the contrary

Suppose $f$ is not uniformly continuous on $D$. Then there is some $\varepsilon_0>0$ such that for every $\delta>0$ there exist points violating the uniform bound. Taking $\delta=1/n$ for each $n\in\mathbb N$ produces $z_n,w_n\in D$ with $$ |z_n-w_n|<\frac1n\qquad\text{but}\qquad |f(z_n)-f(w_n)|\ge\varepsilon_0 $$

Step 2 · Extract a convergent subsequence

Since $D$ is compact, the sequence $(z_n)\subset D$ has (by Bolzano–Weierstrass) a subsequence $(z_{n_k})$ converging to some $z_0\in D$ (closedness of $D$ keeps the limit inside $D$).

Step 3 · The companion sequence converges to the same point

$$ |w_{n_k}-z_0|\le|w_{n_k}-z_{n_k}|+|z_{n_k}-z_0|<\frac1{n_k}+|z_{n_k}-z_0|\xrightarrow[k\to\infty]{}0 $$ so $w_{n_k}\to z_0$ as well.

Step 4 · Apply ordinary continuity at $z_0$

Since $f$ is continuous at $z_0$, both $f(z_{n_k})\to f(z_0)$ and $f(w_{n_k})\to f(z_0)$, hence $$ |f(z_{n_k})-f(w_{n_k})|\to|f(z_0)-f(z_0)|=0 $$

Step 5 · Contradiction

This contradicts $|f(z_{n_k})-f(w_{n_k})|\ge\varepsilon_0>0$ for every $k$ (a fixed positive lower bound cannot tend to $0$). Hence the assumption in Step 1 is false, and $f$ is uniformly continuous on $D$.

Alternative · finite subcover argument

For each $z\in D$, continuity gives $\delta_z>0$ with $|w-z|<\delta_z\Rightarrow|f(w)-f(z)|<\varepsilon/2$. The balls $\{B(z,\delta_z/2)\}_{z\in D}$ cover $D$; by compactness finitely many suffice, say centered at $z_1,\ldots,z_m$. Set $\delta=\min_i\delta_{z_i}/2>0$. For $z,w\in D$ with $|z-w|<\delta$, $z$ lies in some $B(z_i,\delta_{z_i}/2)$, and then both $z,w$ lie within $\delta_{z_i}$ of $z_i$, giving $$ |f(z)-f(w)|\le|f(z)-f(z_i)|+|f(z_i)-f(w)|<\frac\varepsilon2+\frac\varepsilon2=\varepsilon $$ This single $\delta$ works for every pair in $D$.

Result

$$ f\text{ continuous on compact }D\ \Longrightarrow\ f\text{ uniformly continuous on }D $$

Compactness is exactly what upgrades "a $\delta$ for each point" into "one $\delta$ for all points": either by extracting a convergent subsequence (Step 2) or by shrinking an open cover to a finite one (the alternative proof) — both are the same compactness idea in different clothing.