Nonlinear systems: Newton’s and Broyden’s methods
| Problem | Solve nonlinear equations in unknowns, with |
| Devised by | Newton’s method for systems: Thomas Simpson (1740), Leonid Kantorovich (1948, convergence theory); line searches: Larry Armijo (1966), John Dennis and Robert Schnabel (1983); quasi-Newton updates: Charles Broyden (1965); inexact and Jacobian-free Newton-Krylov: Ron Dembo, Stanley Eisenstat and Trond Steihaug (1982), Peter Brown and Youcef Saad (1990), Stanley Eisenstat and Homer Walker (1996) |
| Accuracy | To the requested residual, near a root with a non-singular Jacobian; convergence from a distant start is not guaranteed |
| Cost | Newton: a Jacobian ( extra evaluations if by differences) and an solve per iteration, quadratic convergence. Broyden: one evaluation and an solve per iteration, superlinear convergence |
| Read first | Newton’s method and the secant method, Preliminaries: norms |
| API | newton_system, broyden_system, SystemOptions, SystemRootResult, newton_krylov, NewtonKrylovOptions |
Overview
Equilibria of mechanical structures and chemical reactions, the operating point of an electrical circuit, the discretised equations of a nonlinear differential equation, the implicit stages of an ODE solver: all are systems of nonlinear equations. In more than one dimension there is no bracket to trap a root, and the workhorse is Newton’s method, which linearises the system around the current point and solves the linear system for a correction.
Two refinements make it practical. A line search shortens steps that would make things worse, so that the method converges from much farther away. Quasi-Newton methods, of which Broyden’s is the classic, avoid computing the Jacobian at every step by updating an approximation of it from the steps already taken, which saves most of the function evaluations when the Jacobian must be formed by finite differences.
Where it is used
Systems of nonlinear equations arise whenever several conditions must hold at once.
- Chemical and process engineering. Equilibrium composition, steady-state flows in networks and flowsheets.
- Power and electronics. Load flow in electrical grids and bias points of circuits.
- Robotics. Inverse kinematics: which joint angles put the hand here?
- Implicit time stepping. Every stiff ODE solver solves a nonlinear system at each step, often by Newton or Broyden.
History
Thomas Simpson (1740) applied Newton’s method to two equations in two unknowns, using fluxions (derivatives). Its convergence in general spaces was established by Leonid Kantorovich in 1948, whose theorem guarantees convergence and a unique root in a ball from bounds on , its Jacobian and the Jacobian’s variation at the starting point.
The practical difficulty, that Newton’s method diverges from poor starting points, was attacked in the 1960s and 1970s by globalisation: line searches (with the sufficient-decrease condition of Larry Armijo, 1966) and trust regions (Kenneth Levenberg, 1944, Donald Marquardt, 1963, and Michael Powell’s dogleg, 1970). Charles Broyden (1965), working at the English Electric Company on the equations of nuclear reactors and aircraft design, proposed updating an approximate Jacobian by the smallest change consistent with the latest step. His idea started the family of quasi-Newton methods, which in optimisation became BFGS. John Dennis and Jorge Moré (1974) characterised exactly when such methods converge superlinearly.
For the very large systems that come from discretised partial differential equations, even storing the Jacobian can be too much. Ron Dembo, Stanley Eisenstat and Trond Steihaug (1982) showed that Newton’s method keeps its fast local convergence when each linear system is solved only approximately, to a relative accuracy that shrinks as the iteration converges: inexact Newton methods. Peter Brown and Youcef Saad (1990) solved those systems with Krylov methods that need only products , approximated by a difference of two values of , so that the Jacobian is never formed. Stanley Eisenstat and Homer Walker (1996) gave the adaptive forcing terms in common use, and Dana Knoll and David Keyes (2004) surveyed what had become the standard Jacobian-free Newton-Krylov method in computational physics.
The idea
Newton’s method
The problem is to find a vector at which functions vanish together: , written . For example, the intersection of the circle with the hyperbola is a root of
Newton’s method in one variable replaced by its tangent line. The analogue in variables replaces each by its first-order Taylor expansion about the current point . For a small displacement ,
The matrix of all first partial derivatives is the Jacobian; it plays the role of . Row is the gradient of . For the example above,
The right side of the approximation is a linear function of , and we know how to find where a linear function vanishes. Setting it to zero gives the Newton step:
- solve the linear system for ;
- set .
In one dimension step 1 is the division . In dimensions it is a linear solve by Gaussian elimination. Each iteration of a nonlinear solver therefore contains a linear solver.
As in one dimension, the convergence is quadratic near a root at which is non-singular (the analogue of ).
Where the Jacobian comes from. It can be supplied as a function, or formed by forward differences: perturbing by and differencing gives column . That costs one extra evaluation of per column, in all. The small errors of a difference Jacobian barely affect the convergence, because the Jacobian only determines the step; the root itself is defined by , which is evaluated exactly.
Line search: global convergence
Far from a root the linear model is a poor description of , and the full Newton step can land somewhere worse than where it started. The iteration can then diverge, as it did for in one dimension.
The remedy needs a way to say what “worse” means. With several equations there is no single function value to watch, so we combine them into one number, the merit function
It is zero at a root and positive elsewhere, so a step is an improvement if it reduces .
The Newton direction always points downhill. By the chain rule, the gradient of is . The rate of change of along the Newton direction is the dot product of the two, and since ,
The slope is negative: decreases, at least initially, as we move along . So even when the full step is too long, a short enough step in the same direction makes progress.
Backtracking. The line search takes and looks for an acceptable .
- Try the full step, .
- Accept it if has decreased by at least . This is the Armijo condition: the decrease must be at least a small fraction of what the initial slope predicts, which rules out steps that reduce only negligibly.
- Otherwise choose a smaller . The values of already computed along the line are fitted by a quadratic (the first time) or a cubic (afterwards), and is moved to the minimum of the fit. Go to 2.
Near the root the full step always passes the test, so the line search costs nothing there and the quadratic convergence is untouched.
What it cannot do. The line search guarantees that keeps decreasing, but may have
local minima that are not roots. At such a point with
, which requires the Jacobian to be singular. The solvers then stop and report
converged = false. On , for example, which has no real root, they stop at the
minimum of .
Broyden’s method
When the Jacobian is formed by differences, it costs evaluations of per iteration, which is most of the work for large . In one dimension the secant method avoids the derivative by using the slope between the last two points. Broyden’s method is its generalisation.
It keeps a matrix that approximates the Jacobian and uses it in place of in the Newton step. After each step it has two new pieces of information: the step taken, , and the resulting change in the function, . A good approximation of the Jacobian should reproduce this observation, so the new matrix is required to satisfy the secant equation
In one dimension this determines the slope completely. In dimensions it is only equations for the entries of : it says how acts on the one direction and nothing about the directions perpendicular to it. Broyden’s choice is to leave the action on those directions exactly as it was:
Check the two properties. Applied to , the correction term gives , so . Applied to any perpendicular to , the correction vanishes because , so . Among all matrices satisfying the secant equation, this is the one closest to (in the Frobenius norm, the square root of the sum of squared entries): it changes as little as the new information allows.
Broyden’s method converges superlinearly: faster than any fixed linear rate, though not quadratically. It needs one evaluation of per iteration (plus any used by the line search), instead of . The library forms by differences, and forms it afresh whenever the updated matrix stops giving a descent direction.
Jacobian-free Newton-Krylov
For a system of unknowns from a discretised PDE, a dense Jacobian has entries, and Gaussian elimination on it costs operations. Two observations make Newton’s method practical anyway.
Inexact Newton steps. Far from the root, a precise Newton step is wasted effort, because the linear model is only a rough guide. It is enough to solve until the linear residual is a fraction of :
With the iteration converges superlinearly, and with quadratically. The library uses SciPy’s forcing terms, Eisenstat and Walker’s choice 2: , kept from falling faster than while that is above 0.1, capped at 0.9999, and applied as the relative tolerance .
Jacobian-vector products by differences. A Krylov method such as GMRES needs only through products , and one directional difference gives such a product:
Each inner iteration therefore costs one evaluation of , and the memory is that of the Krylov basis: no matrix at all.
Preconditioning. The Krylov solver converges slowly when is badly conditioned, as it is for elliptic PDEs. Its condition number grows like with the grid spacing . A preconditioner , which need not be exact, groups the eigenvalues of together. For a nonlinear PDE, the inverse of its linear part is often good enough, and it is usually the key to making Newton-Krylov fast.
Comparison
Iterations and evaluations of (including those for difference Jacobians and line searches) to a residual of :
Table 4.5. Newton and Broyden on nonlinear systems.
| system | Newton, exact Jacobian | Newton, difference Jacobian | Broyden |
|---|---|---|---|
| Rosenbrock, , from | 14 it., 27 ev. | 14 it., 55 ev. | 20 it., 49 ev. |
| power sums, | 6 it., 8 ev. | 6 it., 26 ev. | 10 it., 15 ev. |
| Bratu, , from | 3 it., 4 ev. | 3 it., 124 ev. | 4 it., 45 ev. |
- With an exact Jacobian, Newton’s method needs the fewest evaluations.
- With difference Jacobians, the cost per iteration is evaluations or more; Broyden’s method, with a few more iterations at about one evaluation each, is much cheaper for the 40 unknowns of the Bratu problem (45 evaluations against 124), and modestly cheaper for small systems.
- The Rosenbrock system shows the price of the safeguard. Its second equation is linear, so plain Newton reaches the root in two steps, through an intermediate point where is ten times larger. The line search rejects that point and creeps along the curved valley instead, taking 14 iterations. Safety is usually worth this occasional cost.
A nonlinear system can have several solutions, and which one is found depends on the starting point. The Bratu problem , , discretised by finite differences, has two:
Figure 4.5. The two solutions of the Bratu problem.
Algorithm
Newton’s method (newton_system). Input: , optionally its Jacobian, a starting point
, and tolerances on the residual and on the step. Repeat:
- Test the residual. Evaluate . If its largest component in magnitude, , is at most the function tolerance, stop: converged.
- Form the Jacobian , from the supplied function or by forward differences ( further evaluations of ).
- Solve by Gaussian elimination with partial pivoting. If is singular, stop without convergence.
- Line search. If is longer than , scale it down to that length, which prevents a wild step from a nearly singular Jacobian. Then backtrack from until the merit function satisfies the Armijo condition, and set .
- Test the step. If the line search could find no acceptable , or the relative change in is below the step tolerance, stop. The result counts as converged only if the residual is below ; otherwise the iteration has stalled at a point that is not a root.
Each iteration costs one linear solve, , plus the evaluations of .
Jacobian-free Newton-Krylov (newton_krylov), following SciPy step by step. Start from . Repeat:
- Stop if
f_tol(default ) and the other tolerances hold for the last correction. - Solve by GMRES(), one cycle of steps, or by BiCGSTAB with at most steps, to relative residual . The products come from differences, as above.
- Line search: SciPy’s Armijo search on , with taken as . It tries , then the minimiser of a quadratic, then of cubics, down to , and takes the full step if none is acceptable.
- Update by the Eisenstat-Walker rule.
Broyden’s method (broyden_system). The same loop, with these changes:
- before the first iteration, form by forward differences;
- in step 3, solve ;
- after each accepted step, apply Broyden’s update to using the step and the change in ;
- if the line search fails with an updated , form afresh by differences and try again from the same point; only a failure with a fresh ends the iteration.
Implementation
The Newton step and its line search:
let Some(step) = solve_dense(jac, fx.iter().map(|v| -v).collect()) else {
return Ok(finish(x, &fx, iteration, sys.evaluations, false));
};
let f0 = half_norm_squared(&fx);
let (x_new, f_new, ok) = line_search(&mut sys, &x, f0, -2.0 * f0, &step);
Broyden’s update:
if ss > 0.0 {
let bs: Vec<f64> = b.iter().map(|row| row.iter().zip(&s).map(|(a, c)| a * c).sum()).collect();
for i in 0..n {
let u = (f_new[i] - fx[i] - bs[i]) / ss;
b[i].iter_mut().zip(&s).for_each(|(bij, sj)| *bij += u * sj);
}
}
- In
newton_systemandbroyden_systemthe Jacobian is stored densely and solved by Gaussian elimination, which is fine for hundreds of unknowns. Large systems from PDEs neednewton_krylov. - Always check
convergedin the result: the solvers return the best point found even when they fail. - The design follows
newtandbroydnof Numerical Recipes.
The Jacobian-free operator and the Newton-Krylov loop:
/// The Jacobian at `x` seen only through products: `J v ≈ (F(x + h v/‖v‖) − F(x)) ‖v‖ / h`, with
/// `h = rdiff · max(1, ‖x‖∞) / max(1, ‖F(x)‖∞)` (SciPy's `KrylovJacobian`).
struct FiniteDifferenceJacobian<'a, 'b> {
f: &'b Counted<'a>,
x: Vec<f64>,
fx: Vec<f64>,
omega: f64,
products: Cell<usize>,
}
impl LinearOperator for FiniteDifferenceJacobian<'_, '_> {
fn shape(&self) -> (usize, usize) {
(self.x.len(), self.x.len())
}
fn matvec(&self, v: &[f64]) -> Vec<f64> {
let nv = norm2(v);
if nv == 0.0 {
return vec![0.0; v.len()];
}
self.products.set(self.products.get() + 1);
let sc = self.omega / nv;
let xs: Vec<f64> = self.x.iter().zip(v).map(|(x, vi)| x + sc * vi).collect();
self.f.eval(&xs).iter().zip(&self.fx).map(|(a, b)| (a - b) / sc).collect()
}
fn rmatvec(&self, _: &[f64]) -> Vec<f64> {
unimplemented!("the transposed Jacobian is not available without derivatives")
}
}
/// Solves `F(x) = 0` for large `n` without forming the Jacobian (SciPy's `newton_krylov`). Each
/// Newton iteration solves `J dx = −F(x)` inexactly with a Krylov method, to the relative
/// accuracy `η` of the Eisenstat-Walker forcing sequence (choice 2, `γ = 0.9`), using finite-
/// difference products `J v`; an Armijo line search on `‖F‖²` then sets the step. An optional
/// preconditioner `M ≈ J⁻¹` (SciPy's `inner_M`) applies to the inner solves.
pub fn newton_krylov<F>(mut f: F, x0: &[f64], preconditioner: Option<&dyn LinearOperator>, options: &NewtonKrylovOptions) -> Result<NewtonKrylovResult, ErrorsJSL>
where
F: FnMut(&[f64]) -> Vec<f64>,
{
let n = x0.len();
if n == 0 {
return Err(ErrorsJSL::InvalidInputRange("newton_krylov: the starting point must not be empty"));
}
let counted = Counted { f: RefCell::new(&mut f), calls: Cell::new(0) };
let mut x = x0.to_vec();
let mut fx = counted.eval(&x);
if fx.len() != n {
return Err(ErrorsJSL::InvalidInputRange("newton_krylov: F must map ℝⁿ to ℝⁿ"));
}
let max_iter = options.max_iter.unwrap_or(100 * (n + 1));
let rdiff = options.rdiff.unwrap_or(f64::EPSILON.sqrt());
let mut fx_norm = norm2(&fx);
let f0_norm = max_norm(&fx);
let mut dx = vec![f64::INFINITY; n];
let (gamma, eta_max, eta_threshold): (f64, f64, f64) = (0.9, 0.9999, 0.1);
let mut eta: f64 = 1e-3;
let mut augmented = LgmresSolver::new(30, 10);
augmented.store_outer_av = false;
augmented.prepend_outer_v = true;
let (mut checks, mut products, mut converged) = (0, 0, false);
for _ in 0..max_iter {
checks += 1;
let (f_inf, dx_inf) = (max_norm(&fx), max_norm(&dx));
if f_inf == 0.0 || (f_inf <= options.f_tol && f_inf / options.f_rtol <= f0_norm && dx_inf <= options.x_tol && dx_inf / options.x_rtol <= max_norm(&x)) {
converged = true;
break;
}
// Inexact Newton direction.
let omega = rdiff * max_norm(&x).max(1.0) / max_norm(&fx).max(1.0);
let jac = FiniteDifferenceJacobian { f: &counted, x: x.clone(), fx: fx.clone(), omega, products: Cell::new(0) };
let tol = eta.min(eta * fx_norm);
let inner = IterativeOptions { rtol: tol, atol: 0.0, max_iterations: Some(options.inner_maxiter) };
let sol = match options.inner {
InnerSolver::Gmres => gmres(&jac, &fx, None, preconditioner, options.inner_maxiter, inner)?,
InnerSolver::Bicgstab => bicgstab(&jac, &fx, None, preconditioner, inner)?,
InnerSolver::Lgmres => augmented.solve(&jac, &fx, None, preconditioner, IterativeOptions { max_iterations: Some(1), ..inner })?,
};
products += jac.products.get();
dx = sol.x.iter().map(|v| -v).collect();
if norm2(&dx) == 0.0 {
return Err(ErrorsJSL::Message("newton_krylov: the inner solve returned a zero step".into()));
}
// Line search on φ(s) = ‖F(x + s dx)‖².
let (s, x_new, f_new) = if options.line_search {
let mut last: Option<(f64, Vec<f64>)> = None;
let s = armijo(
|s| {
let xt: Vec<f64> = x.iter().zip(&dx).map(|(a, d)| a + s * d).collect();
let v = counted.eval(&xt);
let p = if v.iter().all(|t| t.is_finite()) { norm2(&v).powi(2) } else { f64::INFINITY };
last = Some((s, v));
p
},
fx_norm * fx_norm,
-fx_norm * fx_norm,
1e-2,
)
.unwrap_or(1.0);
let x_new: Vec<f64> = x.iter().zip(&dx).map(|(a, d)| a + s * d).collect();
let f_new = match last {
Some((ls, v)) if ls == s => v,
_ => counted.eval(&x_new),
};
(s, x_new, f_new)
} else {
let x_new: Vec<f64> = x.iter().zip(&dx).map(|(a, d)| a + d).collect();
let f_new = counted.eval(&x_new);
(1.0, x_new, f_new)
};
let _ = s;
let fx_norm_new = norm2(&f_new);
x = x_new;
fx = f_new;
// Eisenstat-Walker forcing term.
let eta_a = gamma * fx_norm_new * fx_norm_new / (fx_norm * fx_norm);
eta = if gamma * eta * eta < eta_threshold { eta_max.min(eta_a) } else { eta_max.min(eta_a.max(gamma * eta * eta)) };
fx_norm = fx_norm_new;
}
let nfev = counted.calls.get();
Ok(NewtonKrylovResult { x, fun: fx, iterations: checks, nfev, jacobian_products: products, converged })
}
- The inner solvers are the sparse module’s
gmres,bicgstabandLgmresSolver, through itsLinearOperatortrait, so any preconditioner implementing it can be passed. InnerSolver::Lgmresreproduces SciPy’s default inner solver. It keeps up to 10 earlier Newton corrections as augmentation vectors, from one Newton step to the next. The library’s default remains GMRES(20).- The library’s GMRES applies the preconditioner on the right and stops on the true residual. SciPy’s applies it on the left and stops on the preconditioned residual.
iterationscounts the convergence tests made, as SciPy’snitdoes: one more than the Newton steps taken.
In practice
//! Nonlinear systems by Newton's and Broyden's methods.
//!
//! Run with `cargo run -p lib_jsl_root_finding --example root_finding_systems`.
use lib_jsl_root_finding::{SystemOptions, broyden_system, newton_system};
type NoJacobian = fn(&[f64]) -> Vec<Vec<f64>>;
fn main() {
// The intersection of the circle x² + y² = 4 with the curve y = eˣ − 1 in the first quadrant.
let f = |v: &[f64]| vec![v[0] * v[0] + v[1] * v[1] - 4.0, v[0].exp() - 1.0 - v[1]];
let jacobian = |v: &[f64]| vec![vec![2.0 * v[0], 2.0 * v[1]], vec![v[0].exp(), -1.0]];
let options = SystemOptions::default();
let exact = newton_system(f, Some(jacobian), vec![1.0, 1.0], options).unwrap();
println!("Newton (exact Jacobian): {:?} after {} iterations", exact.x, exact.iterations);
// Without a Jacobian, Newton's method forms one by finite differences at every step;
// Broyden's method forms one only at the start and then updates it.
let fd = newton_system(f, None::<NoJacobian>, vec![1.0, 1.0], options).unwrap();
let broyden = broyden_system(f, vec![1.0, 1.0], options).unwrap();
println!("Newton (differences): {} evaluations of F", fd.nfev);
println!("Broyden: {} evaluations of F", broyden.nfev);
// Always check `converged`: from a poor start the solvers may stop at a minimum of ‖F‖.
let none = newton_system(|v: &[f64]| vec![v[0] * v[0] + 1.0, v[1]], None::<NoJacobian>, vec![0.3, 0.0], options).unwrap();
println!("x² + 1 = 0: converged = {}, residual {:.3}", none.converged, none.residual);
}
newton_krylov on the two-dimensional Bratu problem on the unit square, with on the boundary, discretised by 5-point differences on grids of , and
unknowns and started from . The references are from SciPy 1.17.1, written by book/generator/data/make_qmcnk_refs.py:
Table 4.6. Newton-Krylov on the Bratu problem against SciPy's `newton_krylov`.
| grid | inner solver | Newton iterations (library / SciPy) | evaluations of F (library / SciPy) | final max |F| (library / SciPy) | peak of u, relative difference from SciPy’s LGMRES solution |
|---|---|---|---|---|---|
| 16 × 16 | GMRES(20) | 4 / 4 | 81 / 81 | 5e-7 / 5e-7 | 4e-10 |
| 16 × 16 | BiCGSTAB | 4 / 4 | 108 / 108 | 4e-8 / 8e-8 | 1e-10 |
| 16 × 16 | GMRES(20), Laplacian LU preconditioner | 4 / 4 | 43 / 20 | 1e-8 / 9e-9 | 2e-12 |
| 16 × 16 | LGMRES (SciPy’s default) | 4 / 4 | 79 / 79 | 9e-9 / 8e-9 | 2e-11 |
| 32 × 32 | GMRES(20) | 20 / 20 | 441 / 441 | 2e-6 / 2e-6 | 2e-7 |
| 32 × 32 | BiCGSTAB | 5 / 4 | 195 / 160 | 4e-7 / 6e-6 | 3e-8 |
| 32 × 32 | GMRES(20), Laplacian LU preconditioner | 4 / 4 | 42 / 19 | 4e-8 / 6e-8 | 7e-10 |
| 32 × 32 | LGMRES (SciPy’s default) | 4 / 4 | 114 / 114 | 6e-8 / 1e-7 | 5e-10 |
| 64 × 64 | GMRES(20) | 69 / 69 | 1519 / 1519 | 6e-6 / 6e-6 | 7e-7 |
| 64 × 64 | BiCGSTAB | 14 / 18 | 512 / 604 | 2e-6 / 3e-6 | 2e-7 |
| 64 × 64 | GMRES(20), Laplacian LU preconditioner | 4 / 4 | 41 / 19 | 3e-7 / 3e-7 | 2e-9 |
| 64 × 64 | LGMRES (SciPy’s default) | 6 / 6 | 187 / 187 | 4e-6 / 1e-6 | 7e-9 |
With unpreconditioned GMRES(20), the library takes exactly SciPy’s path: the same Newton iterations and the same number of evaluations of on every grid. As the grid is refined, the Jacobian’s condition number grows, 20 GMRES steps no longer reach the forcing tolerance, and the Newton iteration slows from 4 steps to 69. BiCGSTAB copes better, and differs from SciPy in a few iterations because its residual is not monotone. LGMRES, SciPy’s default, again takes SciPy’s path exactly. It needs far fewer evaluations than GMRES(20) on the fine grid, because the corrections it carries from one Newton step to the next span the slowly converging directions. Preconditioning with the LU factors of the discrete Laplacian, the linear part of the problem, makes the work independent of the grid: four Newton steps on every grid. The library’s preconditioned solves use about twice SciPy’s evaluations, because they stop on the true residual rather than the preconditioned one. They reach the same final residual.
Figure 4.6. Convergence of Newton-Krylov on the 64 × 64 Bratu problem, library (lines) and SciPy (markers). With GMRES(20) and no preconditioner, the inexact Newton steps make only linear progress. BiCGSTAB and LGMRES do better, and with the Laplacian preconditioner the convergence is quadratic.
Strengths
- Quadratic (Newton) or superlinear (Broyden) convergence near a root.
- The line search gives convergence from much farther away than plain iteration.
- Broyden’s method needs few function evaluations when no Jacobian is available.
newton_krylovneeds neither the Jacobian nor its storage, and reproduces SciPy’s iterations.
Weaknesses
- Convergence to a root is still not guaranteed: the iteration can stop at a local minimum of .
newton_systemandbroyden_systemuse dense linear algebra per iteration and memory.- Without a good preconditioner,
newton_krylovdegrades on fine grids, as the inner solves stop reaching their tolerance. - Which of several roots is found depends on the starting point.
Exercises
- Show that the Newton direction is a descent direction for , and that it is not, in general, the steepest descent direction.
- Verify that Broyden’s update satisfies the secant equation and changes only on the span of : whenever .
- Solve the Bratu problem with replaced by for increasing . Near the two solutions merge and disappear. What happens to the Jacobian there?
- Write the intersection of the circle and the hyperbola as a system and find all four solutions by choosing starting points.
- Compare the evaluations used by Newton with difference Jacobians and by Broyden for the Bratu problem with . How does the ratio grow with ?
- Show that the error of the difference product is from truncation and from rounding, relative to , and that balances them.
- Show that the Newton step is a descent direction for even when it is computed inexactly, provided .
Hints and answers
- The Newton direction is and the gradient of is . Then . Steepest descent is , which equals only when is a multiple of the identity.
- . Applying it to gives . For the correction term vanishes.
- At the fold the Jacobian becomes singular (its smallest singular value tends to zero), so the Newton step is undefined or huge. Following the solution past a turning point needs continuation in an arclength parameter rather than in .
- Adding and subtracting: and , so the solutions are and . Start from points in each quadrant, and from both sides of the line .
- A finite-difference Jacobian costs evaluations of per iteration, Broyden’s method one. With similar iteration counts, the ratio should grow roughly in proportion to .
- Taylor’s theorem gives for a unit vector . Dividing by leaves an error, while the rounding error of each value of , about , becomes after the division. The sum is smallest at .
- Write with . The directional derivative of along is .
Further reading
- C. G. Broyden, “A class of methods for solving nonlinear simultaneous equations”, Mathematics of Computation 19 (1965) 577–593.
- J. E. Dennis and J. J. Moré, “A characterization of superlinear convergence and its application to quasi-Newton methods”, Mathematics of Computation 28 (1974) 549–560.
- J. E. Dennis and R. B. Schnabel, Numerical Methods for Unconstrained Optimization and Nonlinear Equations, Prentice-Hall, 1983 (SIAM reprint, 1996).
- J. Nocedal and S. J. Wright, Numerical Optimization, 2nd ed., Springer, 2006, chapter 11.
- C. T. Kelley, Iterative Methods for Linear and Nonlinear Equations, SIAM, 1995.
- R. S. Dembo, S. C. Eisenstat and T. Steihaug, “Inexact Newton methods”, SIAM Journal on Numerical Analysis 19 (1982) 400–408.
- P. N. Brown and Y. Saad, “Hybrid Krylov methods for nonlinear systems of equations”, SIAM Journal on Scientific and Statistical Computing 11 (1990) 450–481.
- S. C. Eisenstat and H. F. Walker, “Choosing the forcing terms in an inexact Newton method”, SIAM Journal on Scientific Computing 17 (1996) 16–32.
- D. A. Knoll and D. E. Keyes, “Jacobian-free Newton-Krylov methods: a survey of approaches and applications”, Journal of Computational Physics 193 (2004) 357–397.