In mathematics, Fermat’s theorem (also known as interior extremum theorem) is a method to find local maxima and minima of differentiable functions on open sets by showing that every local extremum of the function is a stationary point (the function’s derivative is zero at that point). Fermat’s theorem is a theorem in real analysis, named after Pierre de Fermat.
By using Fermat’s theorem, the potential extrema of a function {\displaystyle \displaystyle f}\displaystyle f, with derivative {\displaystyle \displaystyle f’}\displaystyle f’, are found by solving an equation in {\displaystyle \displaystyle f’}\displaystyle f’. Fermat’s theorem gives only a necessary condition for extreme function values, as some stationary points are inflection points (not a maximum or minimum). The function’s second derivative, if it exists, can sometimes be used to determine whether a stationary point is a maximum or minimum.
Contents
1 Statement
One way to state Fermat’s theorem is that, if a function has a local extremum at some point and is differentiable there, then the function’s derivative at that point must be zero. In precise mathematical language:
Let {\displaystyle f\colon (a,b)\rightarrow \mathbb {R} }f\colon (a,b) \rightarrow \mathbb{R} be a function and suppose that {\displaystyle x_{0}\in (a,b)}{\displaystyle x_{0}\in (a,b)} is a point where {\displaystyle f}f has a local extremum. If {\displaystyle f}f is differentiable at {\displaystyle \displaystyle x_{0}}\displaystyle x_{0}, then {\displaystyle f’(x_{0})=0}{\displaystyle f’(x_{0})=0}.
Another way to understand the theorem is via the contrapositive statement: if the derivative of a function at any point is not zero, then there is not a local extremum at that point. Formally:
If {\displaystyle f}f is differentiable at {\displaystyle x_{0}\in (a,b)}{\displaystyle x_{0}\in (a,b)}, and {\displaystyle f’(x_{0})\neq 0}{\displaystyle f’(x_{0})\neq 0}, then {\displaystyle x_{0}}x_{0} is not a local extremum of {\displaystyle f}f.
1.1 Corollary
The global extrema of a function f on a domain A occur only at boundaries, non-differentiable points, and stationary points. If {\displaystyle x_{0}}x_{0} is a global extremum of f, then one of the following is true:
boundary: {\displaystyle x_{0}}x_{0} is in the boundary of A
non-differentiable: f is not differentiable at {\displaystyle x_{0}}x_{0}
stationary point: {\displaystyle x_{0}}x_{0} is a stationary point of f
1.2 Extension
In higher dimensions, exactly the same statement holds; however, the proof is slightly more complicated. The complication is that in 1 dimension, one can either move left or right from a point, while in higher dimensions, one can move in many directions. Thus, if the derivative does not vanish, one must argue that there is some direction in which the function increases – and thus in the opposite direction the function decreases. This is the only change to the proof or the analysis.
The statement can also be extended to differentiable manifolds. If {\displaystyle f:M\to \mathbb {R} }{\displaystyle f:M\to \mathbb {R} } is a differentiable function on a manifold {\displaystyle M}M, then its local extrema must be critical points of {\displaystyle f}f, in particular points where the exterior derivative {\displaystyle df}df is zero.[1]