Fundamentals / Numerical mathematics / Nonlinear equations / Nonlinear systems and iterative methods

Accelerating fixed points with differences of residuals

A slowly convergent physical iteration contains information in the direction of successive errors. Use a scalar extrapolation and a small residual-minimisation problem to exploit that information, then test the extrapolated state against the original equation.

Eliminate an unknown leading error without knowing the root

Suppose a sequence obeys \(x_j=x_*+c q^j\) for an unknown limit and mode multiplier \(q\ne1\). Subtract successive terms to find

\[\Delta x_{j+1}/\Delta x_j=q.\]

Eliminating \(q,c\) yields the Aitken extrapolation \(\hat x_j=x_j-(x_{j+1}-x_j)^2/(x_{j+2}-2x_{j+1}+x_j)\). For a single exact geometric error it returns the limit after observing three values, even if the multiplier is negative and the iterates oscillate. If the denominator is near zero relative to numerical uncertainty, the extrapolation can amplify noise. A nearly constant first difference may indicate almost linear drift rather than a trustworthy asymptotic geometric error.

For \(g(x)=0.95x+0.10\), ordinary iteration from zero gives \(0,0.10,0.195\); the fixed point is 2. The second difference is \(-0.005\) and the formula gives exactly 2. If the last reported value is rounded to 0.196, the denominator changes to \(-0.004\), giving an extrapolated 2.50. Substituting this candidate into the original residual \(g(x)-x\) gives \(-0.025\): it is a worse fixed point than 2 but still has a modest residual because the fixed point itself is weakly conditioned. Always evaluate the actual residual and estimate its relation to state error if a meaningful physical tolerance is required.

Choose affine weights that minimise residual history

For a vector fixed-point map \(g\), let \(f_i=g(x_i)-x_i\). Seek a combination of recent residuals with small norm while preserving a fixed point under averaging. Anderson mixing chooses coefficients \(\alpha_i\) minimising \(\|\sum_i\alpha_i f_i\|\) subject to \(\sum_i\alpha_i=1\), then evaluates a candidate \(x_{\rm new}=\sum_i\alpha_i g(x_i)\) in a basic undamped formulation. The affine constraint allows negative coefficients, which is precisely what makes acceleration beyond ordinary averaging possible. For one-dimensional affine maps the combination can eliminate a single mode exactly.

For two residual vectors write their affine combination as \(f_1+\beta(f_0-f_1)\). Its least-squares optimum is \(\beta=-f_1^T(f_0-f_1)/\|f_0-f_1\|^2\) if the denominator is nonzero. With several vectors a small QR or SVD solve in terms of differences is preferable to building normal equations when differences are nearly collinear. Choose component units or a weighted norm consistent with the physical equation. Otherwise a residual expressed in large numerical units can dominate the fit and accelerate one variable while neglecting another important constraint.

For a strictly affine map \(g(x)=Gx+c\),

\[f(\sum\alpha_i x_i)=\sum\alpha_i f_i.\]

The predicted residual at the affine combination of old states is exactly the linear combination. The candidate formed by applying \(g\) to it has residual \(G\sum\alpha_i f_i\). For nonlinear \(g\) neither equality need hold globally. An Anderson residual minimisation is a local extrapolation hypothesis, not a proof that the next nonlinear state decreases residual or stays feasible. Evaluating \(f(x_{\rm new})\), accepting a damped mixture when appropriate, and dropping near-dependent history are practical ways to test that hypothesis.

Background · What happens when two residual histories almost coincide?

Take two residuals from nearly consecutive states and minimise the norm of \(r_1+\alpha(r_2-r_1)\). Write \(d=r_2-r_1\). Differentiating the squared norm with respect to \(\alpha\) gives

\[\alpha=-\frac{d^T r_1}{d^T d}.\]

The denominator vanishes for duplicate residuals. A tiny denominator can also demand enormous positive and negative weights that cancel in the modelled residual. For scalar residuals 1 and 0.999 those weights are about \(-999\) and \(1000\). Extrapolating the nonlinear states this far relies on local behaviour far outside the sampled interval. One practical response is to discard a nearly redundant column, then evaluate the true residual of the proposed state. A small residual of the affine model alone provides no acceptance test.

