TITLE: Proving the limit of a function of a sequence is equal to the function of the limit of that sequence
QUESTION [13 upvotes]: Suppose $f$ is a continuous function at $x = c$ in $[a,b]$.  Prove that for any sequence ${x_n}$ in $[a,b]$ converting to $c$, the sequence $\{f(x_n)\}$ converges to $f(c)$.  That is, $$ \lim_{n\to\infty}f(x_n)= f\left(\lim_{n\to\infty}x_n\right)$$

This proof seems simple but there are a few things that I need to know first. If $\{x_n\}$ converges to $c$, is it sufficient to substitute $c$ in for $\lim_{n\to\infty}x_n$?  Also needing some guidance on the structure of this proof.  Thanks!

REPLY [3 votes]: Here is my attempt to give a complete proof, trying to stay consistent with the notation introduced by the previous answer.
On the one hand, continuity of f at c implies that $\forall \ \epsilon>0, \ \exists \ \gamma = \gamma(\epsilon)>0 \ s.t. \ |f(x_n) - f(c)| < \ \epsilon \ \forall \ x_n \ s.t. \ |x_n - c| < \ \gamma $. 
On the other hand, convergence of $x_n$ to $c$ implies that $\exists$ $N=N(\gamma)$ s.t. $|x_n - c|<\gamma$ $\forall$ $n>N$.
Hence, $\exists$ $N=N(\gamma(\epsilon))$ s.t. $|x_n-c|<\gamma$ and, therefore (by continuity of f), $\ |f(x_n) - f(c)| < \ \epsilon$ for $n>N$.