# $A\subset\mathbb{R^n}$ is compact and $f:A\rightarrow\mathbb{R}$ is continuous. Show $f$ is uniformly continuous.

Since $A$ is compact and $f$ is continuous, then $f(A)$ is compact. Suppose $f$ is not uniformly continuous. Then $\exists \epsilon >0.\forall \delta >0. \exists x,y\in A$ such that $d(x,y)<\delta$ and $d(f(x),f(y))>\epsilon$. Therefore we can choose some $x$ such that, for some specific choice of $\epsilon$, we have $d(x,y)<\delta$ and $d(f(x),f(y))>\epsilon$ for all $\delta >0$ and $y\in A$. Denote that $x$ as $x_0$

Let ${x_k}$ be a sequence with a subsequence converging to $x_0$ (that at least one such sequence exists is clear). Call this subsequence ${x_n}$. Since $f$ is continuous, then as $x_n \rightarrow x_0$ we have $f(x_n)\rightarrow f(x_0)$. Therefore, for every $\epsilon >0$ we can find some $\delta >0$ such that there exists some element $x_i$ of the sequence ${x_n}$ such that $d(x_i,d_0)<\delta$ and $df((x_i),f(x_0))$, in contradiction to our assumption that $f$ is not uniformly continuous.

Therefore, $f$ is uniformly continuous.

I'm not sure if this is a good proof, or if there are holes in it. I struggle quite a bit with uniform continuity; I don't really have a good handle on it. Please let me know if you think the proof is good, or how I can improve it.

Thanks.

• It's strange to take an $\varepsilon$ s.t. $d(x,y)<\delta\implies d(f(x),f(y))>\varepsilon$. It's $\varepsilon>0$ such that $d(x,y)<\delta$ and $d(f(x),f(y))>\varepsilon$ (for certain $x,y\in A$). – Surb Nov 11 '15 at 16:11
• I was trying to take the logical negation of the statement of uniform continuity but it looks like I messed it up a little. – Zelzy Nov 11 '15 at 16:27
• Yes, there is a sequence converging to $x_0$. But for all you know, this sequence may be constant. – egreg Nov 11 '15 at 17:46

Suppose has given $\epsilon > 0$ has given. for $x\in X$ since $f$ is continous at $x$, Let $\delta_x$ $$\exists \delta_x > 0 ~~\forall y \in \mathbb R: |x-y|< \delta_x \rightarrow |f(x)-f(y)| < \frac{\epsilon}{2}$$ we have $X\subseteq \bigcup_{x\in X} B(x,\frac{\delta_{x}}2)$ by compactness of $X$ exists $N$ such that $X\subseteq \bigcup_{i}^N$ $B(x_i,\frac{\delta_{x_i}}2)$. Let $\delta = \min_{i=1,\cdots,N} \frac {\delta_{x_i}} 2$

consider $x, y\in X$ such that $|x-y|<\delta$, there are $1\leq i, j\leq N$ such that $x\in,B(x_i,\frac{\delta_{x_i}}2)$ and $y\in B(x_j,\frac{\delta_{x_j}}2)$ thus $$d(x_i, y)\leq d(x_i, x)+d(x,y)\leq \frac {\delta_{x_i}} 2+\delta\leq \frac {\delta_{x_i}} 2+\frac {\delta_{x_i}} 2=\delta_{x_i}$$ thus $$|f(x)-f(y)|\leq |f(x)-f(x_i)|+|f(x_i)-f(y)|<\frac{\epsilon}{2}+\frac{\epsilon}{2}=\epsilon$$

• Could you détails your proof ? I don't think that the conclusion of uniform continuous is that obvious... – Surb Nov 11 '15 at 16:49
• Ok, I see now. You proved in fact that if $x,y$ are such that $|x-y|<\delta$ then they are in the same ball. So now it's correct. – Surb Nov 11 '15 at 17:54
• So, the proof ultimately relies on the continuity of $f$ to choose small enough $\delta_x$ and the compactness of $A$ to choose a finite number of these sets and use the triangle inequality to show that the distance between any two points, if less than $\delta$, must be contained within one of the $\delta_x$ balls we have defined above, and therefore we have the desired $f(x)-f(y)<\epsilon$. I think I've got it. Thanks. – Zelzy Nov 11 '15 at 19:30
• you are welcome :) – R.N Nov 11 '15 at 19:41

let $\varepsilon>0$ s.t. $$\forall n\in\mathbb N, \exists x_n,y_n\in A: d(x_n,y_n)<\frac{1}{n}\quad\text{and}\quad d(f(x_n),f(y_n))>\varepsilon.$$

By Heine-Borel, $A$ is closed and bounded (since $\mathbb R^n$ is metrizable). Then, by Bolzano-weierstrass $(x_n)$ has a subsequence $(x_{n_k})$ that converge, and since $A$ is closed, it's limit is in $A$. Let $\ell$ it's limit. Since $$d(y_{n_k},\ell)\leq d(x_{n_k},y_{n_k})+d(x_{n_k},\ell)\underset{k\to\infty }{\longrightarrow }0$$ and thus $(y_{n_k})$ converge also to $\ell$. By continuity, you have that $$\lim_{k\to\infty }d(f(x_{n_k}),f(y_{n_k}))=0$$ and this is the contradiction with the fact that $d(f(x_{n_k}),f(x_{n_k}))>\varepsilon$ for all $k$.

To be a more explicit

By continuity, there is a $N$ such that $$d(f(x_{n_K}),\ell)<\frac{\varepsilon}{2}\quad\text{and}\quad d(f(y_{n_N}),\ell)<\frac{\varepsilon}{2}$$
and thus $$d(f(x_{n_N}),f(y_{n_N}))<d(f(x_{n_N}),f(\ell))+d(f(y_{n_N}),f(\ell))$$

and thus, you have that $$d(f(x_{n_N}),f(y_{n_N}))<\varepsilon$$ and here is the contradiction.

• Sorry, i wasn't saying that if $x_n$ is a sequence then it is clear it has a subsequence that converges to $x_0$. I was saying that it is clear that there exists some sequence $x_n$ with a subsequence converging to $x_0$ so we could look generally at sequences with that property. But I guess that's not good enough. – Zelzy Nov 11 '15 at 16:26
• If $x_n$ is unspecified, you can't do a lot of things... But can you continue with my hint or not really ? – Surb Nov 11 '15 at 16:29
• But isn't it enough to show that, if at least one sequence with a subsequence converging to $x_0$ gives you a contradiction, then we have a contradiction in general? – Zelzy Nov 11 '15 at 16:31
• First, why is there a sequence with a subsequence converging ? For example, if you are in $\mathbb Q$, $x_n=(1+\frac{1}{n})^n$ has no subsequence that converge (and $x_n$ is bounded, increasing...). In $\mathbb R$, $x_n=n$ has no subsequence that converge (but this one is not bounded). But let suppose it. You took $x,y\in A$ such that $d(x,y)<\delta$ and $d(f(x),f(y))> \varepsilon$. Notice that $x$ and $y$ are specified. By convergence ox $x_n$, there is a $N$ s.t. $d(x_n,x_0)<\delta$ if $n>N$. But now, why $|f(x_n)-f(x_0)|>\varepsilon$ ? $x_n$ and $x_0$ are neither $x$ nor $y$, – Surb Nov 11 '15 at 16:37
• Still not working. I have $d(f(x_n),f(y_n))>\varepsilon$ not $d(f(x_n),f(x_0))>\varepsilon$. So it doesn't work ! – Surb Nov 11 '15 at 16:45