1 | initial version |
Did you take a look at the examples in the documentation of the function minimize
?
sage: x,y = var('x,y')
sage: start = random_vector(RR,2)
sage: minimize((x*y)**4, start)
(0.03970299255032317, -0.16999160099351518)
Documentation says that if you provide a symbolic expression, it computes the gradient for you. You only need to provide a starting point whose dimension should match the number of variables of the expression.