$\newcommand{\ds}{\displaystyle}$ $\newcommand{\Rr}{\mathbb{R}}$ $\DeclareMathOperator{\dom}{dom}$
Uniform Continuity¶
Read Section 3.4
A function $f$ is uniformly continuous on $S \subseteq \dom f$ if for any $\varepsilon > 0$, there exists $\delta >0$ such that $|f(s)-f(t)| < \varepsilon$ whenever $s,t \in S$ with $|s-t| < \delta$.
Note that $\delta$ appear above depends only on $\varepsilon$ and not on the the points $s$ and $t$ (hence the adjective "uniform").
From the definition, it is clear that if $f$ is uniformly continuous on $S$ then $f$ is continuous at every $s \in S$.
However, the reverse implication is not true.
Example. (3.4.3) The function $f \colon (0,1) \to \Rr$, defined by $f(x) = 1/x$ is not uniformly continuous.
By Lemma (3.4.5) (see below), it sufficies to demonstrate a Cauchy sequence in $(0,1)$ whose image under $f$ is not Cauchy. For that we can simply take $x_n = 1/n$, then $(f(x_n) = n)$ is not bounded and hence cannot be Cauchy.
The key result is
Theorem (3.4.4)
A function continuous on a closed bounded interval $I$ is uniformly continuous on $I$.
Proof. Suppose $f \colon [a,b] \to \Rr$ is continuous but not uniformly continuous. Then there exists some $\varepsilon_0 > 0$ such that for any $n \in \mathbb{N}$, there exist $x_n,x_n' \in [a,b]$ with $|x_n-x_n'| < 1/n$ but $|f(x_n) -f(x_n')| \ge \varepsilon_0$.
Since $(x_n)$ is bounded, Bolzano-Weierstrass theorem guarantees a convergent subsequence $(x_{n_k})$ of $(x_n)$. Since $[a,b]$ is closed, the limit of $(x_{n_k})$, say $c$ is in $[a,b]$. Since $x_{n_k}-x_{n_k}' \to 0$, so $(x_{n_k}')$ converges to $c$ as well. By continuity, both $f(x_{n_k}) \to f(c)$ and $f(x'_{n_k}) \to f(c)$, contradicting $|f(x_{n_k}) - f(x'_{n_k})| \ge \varepsilon_0$.
Continuous Extension¶
Lemma (3.4.5) A function uniformly continuous on $S$ maps a Cauchy sequence in $S$ to a Cauchy sequence.
Proof. Suppose $f$ is uniformly continuous on $S$. Let $(x_n)$ be a Cauchy sequence in $S$. For any $\varepsilon > 0$, there exists $\delta > 0$ such that
$$|f(x)-f(x')| < \varepsilon \ \text{whenever}\ x,x' \in S\ \text{with}\ |x-x'| < \delta. (*)$$
For this $\delta > 0$, since $(x_n)$ is Cauchy, there exists $N$ such that $|x_m-x_k| < \delta$ whenever $m,k \ge N$. So by $(*) |f(x_m)-f(x_k)| < \varepsilon$ whenever $m,k \ge N$. This shows that $(f(x_n))$ is Cauchy.
Proposition (3.4.6) A function $f \colon (a,b) \to \Rr$ is uniformly continuous if and only if $f$ can be extended to a continuous on $[a,b]$.
Proof. If $\tilde{f}$ is a continuous extension of $f$ on $[a,b]$, then $\tilde{f}$ is uniformly continuous on $[a,b]$ by Theorem 3.4.4 and so $f$, the restriction of $\tilde{f}$ to $(a,b)$ is uniformly continuous.
Conversely, suppose $f$ is uniformly continuous on $(a,b)$. First, by Lemma 3.4.5, if $(x_n)$ is a sequence of points in $(a,b)$ that is convergent (hence Cauchy) to $a$, then the sequence $(f(x_n))$ is (Cauchy and hence) convergent as well. Next, suppose $(x_n)$ and $(x_n')$ are two sequences in $(a,b)$ that converge to $a$, then their images under $f$ converge to the same number. We can see this by interlacing $(x_n)$ and $(x_n')$, i.e. consider the sequence $(x''_{n})$ where $x''_{2n-1} = x_n$ and $x''_{2n} = x'_n$. It is easy to show that the sequence $(x''_n)$ coverges to $a$ as well. But then $(f(x_n))$ and $(f(x'_n))$ as subsequences of $(f(x_n''))$ must converge to the same number $L_a$, namely the limit of $(f(x_n''))$.
Likewise, we can argue that $(f(x_n))$ and $(f(x_n'))$ converge to the same limit, say $L_b$ for any two sequences $(x_n)$ and $(x_n')$ in $(a,b)$ that converge to $b$.
It follows from Proposition 1.(3.2.2), that the function
$$ \tilde{f}(x) = \begin{cases} L_a & x = a \\ f(x) & a \lt x \le b \\ L_b & x=b \end{cases} $$ is a continuous extension of $f$ to $[a,b]$.
Lipschitz continuous functions¶
A function $f$ defines on $S$ is Lipschitz continuous on $S$, if there exists $K > 0$ such that for all $x,x' \in S$,
$$ |f(x)-f(x')| \le K|x-x'|. $$
Proposition (3.4.8) Lipschitz continuity implies uniform continuity.
Proof. Suppose $f$ is Lipschitz continuous on $S$. Then there exists some $K > 0$ such that for any $x,x' \in S$,
$$ |f(x) - f(x')| \le K|x-x'|. \tag{*}$$
To see that $f$ is uniformly continuous on $S$, take any $\varepsilon \gt 0$, choose $\delta$ to be $\varepsilon/K$. Note that $\delta > 0$ since both $\varepsilon$ and $K$ are. Then for any $x, x' \in S$ with $|x-x'| < \delta$, it follows from ($*$) that
$$ |f(x)-f(x')| \le K|x-x'| < K\delta = K \frac{\varepsilon}{K} = \varepsilon.$$
That means $f$ is uniformly continuous on $S$.
Example (3.4.10) The function $f \colon [1,\infty) \to \Rr$ defined by $f(x) = \sqrt{x}$ is Lipschitz continuous.
This is because for any $x,x' \in [1, \infty)$,
$$ |x-x'| = \left|\sqrt{x} +\sqrt{x'}\right|\left|\sqrt{x}-\sqrt{x'}\right| \ge 2\left|\sqrt{x}-\sqrt{x'}\right|$$
That is $$ |f(x)-f(x')| = \left|\sqrt{x}-\sqrt{x'}\right| \le \frac{1}{2}|x-x'|.$$
Proposition. Suppose $f$ is uniformly continuous intervals $I_1$ and $I_2$ and that $I_1 \cap I_2 \neq \emptyset$. Then $f$ is uniformly continuous on $I_1 \cup I_2$.
Proof. For any $\varepsilon >0$, by uniform continuity of $f$ on $I_k$ ($k=1,2$), there exist $\delta_k >0$ so that $$ |f(x)-f(x')| < \varepsilon $$ whenever $x,x' \in I_k$ with $|x-x'| < \delta_k$ ($k=1,2$).
Let $\delta = \min\{\delta_1,\delta_2\}$. Take any $x,x' \in I_1 \cup I_2$ with $|x-x'| < \delta$. If both $x$ and $x'$ are in $I_1$ then since $|x-x'|< \delta \le \delta_1$, so $|f(x)-f(x')| < \varepsilon$. Likewise, the last inequality holds if both $x,x'$ are in $I_2$.
For the remaining case, we can assume $x \in I_1\setminus I_2$ and $x' \in I_2 \setminus I_1$. By assumption, there is a point $x'' \in I_1 \cap I_2$. If $x$ is in between $x''$ and $x'$, then since both $x'',x'$ are in $I_2$ and $I_2$ is an interval, $x \in I_2$ as well, contradicting our assumptions. Likewise, $x'$ cannot be in between $x''$ and $x$. So we must have $x''$ in between $x$ and $x'$ and therefore
$$|x-x''|, |x''-x'| < |x-x'| < \delta.$$
Since $x,x'' \in I_1$ and $x'',x' \in I_2$, it follows from the case that both points are in the same interval that
$$|f(x)-f(x'')|, |f(x'')-f(x')| < \varepsilon.$$
Consequently,
$$|f(x) -f(x')| \le |f(x)-f(x'')| + |f(x'')-f(x')| < \varepsilon + \varepsilon = 2\varepsilon.$$
Since $x,x' \in I_1 \cup I_2$ are arbitrary and $\delta >0$ is independent of the choice of $x$ and $x'$, we conclude that $f$ is uniformly continuous on $I_1 \cup I_2$.
Exercise. Show that $f(x) = \sqrt{x}$ is uniformly continuous on $[0,\infty)$.
Hint: Argue that $f$ is uniformly continuous on $[0,2]$ and on $[2,\infty)$ separately. Then deduce the result from the proposition above.