If a function is defined on a closed interval $[a,b]$, does it necessarily achieve a max and min value on that interval?

3k Views Asked by At

The extreme value theorem requires that a function be continuous on a closed interval $[a,b]$ for it to necessarily take on a max and min, but I've been thinking and it seems to me that as long as it is defined for all numbers in a closed interval it will take on a max and min on that interval.

Is this correct?

2

There are 2 best solutions below

0
On

Consider $f:[-1,1] \to \mathbb{R},$

$$f(x)=\begin{cases} |x| &, x\in [-1,1]\setminus \{ 0\}\\ 1&, x=0 \end{cases}$$

then this function does not have a global minimum.

Another function would be $g: [-1,1] \to \mathbb{R}$,

$$g(x)=\begin{cases} \frac{1}{x+1}+\frac{1}{x-1} &, |x| \leq 1\\ 0&, |x|=1 \end{cases}$$

2
On

Consider the function: $$f(x) = \begin{cases}\frac{1}{x} & x\neq 0 \\ 0 & x = 0\end{cases}$$ on any interval $[a,b]$ such that $0\in (a,b)$. It has no global maximum or minimum, and is even continuous (and infinitely differentiable) on the entire interval besides $0$.