Uniform continuity vs continuity in relation to the preservation of Cauchy sequences Give an example of each of the following, or state that such a
request is impossible. For any that are impossible, supply a short explanation
(perhaps referencing the appropriate theorem(s)) for why this is the case.

a continuous function $f \colon [0, 1] \to \mathbb{R}$ and a Cauchy sequence $(x_{n})$ such that $f(x_{n})$ is not a Cauchy sequence.

My solution:
This is impossible. A Cauchy sequence $(x_{n})$ in $[0, 1]$ must have a limit
in $[0, 1]$ because this is a closed set. If $x = \lim (x_{n})$, then by continuity $f(x) =\lim f(x_{n})$. Because $f(x_{n})$ converges, it is a Cauchy sequence as well.
Does this proof hold when the interval isn't closed but $f$ is uniformly continuous? As in, is there a uniformly continuous function $f \colon (0, 1) → \mathbb{R}$ and a Cauchy sequence $(x_{n})$ such that $f(x_{n})$ is not a Cauchy sequence?
 A: The proof does hold for $(0,1)$ as long as $f$ is uniformly continuous.  It need not be true if uniform continuity does not hold.  For example, consider $f:(0,1)\to\Bbb R$ given by $f(x)=1/x$.
A: $$
\text{Let } x_n = \frac 1 {\pi n}, \text{ and } f(x) = \sin \frac 1 x.
$$
Then $\{x_n\}_{n=1}^\infty$ is a Cauchy sequence and $\{f(x_n)\}_{n=1}^\infty$ oscillates between $\pm1$ and so is not a Cauchy sequence.  The function $f$ is continuous on the interval $(0,\infty)$.
However: A continuous function on a compact set is uniformly continuous; and even if the domain is not compact, uniformly continuous functions on a metric space preserve Cauchy sequences.
Proof: Suppose $\{x_n\}_{n=1}^\infty$ is a Cauchy sequence in a metric space and $f$ is a uniformly continuous real-valued function on that space.  Then
$$
\forall\varepsilon>0\ \exists\delta>0\ \forall x,y\in \text{the domain, if } d(x,y)<\delta \text{ then } |f(x)-f(y)|<\varepsilon \tag 1
$$
and
$$
\forall\delta>0\ \exists N\in\mathbb N\ \forall n,m\ge N\  d(x_n,x_m)<\delta. \tag 2
$$
Given $\varepsilon>0$, let $\delta$ be as in $(1)$, and given that value of $\delta$, let $N$ be as in $(2)$; then conjoining $(1)$ and $(2)$ we deduce that $|f(x_n) - f(x_m)| < \varepsilon$. $\quad\quad\blacksquare$
