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.
The statement is correct. To see this, let $x_0\in D$ and $(x_n)$ a sequence in $D$ with $x_n\to x_0$. We want to show that $f(x_n)\to f(x_0)$. Define the sequence $(y_n)=(x_1,x_0,x_2,x_0,x_3,x_0,\dots)$. Then $y_n\to x_0$, so by assumption $f(y_n)$ is a Cauchy-sequence. It has the constant convergent subsequence $f(x_0)$, hence $f(y_n)$ converges to $f(x_0)$ (A Cauchy-sequence with convergent subsequence is itself convergent with the same limit). As $f(x_n)$ is a subsequence of $f(y_n)$ it follows that $f(x_n)\to f(x_0)$