A Demonstration of the Procedure minimize
The procedure minimize returns the infimum of an expression or function over a given domain. It is also possible to have minimize return both the infimum and the location where the infimum is either approached or achieved.
restart
The Infimum of a Function
A function f on a given domain D is said to be bounded below on D if there exists a real number β such that β≤f⁡x for each x in D. If such a β exists then it is called a lower bound of f on D. For example, the function cosh(x) is bounded below by 0, (or any other number less than or equal to 1.)
plot⁡cosh⁡x,x=−3..3,y=−1..5
If a function f is bounded below on a domain D and if there exists an alpha which is a lower bound of f on D with the additional property that for any other lower bound gamma it follows that γ≤α then alpha is said to be the infimum of the function f on D. For example, the infimum of the function cosh⁡x over the real line is 1. Another example is the function ⅇx on the real line which has an infimum of 0 but there does not exist a real number x such that ⅇx=0.
plot⁡ⅇx,x=−5..2
If a function is not bounded below then the infimum is said to be −∞. For example, the infimum of tan⁡x on the interval -5..5 is −∞:
plot⁡tan⁡x,x=−5..5,y=−10..10,'discont=true'
An Example of Finding the Infimum Analytically
As an example, we will prove that the infimum of cosh⁡x on the real line is 1.
cosh⁡0=1 and therefore 1 is a lower bound. Differentiating cosh⁡x with respect to x, we get
ⅆⅆx⁢cosh⁡x
sinh⁡x
which is a function which is strictly greater than zero for 0<x and strictly less than zero for x>0.
Proof Using the Mean Value Theorem
The mean value theorem states that for two values x and y where x<y, there exists some value c in the open interval (x,y) such that f⁡y−f⁡x=ⅆⅆx⁢f⁡xx=c|ⅆⅆx⁢f⁡xx=c⁢y−x .
In this case, if we assume y>0 this gives us that cosh⁡y−cosh⁡0=sinh⁡c⁢y for some value c in the open interval (0,y). Therefore c>0 and thus 0<sinh⁡c and so therefore 0<cosh⁡y−1. A similar argument gives us the same result when y<0. Therefore the infimum of cosh⁡x is 1.
minimize⁡cosh⁡x,x=−∞..∞
1
The user may wish to try this technique with a simpler function such as x2.
Specifying the Domain of a Variable
The domain of a variable can be specified in one of three ways:
The Default minimize( f(x), x )
If just the variable is listed, then it is assumed that that variable is to be minimized over the entire real line, that is, −∞..∞.
minimize⁡sin⁡x
−1
A Range minimize( f(x), x = 0..1 )
If the variable is equated to a range, then the variable is minimized over the closed interval bounded by the given range. The endpoints of the range must be of type realcons.
minimize⁡sin⁡x,x=0..4
sin⁡4
This form of specifying the domain over which the function is to be minimized allows a quick substitution to give a plot of the function:
minimize⁡x2−x⁢y+2⁢y2+ⅇx,x=−1..0,y=−12..12
7⁢LambertW⁡4728+ⅇ−LambertW⁡47
evalf⁡
0.8101382722
plot3d⁡x2−x⁢y+2⁢y2+ⅇx,x=−1..0,y=−12..12,'axes=framed'
A Simple Relation minimize( f(x), x > 0 )
A domain can be specified by having a name related to an object of type realcons by one of the relation operators =, <, <=, > or >=. Some examples are:
minimize⁡cosh⁡x,x=5
cosh⁡5
minimize⁡x2,5<x
25
minimize⁡sin⁡x,x<3
minimize⁡signum⁡x,0<x
minimize⁡signum⁡x,0≤x
If no domains are given for any variable then it is assumed that each indeterminate of type name is being minimized over the entire real line:
minimize⁡x2+cosh⁡y+3
4
minimize⁡x2+cosh⁡y+3,x=−∞..∞,y=−∞..∞
minimize⁡x2+cosh⁡y+3,x=−∞..∞
3+cosh⁡y
plot3d⁡x2+cosh⁡y+3,x=−5..5,y=−5..5,'axes=framed'
Option location
If the option location or location=true is given, then an expression sequence of two objects is returned, the first being the infimum and the second is a set of lists where the first operand of each list is a list of substitutions which indicates a point or set of points at or near which the infimum is either approached or achieved. Four examples are:
minimize⁡x2,x=−3..3,'location'
0,x=0,0
minimize⁡cosh⁡x,x=−3..3,'location'
1,x=0,1
minimize⁡x2−22,x=−4..4,'location'
0,x=2,0,x=−2,0
minimize⁡sin⁡x,x=2..12,'location'
−1,x=3⁢π2,−1,x=7⁢π2,−1
In some cases, minimize cannot determine the location and therefore returns FAIL as the location.
minimize⁡signum⁡cosh⁡x−3,x=1..3,'location'
−1,∅
The option location=false can be given to indicate explicitly that only the infimum is wanted.
If there are multiple options for the keyword location then the last is used.
minimize⁡sin⁡x,x=0..4,'location','location=false'
minimize⁡sin⁡x,x=0..4,'location=false','location'
sin⁡4,x=4,sin⁡4
The location Data Structure
A location data structure (see previous section) can be used to quickly find the value of the function or the point(s) where the infimum is achieved (assuming the function is continuous and being minimized over a closed interval.)
minima,points:=minimize⁡3−x2−4⁢y2,x=−4..4,y=−2..2,'location'
minima,points≔−29,x=−4,y=−2,−29,x=−4,y=2,−29,x=4,y=−2,−29,x=4,y=2,−29
for i in points do 'x','y'=subsi1,x,y; od
x,y=−4,−2
x,y=−4,2
x,y=4,−2
x,y=4,2
Relation of the Location of the Minimum and the Infimum
If the infimum is finite then any location returned when option location is given indicates that that the infimum is either achieved at that point or approached arbitrarily closely in any open neighborhood around the point. The location may not even be in the original interval being minimized over, but rather one of the endpoints of the interval. If the infimum is −∞ then the function is not bounded below on any open neighborhood of the point.
minimize⁡piecewise⁡x=0,1,x,'location'
minimize⁡piecewise⁡x=0,−1,x,'location'
−1,x=0,−1
maximize⁡ⅇ−x, x>0,'location'
minimize⁡lnx, x>0,'location'
−∞,x=0,−∞
Return to Index for Example Worksheets
Download Help Document