TITLE: $\liminf, \limsup$ and continuous functions
QUESTION [10 upvotes]: If a function $f: \mathbb R \to \mathbb R$ is continuous in x, $f$ is sequentially continuous in x: $$ \lim_{n\rightarrow +\infty} x_n = x \Rightarrow \lim_{n\rightarrow +\infty} f(x_n)=f(x)$$
I'm wondering whether the same  is true with $\liminf$ or $\limsup$ instead of $\lim$
$$ \liminf_{n\rightarrow +\infty} x_n = x \Rightarrow \liminf_{n\rightarrow +\infty} f(x_n)=f(x)$$
I can't find a counterexample to prove that it is false.

REPLY [6 votes]: If $f$ is also monotone increasing, in addition to continuous, then you get what you want, since in this case $$f\left(\liminf_{n\rightarrow \infty} x_n\right) = \liminf_{n\rightarrow \infty} f(x_n) \quad \textrm{and} \quad f\left(\limsup_{n\rightarrow \infty} x_n\right) = \limsup_{n\rightarrow \infty} f(x_n).$$