# Extreme Value Theorem proof help

Extreme Value Theorem: If $f$ is a continuous function on an interval [a,b],
then $f$ attains its maximum and minimum values on [a,b].

Proof from my book: Since $f$ is continuous, then $f$ has the least upper bound, call it $M$. Assume there is no value $c \in [a,b]$ for which $f(c)=M$.
Therefore, $f(x)<M$ for all $x \in [a,b]$. Define a new function $g$ by

$g(x)=\frac{1}{M-f(x)}$

Observe $g(x)>0$ for every $x\in[a,b]$ and that $g$ is continuous and bounded on [a,b]. Therefore there exists $K>0$ such that $g(x)\le K$ for every $x\in [a,b]$. Since for each $x \in [a,b]$,

$g(x)= \frac{1}{M-f(x)} \le K$ is equivalent to $f(x)\le M-\frac{1}{K}$,

we have contradicted the fact that $M$ was assumed to be the least upper bound of $f$ on [a,b].
Hence, there must be a balue $c\in[a,b]$ such that $f(c)=M$.

Q: Where does the function $g$ come from? Is there a popular alternative proof?

• using Bolzano-weierstrass ,there is an alternate nicer proof.see :en.wikipedia.org/wiki/Extreme_value_theorem Apr 29, 2013 at 20:46
• @StefanSmith, $f$ is bounded by the boundedness theorem Jul 17, 2014 at 15:52
• @Elimination : Thanks, you're right. I had to Google "the boundedness theorem". The proof should mention why $f$ must be bounded, unless it is clear from context, from something immediately before it in the OP's book. I still prefer the proof that Halil Duru cites. Jul 19, 2014 at 0:24
• How come we assumed that $g(x) \le K$, when what we need to prove in the first place is that a continuous function like this will be less that equal to its least upper bound, and not just strictly less than that. That's where the proof began right? With assuming $f(x) \lt M$. Jun 26 at 8:14

The "simplest" proof I know goes something like this : If $M$ is the supremum of $f$, then there is a sequence $(x_n)$ such that $f(x_n) \to M$. Now, $(x_n)$ itself may not be convergent, but since $[a,b]$ is compact, it will have a convergent subsequence $(x_{n_k})$. Suppose $x_{n_k} \to c \in [a,b]$, then $f(x_{n_k}) \to f(c)$. But $f(x_{n_k})$ is a subsequence of $f(x_n)$, and hence must converge to $M$. Hence, $f(c) = M$.

This is quite a simple proof, isn't it? Why do you want a 'popular alternative proof'?

The proof can't be too simple, because the result is not true if $f$ is defined over $\mathbb Q$ instead of $\mathbb R$. For instance, define $f:\mathbb Q \to \mathbb Q$ by $f(x) = x^3 - x$. Then $f$ doesn't attain its maximum in $[-1,0]$, because $-\sqrt\frac{1}{3} \notin \mathbb Q$. Hence any proof of your theorem must use the properties of the real numbers in an essential way.

As an illuminating exercise, try to see where the proof breaks down if $f$ is only defined over the rational numbers.

• May you guide where the proof breaks Sir ? @TonyK May 6 at 23:55

Where does the function $g$ come from?

We need to show that $f(x)=M$ for some $x$. A natural move is to consider the difference between $f$ and $M$. Let $d(x)=M-f(x)$. $f(x)=M \leftrightarrow d(x)=0$. The reason that the definition $g(x)=(d(x))^{-1}$ uses the inverse of the difference is that if $g$ is bounded from above by $K>0$, than $d$ is bounded from below by $K^{-1}>0$. $g$ is bounded by the boundedness theorem, thus we know a positive lower bound of $d$. Applying the boundedness theorem directly to $d$ is useless because the lower bound of $d$ can be $0$. This is the intuition behind $g$.

• Sir the proof shows the maximum bound which is being achived that is f(x) = M for some c . But what about the minimum value which the function is taking how to show it takes the minimum value too ? ( I am referring to a situation where maxium of function is at y= 5 but minimum is at y= -3 ) that is not symmetric about y axis Apr 20 at 4:08
• @Orion_Pax If I understood you correctly, you want the proof for the minimum value. It's similar to the proof for the maximum value, but is mirrored with respect to the Y axis. You start with proving that $f$ has the greatest lower bound. May 6 at 20:47
• Actually i already told whats wrong with that mirror part , may you once check this : @beroal May 6 at 23:49
• math.stackexchange.com/q/4431692/922054 this @beroal May 6 at 23:50
• @Orion_Pax Okay, I wrote the mirror proof in full math.stackexchange.com/a/4445009/7011 . Comment there if your think there is something wrong with it. May 7 at 8:04

You asked for a "popular alternative proof". This is an alternative proof. I don't know how popular it is, but I like it. It uses the Bolzano-Weierstrass theorem (convergent subsequences) but hardly anything else, no least upper bounds; it skips the step of proving boundedness, going straight for the maximum. It could be shortened by using the fact that the set of rational numbers is countable, but that seems unnecessarily sophisticated.

Given a continuous real-valued function $f$ on $[a,b]$, we will show that the set $Y = f([a,b])$ has a greatest element.

For each positive integer $n$, define a finite set $Q_n = \{\frac{p}{q}: p,q \text{ integers, } 0 < q \le n, |p| \le n\}$.

Choose $y_n\in Y$ so as to maximize the number of elements in the set $\{r\in Q_n: y_n > r\}$, and choose $x_n\in[a,b]$ with $f(x_n) = y_n$.

The sequence $\{x_n\}$ has a subsequence converging to a point $c\in[a,b]$. Since $f$ is continuous, the corresponding subsequence of $\{y_n\}$ converges to $f(c)$. We will show that $f(c)$ is the greatest element of $Y$.

Assume for a contradiction that $f(c)<y\in Y$. Choose a rational number $r$ so that $f(c)<r<y$. Because of the way $y_n$ was chosen, we have $y_n > r$ whenever $r\in Q_n$. Since $r\in Q_n$ for all sufficiently large $n$, we have $y_n > r > f(c)$ for all sufficiently large $n$. But this is absurd, since $\{y_n\}$ has a subsequence converging to $f(c)$.