The NEWTON function solves a system of n non-linear equations in n dimensions using a globally-convergent Newton's method. The result is an n -element vector containing the solution.
NEWTON is based on the routine
described in section 9.7 of
Numerical Recipes in C: The Art of Scientific Computing
(Second Edition), published by Cambridge University Press, and is used by permission.
A scalar string specifying the name of a user-supplied IDL function that defines the system of non-linear equations. This function must accept an n -element vector argument X and return an n -element vector result.
NEWTON calls an internal function named
to determine whether the routine has converged to a local minimum rather than to a global minimum (see
, section 9.7). Use the CHECK keyword to specify a named variable which will be set to 1 if the routine has converged to a local minimum or to 0 if it has not. If the routine does converge to a local minimum, try restarting from a different initial guess to obtain the global minimum.
Use NEWTON to solve an n-dimensional system of n non-linear equations. Systems of non-linear equations may have multiple solutions; starting the algorithms with different initial guesses enables detection of different solutions.