# Continuous real functions and differences of sequences

Let $f:\mathbb R\to\mathbb R$ be continuous. Suppose $(x_n)_n$ and $(y_n)_n$ are sequences in $\mathbb R$ such that the sequence $(x_n-y_n)_n$ converges to $0$. Does this mean that the sequence $(f(x_n)-f(y_n))_n$ converges to $0$?

I feel like it is true, since the definition of continuity states that $f$ preserves limits of convergent sequences, but I do not know how to prove it.

-
Try thinking about continuous functions that are not uniformly continuous. Based on your remark, to find a counterexample you should make sure that $(x_n)$ and $(y_n)$ are not convergent sequences. –  Jonas Meyer May 22 '12 at 15:46
@Jonas Meyer thank you for your help, I've just found a counterexample. –  D. Didier May 22 '12 at 15:55

Try $f(x) = e^{x^2}$, with $y_n = n$, $x_n = n+\frac{1}{n}$. Then $(x_n-y_n) \to 0$, but $f(x_n)-f(y_n) = e^{n^2}(e^{2+\frac{1}{n^2}}-1)$, which is unbounded.
$x^2$ works, too, & is a little easier. –  Jonas Meyer May 22 '12 at 15:48
• The result is true is $f$ is uniformly continuous on $\Bbb R$.
• But if it's not the case, we can find $\{x_n\}$ and $\{y_n\}$ which contradict this fact, using the definition of uniform continuity.