Proving the limit of a function of a sequence is equal to the function of the limit of that sequence Suppose $f$ is a continuous function at $x = c$ in $[a,b]$.  Prove that for any sequence ${x_n}$ in $[a,b]$ converging 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!
 A: Just write down the definitions:


*

*$x_n$ converges to $c$ if and only if $\forall \delta > 0$ there exists $N = N(\delta)$ such that $\forall n \ge N$ we have $|x_n - c| < \delta$

*$f$ is continuous if and only if $\forall \eta > 0$ there exists $\gamma = \gamma(\eta)$ such that if $|x - y| < \gamma$ then $|f(x) - f(y)| < \eta$.


Now we want to prove the following claim


*

*$\forall \epsilon > 0$ there exists $M = M(\epsilon)$ such that if $n \ge M$ then we have $|f(x_n) - f(c)| < \epsilon$.


Hint: if $x_n \to c$ then you can make $|x_n - c|$ small enough to use the continuity of $f$ (say, for example, smaller than $\gamma(\epsilon)$).
A: 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$.
