1 | initial version |
The simplest is probably to use scipy.optimize.minimize
sage: import scipy.optimize
sage: def f(X):
....: x,y = X
....: return 3*x^2 + 2*y^2 + x + y*cos(x*y)
sage: res = scipy.optimize.minimize(f,(0,0))
sage: res.x
array([-0.16623723, -0.2493558 ])