Derivative at Maximum or Minimum

Theorem
Let $f$ be a real function which is differentiable on the open interval $\left({a \,.\,.\, b}\right)$.

Let $f$ have a local minimum or local maximum at $\xi \in \left({a \,.\,.\, b}\right)$.

Then $f^{\prime} \left({\xi}\right) = 0$.

Proof
By definition of derivative at a point:
 * $\dfrac {f \left({x}\right) - f \left({\xi}\right)} {x - \xi} \to f^{\prime} \left({\xi}\right)$ as $x \to \xi$

Suppose $f^{\prime} \left({\xi}\right) > 0$.

Then from Behaviour of Function Near Limit‎ it follows that:

$\exists I = \left({\xi - h \,.\,.\, \xi + h}\right): \dfrac {f \left({x}\right) - f \left({\xi}\right)} {x - \xi} > 0$

provided that $x \in I$ and $x \ne \xi$.

Now let $x_1$ be any number in the open interval $\left({\xi - h \,.\,.\, \xi}\right)$.

Then $x_1 - \xi < 0$ and hence from $\dfrac {f \left({x_1}\right) - f \left({\xi}\right)} {x_1 - \xi} > 0$ it follows that $f \left({x_1}\right) < f \left({\xi}\right)$.

Thus $f$ can not have a local minimum at $\xi$.

Now let $x_2$ be any number in the open interval $\left({\xi \,.\,.\, \xi + h}\right)$.

Then $x_2 - \xi > 0$ and hence from $\dfrac {f \left({x_2}\right) - f \left({\xi}\right)} {x_2 - \xi} > 0$ it follows that $f \left({x_2}\right) > f \left({\xi}\right)$.

Thus $f$ can not have a local maximum at $\xi$ either.

A similar argument can be applied to $-f$ to handle the case where $f^{\prime} \left({\xi}\right) < 0$.

The only other possibility is that $f^{\prime} \left({\xi}\right) = 0$, hence the result.