Fermat's theorem (stationary points)
   HOME

TheInfoList



OR:

In mathematics, Fermat's theorem (also known as interior extremum theorem) is a method to find local maxima and minima of
differentiable function In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non-vertical tangent line at each interior point in it ...
s on
open sets In mathematics, open sets are a generalization of open intervals in the real line. In a metric space (a set along with a distance defined between any two points), open sets are the sets that, with every point , contain all points that are suff ...
by showing that every local
extremum In mathematical analysis, the maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given ra ...
of the
function Function or functionality may refer to: Computing * Function key, a type of key on computer keyboards * Function model, a structured representation of processes in a system * Function object or functor or functionoid, a concept of object-oriente ...
is a
stationary point In mathematics, particularly in calculus, a stationary point of a differentiable function of one variable is a point on the graph of the function where the function's derivative is zero. Informally, it is a point where the function "stops" in ...
(the function's
derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
is zero at that point). Fermat's theorem is a
theorem In mathematics, a theorem is a statement that has been proved, or can be proved. The ''proof'' of a theorem is a logical argument that uses the inference rules of a deductive system to establish that the theorem is a logical consequence of t ...
in
real analysis In mathematics, the branch of real analysis studies the behavior of real numbers, sequences and series of real numbers, and real functions. Some particular properties of real-valued sequences and functions that real analysis studies include conv ...
, named after
Pierre de Fermat Pierre de Fermat (; between 31 October and 6 December 1607 – 12 January 1665) was a French mathematician who is given credit for early developments that led to infinitesimal calculus, including his technique of adequality. In particular, he ...
. By using Fermat's theorem, the potential extrema of a function \displaystyle f, with derivative \displaystyle f', are found by solving an equation in \displaystyle f'. Fermat's theorem gives only a necessary condition for extreme function values, as some stationary points are
inflection point In differential calculus and differential geometry, an inflection point, point of inflection, flex, or inflection (British English: inflexion) is a point on a smooth plane curve at which the curvature changes sign. In particular, in the case ...
s (not a maximum or minimum). The function's
second derivative In calculus, the second derivative, or the second order derivative, of a function is the derivative of the derivative of . Roughly speaking, the second derivative measures how the rate of change of a quantity is itself changing; for example, ...
, if it exists, can sometimes be used to determine whether a stationary point is a maximum or minimum.


Statement

One way to state Fermat's theorem is that, if a function has a local
extremum In mathematical analysis, the maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given ra ...
at some point and is
differentiable In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non-vertical tangent line at each interior point in its ...
there, then the function's derivative at that point must be zero. In precise mathematical language: :Let f\colon (a,b) \rightarrow \mathbb be a function and suppose that x_0 \in (a,b) is a point where f has a local extremum. If f is differentiable at \displaystyle x_0, then f'(x_0) = 0. Another way to understand the theorem is via the
contrapositive In logic and mathematics, contraposition refers to the inference of going from a conditional statement into its logically equivalent contrapositive, and an associated proof method known as proof by contraposition. The contrapositive of a statem ...
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 f is differentiable at x_0 \in (a,b), and f'(x_0) \neq 0, then x_0 is not a local extremum of f.''


Corollary

The global extrema of a function ''f'' on a domain ''A'' occur only at boundaries, non-differentiable points, and stationary points. If x_0 is a global extremum of ''f'', then one of the following is true: * boundary: x_0 is in the boundary of ''A'' * non-differentiable: ''f'' is not differentiable at x_0 * stationary point: x_0 is a stationary point of ''f''


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 f : M \to \mathbb is a
differentiable function In mathematics, a differentiable function of one real variable is a function whose derivative exists at each point in its domain. In other words, the graph of a differentiable function has a non-vertical tangent line at each interior point in it ...
on a manifold M, then its local extrema must be critical points of f, in particular points where the exterior derivative df is zero.


Applications

Fermat's theorem is central to the calculus method of determining maxima and minima: in one dimension, one can find extrema by simply computing the stationary points (by computing the zeros of the derivative), the non-differentiable points, and the boundary points, and then investigating this set to determine the extrema. One can do this either by evaluating the function at each point and taking the maximum, or by analyzing the derivatives further, using the
first derivative test In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information abo ...
, the
second derivative test In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information abou ...
, or the
higher-order derivative test In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information abo ...
.


Intuitive argument

