advanced35 min studyLesson 327 in Mathematics

Implicit solvers and Newton tolerances

Control algebraic error inside an implicit time step using Jacobian conditioning, scaled corrections, and a discretization error budget.

On this page

What you’ll understand

  • Form the residual and Newton matrix for an implicit step.
  • Relate residual size to state error through an inverse Jacobian.
  • Choose algebraic accuracy that does not overwhelm temporal discretization.

An implicit formula defines the next value through an equation, and software only solves that equation approximately. Its output therefore contains algebraic error in addition to the time-discretization error of the ideal formula. Solving far beyond the needed accuracy wastes work, while stopping too early can erase the integrator's nominal order. A reliable implementation connects the nonlinear stopping criterion to a scaled state-error budget and checks the linear systems used to produce each Newton correction.

The time step becomes a residual equation

Backward Euler seeks a value Z satisfying G(Z)=Z−Yn−hf(tn+1,Z)=0G(Z)=Z-Y_n-hf(t_{n+1},Z)=0. Newton's method linearizes G at a current guess, solves for a correction, and updates that guess. The exact Newton matrix is identity minus h times the state Jacobian of f. A small h often makes this matrix close to identity, but stiff rates, couplings, and scaling can change its conditioning. The mathematical implicit formula does not specify how many iterations are sufficient.

A predictor from previous accepted values can provide a good initial guess, but Newton convergence remains local without additional safeguards. A line search or damping can prevent a bad full correction from leaving the useful region. Reusing a factorization gives a modified Newton method, which can save work when the Jacobian changes slowly but can converge more slowly. Failure to reduce corrections or residuals may require refreshing the Jacobian, improving the linear solve, rejecting the step, or reducing h.

G(Z)=Z−Yn−hf(tn+1,Z),(I−hJf(Z(m)))δ(m)=−G(Z(m)),Z(m+1)=Z(m)+δ(m)G(Z)=Z-Y_n-hf(t_{n+1},Z),\qquad (I-hJ_f(Z^{(m)}))\delta^{(m)}=-G(Z^{(m)}),\qquad Z^{(m+1)}=Z^{(m)}+\delta^{(m)}
These are the backward-Euler residual and exact Newton correction equations. Production solvers may use approximate Jacobians and inexact linear solves.↔ Scroll wide equations horizontally.

A small residual needs a conditioning interpretation

Near a regular root, first-order perturbation analysis relates the state error to the inverse residual Jacobian applied to the residual. A small raw residual can correspond to a large state error if that inverse is large. Multiplying the entire equation by a small constant also makes its residual small without changing the root. Residual tolerances must therefore use a meaningful scaling and an estimate of how residual error affects the state, rather than an arbitrary numerical threshold.

Correction-based stopping can estimate the remaining error when the iterations have entered a predictable contraction regime. But a small step in an iteration is not always proof of a small error: damping, stagnation, or a poor approximate Jacobian can make corrections tiny. Use both progress and a residual or correction criterion tied to the integration scales. In a scalar problem a derivative bounded away from zero can give a rigorous local error bound by the mean-value theorem; in a system one needs an appropriate inverse or nonlinear regularity bound.

Z−Z∗≈G′(Z∗)−1G(Z),∣Z−Z∗∣≤∣G(Z)∣γif ∣G′∣≥γ>0 between Z and Z∗Z-Z^*\approx G'(Z^*)^{-1}G(Z),\qquad |Z-Z^*|\le\frac{|G(Z)|}{\gamma}\quad\text{if }|G'|\ge\gamma>0\text{ between }Z\text{ and }Z^*
The first relation is local linearization. The second is a scalar mean-value bound on an interval with a nonvanishing derivative, not a universal vector residual estimate.↔ Scroll wide equations horizontally.

Nest the error budgets rather than solving blindly

An order-p one-step formula has an ideal local defect of order h to the p plus one. A sufficient fixed-interval strategy is to keep each algebraic state error at that scale or below, so its propagated contribution does not spoil the intended global order under the same stability assumptions. A fixed absolute nonlinear tolerance may dominate as h shrinks, causing a refinement plateau. Adaptive codes usually tie nonlinear error to the current componentwise integration weights and reserve a fraction of the allowed local estimate.

There is another nested solve inside Newton when a Krylov method approximates the correction. Its linear residual should be small enough that the resulting correction error does not obstruct nonlinear convergence, but high accuracy in early nonlinear iterations may be unnecessary. Preconditioners affect that trade and must account for the step-dependent matrix. Track nonlinear iterations, linear iterations, rejected trials, and Jacobian updates together; a solver that takes few accepted steps can still be expensive if each step hides a difficult algebraic problem.

