# Extreme value theorem using continuous image of compact is compact + Heine Borel

EVT: Let $f: [a,b] \to \mathbb{R}$ be continuous, then $f$ achieves maximum and minimum

I think it is very easy to prove using continuous image of compact is compact + Heine Borel but I am stuck on showing that the $\sup$ and $\inf$ are actually $\max$ and $\min$

Proof attempt:

Since $[a,b]$ is compact, $f$ continuous, therefore $f([a,b])$ is compact.

By Heine Borel, $f([a,b])$ is closed and bounded. By boundedness, $f([a,b]) \subseteq [-N,N], N \in \mathbb{R}_{+}$.

Let $u := \sup f([a,b])$, then we wish to show that $u \in f([a,b])$

I'm guessing if I were to continue, it would be something like this. Since $u$ is the $\sup f([a,b])$, then there exists $u_1 \in [u-\epsilon, u]$ for some $\epsilon >0$, otherwise $u$ is not the supremum. Then we can find $u_2 \in [u_1-\epsilon, u]$...this builds a Cauchy sequence. Since any closed interval in $\mathbb{R}$ is complete, the Cauchy sequence converges. Since $f([a,b])$ is closed, and $u_1, u_2,\ldots$ converges to $u$, therefore $u \in f([a,b])$.

Is this correct?

Note: I realized that the above would rely on sequential compactness rather than covering compactness. What is another way to prove this that is more topologically oriented?

• Not quite. Based on the way you have it written, you can choose the constant sequence $\{u_1,u_1,\ldots\}$. – Aweygan Jul 30 '16 at 22:55
• keep in mind the trivial case where the function is constant, I think that's along the lines of what Aweygan was saying. – Alan Jul 30 '16 at 22:59
• It is much simpler to argue via contradiction. If $M = \sup f$ and $f$ never takes value $M$ in $[a, b]$ then $g(x) = 1/\{M - f(x)\}$ is continuous on $[a, b]$ and hence bounded. But since $f$ can take values arbitrarily close to $M$ the expression $M - f(x)$ can be made arbitrarily small and thus $g(x)$ takes arbitrarily large values and this contradicts that $g$ is bounded. – Paramanand Singh Jul 31 '16 at 9:08

Since the image is compact, the supremum (now seen as the supremum of the set of attained values of $f$) does belong to the image (as a set). (A compact set contains its supremum.) But what does it mean for a value $y$ to be in the image? It means that there is an $x$ in the domain such that $f(x)=y$.
Put $M=\sup\limits_{x\in[a,b]}f(x)$. There is a sequence $\{x_n\}$ in $[a,b]$ with $$M\leq f(x_n)+\frac{1}{n},$$ And thus $f(x_n)\to M$ as $n\to\infty$. Since $[a,b]$ is compact, there is a subsequence $\{x_{n_k}\}$ of $\{x_n\}$ convergent to some $x_0\in[a,b]$, and the continuity of $f$ guarantees that $f(x_{n_k})\to f(x_0)$ as $k\to\infty$. But $f(x_n)$ is convergent, so $f(x_{n_k})$ must converge to the same value, and thus $f(x_0)=M$.
The corresponding proof for $\inf$ follows by applying the proceeding argument to $-f$.