The extreme value theorem and the intermediate value theorem show that a continuous function on an interval has strong global consequences. There is another global strengthening of continuity that will be useful later: a single choice of \(\delta\) can control the oscillation of the function at every point of the domain at once. This is the idea of uniform continuity.
Let \(S \subseteq \R\) and let \(f \colon S \to \R\text{.}\) We say that \(f\) is uniformly continuous on \(S\) if for every \(\varepsilon \gt 0\) there exists \(\delta \gt 0\) such that
The crucial difference from ordinary continuity is that \(\delta\) depends only on \(\varepsilon\text{,}\) not on a base point \(c \in S\text{.}\) Thus one estimate works simultaneously for all points of the domain.
Fix \(c \in S\) and let \(\varepsilon \gt 0\text{.}\) Choose \(\delta \gt 0\) from uniform continuity. If \(x \in S\) and \(|x-c| \lt \delta\text{,}\) then applying the definition with \(s=x\) and \(t=c\) gives \(|f(x)-f(c)| \lt \varepsilon\text{.}\) Therefore \(f\) is continuous at \(c\text{.}\)
The function \(f(x)=1/x\) on \((0,1)\) is continuous but not uniformly continuous. To see this, take \(\varepsilon = 1\text{.}\) Suppose there were some \(\delta \gt 0\) such that \(|1/s-1/t| \lt 1\) whenever \(s,t \in (0,1)\) and \(|s-t| \lt \delta\text{.}\) Choose \(n \in \N\) so large that \(1/(n(n+1)) \lt \delta\text{,}\) and let
Let \(f \colon [a,b] \to \R\) be continuous. Suppose that \(f\) is not uniformly continuous. Then there exists \(\varepsilon_0 \gt 0\) such that for every \(n \in \N\) we can find \(x_n,x'_n \in [a,b]\) with
The sequence \((x_n)\) lies in the bounded interval \([a,b]\text{,}\) so by the Bolzano-Weierstrass Theorem it has a convergent subsequence \((x_{n_k})\text{.}\) Let \(x_{n_k} \to
c\text{.}\) Since \([a,b]\) contains all its cluster points Proposition 4.4.1, \(c \in
[a,b]\text{.}\)
As a subsequence of the null sequence \((x_n - x_n')\text{,}\)\((x'_{n_k}-x_{n_k})\) is also null. Thus, \(x'_{n_k}\) converges to \(c\) as well. Since \(f\) is continuous at \(c\text{,}\)Proposition 4.3.1 gives
Therefore, \(f(x_{n_k})-f(x'_{n_k}) \to 0\) is null which contradicts \(|f(x_{n_k})-f(x'_{n_k})| \ge \varepsilon_0\) for every \(k\text{.}\) This contradiction shows that \(f\) is uniformly continuous.
Subsection4.5.3Cauchy Sequences and Extension to Endpoints
Uniform continuity is closely tied to the material from the chapter on sequences. Ordinary continuity carries convergent sequences to convergent sequences (Proposition 4.3.1). Uniform continuity does something stronger: it preserves the Cauchy property itself.
If \(f \colon S \to \R\) is uniformly continuous on \(S\) and \((x_n)\) is a Cauchy sequence in \(S\text{,}\) then \((f(x_n))\) is a Cauchy sequence in \(\R\text{.}\)
Let \(\varepsilon \gt 0\text{.}\) Choose \(\delta \gt 0\) from the definition of uniform continuity. Since \((x_n)\) is Cauchy, there exists \(N \in \N\) such that \(|x_n-x_m| \lt \delta\) whenever \(m,n \ge N\text{.}\) Therefore, for \(m,n \ge N\text{,}\)
Let \(f \colon (a,b) \to \R\text{.}\) Then \(f\) is uniformly continuous on \((a,b)\) if and only if \(f\) extends to a continuous function on \([a,b]\text{.}\)
First suppose that \(f\) extends to a continuous function \(\widetilde{f} \colon [a,b] \to \R\text{.}\) By Theorem 4.5.3, \(\widetilde{f}\) is uniformly continuous on \([a,b]\text{.}\) Its restriction to \((a,b)\) is therefore uniformly continuous as well, so \(f\) is uniformly continuous on \((a,b)\text{.}\)
Conversely, suppose that \(f\) is uniformly continuous on \((a,b)\text{.}\) Let \((x_n)\) be any sequence in \((a,b)\) with \(x_n \to a\text{.}\) By Proposition 2.4.3, \((x_n)\) is Cauchy, so Proposition 4.5.4 shows that \((f(x_n))\) is Cauchy. By Theorem 2.4.5, \((f(x_n))\) converges.
This limit is independent of the sequence approaching \(a\text{.}\) To see this, let \((x_n)\) and \((x'_n)\) be sequences in \((a,b)\) with \(x_n \to a\) and \(x'_n \to a\text{,}\) and define a new sequence \((z_n)\) by
Then \(z_n \to a\text{,}\) so the argument above shows that \((f(z_n))\) converges. Since \((f(x_n))\) and \((f(x'_n))\) are subsequences of the convergent sequence \((f(z_n))\text{,}\)Proposition 2.1.10 implies that they converge to the same limit. Denote this common limit by \(L_a\text{.}\) In the same way, there is a uniquely determined real number \(L_b\) such that \(f(x_n) \to L_b\) whenever \(x_n \to b\) with \(x_n \in (a,b)\text{.}\)
It remains to prove continuity at the endpoints. We do this at \(a\text{;}\) the proof at \(b\) is identical. Let \((u_n)\) be a sequence in \([a,b]\) with \(u_n \to a\text{.}\) If all but finitely many terms satisfy \(u_n=a\text{,}\) then clearly \(\widetilde{f}(u_n) \to L_a=\widetilde{f}(a)\text{.}\) Otherwise, the subsequence consisting of those terms with \(u_n \gt a\) still converges to \(a\text{.}\) By the definition of \(L_a\text{,}\) the image of that subsequence under \(\widetilde{f}\) converges to \(L_a\text{,}\) while every term with \(u_n=a\) is mapped exactly to \(L_a\text{.}\) Hence the whole sequence \((\widetilde{f}(u_n))\) converges to \(L_a\text{.}\) By the sequential characterization of continuity, \(\widetilde{f}\) is continuous at \(a\text{.}\)
Suppose \(|f(x)-f(x')| \le K|x-x'|\) for all \(x,x' \in S\text{.}\) Given \(\varepsilon \gt 0\text{,}\) choose \(\delta = \varepsilon/K\text{.}\) Then whenever \(x,x' \in S\) satisfy \(|x-x'| \lt \delta\text{,}\) we have
Let \(I_1\) and \(I_2\) be intervals with \(I_1 \cap I_2 \neq \emptyset\text{.}\) If \(f \colon I_1 \cup I_2 \to \R\) is uniformly continuous on both \(I_1\) and \(I_2\text{,}\) then \(f\) is uniformly continuous on \(I_1 \cup I_2\text{.}\)
Take \(x,x' \in I_1 \cup I_2\) with \(|x-x'| \lt \delta\text{.}\) If both points lie in the same interval, then \(|f(x)-f(x')| \lt \varepsilon/2 \lt \varepsilon\text{.}\) So assume that \(x \in I_1 \setminus I_2\) and \(x' \in I_2 \setminus I_1\text{.}\) Choose \(c \in I_1 \cap I_2\text{.}\)
The point \(c\) must lie between \(x\) and \(x'\text{.}\) For if, say, \(x\) lay between \(c\) and \(x'\text{,}\) then since \(c,x' \in I_2\) and \(I_2\) is an interval, we would also have \(x \in I_2\text{,}\) a contradiction. Thus
The function \(f(x)=\sqrt{x}\) is uniformly continuous on \([0,\infty)\text{.}\) By Theorem 4.5.3, the function is uniformly continuous on \([0,1]\text{.}\) By Example 4.5.7, it is uniformly continuous on \([1,\infty)\text{.}\) Since these intervals overlap, Proposition 4.5.8 implies that \(\sqrt{x}\) is uniformly continuous on their union \([0,\infty)\text{.}\)