# Sequences and continuity

If $f$ is continuous function and $(x_n)$ is a sequence then $$x_n \to x \implies f(x_n) \to f(x)$$
The converse $$f(x_n) \to f(x) \implies x_n \to x$$ in general isn't true but why is it true, for example, if $f$ is arctan?

Let $\mbox{arctan}(u_n) \to \arctan(u)$. Write $x_n = \mbox{arctan}(u_n)$ and $x = \mbox{arctan}(u)$, so $x_n \to x$. Now using $x_n \to x \implies f(x_n) \to f(x)$, with $f$ as tan gives the result. Why can you do this?