Proof (Bolzano-Weierstrass theorem)

We perform bisection to find nested intervals that contain infinitely many elements in the sequence as follows:

By construction, $a_n$ is increasing and bounded above by $b_1$, so $a_n \to a$ for some $a\in[a_1,b_1]$ as $n\to\infty$. Similarly $b_n$ is decreasing and bounded below by $a_1$, so $b_n\to b$ for some $b\in[a_1, b_1]$ as $n\to\infty$.

But $b_n - a_n = (b_{n-1} - a_{n-1})/2$, so by taking limits on both sides, $b-a = (b-a)/2$ so $a=b$.

Now construct the subsequence as follows:

Notice that $a_j \leq x_{n_j} \leq b_j$, so by squeeze theorem, $x_{n_j} \to a$.

Alternative proof (sheet 1 Q12)

Suppose $(a_n)_{n\geq N}$ does not have a maximum term for some $N$. For any $n\geq N$, there exists $m>n$ such that $a_m\geq a_n$, since otherwise $a_m < a_n$ for all $m>n$ and so $\max_{N\leq i\leq m} a_i = \max_{i\geq N}a_i$. Let $i_1= 1$ and set $i_{n+1} > i_{n}$ such that $a_{n+1} \geq a_n$. This gives an increasing subsequence $a_{i_n}$.

Otherwise $(a_n)_{n\geq N}$ has a maximum term for all $N$. Let $a_{i_1}$ be maximum in $(a_n)_{n\geq 1}$ and iteratively define $a_{i_{k+1}}$ to be maximum in $(a_n)_{n\geq i_k + 1}$. By construction $i_{k+1} \geq i_k$ and $a_{i_{k+1}} \leq a_{i_k}$. This gives a decreasing subsequence $a_{i_k}$.

Since $(a_n)$ is bounded, the monotone subsequence founded is bounded, so it converges.