← Back to MATH 4630

Compact Sets and Uniform Continuity

Warm-up

Warm-up:

Consider the function $f(x) = \frac{1}{x}.$ We will study its behavior on three different domains. The function itself does not change. Only the domain does.

x f 0 1 A₁ = (0,1) x f 1 1 A₂ = [1,∞) x f ½ 3 2 A₃ = [½,3]
(a) Is $f(x) = 1/x$ continuous on the given domain?

(b) What is the range $f(A_i)$ in each case? Is the range open, closed, bounded, compact?
Domain Range $f(A_i)$ Open? Closed? Bounded? Compact?
$A_1 = (0,1)$
$A_2 = [1,\infty)$
$A_3 = [\frac{1}{2},3]$
(c) On which domain(s) does $f$ attain a maximum value? A minimum value?

(d) Recall the $\varepsilon$–$\delta$ definition of continuity. For a fixed $\varepsilon = \frac{1}{2}$, can you find a single $\delta > 0$ that works simultaneously for every point in $A_1$? What about in $A_3$? What is going wrong near $x = 0$ in $A_1$?

(e) What property does $A_3$ have that $A_1$ and $A_2$ lack? State it precisely using vocabulary from Chapter 3.

The pattern. The answers to (b)–(d) are perfect on $A_3$ and fail on $A_1$ and $A_2$ — and the only structural difference is . This is not a coincidence. The rest of this handout explains exactly why forces these good behaviors, and proves it rigorously.

Preservation of Compact Sets

Theorem

Let $f: A \to \mathbb{R}$ be continuous on $A$. If $K \subseteq A$ is compact, then $f(K)$ is compact as well.

Proof. Let $K \subseteq A$ be a compact set and $(y_n)$ be an arbitrary sequence in $f(K)$.

Use compactness of $K$ and continuity of $f$ to show that the sequence $(y_n)$ has a convergent subsequence $(y_{n_k})$ converges to a limit in $f(K).$

The Extreme Value Theorem

Theorem (Extreme Value Theorem)

If $f: K \to \mathbb{R}$ is continuous on a compact set $K \subseteq \mathbb{R}$, then $f$ attains both a maximum and minimum value. That is, there exist $x_0, x_1 \in K$ such that $f(x_0) \leq f(x) \leq f(x_1)$ for all $x \in K$.

Why each hypothesis is necessary:

Condition dropped Example What fails
$f$ not continuous
$K$ not closed
$K$ not bounded
Example 1. Let $f(x) = \cos(x)$ defined on $K = [0, \pi]$. Without computing, explain why $f$ attains both a maximum and minimum, and identify what they are.

Uniform Continuity

Recall the definition of ordinary continuity: $f$ is continuous at $c$ if, given $\varepsilon > 0$, there exists $\delta > 0$ (possibly depending on $c$) such that $|x - c| < \delta$ implies $|f(x) - f(c)| < \varepsilon$.

The subtlety is the phrase "possibly depending on $c$." Uniform continuity removes this dependence entirely.

Definition (Uniform Continuity)

A function $f: A \to \mathbb{R}$ is uniformly continuous on $A$ if for every $\varepsilon > 0$ there exists a $\delta > 0$ such that for all $x, y \in A$: $|x - y| < \delta \implies |f(x) - f(y)| < \varepsilon.$

Comparison. In standard continuity, the quantifier order is: $\forall \varepsilon > 0, \forall c \in A, \exists \delta > 0$ (may depend on $\varepsilon$ and $c$): $|x-c|<\delta \Rightarrow |f(x)-f(c)|<\varepsilon.$ In uniform continuity, the quantifier order is: $\forall \varepsilon > 0, \exists \delta > 0$ (depends on $\varepsilon$ only): $\forall x, y \in A, |x-y|<\delta \Rightarrow |f(x)-f(y)|<\varepsilon.$ The $\delta$ must work simultaneously for all pairs $x, y$ in $A$.
x f(x) c₁ c₂ c₃ ε ε ε
Example 2. Prove that the function $f(x)=2x+3$ is uniformly continuous on $\mathbb{R}$.

