Supremum is the limit of some sequence Consider the attached from the Hubbards' multivariable calculus text. I am trying to prove (1.6.9) in particular: that is, if $M= \sup_{\textbf{c} \in C}f(\textbf{c})$ then there exists a sequence $i \mapsto \textbf{x}_i $ in $C$ such that $\lim_{i \to \infty} f(\textbf{x}_i) = M$. My attempt at a proof is as follows, where I proceed by contradiction:
Suppose that no such sequence existed, so that (negating the statement above) for every sequence in $C$, there exists an $\epsilon>0$ such that there is no integer $N$ which has $n>N \implies |f(\textbf{x}_i) - M| < \epsilon$. Consider all of the singleton sequences; that is, the sequence where $i \mapsto \textbf{x}_0 $ for some fixed $\textbf{x}_0 $ for each $i$. Then we have by the above development that, for each $\textbf{x}_0$ (corresponding to each singleton sequence in $C$), there is some $\epsilon_{\textbf{x}_0}$ such that $M-f(\textbf{x}_0) \geq \epsilon_{\textbf{x}_0}$...
This is where I run into a wall. I want to go further by saying that this implies that there is some $\epsilon>0$ such that $M-f(\textbf{x}_0) \geq \epsilon$ for every $\textbf{x}_0$ which would contradict the definition of $M$, but it's not clear to me that what I've done allows for such an $\epsilon$. The set of $\epsilon_{\textbf{x}_0}$ is infinite and so I can't take a minimum, and the infimum may in general be $0$ which would contradict $\epsilon>0$. Am I supposed to use the compactness of $C$ somehow?
As I think about the question more, I think there is a way to construct the sequence in question by considering a sequence of $1/n$ for $n \in \mathbb{N}$ and using that $M$ is a supremum to observe that there must be some $f(\textbf{x}_0)$ such that $M-f(\textbf{x}_0)<1/n$ or else $M$ is not the supremum, but I'm hoping someone can rescue my original proof strategy somehow.

 A: You are attempting to prove the following statement:
$$
(P):\text{there is a sequence $\{x_i\}$ in $C$ such that $f(x_i)\to M$},
$$
and the strategy you've chosen is proof by contradiction, so we assume "not (P)" to start. "Not (P)" implies that for each sequence $a = \{x_i\}$ in $C$, the number
$$
\epsilon_a = \liminf_{i\to\infty}\big(M-f(x_i)\big)>0.\qquad(a = \{x_i\})
$$
Otherwise, $\epsilon_a = 0$, and hence there is a subsequence $a'$ of $a$ so that $M-f$ approaches $0$ along $a'$, contradicting "not (P)." Now consider the number
$$
\epsilon_0 := \inf\{\epsilon_a:a\}.
$$
I claim that $\epsilon_0>0$ by the assumption "not (P)." Otherwise, $\epsilon_0 = 0$, and there are sequences $a_1,a_2,\dots$ such that for each $n$, $\epsilon_{a_n} < 1/n$. By choosing points $x_n$, one from each of the tails of the sequences $a_n$, we can construct a new sequence $\{x_n\}$ such that $f(x_n) \to M$. Since we assume "not (P)," this is impossible, so $\epsilon_0 > 0$.
As a consequence of $\epsilon_0>0$, for any sequence $\{x_i\}$,
$$
\liminf_{i\to\infty}\big(M-f(x_i)\big)\ge \epsilon_0 > 0.
$$
In particular, for all $i$ sufficiently large,
$$
0 < \epsilon_0 \le M-f(x_i).
$$
When we apply this to the constant sequences $\{x_i\} = \{x\}$, "$0<\epsilon_0\le M-f(x_i)$ for all $i$ sufficiently large" simply becomes $f(x)\le M-\epsilon_0 < M$ because $x_i = x$ for all $i$. This is finally the contradiction we aimed for because we contradicted the definition of $M$ as $\sup_Cf(x)$.

The direct strategy of proof for (P) is much simpler and easier to execute. By definition of $M$, for each $n$, there must exist a point $x_n\in C$ such that $M\ge f(x_n)>M-1/n$. By definition of the points $x_n$, $f(x_n)\to M$. This part of the argument of Theorem 1.6.9  doesn't have to do with the compactness of $C$—it is a consequence of the definition of the supremum of the set of numbers $\{f(x):x\in C\}$.
