Continuity – Does Convergence of f(x_n) Imply Continuity of f?

continuitygeneral-topologymetric-spacessequences-and-series

Let $f\colon(X,d_X)\rightarrow(Y,d_Y)$ be a function between metric spaces such that for every convergent sequence $(x_n)_{n\in\mathbb{N}}$ in $X$ the sequence $(f(x_n))_{n\in\mathbb{N}}$ is convergent in $Y$. Does this impy continuity of $f$?

At first I thought that this does not imply the continuity of $f$, so I tried to think of a counterexample. I thought about it for a long time, but I couldn't find one. I found a few similar problems, but none helped me. Can someone help me please?

Best Answer

Suppose that $f$ is discontinuous at some point $x$. Then,for some $\varepsilon>0$, if $n\in\mathbb N$, then there is a $x_n\in B\left(x,\frac1n\right)$ such that $d\bigl(f(x),f(x_n)\bigr)\geqslant\varepsilon$. Now consider the sequence$$x,x_1,x,x_2,x,x_3,\ldots$$It converges (to $x$). However, the sequence$$f(x),f(x_1),f(x),f(x_2),f(x),f(x_3),\ldots$$does not converge.

Related Question