Scratch work:

Formal proof:

Example 3. Prove that the function $f(x)=x^2$ is uniformly continuous on $[0,1]$.

Scratch work:

Formal proof:

Failure of Uniform Continuity

Theorem

A function $f: A \to \mathbb{R}$ fails to be uniformly continuous on $A$ if and only if there exists $\varepsilon_0 > 0$ and sequences $(x_n)$, $(y_n)$ in $A$ satisfying $|x_n - y_n| \to 0$ but $|f(x_n) - f(y_n)| \geq \varepsilon_0.$

Proof sketch. Assume $f:A \to \mathbb{R}$ is not uniformly continuous on $A$.

Write the negation of the definition of uniform continuity.

Using the negation above, construct two sequences $(x_n)$ and $(y_n)$ in $A$ such that $|x_n - y_n| \to 0$ and $|f(x_n) - f(y_n)| \geq \varepsilon_0$.

Example 4. Show that $f(x) = x^3$ is not uniformly continuous on $\mathbb{R}$.

Strategy: Find sequences $(x_n)$ and $(y_n)$ in $\mathbb{R}$ with $|x_n - y_n| \to 0$ but $|f(x_n) - f(y_n)| \not\to 0$.

Expand and estimate $\left(n + \frac{1}{n^2}\right)^3$ to show $|f(x_n) - f(y_n)| \to 3$ (you may use $(a+b)^3 = a^3 + 3a^2b + 3ab^2 + b^3$).

Conclude: $f(x) = x^3$ is not uniformly continuous on $\mathbb{R}$.

Example 5. Show that $h(x) = \frac{1}{x}$ is not uniformly continuous on $(0,1)$.

Strategy: The problem is near $x = 0$ where $1/x$ blows up. Let $x_n = $ and $y_n = $

(a) Verify that $|x_n - y_n| \to 0$.

(b) Compute $|h(x_n) - h(y_n)|$ and show it does not go to $0$.

(c) Conclude $h$ is not uniformly continuous on $(0,1)$.

Uniform Continuity on Compact Sets

The previous examples show that uniform continuity can fail on unbounded domains and on non-closed bounded domains. The next theorem closes the door: neither failure is possible when the domain is compact.

Theorem

If $f: K \to \mathbb{R}$ is continuous on a compact set $K \subseteq \mathbb{R}$, then $f$ is uniformly continuous on $K$.

Proof. We argue by contradiction. Suppose $f$ is continuous on $K$ but not uniformly continuous. By the previous theorem, there exist $\varepsilon_0 > 0$ and sequences $(x_n), (y_n) \subseteq K$ with $|x_n - y_n| \to 0$ but $|f(x_n) - f(y_n)| \geq \varepsilon_0$.

Use compactness of $K$ to extract a convergent subsequence $(x_{n_k})$ of $(x_n)$.

Now consider the corresponding subsequence $(y_{n_k})$ and show that $(y_{n_k})$ converges to the same limit as $(x_{n_k})$ does.

Use the continuity of $f$ to show that $|f(x_{n_k})-f(y_{n_k})| \to 0$.

But this contradicts $|f(x_n) - f(y_n)| \geq \varepsilon_0$ for all $n$. $\square$

Summary

Uniformly continuous on K Continuous on K Continuous at c implies implies K compact

Activity

Problem 1. Prove using the definition that $f(x) = x^3$ is uniformly continuous on $[-2, 2]$.
Problem 2. Is $f(x) = \frac{1}{x}$ uniformly continuous on $\left[\frac{1}{4}, 4\right]$?
Problem 3. True/False (justify each):

(a) If $f$ is uniformly continuous on $(0,1)$ and $(x_n)$ is a Cauchy sequence in $(0,1)$, then $(f(x_n))$ is also a Cauchy sequence.

(b) If $f$ is continuous on $[0,\infty)$, then $f$ is uniformly continuous on $[0,\infty)$.