# A continuous function on a closed interval is uniformly continuous (Proof).

I am doing my best to understand the proof given to me in my class notes. It is attached below:

Proof

We prove this by contradiction. Suppose that $f$ is continuous on $[a,b]$ but not uniformly continuous. Then there exists $\epsilon > 0$ such that for all $n \in \mathbb{N}$ there exist $x_n, y_n$ such that $|x_n - y_n| < 1/n, |f(x_n) - f(y_n)|> \epsilon$. By the Bolzano-Weierstrass Theorem, there exist $x_{n_k}, y_{n_k}$ which converge to $x, y$ respectively. Hence, using the first inequality: $x=y$. Therefore $f(x) = f(y)$, a contradiction.

Questions:

1. Firstly, in order for the $x=y$ to work, we need $\lim_{k\to\infty}(x_{n_k} -y_{n_k})= 0$. Why is this condition true? Does the fact that $x_{n_k}$ and $y_{n_k}$ are subsequences of $x_n$ and $y_n$ imply this?

2. I took a look at a similar proof on this link: http://www.math.ku.edu/~lerner/m500f09/Uniform%20continuity.pdf which seems to completely discredit the proof in my course notes, as the very first question below is: "Why, in the proof of the theorem, can’t we just take a convergent subsequence of $x_n$ and a convergent subsequence of $y_n$ and proceed directly to the conclusion? "

P.S. I am new to Analysis and a detailed explanation would be appreciated.

• "we have f(x)=f(y), a contradiction." To what? $x$ and $y$ were discovered during the proof. There was no a priori knowledge that $f(x)\ne f(y)$ to contradict ..... What we DO have is that for any $r>0$ there are $x_{n_k}, y_{n_k}\in (x-r,x+r)$ with $|f(x_{n_k}-f(y_{n_k})|>\epsilon,$ implying that $f$ is not continuous at $x.$ .... or to state it another way, $(x_{n_k})_k$ and $(y_{n_k})_k$ both converge to $x,$ but $(f(x_{n_k}))_k$ and $(f(y_{n_k}))_k$ cannot converge to the same value (contradicting the continuity of $f$) because $|f(x_{n_k})-f(y_{n_k})|>\epsilon$ for all $k.$ Dec 31, 2016 at 12:51
• $\mathbb R$ is a closed interval, and the theorem fails on $\mathbb R.$
– zhw.
Dec 31, 2016 at 21:18

1. We have $|x_{n_k}-y_{n_k}|<\frac1{n_k}$ and as $n_k\to \infty$ (i.e., because we consider subsequences), we have $\frac1{n_k}\to 0$.

2. Yes, just taking a subsequence of $(x_n)$ and an unrelated subsequence of $(y_n)$ might not work, as in that case the limits $x$ and $y$ might also be unrelated. Just think of $x_n=(-1)^n+\frac1{n}$ and $y_n=(-1)^n+\frac1{2n}$. If you pick all even indices for the subsequence of $(x_n)$ and the odd indices for $(y_n)$, you get $x_{n_k}=(-1)^{n_k}+\frac1{2n_k}=1+\frac1{2k}\to 1$ and $y_{m_k}=(-1)^{m_k}+\frac1{2m_k}=-1+\frac1{4k+2}\to -1$. Actually, it suffices to pick a convergent subsequence $x_{n_k}$ of $(x_{n_k})$ with $x_{n_k}\to x$. Then automatically (per the argument under 1) the corresponding subsequence $y_{n_k}$ converges to $x$ as well.

• To the OP. Re: The last 2 sentences: If $x_{n_k}\to x$ as $k\to \infty$ then $y_{n_k}\to x$ because $|x_{n_k}-y_{n_k}|<1/n_k\leq 1/k.$ Dec 31, 2016 at 12:33

1) Observe that

$$|x_n-y_n|<\frac1n\implies \lim_{n\to\infty}(x_n-y_n)=0$$

since, for example, for any $\;\epsilon>0\;$ there exists $\;N\in\Bbb N\;$ such that $\;n>N\implies \cfrac1n<\epsilon\;$ , and etc.

And now, because the sequence $\;a_n:=x_n-y_n\;$ converges to zero, then any subsequence of it, $\;a_{n_k}=x_{n_k}-y_{n_k}\;$ also converges to zero. The existence of partial limits though follows from Bolzano-Weierstrass, as both sequences $\;\{x_n\}\,,\,\,\{y_n\}\;$ are contained in a closed, bounded interval.

2) The proof you linked makes things more formal: certainly none of the sequences $\;x_n,\,y_n\;$ has to convergent, yet because of B-W each of them has a convergent subsequence, say

$$x_{n_k}\to x_0\;,\;\;y_{n_m}\to y_0$$

...but the sequences of indices $\;\{n_k\}\;,\;\;\{n_m\}\;$ don't have to be equal! Then, you have to take new subsequences of the first subsequences$\;\{x_{n{_{k_l}}}\}\;,\;\;\{y_{n_{m_l}}\}\;$ for which the indices now are equal and etc.