|
$f$ is continuous, so it will transform compact sets into compact sets. Thus since $[a,b]$ is compact, $f([a,b])$ is also compact. $f$ will thus attain on the interval $[a,b]$ a maximum and a minimum value because real compact sets are closed and bounded.
Consider the maximum and later use the same argument for $-f$ to consider the minimum.
By a known theorem if the maximum is attained in the interior of the domain, $c \in ]a,b[$ then $f(c) {is a maximum} \implies f'(c)=0$ , since $f$ is differentiable.
If the maximum isn't attained in $]a,b[$ and since it must be attained in $[a,b]$ either $f(a)$ or $f(b)$ is a maximum.
For the minimum consider $-f$ and note that $-f$ will verify all conditions of the theorem and that a maximum of $-f$ corresponds to a minimum of $f$ and that $-f'(c)=0 \iff f'(c)=0$ .
|