From first principles
Choose a step using actual reduction in residual
A local Newton model can predict a zero far outside its useful region. To test the correction, use the merit function \(\phi(x)=\|F(x)\|_2^2/2\). Along a candidate direction \(s\), differentiate this scalar at step length zero. For a Newton direction solving \(Js=-F\), the predicted slope is strictly negative whenever \(F\ne0\),
Choose a fraction \(0<c<1\) of that initial decrease and accept a trial length \(\alpha>0\) when the actual residual satisfies
Try full length first and shorten if necessary. For a differentiable merit function and a descent direction, sufficiently short feasible steps pass because the linear term dominates the remainder. This establishes a local acceptance mechanism. Bounds on variables, nondecreasing directions, or stationary points of \(\phi\) with nonzero residual require additional interpretation.
Derivation and applications
Bound the number of reductions in a backtracking line search
A sufficient decrease test can be guaranteed once the step is short enough. Assume a differentiable merit \(\phi\), a nonzero direction \(p\) with \(g^Tp<0\) for \(g=\nabla\phi(x)\), and an \(L\)-Lipschitz gradient on the whole feasible trial segment. The change in merit equals an integral of directional derivative. Replacing the gradient at a displaced point by its initial value introduces a bounded error,
To make the right-hand side no larger than the Armijo requirement \(c\alpha g^Tp\), rearrange the inequality using \(g^Tp<0\) and \(\alpha>0\). This yields a guaranteed acceptance range
Starting at \(\alpha_0\) and reducing by a fixed factor \(0<\rho<1\), the number of reductions before reaching this range is at most
Larger steps can already pass because the curvature bound is only sufficient. This estimate makes the roles of a nearly tangential descent direction and a poor scale for the search direction explicit. It assumes trial points lie inside the domain on which the function and its gradient bound are valid.
Worked example
Predict a line search on an exact quadratic
Use \(\phi(x)=5x^2\), start at \(x=1\), and take \(p=-10\). Here \(L=10,\ g^Tp=-100,\ \|p\|^2=100\). With \(c=0.1\) the safe length is \(0.18\). Starting from 1 and halving reaches \(0.125\) after three reductions. The merit becomes \(5(-0.25)^2=0.3125\), below the required
The previous length \(0.25\) gives merit \(11.25\) and fails.
Second application
Check an acceptance claim under curvature uncertainty
Another model has \(-g^Tp=0.8,\ \|p\|=2,\ L=3,\ c=0.25\). The sufficient length is
An initial \(0.80\) reduced by a factor \(0.4\) produces \(0.32,\ 0.128,\ 0.0512\); the third reduction is guaranteed to pass. Accepting \(0.128\) on the actual merit would also be consistent with the bound.
OneSimulation laboratory
Locate the root of an implicit cooling step
Start from this chapter. Compare damped and undamped Newton on the same stage equation. Substitute each returned temperature into the residual independently to see whether they reach the same root.
Compare recorded OneSimulation runs on this page. To test your own inputs, download the Python model and run the model in an activated OneSimulation environment.
The downloadable model takes one backward Euler step with \(C=2\) J/K, \(A=0.3\) m², emissivity 0.5 and a test radiation constant of 0.02 W/(m²·K⁴), giving \(\beta=0.0015\) K⁻³s⁻¹. Its output substitutes the returned temperature into the residual independently. Predict which edit changes the root. Download the Python experiment · OneSimulation implicit cooling comparison.
python nonlinear-equations.py
python nonlinear-equations.py --step 0.05
python nonlinear-equations.py --solver damped
| Step, solver | Temperature (K) | |F| (K) |
|---|---|---|
| 1 s, Newton | 1.9785147906 | 5.6 × 10⁻¹⁷ |
| 0.05 s, Newton | 1.9988776913 | 3.7 × 10⁻¹⁷ |
| 1 s, damped Newton | 1.9785147906 | 5.6 × 10⁻¹⁷ |

