Given $f:D \subseteq \mathbb{R} \to \mathbb{R}$, if for every sequence $(x_n)$ in $D$ such that $x_n \to x_0$ is true that $(f(x_n))$ is a Cauchy sequence, then is $f$ continuous?
This is what I know:
- Every Cauchy sequence is a convergent sequence.
- $f$ is continuous if and only if $x_n \to x_0 \implies f(x_n) \to f(x_0)$ for every sequence $(x_n)$.
However, I only know that $f(x_n) \to a \in \mathbb{R}$; how can I see that $a = f(x_0)$ and then have the continuity of $f$?
If the result is false, please show a counterexample, i.e., a discontinuous function such that for every $x_n \to x_0$ I have $(f(x_n))$ Cauchy.