# If $\{x_n\}$ is a sequence in an open interval and $f$ is continuous, must $\{f(x_n)\}$ have a convergent subsequence? What if the interval is closed?

I seek to show whether the following statements are true or false:

1. If $f$ is continuous on $(a,b)$ and $\{x_n\}$ is a sequence in $(a,b)$, then the sequence $\{f(x_n)\}$ has a convergent subsequence.

2. If $f$ is continuous on $[a,b]$ and $\{x_n\}$ is a sequence in $(a,b)$, then the sequence $\{f(x_n)\}$ has a convergent subsequence.

My gut tells me one of them is true and the other false, but I'm not sure which. I think 2 is false and 1 is true? I can't really seem to explain why...

Thanks in advance.

## 5 Answers

HINTS:

1. Look at the sequence $\left\langle\frac1n:n\in\Bbb Z^+\right\rangle$ in $(0,1)$ and the function $f(x)=\frac1x$.

2. If $f$ is continuous on $[a,b]$, then $f\big[[a,b]\big]$ is a closed interval $[c,d]$ in $\Bbb R$. What do you know about sequences in closed, bounded sets?

• so here, why is $[c,d]$ necessarily a closed, bounded interval? – Peej Gerard Apr 3 '13 at 1:26
• @Paul: Because continuous functions preserve compactness and connectedness, and the only compact, connected subsets of $\Bbb R$ are sets of the form $[c,d]$. All you really need to know, however, is that the image is compact (closed and bounded); you don’t need to know that it’s an interval. – Brian M. Scott Apr 3 '13 at 1:29

The first statement is false. Consider the case where $f(x)=\frac{1}{x}$, $(a,b)=(0,2)$, and $\{x_n\}=\{\frac{1}{n}\}$. Obviously, $\{f(x_n)\}=\{n\}$, which has no convergent subsequence.

It's the other way around: 1. is false and 2. is true.

It's all about the endpoints. Imagine any continuous function that would go to $\pm\infty$ both in $a$ and in $b$. This is allowed for 1. but not allowed for 2. Now, if $x_n\to a$, then $f(x_n)$ will tend to $\pm\infty$, so it's not convergent.

If you suppose $f(x)=\frac{1}{x-a}$, and consider the sequence $x_n=a+\frac{1}{n}$, what happens to $f(x_n)$? Does it have a convergent subsequence?

On the other hand, since $[a,b]$ is compact and the continuous image of a compact set is compact, we know $f([a,b])$ is compact. Now we know any bounded sequence will have a convergent sequence, therefore $f(x_n)$ will have a convergent subsequence.

The second statement is true. This is because $[a,b]$ is compact, and $f$ is continuous, which implies that $f([a,b])$ is also compact. Hence, $f(\{x_n\})$ is a sequence in a compact set, which indicates that it has a convergent subsequence (compactness implies sequential compactness.)

• Your last statement is not true in general. See here for reasoning. You may want to explicitly say that compactness implies sequential compactness in metric spaces. – Clayton Apr 3 '13 at 1:22