# A query regarding the uniformly continuous nature of continuous functions from compact metric spaces to metric spaces.

Rudin says:

Let $f$ be a continuous mapping of a compact metric space $X$ into a metric space $Y$. Then $f$ is uniformly continuous on $X$.

Let $f:[0,2]\to[0,4]$ be defined by $x\to x^2$. How is this function uniformly continuous on $[0,2]$? Let $|a-x|<\delta$. Then $|a^2-x^2|=\delta|a+x|$. Hence, $|a^2-x^2|$ is not independent of $x$.

Thanks.

• Well we know that $x<2$ hence $a+x<4$ so we can choose our delta independent from $x$. – user45878 Apr 10 '14 at 10:30

$f$ is uniformly continuous on $[0,2]$:

Take any $\epsilon> 0$, and take $\delta = \frac{\epsilon}{8}$. Then, for $|x-y|<\delta$, we know that $$f(x)-f(y)=f'(z)(x-y)$$ for some $z\in[x,y]\subseteq[0,2]$. This means that $$|f(x)-f(y)|\leq |f'(z)||x-y|\leq \max_{0\leq z\leq2}|f'(z)||x-y| = 4|x-y|\leq 4\delta = \frac\epsilon2,$$ meaning that $f$ is uniformly continuous.

$$|a^2-x^2|=|a+x|\,|a-x|\le(|a|+|x|)|a-x|\le4\,|a-x|,$$ because $0\le a,x\le2$.