# Are absolute extrema only in continuous functions?

The Extreme Value Theorem says that if $f(x)$ is continuous on the interval $[a,b]$ then there are two numbers, $a≤c$ and $d≤b$, so that $f(c)$ is an absolute maximum for the function and $f(d)$ is an absolute minimum for the function.

So, if we have a continuous function on $[a,b]$ we're guaranteed to have both absolute maximum and absolute minimum, but functions that aren't continuous can still have either an absolute min or max?

For example, the function $f(x)=1/x^2$ on $[-1,1]$ isn't continuous at $x=0$ since the function is approaching infinity, so this function doesn't have an absolute maximum. Another example: suppose a graph is on a closed interval and there is a jump discontinuity at a point $x=c$, and this point is the absolute minimum.

The extreme value theorem requires continuity in order for absolute extrema to exist, so why can there be extrema where the function isn't continuous?

-

First of all, $f(x) = x^{-2}$ isn't well defined on the domain $[-1,1]$, specifically where $x = 0$, so you can't really say that it is discontinuous. But if you assign it any value at $x = 0$, so $f(0) := c$ for $c \in \mathbb{R}$, it is discontinuous. Then, as shown by yourself, continuity isn't needed to find a function on an interval $[a,b]$ having absolute extrema. This is reflected by the extreme value theorem, because it only guarantees extreme values for a continuous, real function on an interval $[a,b]$, but does not say that a function, having such extreme values, necessarily is continuous.

-

This is a difference between necessary and sufficient conditions, see here.

The extreme value theorem states that continuity on a closed interval is sufficient to ensure that the function attains a maximum and minimum. However, this condition is not necessary. Consider $$f(x) = \begin{cases} 1, \text{ for x=0} \\ 0, \text{ elsewhere}. \end{cases}$$ Clearly, $\max(f)=1$, $\min(f)=0$, but $f$ is discontinuous at $x=0$.

-

Semi-continuous functions have this property.

-