Separate fast and slow modes in a two-component relaxation

Use \(g(x,y)=(0.9x+0.1,0.2y+0.8)\), whose fixed point is \((1,1)\). Start at \((0,0)\), then \(x_1=(0.1,0.8)\). Residuals are \(f_0=(0.1,0.8)\) and \(f_1=(0.09,0.16)\); their difference is \((0.01,0.64)\). The two-history coefficient above is about \(-0.252\). The predicted residual of the affine state is approximately \((0.0875,-0.0010)\), largely eliminating the fast second component while leaving the slower first. Three appropriately independent histories can eliminate two geometrically distinct error directions for this affine example if their residual vectors affinely span zero in exact arithmetic. Near-equal decay factors can make that calculation badly conditioned. A finite memory window trades acceleration against conditioning, storage and the cost of residual evaluation.

Follow a two-mode residual through a real mixing step

Set the slow multiplier to 0.90 and the second to 0.20. The first two ordinary states coincide in both runs because the accelerated iteration has no history at the start. Thereafter the calculator solves the two-vector minimisation at each iteration, forms the proposed mixed state and evaluates its actual residual. The second component initially dominates the residual norm even though it is the more rapidly damped mode. Notice how the mixed and plain curves separate as the slow component becomes limiting. The plotted logarithmic residual measures convergence to the stated map; the physical state error in mode j is its residual divided by the magnitude of one minus that mode multiplier.

Move the two multipliers close together so the map becomes nearly a scalar relaxation, then choose a negative second multiplier so its errors alternate. Explain why affine mixing can nearly remove a single geometric mode, while nearly dependent histories make weights sensitive to evaluation noise. The implementation falls back to the ordinary map if the difference norm is already at the roundoff threshold. Very small residuals are marked at a finite plotting floor. Compare curves before that floor rather than fitting a convergence rate to the flat portion.

Tutorial · identify good and bad extrapolation data

Check an alternating scalar series

Three iterates are 1.50, 0.75 and 1.125. Infer the geometric multiplier and limit. How should the next value be checked?

Work through the solution

The differences are \(-0.75\) and \(+0.375\), so \(q=-0.5\). The Aitken prediction is

\[1.50-0.75^2/1.125=1.00.\]

If the geometric assumption persists, the next raw iterate would be \(1-0.0625=0.9375\). Comparing both the new observed iterate and the actual residual at 1 tests the single-mode hypothesis. Three arbitrary numbers alone can always fit such a geometric extrapolation when the denominator is nonzero.

Show the connection to a secant root step

Use two scalar residuals \(f_i=g(x_i)-x_i\). Derive the affine combination of \(x_0,x_1\) whose predicted residual is zero and compare with a secant step for \(f=0\).

Work through the solution

Solve \(\alpha f_0+(1-\alpha)f_1=0\) to get

\[\alpha=-f_1/(f_0-f_1).\]

The mixed state is \(x_1-f_1(x_1-x_0)/(f_1-f_0)\), the ordinary secant prediction. The combination of \(g(x_i)\) is the same state because the weighted residual vanishes. For nearly equal residuals the denominator can be tiny, generating a large extrapolation. A bounded step or fallback to the base fixed-point map may be necessary if the candidate leaves the valid state domain.

Select a restart from nearly identical residual columns

Two stored vectors have residuals \((1,0)\) and \((1,10^{-9})\), measured with absolute component errors \(10^{-7}\). Can their difference support a reliable two-history fit?

Work through the solution

The direction being used for the second independent sample is smaller than the evaluation uncertainty by two orders of magnitude. Its orientation and length can be dominated by numerical error, so a large coefficient in a least-squares solve carries little physical information. Drop the redundant direction or use a rank-revealing solve scaled to the expected residual error. Evaluate any retained candidate on the original model. A tiny predicted mixed residual from cancelling inaccurate large coefficients has no independent evidential value.

Further reading