Given a function of multiple variables, and some initial conditions, I would like an efficient way to track the gradient to the local minimum of that function. Two options spring to mind — to either use NDSolve
, or FindMinimum
. I don't know an efficient way to make NDSolve
identify when it has found a minimum, so I'm currently playing with FindMinimum
. My problem is that FindMinimum
is too efficient in the sense that it takes very large steps initially.
ListLinePlot[Last[Reap[
FindMinimum[x^2 + y^4, {x, 10}, {y, 10}, EvaluationMonitor :> Sow[{x, y}]
]]], PlotRange -> All, PlotMarkers -> {Automatic, 10}]
What I would like is a dense string of data points along the trajectory to the minimum as determined by gradient flow. Maybe FindMinimum
is not the best option, but it seems like it may be, provided I can place a constraint on the maximum step size. Is this possible? Is there a better way?