∥εalg,n∥=O(hp+1)⟹an O(hp) accumulated contribution on a fixed stable interval\|\varepsilon_{\mathrm{alg},n}\|=O(h^{p+1})\quad\Longrightarrow\quad\text{an }O(h^p)\text{ accumulated contribution on a fixed stable interval}
This is a sufficient budget under uniform propagation bounds. It concerns error in the computed state, so a raw residual needs conditioning and scaling before being used as its proxy.↔ Scroll wide equations horizontally.

Solving a nonlinear backward-Euler step

For y′=−y², Yₙ=1, and h=0.2, solve G(Z)=Z+0.2Z²−1=0 on the nonnegative branch using Newton from Z⁽⁰⁾=1.

  1. The derivative is 1+0.4Z. The first correction is −0.2/1.4=−1/7, giving Z⁽¹⁾=6/7≈0.8571428571.

  2. At this value G=1/245 and G′=47/35. The next correction is −1/329, giving Z⁽²⁾=281/329≈0.8541033435.

  3. The exact nonnegative algebraic root is (√1.8−1)/0.4≈0.8541019662. The remaining error is about 1.3772×10⁻⁶. Because G′≥1 on the nonnegative interval, the residual also bounds the state error there.

Z∗=1.8−10.4,Z(2)=281329Z^*=\frac{\sqrt{1.8}-1}{0.4},\qquad Z^{(2)}=\frac{281}{329}
Algebraic convergence reaches the backward-Euler endpoint, not the exact ODE endpoint. Further Newton iterations cannot remove the method's discretization error.↔ Scroll wide equations horizontally.
The result

Two Newton updates solve the implicit equation closely. This algebraic root is still distinct from the exact differential-equation value 1/1.2≈0.8333333333.

Explore the model

Interactive lab

Interactive lab · root-finding

A rigorous algebraic bracket

Pause and Reset, then set target c=2 and upper bound U=2. Predict the bracket after three bisections and Step three times. Compare the midpoint and reported bracket error bound with √2. Use this as a concrete example of an algebraic stopping certificate.

A rigorous algebraic bracketBisection of x² − c on [0,U], capped at 50 iterations for floating-point resolution. The error bound is the maximum distance from the displayed midpoint to either bracket endpoint (half the width in exact arithmetic). Compensated square evaluation preserves the bracket when ordinary multiplication rounds a residual to zero. A truly exact endpoint or midpoint collapses the bracket. This is one monotone quadratic, not a general root solver. Current readings: Midpoint after 0 refinements: 1.5; Bracket error bound: 1.5; Computed residual · x² − c: 0.25. All parameters are adjustable with the labeled controls below.Bisection on x squared minus 2: bracket from 0 to 3 after 0 refinements.00.751.52.253−2.360.192.745.297.84x · bracket stays nonnegativef(x) = x² − cn = 0 · [ 0, 3 ]
Quadratic / midpointCurrent bracketPositive root
Midpoint after 0 refinements
1.5
Bracket error bound
1.5
Computed residual · x² − c
0.25
t = 0 s

Bisection of x² − c on [0,U], capped at 50 iterations for floating-point resolution. The error bound is the maximum distance from the displayed midpoint to either bracket endpoint (half the width in exact arithmetic). Compensated square evaluation preserves the bracket when ordinary multiplication rounds a residual to zero. A truly exact endpoint or midpoint collapses the bracket. This is one monotone quadratic, not a general root solver. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forThe bracket is [1.25,1.5], midpoint 1.375, with bound 0.125. This instrument bisects x²−2; it does not run Newton or solve an implicit ODE. Its guaranteed scalar bound illustrates what a solver tolerance must mean.

Check your understanding

Why can a nonlinear residual of 10⁻¹⁰ fail to imply a state error near 10⁻¹⁰?

Try it yourself

Backward Euler for y′=−3y from Yₙ=2 with h=0.25 gives G(Z)=1.75Z−2. For a candidate Z=1.143, find the residual, exact algebraic error, and exact algebraic root.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

This residual is linear, so dividing it by 1.75 gives the state error exactly.

Compare with the solution

The algebraic root is 2/1.75=8/7≈1.1428571429. The candidate residual is 1.75·1.143−2=0.00025. Dividing by 1.75 gives the signed state error 1/7000≈0.0001428571. This identity is exact for the linear residual. The ODE's exact next value is 2exp(−0.75), which is a different target from the implicit algebraic root.

Take it with you

  • Implicit discretization error remains even after the algebraic equation is solved exactly.
  • Residuals need conditioning and scale information before they certify state accuracy.
  • Linear and nonlinear solve budgets should remain below the temporal error budget.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.