Proof of the continuous function on a compact set is uniform continuous

compactnessproof-verificationuniform-continuity

Consider the following attempted proof of the statement that if $X$ is a compact subset of $\mathbb {R}$, then a continuous function $f:X\to \mathbb {R}$ is uniformly continuous. We use $B_{\epsilon}(x)$ to denote the open ball of radius $\epsilon$ about $x$.

I. Fix $\epsilon>0$. As $f$ is continuous for all $x\in X$ there exists $\delta_{x}$ such that if $y\in B_{\delta_{x}}(x)$, then $|f(x)-f(y)|<\epsilon/2$. Let $C=\left\{B_{\delta_{x}}|x\in X\right\}$. Note $C$ is an open cover of $X$.

II. By compactness of $X$ there exists a finite subcover $C'$ of $C$, which we index by the set $X'\subset X$.

III. Set $\delta=\min_{x\in X'}\delta_{x}/2$. Then if $\delta/4>|x-y|$, there exists $z\in X'$ such that $x,y\in B_{\delta_{z}}$.

IV. Thus as $|f(z)-f(x)|$ and $|f(z)-f(y)|$ are both less than $\epsilon/2$, by the triangle inequality $|f(x)-f(y)|<\epsilon$, so $f$ is uniformly continuous.

In the above proof, at which step was the first error made? Or is there none at all? The answer said that step III is wrong, but I don't know why.

Best Answer

Let $X$ is a compact subset of $\mathbb {R}^n$, then a continuous function $f:X\to \mathbb {R}$ is uniformly continuous.

Proof:

I. Fix $\epsilon>0$. For every $x\in X$, as $f$ is continuous for all $x\in X$, there exists $\delta_{x}$ such that if $y\in B_{2\delta_{x}}(x)$, then $|f(x)-f(y)|<\epsilon/2$. Let $C=\left\{B_{\delta_{x}}\ |\ x\in X\right\}$. Note $C$ is an open cover of $X$.

II. By compactness of $X$ there exists a finite subcover $C'$ of $C$, which we index by the set $X'\subset X$.

III. Set $\delta=\min_{x\in X'}\delta_{x}$. Then for all $x,y\in X$, if $\delta>|x-y|$, there exists $z\in X'$ such that $x\in B_{\delta_{z}}$. Moreover, $|y-z| \leq |y-x|+|x-z| \leq 2 \delta $. So $x, y\in B_{2\delta_{z}}.$

IV. Thus as $|f(z)-f(x)|$ and $|f(z)-f(y)|$ are both less than $\epsilon/2$, by the triangle inequality $|f(x)-f(y)|<\epsilon$, so $f$ is uniformly continuous.

It's the corrected proof. The trick is that you don't need to take $x,y$ in some ball of your cover of $X$ for the sake of your correct proof. =)

Related Question