Local and global maxima and minima for cos(3πx)/x, 0.1≤ x≤1.1
Inmathematical analysis, themaximum andminimum[a] of afunction are, respectively, the greatest and least value taken by the function. Known generically asextremum,[b] they may be defined either within a givenrange (thelocal orrelative extrema) or on the entiredomain (theglobal orabsolute extrema) of a function.[1][2][3]Pierre de Fermat was one of the first mathematicians to propose a general technique,adequality, for finding the maxima and minima of functions.
A real-valuedfunctionf defined on adomainX has aglobal (orabsolute)maximum point atx∗, iff(x∗) ≥f(x) for allx inX. Similarly, the function has aglobal (orabsolute)minimum point atx∗, iff(x∗) ≤f(x) for allx inX. The value of the function at a maximum point is called themaximum value of the function, denoted, and the value of the function at a minimum point is called theminimum value of the function, (denoted for clarity). Symbolically, this can be written as follows:
is a global maximum point of function if
The definition of global minimum point also proceeds similarly.
If the domainX is ametric space, thenf is said to have alocal (orrelative)maximum point at the pointx∗, if there exists someε > 0 such thatf(x∗) ≥f(x) for allx inX within distanceε ofx∗. Similarly, the function has alocal minimum point atx∗, iff(x∗) ≤f(x) for allx inX within distanceε ofx∗. A similar definition can be used whenX is atopological space, since the definition just given can be rephrased in terms of neighbourhoods. Mathematically, the given definition is written as follows:
Let be a metric space and function. Then is a local maximum point of function if such that
The definition of local minimum point can also proceed similarly.
In both the global and local cases, the concept of astrict extremum can be defined. For example,x∗ is astrict global maximum point if for allx inX withx ≠x∗, we havef(x∗) >f(x), andx∗ is astrict local maximum point if there exists someε > 0 such that, for allx inX within distanceε ofx∗ withx ≠x∗, we havef(x∗) >f(x). Note that a point is a strict global maximum point if and only if it is the unique global maximum point, and similarly for minimum points.
Acontinuous real-valued function with acompact domain always has a maximum point and a minimum point. An important example is a function whose domain is a closed and boundedinterval ofreal numbers (see the graph above).
Finding global maxima and minima is the goal ofmathematical optimization. If a function is continuous on a closed interval, then by theextreme value theorem, global maxima and minima exist. Furthermore, a global maximum (or minimum) either must be a local maximum (or minimum) in the interior of the domain, or must lie on the boundary of the domain. So a method of finding a global maximum (or minimum) is to look at all the local maxima (or minima) in the interior, and also look at the maxima (or minima) of the points on the boundary, and take the greatest (or least) one.
For any function that is definedpiecewise, one finds a maximum (or minimum) by finding the maximum (or minimum) of each piece separately, and then seeing which one is greatest (or least).
No global minima or maxima. Although the first derivative (3x2) is 0 atx = 0, this is aninflection point. (2nd derivative is 0 at that point.)
Unique global maximum atx =e. (See figure at right)
x−x
Unique global maximum over the positive real numbers atx = 1/e.
x3/3 −x
First derivativex2 − 1 andsecond derivative 2x. Setting the first derivative to 0 and solving forx givesstationary points at −1 and +1. From the sign of the second derivative, we can see that −1 is a local maximum and +1 is a local minimum. This function has no global maximum or minimum.
|x|
Global minimum atx = 0 that cannot be found by taking derivatives, because the derivative does not exist atx = 0.
cos(x)
Infinitely many global maxima at 0, ±2π, ±4π, ..., and infinitely many global minima at ±π, ±3π, ±5π, ....
2 cos(x) −x
Infinitely many local maxima and minima, but no global maximum or minimum.
cos(3πx)/x with0.1 ≤x ≤ 1.1
Global maximum atx = 0.1 (a boundary), a global minimum nearx = 0.3, a local maximum nearx = 0.6, and a local minimum nearx = 1.0. (See figure at top of page.)
x3 + 3x2 − 2x + 1 defined over the closed interval (segment) [−4,2]
Local maximum atx = −1−√15/3, local minimum atx = −1+√15/3, global maximum atx = 2 and global minimum atx = −4.
For a practical example,[6] assume a situation where someone has feet of fencing and is trying to maximize the square footage of a rectangular enclosure, where is the length, is the width, and is the area:
The derivative with respect to is:
Setting this equal to
reveals that is our onlycritical point.Now retrieve theendpoints by determining the interval to which is restricted. Since width is positive, then, and since, that implies that.Plug in critical point, as well as endpoints and, into, and the results are and respectively.
Therefore, the greatest area attainable with a rectangle of feet of fencing is.[6]
Peano surface, a counterexample to some criteria of local maxima of the 19th centuryThe global maximum is the point at the topCounterexample: The red dot shows a local minimum that is not a global minimum
For functions of more than one variable, similar conditions apply. For example, in the (enlargeable) figure on the right, the necessary conditions for alocal maximum are similar to those of a function with only one variable. The firstpartial derivatives as toz (the variable to be maximized) are zero at the maximum (the glowing dot on top in the figure). The second partial derivatives are negative. These are only necessary, not sufficient, conditions for a local maximum, because of the possibility of asaddle point. For use of these conditions to solve for a maximum, the functionz must also bedifferentiable throughout. Thesecond partial derivative test can help classify the point as a relative maximum or relative minimum.In contrast, there are substantial differences between functions of one variable and functions of more than one variable in the identification of global extrema. For example, if a bounded differentiable functionf defined on a closed interval in the real line has a single critical point, which is a local minimum, then it is also a global minimum (use theintermediate value theorem andRolle's theorem to prove this bycontradiction). In two and more dimensions, this argument fails. This is illustrated by the function
whose only critical point is at (0,0), which is a local minimum withf(0,0) = 0. However, it cannot be a global one, becausef(2,3) = −5.
If the domain of a function for which an extremum is to be found consists itself of functions (i.e. if an extremum is to be found of afunctional), then the extremum is found using thecalculus of variations.
Maxima and minima can also be defined for sets. In general, if anordered setS has agreatest elementm, thenm is amaximal element of the set, also denoted as. Furthermore, ifS is a subset of an ordered setT andm is the greatest element ofS with (respect to order induced byT), thenm is aleast upper bound ofS inT. Similar results hold forleast element,minimal element andgreatest lower bound. The maximum and minimum function for sets are used indatabases, and can be computed rapidly, since the maximum (or minimum) of a set can be computed from the maxima of a partition; formally, they are self-decomposable aggregation functions.
In the case of a generalpartial order, aleast element (i.e., one that is less than all others) should not be confused with theminimal element (nothing is lesser). Likewise, agreatest element of apartially ordered set (poset) is anupper bound of the set which is contained within the set, whereas themaximal elementm of a posetA is an element ofA such that ifm ≤b (for anyb inA), thenm =b. Any least element or greatest element of a poset is unique, but a poset can have several minimal or maximal elements. If a poset has more than one maximal element, then these elements will not be mutually comparable.
In atotally ordered set, orchain, all elements are mutually comparable, so such a set can have at most one minimal element and at most one maximal element. Then, due to mutual comparability, the minimal element will also be the least element, and the maximal element will also be the greatest element. Thus in a totally ordered set, we can simply use the termsminimum andmaximum.
If a chain is finite, then it will always have a maximum and a minimum. If a chain is infinite, then it need not have a maximum or a minimum. For example, the set ofnatural numbers has no maximum, though it has a minimum. If an infinite chainS is bounded, then theclosureCl(S) of the set occasionally has a minimum and a maximum, in which case they are called thegreatest lower bound and theleast upper bound of the setS, respectively.
As an example, both unnormalised and normalisedsinc functions above have of {0} because both attain their global maximum value of 1 atx = 0.
The unnormalised sinc function (red) hasarg min of {−4.49, 4.49}, approximately, because it has 2 global minimum values of approximately −0.217 atx = ±4.49. However, the normalised sinc function (blue) hasarg min of {−1.43, 1.43}, approximately, because their global minima occur atx = ±1.43, even though the minimum value is the same.[7]Inmathematics, the arguments of the maxima (abbreviatedarg max or argmax) and arguments of the minima (abbreviated arg min or argmin) are the input points at which afunction output value ismaximized and minimized, respectively.[8] While thearguments are defined over thedomain of a function, the output is part of itscodomain.