Fermat's Theorem

Knowing derivative of function f(x){f{{\left({x}\right)}}} allows us to make some conclusions about behavior of function y=f(x){y}={f{{\left({x}\right)}}}.

Fermat's Theorem. Suppose function y=f(x)y={f{{\left({x}\right)}}} is defined on interval [a,b]{\left[{a},{b}\right]} and at some point c(a,b){c}\in{\left({a},{b}\right)} takes maximum (minimum) value. If exist finite derivative f(c){f{'}}{\left({c}\right)} then f(c)=0{f{'}}{\left({c}\right)}={0}.

Note, that converse of Fermat's Theorem is not true, that is, if f(c)=0{f{'}}{\left({c}\right)}={0} then f{f{}} doesn't necessarily have maximum or minimum at c{c}.

For example, consider function f(x)=x3{f{{\left({x}\right)}}}={{x}}^{{3}} then f(x)=3x2{f{'}}{\left({x}\right)}={3}{{x}}^{{2}} and f(x)=0{f{'}}{\left({x}\right)}={0} when x=0{x}={0}, but x=0{x}={0} is neither maximum nor minimum. It is just a point where tangent line is horizontal and intersects graph.

Note that there may be maximum (or minimum) where f(c){f{'}}{\left({c}\right)} does not exist. For instance, the function f(x)=x{f{{\left({x}\right)}}}={\left|{x}\right|} has its minimum value at 0, but the value cannot be found by setting f(x)=0{f{'}}{\left({x}\right)}={0} because f(0){f{'}}{\left({0}\right)} does not exist.
Geometric interpretation of Fermat's theorem is fairly simple. Theorem states that if at point c{c} there is maximum or minimum then tangent line at that point is horizontal, i.e. its slope equals 0.

Also, we require point c{c} to be inner point of interval [a,b]{\left[{a},{b}\right]}. If point c{c} is endpoint (either a{a} or b{b}) then Fermat's theorem doesn't hold.

fermat theorem