Intuitively, a differentiable function is approximated by its derivative – a differentiable function behaves infinitesimally like a
linear function In mathematics, the term linear function refers to two distinct but related notions: * In calculus and related areas, a linear function is a function whose graph is a straight line, that is, a polynomial function of degree zero or one. For dist ...
a+bx, or more precisely, f(x_0) + f'(x_0)(x-x_0). Thus, from the perspective that "if ''f'' is differentiable and has non-vanishing derivative at x_0, then it does not attain an extremum at x_0," the intuition is that if the derivative at x_0 is positive, the function is ''
increasing In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of order ...
'' near x_0, while if the derivative is negative, the function is '' decreasing'' near x_0. In both cases, it cannot attain a maximum or minimum, because its value is changing. It can only attain a maximum or minimum if it "stops" – if the derivative vanishes (or if it is not differentiable, or if one runs into the boundary and cannot continue). However, making "behaves like a linear function" precise requires careful analytic proof. More precisely, the intuition can be stated as: if the derivative is positive, there is ''some point'' to the right of x_0 where ''f'' is greater, and ''some point'' to the left of x_0 where ''f'' is less, and thus ''f'' attains neither a maximum nor a minimum at x_0. Conversely, if the derivative is negative, there is a point to the right which is lesser, and a point to the left which is greater. Stated this way, the proof is just translating this into equations and verifying "how much greater or less". The
intuition Intuition is the ability to acquire knowledge without recourse to conscious reasoning. Different fields use the word "intuition" in very different ways, including but not limited to: direct access to unconscious knowledge; unconscious cognition; ...
is based on the behavior of polynomial functions. Assume that function ''f'' has a maximum at ''x''0, the reasoning being similar for a function minimum. If \displaystyle x_0 \in (a,b) is a local maximum then, roughly, there is a (possibly small) neighborhood of \displaystyle x_0 such as the function "is increasing before" and "decreasing after"This intuition is only correct for continuously differentiable \left(C^1\right) functions, while in general it is not literally correct—a function need not be increasing up to a local maximum: it may instead be oscillating, so neither increasing nor decreasing, but simply the local maximum is greater than any values in a small neighborhood to the left or right of it. See details in the pathologies. \displaystyle x_0. As the derivative is positive for an increasing function and negative for a decreasing function, \displaystyle f' is positive before and negative after \displaystyle x_0. \displaystyle f' doesn't skip values (by
Darboux's theorem Darboux's theorem is a theorem in the mathematical field of differential geometry and more specifically differential forms, partially generalizing the Frobenius integration theorem. It is a foundational result in several fields, the chief among ...
), so it has to be zero at some point between the positive and negative values. The only point in the neighbourhood where it is possible to have \displaystyle f'(x) = 0 is \displaystyle x_0. The theorem (and its proof below) is more general than the intuition in that it doesn't require the function to be differentiable over a neighbourhood around \displaystyle x_0. It is sufficient for the function to be differentiable only in the extreme point.


Proof


Proof 1: Non-vanishing derivatives implies not extremum

