# Question about extreme value theorem

The extreme value theorem says that if $f$ is continuous on $[0,1]$ (or any other closed interval $[a,b]$), then it has a maximum and minimum on $[0,1]$.

If $f$ is continuous on $[0,1]$, can it have a maximum on $[0,1]$ but not a minimum or vice versa?

• No, as that would contradict the extreme value theorem. – Adriano May 22 '17 at 6:14
• "The extreme value theorem says...then it has a maximum and minimum on [0,1]" Yes, it does. "can it have a maximum on [0,1] but not a minimum or vice versa?" Um.. you just said it must have both. – fleablood May 22 '17 at 6:16
• To put it yet another way, $\,f\,$ is continuous on $\,[0,1]\,$ iff $\,-f\,$ is continuous on $\,[0,1]\,$. But any maximum of $\,f\,$ corresponds to a minimum of $\,-f\,$, so one implies the other and they are therefore equivalent. – dxiv May 22 '17 at 6:49

Say the function does not have a maximum then there exists a sequence $\{x_n\}\in [a,b]$ such that $f(x_n)>n$ for all $n\in \mathbb{N}$.
Now the sequence has a convergent subsequence which converges to some point $x\in [a,b]$ as $[a,b]$ is closed and bounded, and since $f$ is continuous $f(x_n)$ must converge to $f(x)$, but $f(x)$ is a finite number, and $f(x_n)$ tends to $\infty$, hence a contradiction, so $f(x)$ has a maximum, smilarly you can prove it has a minimum.