Let $\{x_n\}$ be a sequence in $(0, 1)$ such that $x_n \to 0$. Show that the sequence $\{f(x_n)\}$ converges. I'm trying to solve the following problem:

Suppose that $f: (0, 1) \to \mathbb R$ is uniformly continuous. Let $\{x_n\}$ be a sequence in $(0, 1)$ such that $x_n \to 0$. Show that the sequence $\{f(x_n)\}$ converges.

I think if at all $f(x_n)$ converges, it should converge to $f(0)$ but I'm not sure this follows from which theorem (?).
Secondly, if we were say dealing with the interval $[0, 1]$ rather than $(0, 1)$ I think I have an idea about how to approach. Since $f(x)$ would be uniformly continuous on $[0, 1]$ for every $\epsilon > 0$ we would have a $\delta_\epsilon$ such that if $|x_n - 0| < \delta_{\epsilon}$ then $|f(x_n) - f(0)| < \epsilon$. Since, $x_n \to 0$ I think we can always choose some $N \in \mathbb N$ such that for $n > N$, $|x_n - 0| < \delta_\epsilon$. So we'd have that for all $n > N$, $|f(x_n) - f(0)| < \epsilon$ for some choice of $\epsilon > 0$.
But here we are dealing with the open interval $(0, 1)$ rather than $[0, 1]$ and as such we are not guaranteed that for every $\epsilon > 0$ we would have a $\delta_\epsilon$ such that if $|x_n - 0| < \delta_{\epsilon}$ then $|f(x_n) - f(0)| < \epsilon$. This is because the definition of uniform continuity just says:

Let $(X, d_X)$ and $(Y, d_Y)$ be two metric spaces and let $f: X \to Y$. We say that $f$ is uniformly continuous iff for all $\epsilon > 0$ there is a $\delta = \delta(\epsilon) > 0$ such that for all $x, y \in X$, $d_X(x, y) < \delta \implies d_Y(f(x), f(y)) < \epsilon$.

But note that in case of $f: (0, 1) \to \mathbb R$ the point $0$ does not lie in $(0, 1)$! So we are not guaranteed that for all $\epsilon> 0$, $d_X(x, 0) < \delta_{\epsilon} \implies d_Y(f(x), f(0)) < \epsilon$, where $X = (0, 1)$ and $Y = \mathbb R$ in this context.
Any idea how to fix this proof? Also, why should $f(x_n)$ necessarily converge to $f(0)$ if $x_n \to 0$? Is this some special property of uniformly continuous functions?
 A: Show, using uniformly continuity of $f$, that $(f(x_n))_n$ is a Cauchy sequence. $f(0)$ is undefined in your setting (the domain of $f$ is $(0,1)$) so you can't conclude that $f(x_n) \to f(0)$. However, since $\Bbb R$ is complete, the sequence admits a limit. Notice that uniformly continuous functions are continuous, therefore if a function $g$ defined on $[0,1]$ is uniformly continuous then, being in particular continuous, it is true that $g(x_n)\to g(0)$.
A: One approach is by using the fact that if $f:(a,b)\to\mathbb{R}$ is uniformly continuous on $(a,b)$, then $f$ admits a unique uniformly continuous extension to $[a,b]$. For this case, you are able to uniquely define a value of $f(0)$ such that $f:[0,1)\to\mathbb{R}$ is uniformly continuous. Then you can conclude that $f(x_n)\to f(0)$ by continuity.
A: For f(x) is continuous, $\forall \epsilon, \exists \delta$ such that when $|x_n-0|<\delta, |f(x_n)-f(0)|<\epsilon$.
For $x_n\to 0$, $\exists N,$ such that when $n>N, |x_n-0|<\delta$.
Therefore $|f(x_n)-f(x_0)|<\epsilon, f(x_n)$ converges.

Correction: as @FormulaWriter said, $f(0)$ is not clearly defined, so it's better to replace $f(0)$ above as $f(0+)=\lim_{x\to0+}f(x)$.
