continuity of $f$ at the point $0$ Let $f:\mathbb{R}\to\mathbb{R}$ be an increasing function. Suppose there are sequences $(x_n)$ and $(y_n)$ such that $x_n<0<y_n$ for all $n\ge1$ and $f(y_n)-f(x_n)\to0$ as $n$ tends to infinity. Prove that $f$ is continuous at $0$.
Please help to solve this. I have use the sequential criterion to solve this but failed. Please help me.
Thanks in advance.
 A: Since $f$ is increasing and $x_n < 0 < y_n$, we get 
$$
f(x_n) \leq f(0) \leq f(y_n) \quad \text{for all } n \in \mathbb N \; .
$$
By applying the squeeze theorem and the fact that $f(y_n) - f(x_n) \to 0$, you wil see that 
$$
\lim_{n \to \infty} f(x_n) = \lim_{n \to \infty} f(y_n) = f(0) \; .
$$
Let $(z_n)_{n \in \mathbb N}$ be a sequence in $\mathbb R$, such that $z_n \to 0$ for $n \to \infty$. We have to show that 
$$
\lim_{n \to \infty} f(z_n) = f(0) \; .
$$
Let $\epsilon > 0$. Since $\lim_{n \to \infty} f(x_n) = \lim_{n \to \infty} f(y_n) = f(0)$, there exists a $M \in \mathbb N$, such that 
$$
f(0) - f(x_n) = \vert{f(0) - f(x_n)}\vert < \epsilon \quad \text{for all } n \geq M \; ,
$$
and
$$
f(y_n) - f(0) = \vert f(y_n) - f(0) \vert < \epsilon \quad \text{for all } n \geq M \; .
$$
Since $z_n \to 0$, there exists a $N \in \mathbb N$, such that $z_n \in (x_M, y_M)$ for all $n \geq N$.
Now if $n \geq N$ and $z_n < 0$, then 
$$ 0 \leq f(0) - f(z_n) \leq f(0) - f(x_M) < \epsilon \; ,$$
and if $z_n > 0$, then 
$$ 0 \leq f(z_n) - f(0) \leq f(y_M) - f(0) < \epsilon \; . $$
By combining these two inequalities, we get 
$$ \vert f(z_n) - f(0) \vert \leq \epsilon \quad \text{for all } n \in \mathbb N \; , 
$$
i.e. 
$$
\lim_{n \to \infty} f(z_n) = f(0) \; ,
$$
so $f$ is continuous at $0$.
A: Hint: You have to use that $f$ is an increasing function! From $x_n<0<y_n$ you get $f(y_n)\geq f(x_n)$ and $f(y_n)-f(x_n)\geq 0$. If $f$ is constant, the statement is trivial. Otherwise you can get part by part informations about $(x_n)_n$ and $(y_n)_n$ if you consider different cases.
A: We have that limits are always bounded by $\inf$ and $\sup$ so you have:
$$0 = \lim (f(y_n) - f(x_n) \ge \inf (f(y_n) - f(x_n)) \ge \inf (f(\mathbb R^+) - f(\mathbb R^-)) \ge \inf f(\mathbb R^+) - \sup f(\mathbb R^-) \ge 0$$ 
where the last inequality is due to $f$ being increasing.
