# If $f$ is continuous on $\left[ a,b\right]$ then $f$ is uniformly continuous on $\left[ a,b\right]$. [duplicate]

Let $\left[ a,b\right]\rightarrow \mathbb{R}$. If $f$ is continuous on $\left[ a,b\right]$ then $f$ is uniformly continuous on $\left[ a,b\right]$.

Proof-trying. Assume $f$ on $\left[ a,b\right]$. We need to show that $f$ is uniformly continuos on $\left[ a,b\right]$, i.e., for any $\varepsilon >0$ there exist $\delta >0$ such that $\left| f\left( x\right) -f\left( c\right) \right|<\varepsilon$ whenever $x,c\in\left[ a,b\right]$. How can I show this, can you help?

## marked as duplicate by mathcounterexamples.net, E. Joseph, user91500, Claude Leibovici, GNUSupporter 8964民主女神 地下教會Mar 11 '17 at 12:54

• assume that $f$ isn't uniformly continuous. you need to use that on [a,b] every sequence has a convergent subsequence. – Nathanael Skrepek Mar 10 '17 at 17:16
• Related – Chinnapparaj R Mar 10 '17 at 17:18

A direct method of proving it is for a given $\epsilon$, note that for each $c \in [a, b]$, there is a $\delta(c)$ such that if $|y-c| \le \delta(c)$, then $|f(y) - f(c)| < \epsilon/2$.

Consider the collection of balls $B(c, \delta(c)/2)$. Since there is a ball for every $x$, this is an open cover of $[a,b]$ and therefore has a finite subcover. Let $\delta$ be the minimum of the radii of the balls in the subcover.

Suppose $x, y$ are such that $|y - x| < \delta$. $x$ must be inside one of the balls of the finite subcover. Let $c$ be the center of that ball. So $|x - c| < \delta(c)/2$ and $|y - x| < \delta \le \delta(c)/2$ by the choice of $\delta$. Therefore $|y - c| \le |y - x| + |x - c| < \delta(c)$, and since both $x$ and $y$ are within $\delta(c)$ of $c$,

$$|f(y) - f(x)| \le |f(y) - f(c)| + |f(c) - f(x)| < \frac \epsilon 2 + \frac \epsilon 2 = \epsilon$$

Suppose the opposite, that is :

$$\exists\epsilon>0;\forall\delta>0,\exists(x,y)\in[a,b]^2;|x-y|\le\delta\,\,\mathrm{and}\,\,|f(x)-f(y)|>\epsilon$$

We can choose whatever $\delta$ we wish ... Let's take $\delta=\frac1n$, for any positive integer $n$.

There exists $(x_n,y_n)\in[a,b]^2$ such that :

$$|x_n-y_n|\le\frac1n\quad\mathrm{and}\quad|f(x_n)-f(y_n)|>\epsilon$$

By the Bolzano-Weierstrass theorem, we can extract from $(x_n)_{n\ge1}$ a convergent subsequence $(x_{n_k})_{k\ge1}$, which converges to some $u\in[a,b]$.

We observe that, for every $k\in\mathbb{N}^\star$, we have : $|x_{n_k}-y_{n_k}|\le\frac1{n_k}\le\frac1k$. This implies that $(y_{n_k})_{k\ge1}$ also converges to $u$.

By continuity of $f$, we know that :

$$\lim_{k\to\infty}f(x_{n_k})=\lim_{k\to\infty}f(y_{n_k})=f(u)$$

But this leads to $|f(x_{n_k})-f(y_{n_k})|\le\epsilon$ as soon as $k\ge N$ for some convenient $N$. A contradiction !

Finally, we have proved that :

$$\forall\epsilon>0,\exists\delta>0;\forall(x,y)\in[a,b]^2;|x-y|\le\delta\implies|f(x)-f(y)|\le\epsilon$$