Proof of extremum principle, real analysis

In his book "Analysis I", Terence provides the proof of extremum principle, saying that each function with bounded domain must obtain maxima/minima. In previuos theorem it is already shown that each continuous function with bounded domain is bounded.

$\textbf{Proposition 9.6.7}$ Let $a,b \in \mathbb{R}: a<b$; $X \subset \mathbb{R}$ and let $f: X \to \mathbb{R}$, f is continuous. Then $f$ must obtain maxima/minima at some point $x_{max} / x_{min} \in [a,b]$

In the proof he provides a set $E = \{ f(x): x \in [a,b]\}$ and says maxima is attained with the value of $\sup(E)$ since $\forall x \in [a,b]: x \leq \sup(E)$, which is pretty clear to me.

What I cann not understand is that he says that further, it is necessary to find some $x_{max}$ which satisfies $f(x_{max}) = \sup(E)$. Does its existence not follow naturally from the definition of the set $E$?

No, not really. Imagine you would deviate from your $E$ a bit. For example for $f(x)=\frac{1}{x}$ we could write down $$E:=\{\frac{1}{x}:x\in (1,2]\}.$$ Please note, that the intervall in $E$ is not compact anymore. Then $$\sup(E)=1\geq\frac{1}{x}\mbox{ if }x\in(1,2].$$ Now suppose $1\in E$, which would mean there exists an $x_{max}\in (1,2]$ such that $\frac{1}{x_{max}}=1$. Hence $x_{max}=1$, which is a contradiction.

Hence more work is needed, in which you need to use the compactness of $[a,b]$, see Fred's answer.

• Thank you, all clear now! – Cebiş Mellim Mar 21 '18 at 9:30

First of all: it should read: $\forall x \in [a,b]: f(x) \leq \sup(E)$.

Without the continuity of $f$ you can not garantee that there is some $x_0 \in [a,b]$ with $f(x_0) =\sup(E)$. Example:

Let $a=0,b=1$ and

$g(x):=x$ for $x \in [0,1)$ and $g(1):=0$. Then $\sup(E)=1$, but $g(x)<1$ for all $x \in [0,1]$.

If $f$ is continuous, then we have some $x_0 \in [a,b]$ with $f(x_0) =\sup(E)$ !

Proof: there is a sequence $(x_n)$ in $[a,b]$ such that $f(x_n) \to \sup (E)$.

$(x_n)$ contains a convergent subsequenc $(x_{n_k})$ wit limit $x_0 \in [a,b]$.

Then, by continuity, $\sup(E)= \lim_{k \to \infty }f(x_{n_k})=f(x_0)$.