Fermat's Theorem (stationary Points) - Cautions

Cautions

A subtle misconception that is often held in the context of Fermat's theorem is to assume that it makes a stronger statement about local behavior than it does. Notably, Fermat's theorem does not say that functions (monotonically) "increase up to" or "decrease down from" a local maximum. This is very similar to the misconception that a limit means "monotonically getting closer to a point".

For "well-behaved functions" (which here mean continuously differentiable), some intuitions hold, but in general functions may be ill-behaved, as illustrated below.

The moral is that derivatives determine infinitesimal behavior, and that continuous derivatives determine local behavior.

Read more about this topic:  Fermat's Theorem (stationary Points)