let $f$ be a continuous function on $(0,2]$ Show that $f$ is uniformly continuous if $\displaystyle \lim_{x \to 0^{+}} f(x)$ exists.
I can show $f$ is uniformly continuous on $(0,2]$,but i am not sure that to use the condition $\displaystyle \lim_{x \to 0^{+}} f(x)$ exists.
 A: Let $\epsilon > 0$ and suppose that $\delta >0$ is such that $x,y \in (0,2]$ and $\lvert x -y \rvert < \delta$ implies that $\lvert f(x) - f(y) \rvert < \epsilon$; i.e., this pair $\epsilon$-$\delta$ is as in the definition of uniform continuity.  
Let $x_n$ be a sequence in $(0,2]$ with $x_n \to 0$. Then in particular, $x_n$ is Cauchy, so there is $N \in \mathbb N$ such that $n, m \ge N$ gives $\lvert x_n - x_m \rvert < \delta$. But then $\lvert f(x_n) - f(x_m) \rvert < \epsilon$. This shows that $f(x_n)$ is a Cauchy sequence and hence converges to some value $\alpha \in \mathbb R$. Since $x_n$ was an arbitrary sequence in $(0,2]$ which tends to zero, the sequential criterion theorem tells us that $\lim_{x\to 0^+} f(x) = \alpha$. Thus the limit exists. 
Conversely, if the limit exists, then the function $f$ extends uniquely to a continuous function $\tilde f : [0,2] \to \mathbb R$. But since $[0,2]$ is compact, $\tilde f$ is uniformly continuous. But then the restriction of $\tilde f$ to any subset of $[0,2]$ is uniformly continuous, so $f = \tilde f_{(0,2]}$ is uniformly continuous.
