# optimization with user supplied gradient

i want to find a approximate gobal minmum of a nonlinear function . i know the gradient of this function. i find that i can only use Nminimize to achieve this. Although Nminimize offer several Methods(e.g., anneling, evolution) to choose from, none of these support a user supplied gradient. since i have the gradient analytic expression, i want to find a way to take advantage of it, i.e., i want to find an optimization method which support user supplied gradient. But i don't found such function in mma, it only allow this in Findminmum, which only aims to find local minmum.

so my question is 'is there such a global minmization function which allow user supplied gradient in mma?'(while in matlab, one can do this via fmincon)

• All the algorithms used by NMinimize[] are gradient-free, so only FindMinimum[] will be able to take advantage of your separate gradient routine. – J. M. is in limbo Aug 29 '17 at 16:02
• thanks for the comment. just another question: as this function has lots of local minimum, if i use FindMinimum[] with gradient, will i always get stuck in a local minimum? – dr.bian Aug 29 '17 at 16:11
• If you're unlucky at picking starting points, sure... – J. M. is in limbo Aug 29 '17 at 16:28

If you want to do a gradient method, there's no need of a special function. FixedPoint or Nest or NestList or FixedPointList will all work. Say the optimization criterion is crit and the gradient is grad. Then specify a stepsize and iterate:

crit[x_] := (x - 5)^2;