minimize - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : Mathematics : Optimization : minimize

minimize

compute the minimum symbolically

maximize

compute the maximum symbolically

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

minimize(expr, opt1, opt2, ..., optn)

maximize(expr, opt1, opt2, ..., optn)

Parameters

expr

-

algebraic expression

opt1, opt2, ..., optn

-

options -- see below

Description

• 

The minimize(expr, opt1, opt2, ..., optn) function returns the infimum of expr if possible.  If minimize cannot find the infimum, it returns an unevaluated function call.

• 

If the option location or location = true is given then the output is an expression sequence with the first argument being the minimum and the second a set of lists, where the first argument of each list is a set of substitutions that describe a point at or in a neighborhood of where the infimum is either achieved or approached.  If minimize returns unevaluated, the second argument is the empty set {} and the location flag is removed.

• 

If an option is a name equated to a range then minimize finds the infimum of that function over the given range.  If the range is the entire real line -infinity..infinity then range can be omitted.

• 

The variables over which the expression are to be minimized can be given implicitly as options or explicitly as a list containing all such variable ranges.  This second format is necessary if one is minimizing with respect to a variable that appears as an option to minimize.

• 

If no names over which to minimize are given then minimize finds the infimum over all indeterminates of type name.

• 

The function maximize is defined to compute the negative of the result of minimize applied to the negated expr.

• 

The solvers in the Optimization package can also be used for minimization and maximization of expressions.  These solvers allow constraints to be specified and are generally more efficient than the minimize and maximize commands.  However, they perform all computation using floating-point values and return only local solutions to non-convex optimization problems.

Examples

minimizecosx,x=1..3

cos3

(1)

maximizecosx,x=1..3

cos1

(2)

minimizeⅇtanx,x=0..10

0

(3)

minimizex23x+y2+3y+3

32

(4)

minimizex23x+y2+3y+3,location

32,x=32,y=32,32

(5)

minimizex23x+y2+3y+3,x=2..4,y=4..2,location

1,x=2,y=2,1

(6)

maximizex23x+y2+3y+3,x=2..4,y=4..2,location

11,x=4,y=4,11

(7)

minimizeⅇx212,x=4..4,location

0,x=ln2,0,x=ln2,0

(8)

maximizeⅇx212,x=4..4

12

(9)

minimizex4x2,x=3..3,location=true

14,x=122,14,x=122,14

(10)

minimizex2+cosx,x=0..3

1

(11)

'location' is an option and therefore all variables to be minimized over must be placed in a list

minimizesinlocationy,location=1..1,y=1..1,location

sin1,y=1,sin1

(12)

Changing the setting for Normalizer environment variable can in some cases simplify the solution.

fx2+y22+1x2+y2+x22x+1+y22+1x22x+1+y2:

minimizef

min128RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.2373605129624RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.23736051295+36RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.2373605129432RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.23736051293+18RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.237360512926RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.2373605129+92RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.237360512922RootOf2_Z22RootOf2_Z31,index=12_Z+1,0.2373605129+1,128RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.237360513624RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.2373605135+36RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.237360513432RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.2373605133+18RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.23736051326RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.237360513+92RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.23736051322RootOf2_Z22RootOf2_Z31,index=12_Z+1,1.237360513+1

(13)

Normalizersimplify:

minimizef

321/3

(14)

Note that assumptions may be placed on the location of the minima, especially if the function is periodic and contains equally valued minima at multiple locations.

minimizesinx+cosx,x=0..20,location

2,x=14π+π2_Z19+1,2

(15)

aboutindets2,'suffixed''_Z','integer'

{_Z19}:
  is used in the following assumed objects
  [_Z19] assumed AndProp(integer,RealRange(0,2))

The solutions can be made explicit by setting _EnvExplicit to true.

_EnvExplicittrue:

minimizesinx+cosx,x=0..20,location

2,x=54π,2,x=134π,2,x=214π,2

(16)

See Also

envvar

extrema

infnorm

Optimization

simplex

 


Download Help Document

Was this information helpful?



Please add your Comment (Optional)
E-mail Address (Optional)
What is ? This question helps us to combat spam