Continuous functions and converging sequences If $f$ is continuous on $[a,b]$ and $\{ x_n\}$ is a sequence in $(a,b)$, then $\{f(x_n)\}$ has a convergent subsequence. 
Is it true or false?


I think this is false but I am not sure of an example that would show it...


 A: Hints:


*

*$[a,b]$ is compact.

*$f$ is continuous, so $f([a,b])$ is compact.

*$\{f(x_n)\}$ is a sequence in $f([a,b])$.

A: Since $[a,b]$ is compact, there exists a subsequence $\{ x_{n_k} \}$ converging to some $X \in [a,b]$.
Since $f$ is continuous on $[a,b]$, the subsequence $\{ f(x_{n_k}) \}$ converges to $f(X)$.
A: This is true.  We know since $[a,b]$ is sequentially compact (do you know why?), every sequence has a convergent subsequence.  But then since $\{x_{n} \} \subseteq (a,b) \subseteq [a,b]$, it follows that $x_{n}$ has a subsequence that converges in $[a,b]$.
But since $f$ is continuous on $[a,b]$, we know for each $x \in [a,b]$, given a sequence $\{ t_{n} \} \subseteq [a,b]$ such that $t_{n} \to x$, we have $\lim \limits_{n \to \infty} f(t_{n}) = f(x)$.
But then if we call our convergent subsequence $\{x_{n_{k}}\}_{k = 1}^{\infty}$ from the original sequence $\{x_{n}\}$, since this sequence converges in $[a,b]$, call its limit $l$.  Then since $\lim \limits_{k \to \infty} x_{n_{k}} = l$, and $f$ is defined and continuous at $l$, it follows that $\lim \limits_{k \to \infty} f(x_{n_{k}}) = f(l)$, which means a convergent subsequence of $\{f(x_{n}) \}$ is actually $\{ f(x_{n_{k}}) \}_{k = 1}^{\infty}$.
