Newton's Method

Newton's method for nonlinear equations is based on a linear approximation

so the Newton step is found simply by setting (Subscript[M, k])(p)==0,

Near a root of the equations, Newton's method has q-quadratic convergence, similar to Newton's method for minimization. Newton's method is used as the default method for (RefLink[FindRoot, paclet:ref/FindRoot]).

Newton's method can be used with either line search or trust region step control. When it works, the line search control is typically faster, but the trust region approach is usually more robust.

This loads a package that contains some utility functions:

<<Optimization`UnconstrainedProblems`

Here is the Rosenbrock problem as a (RefLink[FindRoot, paclet:ref/FindRoot]) problem:

p = GetFindRootProblem[Rosenbrock]

This finds the solution of the nonlinear system using the default line search approach. (Newton's method is the default method for (RefLink[FindRoot, paclet:ref/FindRoot]).)

FindRootPlot[p]

Note that each of the line searches started along the line x==1. This is a particular property of the Newton step for this particular problem.

This computes the Jacobian and the Newton step symbolically for the Rosenbrock problem:

J = Outer[D, {10 (-(Subscript[X, 1]^2)+(Subscript[X, 2])),1-(Subscript[X, 1])}, {(Subscript[X, 1]), (Subscript[X, 2])}];
LinearSolve[J, -{10 (-(Subscript[X, 1]^2)+(Subscript[X, 2])),1-(Subscript[X, 1])}]

When this step is added to the point ((Subscript[X, 1]),(Subscript[X, 2])), it is easy to see why the steps go to the line (Subscript[X, 1])==1. This is a particular feature of this problem, which is not typical for most functions. Because the trust region approach does not try the Newton step unless it lies within the region bound, this feature does not show up so strongly when the trust region step control is used.

This finds the solution of the nonlinear system using the trust region approach. The search is almost identical to the search with the Gauss–Newton method for the Rosenbrock objective function in (RefLink[FindMinimum, paclet:ref/FindMinimum]):

FindRootPlot[p, Method->{"Newton", "StepControl"->"TrustRegion"}]

When the structure of the Jacobian matrix is sparse, the Wolfram Language will use (RefLink[SparseArray, paclet:ref/SparseArray]) objects both to compute the Jacobian and to handle the necessary numerical linear algebra.

When solving nonlinear equations is used as a part of a more general numerical procedure, such as solving differential equations with implicit methods, often starting values are quite good, and complete convergence is not absolutely necessary. Often the most expensive part of computing a Newton step is finding the Jacobian and computing a matrix factorization. However, when close enough to a root, it is possible to leave the Jacobian frozen for a few steps (though this does certainly affect the convergence rate). You can do this in the Wolfram Language using the method option "UpdateJacobian", which gives the number of steps to go before updating the Jacobian. The default is "UpdateJacobian"->1, so the Jacobian is updated every step.

This shows the number of steps, function evaluations, and Jacobian evaluations required to find a simple square root when the Jacobian is only updated every three steps:

Block[{s = 0, e = 0, j = 0}, {FindRoot[x^2 - 2, {{x, 1.5}}, Method->{"Newton", "UpdateJacobian"->3}, EvaluationMonitor:> e++, StepMonitor:> s++, Jacobian->{Automatic, EvaluationMonitor:> j++}], s, e, j}]

This shows the number of steps, function evaluations, and Jacobian evaluations required to find a simple square root when the Jacobian is updated every step:

Block[{s = 0, e = 0, j = 0}, {FindRoot[x^2 - 2, {{x, 1.5}}, EvaluationMonitor:> e++, StepMonitor:> s++, Jacobian->{Automatic, EvaluationMonitor:> j++}], s, e, j}]

Of course for a simple one-dimensional root, updating the Jacobian is trivial in cost, so holding the update is only of use here to demonstrate the idea.

Method options for (RefLink[Method, paclet:ref/Method])->"Newton" in (RefLink[FindRoot, paclet:ref/FindRoot]).