Suppose that ''f'' is differentiable at x_0 \in (a,b), with derivative ''K,'' and assume
without loss of generality ''Without loss of generality'' (often abbreviated to WOLOG, WLOG or w.l.o.g.; less commonly stated as ''without any loss of generality'' or ''with no loss of generality'') is a frequently used expression in mathematics. The term is used to indicat ...
that K > 0, so the tangent line at x_0 has positive slope (is increasing). Then there is a neighborhood of x_0 on which the
secant line Secant is a term in mathematics derived from the Latin ''secare'' ("to cut"). It may refer to: * a secant line, in geometry * the secant variety, in algebraic geometry * secant (trigonometry) (Latin: secans), the multiplicative inverse (or recipr ...
s through x_0 all have positive slope, and thus to the right of x_0, ''f'' is greater, and to the left of x_0, ''f'' is lesser. The schematic of the proof is: * an infinitesimal statement about derivative (tangent line) ''at'' x_0 implies * a local statement about difference quotients (secant lines) ''near'' x_0, which implies * a local statement about the ''value'' of ''f'' near x_0. Formally, by the definition of derivative, f'(x_0) = K means that :\lim_ \frac = K. In particular, for sufficiently small \varepsilon (less than some \varepsilon_0), the quotient must be at least K/2, by the definition of limit. Thus on the interval (x_0-\varepsilon_0,x_0+\varepsilon_0) one has: :\frac > K/2; one has replaced the ''equality'' in the limit (an infinitesimal statement) with an ''inequality'' on a neighborhood (a local statement). Thus, rearranging the equation, if \varepsilon > 0, then: :f(x_0+\varepsilon) > f(x_0) + (K/2)\varepsilon > f(x_0), so on the interval to the right, ''f'' is greater than f(x_0), and if \varepsilon < 0, then: :f(x_0+\varepsilon) < f(x_0) + (K/2)\varepsilon < f(x_0), so on the interval to the left, ''f'' is less than f(x_0). Thus x_0 is not a local or global maximum or minimum of ''f.''


Proof 2: Extremum implies derivative vanishes

Alternatively, one can start by assuming that \displaystyle x_0 is a local maximum, and then prove that the derivative is 0. Suppose that \displaystyle x_0 is a local maximum (a similar proof applies if \displaystyle x_0 is a local minimum). Then there exists \delta > 0 such that (x_0 - \delta,x_0 + \delta) \subset (a,b) and such that we have f(x_0) \ge f(x) for all x with \displaystyle , x - x_0, < \delta. Hence for any h \in (0,\delta) we have :\frac \le 0. Since the limit of this ratio as \displaystyle h gets close to 0 from above exists and is equal to \displaystyle f'(x_0) we conclude that f'(x_0) \le 0. On the other hand, for h \in (-\delta,0) we notice that :\frac \ge 0 but again the limit as \displaystyle h gets close to 0 from below exists and is equal to \displaystyle f'(x_0) so we also have f'(x_0) \ge 0. Hence we conclude that \displaystyle f'(x_0) = 0.


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 means 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.


Continuously differentiable functions

If ''f'' is continuously differentiable \left(C^1\right) on an open neighborhood of the point x_0, then f'(x_0) > 0 does mean that ''f'' is increasing on a neighborhood of x_0, as follows. If f'(x_0) = K > 0 and f \in C^1, then by continuity of the derivative, there is some \varepsilon_0 > 0 such that f'(x) > K/2 for all x \in (x_0 - \varepsilon_0, x_0 + \varepsilon_0). Then ''f'' is increasing on this interval, by the mean value theorem: the slope of any secant line is at least K/2, as it equals the slope of some tangent line. However, in the general statement of Fermat's theorem, where one is only given that the derivative ''at'' x_0 is positive, one can only conclude that secant lines ''through'' x_0 will have positive slope, for secant lines between x_0 and near enough points. Conversely, if the derivative of ''f'' at a point is zero (x_0 is a stationary point), one cannot in general conclude anything about the local behavior of ''f'' – it may increase to one side and decrease to the other (as in x^3), increase to both sides (as in x^4), decrease to both sides (as in -x^4), or behave in more complicated ways, such as oscillating (as in x^2 \sin(1/x), as discussed below). One can analyze the infinitesimal behavior via the
second derivative test In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information abou ...
and
higher-order derivative test In calculus, a derivative test uses the derivatives of a function to locate the critical points of a function and determine whether each point is a local maximum, a local minimum, or a saddle point. Derivative tests can also give information abo ...
, if the function is differentiable enough, and if the first non-vanishing derivative at x_0 is a continuous function, one can then conclude local behavior (i.e., if f^(x_0) \neq 0 is the first non-vanishing derivative, and f^ is continuous, so f \in C^k), then one can treat ''f'' as locally close to a polynomial of degree ''k,'' since it behaves approximately as f^(x_0) (x - x_0)^k, but if the ''k''-th derivative is not continuous, one cannot draw such conclusions, and it may behave rather differently.


Pathological functions

The function \sin(1/x) – it oscillates increasingly rapidly between -1 and 1 as ''x'' approaches 0. Consequently, the function f(x) = (1 + \sin(1/x))x^2 oscillates increasingly rapidly between 0 and 2x^2 as ''x'' approaches 0. If one extends this function by defining f(0) = 0 then the extended function is continuous and everywhere differentiable (it is differentiable at 0 with derivative 0), but has rather unexpected behavior near 0: in any neighborhood of 0 it attains 0 infinitely many times, but also equals 2x^2 (a positive number) infinitely often. Continuing in this vein, one may define g(x) = (2 + \sin(1/x))x^2, which oscillates between x^2 and 3x^2. The function has its local and global minimum at x=0, but on no neighborhood of 0 is it decreasing down to or increasing up from 0 – it oscillates wildly near 0. This pathology can be understood because, while the function is everywhere differentiable, it is not ''continuously'' differentiable: the limit of g'(x) as x \to 0 does not exist, so the derivative is not continuous at 0. This reflects the oscillation between increasing and decreasing values as it approaches 0.


See also

*
Optimization (mathematics) Mathematical optimization (alternatively spelled ''optimisation'') or mathematical programming is the selection of a best element, with regard to some criterion, from some set of available alternatives. It is generally divided into two subfi ...
* Maxima and minima *
Derivative In mathematics, the derivative of a function of a real variable measures the sensitivity to change of the function value (output value) with respect to a change in its argument (input value). Derivatives are a fundamental tool of calculus. ...
*
Extreme value In mathematical analysis, the maxima and minima (the respective plurals of maximum and minimum) of a function, known collectively as extrema (the plural of extremum), are the largest and smallest value of the function, either within a given ran ...
* arg max *
Adequality Adequality is a technique developed by Pierre de Fermat in his treatise ''Methodus ad disquirendam maximam et minimam''Theorems in real analysis Differential calculus Articles containing proofs Theorems in calculus