# Why do proofs using continuity use the Bolzano-Weierstrass theorem?

This may just be goofy of me but there's a lot of proofs I've been seeing recently while learning real analysis that keep on invoking the Bolzano-Weierstrass theorem, and while I understand how it's being used and it makes sense, I don't quite understand why it needs to be used at all.

For example, this was a proof of the extreme value theorem,

If $$f$$ is continuous, then $$f$$ is bounded by the previous theorem. Thus, the set $$E = \{f(x) | x \in [a, b]\}$$ is bounded above. Let $$L = \sup E$$. Then,

1. $$L$$ is an upper bound for $$E$$, i.e. $$\forall x \in [a, b], f(x) \le L$$.
2. There exists a sequence $$\{f(x_n)\}$$ with $$x_n \in [a, b]$$ such that $$f(x_n) \to L$$.
By the Bolzano-Weierstrass theorem, there exists a subsequence $$\{x_{n_k}\}$$ of $${x_n}$$ and $$d \in [a, b]$$ such that $$x_{n_k} \to d$$ as $$k \to \infty$$. Hence, $$f(d) = \lim_{k \to \infty} f(x_{n_k}) = \lim{n \to \infty} f(x_n) = L$$ by the continuity of $$f$$. Thus, $$f$$ achieves an absolute maximum at $$d$$.

I understanding creating a sequence in $$[a,b]$$ such that $$f(x_n)$$ approaches $$L$$. I also understand that for the sequence you can generate a subsequence such that $$x_{n_k}$$ approaches $$d$$. I'm just a little lost on why we can't just say that $${x_n}$$ approaches $$d$$, and why we need to create a whole subsequence just to justify it. If there's anyone who can help me out here, many thanks.

• Can you share what reference you're looking at? The B-W theorem can be used as a start to phrase completeness. Commented Sep 4 at 14:10
• How can you ensure $x_n\to d?$ The sequence you have constructed has no reference to $d,$ and you have no idea it converges. If there are two $d_1\neq d_2$ such that $f(d_1)=f(d_2)=L,$ you might not be able to ensure $x_n$ converges to anything, but some subsequence will. Commented Sep 4 at 14:12

Here's an example: let $$f(x) = |x|$$ on $$[-1,1]$$. The sequence $$x_n = (-1)^n(1-1/n)$$ satisfies $$f(x_n) \to 1$$, but the sequence is not convergent. Nothing in the proof rules out $$x_n$$ being a sequence like that, which is why you need to take a subsequence.
• In this case, the subsequence $(x_{2n})$ converges to $1$. Commented Sep 4 at 14:20
The underlying reason is simply beacuse the B-W is a strong result. In general, we know very little about sequnces, but a lot about converging sequances, so the B-W theorem provides some insight about general sequances. In the proof you described, the problem is that we do not know a lot about $$x_n$$. we cannot concluse that $$x_n->d$$. for example, the sequance $$x_n = (-1)^n$$ is clearly not converging but the subsequance $$x_{2n}$$ is constant, thus converges to 1. In a broader sense, the B-W theorem shows that a closed interval in $$\Bbb R$$, namely $$[a, b]$$ with $$a is a compact set (which you will find later that it is a really useful trait).