A different step changes both the equation and the observation time. A converged line-search Newton method on the original step recovers the same physical root. To measure time discretisation error, compare solutions on successively finer grids at a common final time.
Change parameters · Change the laboratory inputs
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.
Problem sheet 2 · Distinguish root accuracy from temperature sensitivity
A locally excellent algorithm can cycle
Consider \(F(x)=x^3-2x+2\). Starting from zero gives \(F(0)=2,F'(0)=-2\), so Newton proposes \(x_1=1\). At one, \(F(1)=1,F'(1)=1\), and the next iterate returns to zero. The sequence will repeat indefinitely in exact arithmetic. A real root does exist between \(-2\) and \(-1\), where the function changes sign. The trouble lies in the update chosen from this starting point. It does not refute the local convergence result near a simple root.
For coupled equations define the merit function \(\phi(x)=\|F(x)\|_2^2/2\). Its directional derivative along an exact Newton step \(s\) is \(\nabla\phi^Ts=F^TJs=-\|F\|^2\), strictly negative when \(F\ne0\). Thus a sufficiently short step in that direction decreases the squared mismatch. This identity assumes \(Js=-F\) is solved accurately. With a strongly truncated inner iteration, check the actual directional derivative before treating the step as a descent direction.
Compute an accepted step
A backtracking line search starts at \(\alpha=1\) and reduces it until \(\phi(x+\alpha s)\leq\phi(x)+c\alpha\nabla\phi^Ts\) with \(0<c<1\). This sufficient-decrease condition compares actual progress with the local prediction. In the cycling example at \(x=1\) the Newton direction is \(s=-1\), the initial merit is 0.5 and its slope along \(s\) is \(-1\). With \(c=10^{-4}\), the full trial returns to zero and gives \(\phi=2\), which fails. A half-step gives \(F(0.5)=1.125\) and fails too. A quarter-step gives \(F(0.75)=0.921875\), so \(\phi\simeq0.425\), satisfying the condition.
A smaller mismatch at this point does not certify a nearby root. This example has a positive local minimum of \(\phi\) near \(x=\sqrt{2/3}\), where \(F'\) vanishes but \(F\) stays nonzero. From a poor starting point, globalisation may lead near such a stationary point. Check the residual itself, use a bracket when available and try physically motivated alternative starts. A long sequence of tiny accepted steps should prompt inspection of local derivatives or constraints rather than being counted as successful convergence.
Compare a regional model with the real residual
A trust-region method minimises the local model \(m(s)=\|F+Js\|^2/2\) subject to \(\|s\|\leq\Delta\). Its radius states how far the current linearisation is trusted in the chosen variable scales. After a trial, compute the ratio \(\rho=[\phi(x)-\phi(x+s)]/[m(0)-m(s)]\) when predicted reduction is positive. A negative ratio means the true merit increased. A ratio near one indicates accurate local prediction. One can shrink the radius after a poor trial or enlarge it when the model predicts progress well near the boundary.
In the quarter-step above the linear model predicts residual \(1-0.25=0.75\) and merit \(0.28125\), a reduction of 0.21875. The actual reduction is about 0.075, giving \(\rho\approx0.34\). The trial moved in the intended direction but the predicted gain was optimistic. Using such comparisons is especially valuable when model coefficients change sharply with state. On a simple monotone thermal stage, damped and full Newton can converge to the same root. The resulting residual and a comparison at identical time step test this expectation. Compare two nonlinear cooling solves.
Include physical bounds in a step decision
A variable representing a concentration cannot be negative. If a positive current value \(c\) receives a negative proposed correction \(s\), then \(c+\alpha s\geq0\) imposes \(\alpha\leq c/(-s)\). For a concentration of 0.04 and a direction of −0.10 in matching units, only factors up to 0.4 keep this component admissible. Starting a merit-function search at 0.36 leaves a small distance from the boundary. Across many components use the most restrictive bound before evaluating an expensive residual.
Admissibility alone cannot guarantee progress: a physically acceptable state may have a larger balance mismatch than the old one. Conversely, clipping a negative candidate to zero changes the search direction and can alter conservation. A genuinely constrained equilibrium may require a complementarity or inequality formulation rather than repeated clipping. Record which condition limited each step when diagnosing persistent stagnation near a boundary.
Derive the step along a trust-region boundary
For a smooth squared-residual objective, a local quadratic model has change \(m(s)=g^Ts+s^TBs/2\), often with \(B=J^TJ\). A trust region limits this model to \(\|s\|_2\le\Delta\) in scaled coordinates. Suppose first that \(B\) is symmetric positive definite. If the unconstrained minimiser \(-B^{-1}g\) lies inside the ball it solves the constrained problem. Otherwise the minimiser lies on the sphere. The stationarity condition there is \((B+\lambda I)s=-g\), with \(\lambda>0\) chosen so the length equals \(\Delta\).
Diagonalising \(B=Q\operatorname{diag}(\beta_i)Q^T\) turns the length condition into \(\sum_i (q_i^Tg)^2/(\beta_i+\lambda)^2=\Delta^2\). For a nonzero gradient this left-hand side decreases continuously to zero with \(\lambda\), starting at the squared unconstrained-step length. Thus the boundary multiplier exists uniquely. A positive shift damps different curvature directions by different factors. The step is generally not a scalar fraction of the full unconstrained step. If \(B\) has negative eigenvalues, positive semidefiniteness of \(B+\lambda I\) and possible singular boundary cases require additional treatment.
Measure what a restricted model predicted
Let \(B=\operatorname{diag}(1,4)\) and \(g=(-2,-5)^T\). The full minimiser is \((2,1.25)^T\), of norm about 2.36. Set the permitted radius to \(\sqrt2\). At \(\lambda=1\) the shifted equations give
with exactly the required length. The low-curvature component has been reduced to one half of its unconstrained value while the second retains four fifths. That orientation change follows from the different denominators; shortening the original step to the same norm would predict a different model decrease.
The linear term at the accepted candidate is \(-7\). The quadratic term is \((1+4)/2=2.5\), so the predicted decrease is \(7-2.5=4.5\). Suppose the actual objective is this local model plus \(0.6s_1^4\), up to an irrelevant constant. The actual decrease at \((1,1)\) is 3.9 and the ratio of actual to predicted decrease is \(3.9/4.5\approx0.867\). The extra quartic term does not alter the gradient or Hessian at the base point, yet it changes the observed progress over a finite step.
If that coefficient were 6 instead, the actual change would be an increase of 1.5 while the local quadratic still predicts a decrease of 4.5. Shrinking the radius diminishes the neglected term more rapidly than the leading linear improvement. Comparing achieved and predicted reductions supplies information about model accuracy that neither the multiplier nor the trust radius alone provides.
The choice of norm defining the ball also influences the calculation. If one coordinate is measured in millimetres and the other in metres, changing only the unit of the first coordinate alters an unscaled Euclidean ball. Instead specify physically meaningful scales and constrain the length of the dimensionless step. Transform the gradient and curvature consistently with that scaling; otherwise the shifted equations describe a different model than the one used to evaluate the actual decrease.
An equivalent specification is a weighted ellipsoid in the physical variables, with semiaxes equal to admissible changes in each parameter.
Measure how far a Newton model remains predictive
Apply Newton’s method to \(\arctan x=0\) from \(x=2\). The full step is \(-5\arctan(2)\). Evaluate the true merit along that line and compare with the model that predicts zero residual at its end.

Read values from the plot
| Fraction of Newton step | Re-evaluated merit | Linear residual prediction |
|---|---|---|
| 0 | 0.61289 | 0.61289 |
| 0.29 | 0.07064 | 0.30896 |
| 0.575 | 0.37763 | 0.1107 |
| 0.86 | 0.7482 | 0.012013 |
| 1.15 | 0.90538 | 0.01379 |
Change parameters · Measure how far a Newton model remains predictive
Change one input at a time and compare the recalculated curves with the argument above. The browser evaluates this small model locally; the accompanying numerical values state its assumptions and reference checks. Reset restores the reference inputs, and the data can be downloaded as CSV.