next up previous contents
Next: Specific parameters for the Up: Optimization Previous: Introduction   Contents


Let consider the following example:

will return the value of $x,y$ in the range $[-\pi,\pi]$ which minimize the value of $x^2+y^2$ under the constraint $\cos(x)+y*\cos(y)^2-0.2=0$ and Min will contain the minimal value. In the previous example we will get the following result:
[[[-.957582, -.957582], [-.474626, -.474626]],

    [[-.957582, -.957582], [-.474626, -.474626]]]
                              [[1.14223, 1.14223]]
You may notice that Min is a range and that Minimize returns two solutions for x,y. This is so because Minimize may deal with function having interval coefficients: hence the procedure will return a range for the minimal value of the function and the values of x,y at which the lower and upper bound have been obtained. Hence we may change the previous example with:
[[[-.958271, -.958271], [-.473241, -.473241]],

    [[-.957582, -.957582], [-.474626, -.474626]]]

> Min;
                              [[1.12307, 1.14233]]
Note that for this example we may have generated a simplification procedure with:
which allows to decrease almost by half the computation time.

Jean-Pierre Merlet 2012-12-20