Training Real Analysis Continuity & Uniform Continuity
3 / 7

Continuity & Uniform Continuity

35 min Real Analysis

Continuity & Uniform Continuity

A function $f:\mathbb{R}\to\mathbb{R}$ is continuous at $x_0$ if $\forall\epsilon>0,\exists\delta>0$ such that $|x-x_0|<\delta\Rightarrow|f(x)-f(x_0)|<\epsilon$. Uniform continuity strengthens this by requiring $\delta$ to work uniformly over all $x_0\in$ the domain. The distinction matters for integration theory: uniformly continuous functions on compact sets are Riemann integrable, and continuous functions on closed bounded intervals are uniformly continuous (Cantor's theorem).

Uniform Continuity

$f:D\to\mathbb{R}$ is uniformly continuous if $\forall\epsilon>0,\exists\delta>0$ such that $|x-y|<\delta\Rightarrow|f(x)-f(y)|<\epsilon$ for all $x,y\in D$ (same $\delta$ for all pairs). Comparison: continuity requires $\delta$ depending on both $\epsilon$ and $x_0$; uniform continuity requires $\delta$ depending only on $\epsilon$. Example: $f(x)=1/x$ is continuous but not uniformly continuous on $(0,1)$: for any $\delta>0$, choose $x=\delta/2,y=\delta/4$ with $|x-y|=\delta/4<\delta$ but $|f(x)-f(y)|=|2/\delta-4/\delta|=2/\delta\to\infty$.

Cantor's Theorem

Every continuous function on a closed bounded interval $[a,b]$ is uniformly continuous. Proof: suppose not; then $\exists\epsilon_0>0$ and sequences $x_n,y_n\in[a,b]$ with $|x_n-y_n|<1/n$ but $|f(x_n)-f(y_n)|\geq\epsilon_0$. By Bolzano-Weierstrass, extract $x_{n_k}\to L\in[a,b]$; then $y_{n_k}\to L$ too (since $|x_{n_k}-y_{n_k}|\to 0$). By continuity, $f(x_{n_k})\to f(L)$ and $f(y_{n_k})\to f(L)$, but $|f(x_{n_k})-f(y_{n_k})|\geq\epsilon_0$ for all $k$ — contradiction.

Example 1

Prove the intermediate value theorem: if $f:[a,b]\to\mathbb{R}$ is continuous with $f(a)<0

Solution: Bisection: let $a_0=a,b_0=b$. At step $n$: if $f((a_n+b_n)/2)=0$, done; if $f((a_n+b_n)/2)<0$, set $a_{n+1}=(a_n+b_n)/2,b_{n+1}=b_n$; otherwise $a_{n+1}=a_n,b_{n+1}=(a_n+b_n)/2$. Both $(a_n)$ and $(b_n)$ are Cauchy (intervals shrink, $b_n-a_n=(b-a)/2^n\to 0$), converging to the same $c$. Since $f(a_n)<0$ and $f(b_n)>0$, by continuity $f(c)\leq 0$ and $f(c)\geq 0$, so $f(c)=0$.

Example 2

Show $f(x)=x\sin(1/x)$ (with $f(0)=0$) is continuous on $\mathbb{R}$ but not differentiable at 0.

Solution: Continuity at 0: $|f(x)-f(0)|=|x\sin(1/x)|\leq|x|\to 0$ as $x\to 0$. Differentiability at 0: $f'(0)=\lim_{h\to 0}h\sin(1/h)/h=\lim_{h\to 0}\sin(1/h)$, which does not exist (oscillates). So $f$ is continuous but not differentiable at 0.

Practice

  1. Prove: if $f$ is uniformly continuous and $(x_n)$ is Cauchy, then $(f(x_n))$ is Cauchy.
  2. Show $f(x)=x^2$ is not uniformly continuous on $\mathbb{R}$ but is uniformly continuous on $[0,M]$ for any $M>0$.
  3. State and prove the extreme value theorem: continuous $f$ on $[a,b]$ achieves its maximum and minimum.
  4. Prove that the composition of uniformly continuous functions is uniformly continuous.
Show Answer Key

1. Let $(x_n)$ be Cauchy and $\epsilon>0$. By uniform continuity, $\exists\delta>0$: $|x-y|<\delta\Rightarrow|f(x)-f(y)|<\epsilon$. Since $(x_n)$ is Cauchy, $\exists N$: $m,n\ge N\Rightarrow|x_m-x_n|<\delta$, hence $|f(x_m)-f(x_n)|<\epsilon$. So $(f(x_n))$ is Cauchy.

2. On $\mathbb{R}$: take $x_n=n$, $y_n=n+1/n$. Then $|x_n-y_n|=1/n\to0$ but $|f(x_n)-f(y_n)|=|n^2-(n+1/n)^2|=|2+1/n^2|\to2\neq0$. On $[0,M]$: $f$ is continuous on a compact set, hence uniformly continuous by the Heine-Cantor theorem.

3. Continuous $f$ on compact $[a,b]$ attains its bounds. Let $M=\sup f([a,b])$. If $f(x)

4. Let $f,g$ be uniformly continuous. Given $\epsilon>0$, $\exists\delta_1$: $|f(x)-f(y)|<\epsilon$ when $|x-y|<\delta_1$, and $\exists\delta_2$: $|g(s)-g(t)|<\delta_1$ when $|s-t|<\delta_2$. Then $|s-t|<\delta_2\Rightarrow|g(s)-g(t)|<\delta_1\Rightarrow|f(g(s))-f(g(t))|<\epsilon$.