Previous Up Next

15.3.2  Derivative-free constrained optimization

The fMax and fMin commands find where maxima and minima occur by using the COBYLA algorithm. They can do this for expressions of one variable or for expressions of several variables subject to a set of constraints, either equalities or inequalities.

Examples

fMax(sin(x),x)

or:

fMax(sin(x))

or:

fMax(sin(y),y)
     
π
2
          
fMin(sin(x),x)

or:

fMin(sin(x))

or:

fMin(sin(y),y)
     
π
2
          
fMax((x-2)^2+(y-1)^2,[-.25x^2-y^2+1>=0,x-2y+1=0],[x,y],[.5,.75])
     

−1.82287565553,−0.411437827766
          
fMin((x-5)^2+y^2-25,[y>=x^2],[x,y],[1,1])
     

1.2347728625,1.52466402196
          

Previous Up Next