# Continuous and uniformly continuous proof

How would you show that if a continuous function $f:[0,1) \to \mathbb{R}$ satisfies $f(x) \to 0$ as $x \to 1$ then it is uniformly continuous?

-

Because you can define another function $g : [0,1] \to \Bbb{R}$ with the property that $$g(x)=\begin{cases} f(x) & x \in [0,1) \\ \lim_{x \to 1}f(x) & x=1 \end{cases}$$

This function is continuous, defined on $[0,1]$ and therefore is uniformly continuous. This implies that $f$, which is a restriction of $g$ is also uniformly continuous.

-

Fix $\varepsilon>0$. We can find $x_0$ such that $|f(x)|\leq\epsilon$ if $x_0\leq x<1$. Now we use the uniform continuity on $[0,\frac{x_0+1}2]$ of $f$, since $f$ is continuous to get a $\delta>0$ such that if $x,y\in [0,\frac{x_0+1}2]$ and $|x-y|\leq \delta$ then $|f(x)-f(y)|\leq\varepsilon$. This $\delta$ can be assumed to be $\leq x_0/2$. Now check that this one works.

-

Put $g : [0,1] \to \mathbb{R}$ such that $g(x) = f(x)$ if $x \in [0,1]$ and $g(1) = 0$.

$g$ is continuous, and $[0,1]$ is compact so $g$ is uniformly continuous. Since $\forall x \in [0,1)$ we have $f(x) = g(x)$, $f$ is uniformly continuous.

-