Solve only for directions constrained by data
Given covariance \(C>0\), whiten the residual \(r=C^{-1/2}(f(x)-d)\) and its Jacobian \(J\). Gauss–Newton minimises \(\|r+Js\|^2/2\). Write \(J=U\Sigma V^T\). Components orthogonal to its range cannot be changed to first order. Each reliably measured direction obeys \(v_i^Ts=-u_i^Tr/\sigma_i\). A direction in the nullspace is free. Setting its correction to zero selects the minimum Euclidean norm in the chosen parameter units.
If the forward derivative carries error \(e_J\), singular values below \(\|e_J\|\) cannot be distinguished reliably from zero. Also compare predicted changes to measurement noise over physically allowed parameter displacements. Damping with a penalty gives factors \(\sigma_i/(\sigma_i^2+\lambda^2)\) and is continuous in the singular values. A penalty adds assumptions about scales.
Take two equal-noise readings whose model rows depend only on \(a+b\), with sensitivities \((1,1),(2,2)\). At \(a=b=0\) readings \((3,6)\) demand \(a+b=3\). Minimum norm assigns \(a=b=1.5\). Changing parameter units can change that individual assignment while retaining the identifiable sum. A new observation of \(a-b\) adds an independent singular direction.
Exchange a failing parameter for a curve coordinate
Let \(F(u,p)=0\) be \(n\) equations in \(n+1\) unknowns and suppose \([F_u,F_p]\) has row rank \(n\). Its nullspace supplies a unit tangent \(t\) oriented with the preceding tangent. Predict \(z_p=z_k+h t\). The corrector solves \(F(z)=0,\ t^T(z-z_p)=0\). At \(z_k\) the augmented derivative is invertible since its nullspace would lie both along \(t\) and perpendicular to it. This remains true locally for sufficiently small prediction steps, including a simple fold with singular \(F_u\).
For a boundary-value application consider \(u''+\lambda e^u=0,\ u(0)=u(1)=0\). A centred grid gives \(F_i=(u_{i-1}-2u_i+u_{i+1})/\Delta x^2+\lambda e^{u_i}\). The augmented rows have tridiagonal state derivative with diagonal \(-2/\Delta x^2+\lambda e^{u_i}\) and parameter column \(e^{u_i}\). Use grid-weighted state inner products for tangents so refinement does not change the meaning of arclength. Halve \(h\) and repeat the prediction if corrector displacements are too large relative to \(h\). If halving reduces the displacement by about four, the quadratic predictor defect is a geometrical effect.
How can a perfectly converged branch still predict a wrong maximum load?
Newton controls the residual of the chosen grid only. Correct the same branch point on a grid of half the spacing, matching arclength or a monotonic observed amplitude rather than load at the fold. In the regular second-order regime divide the fine–coarse output difference by three to estimate the fine-grid error. Refine the grid when this exceeds the output tolerance. Tighten the augmented linear and nonlinear solves enough that their estimated effect on that output is smaller.

Tutorial on a fold with an exact reference
Find a mesh-independent check for the boundary-value branch
Work through the solution
Set \(u(x)=2\log[\cosh(a/2)/\cosh(a(x-1/2))]\). Then \(u''=-2a^2\operatorname{sech}^2(a(x-1/2))\) and \(e^u=\cosh^2(a/2)\operatorname{sech}^2(a(x-1/2))\). Hence \(\lambda=2a^2/\cosh^2(a/2)\) and the end values vanish. This parametric curve can test either side of the turning point.
Locate the fold and choose a comparison observable
Work through the solution
Differentiating \(\log\lambda\) gives \(2/a-\tanh(a/2)\). Solve \(a\tanh(a/2)=2\), yielding \(a\) near 2.40 and \(\lambda\) near 3.51. The midpoint temperature \(2\log\cosh(a/2)\) is strictly increasing for positive \(a\), making it a well-defined matching observable across meshes.
Deuflhard · Gauss–Newton and continuation
Change parameters · Which correction does an experiment identify?
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.
Open this calculation with adjustable inputs
Download the executed OneSimulation notebook · Python source
The notebook reproduces the reference case and exposes the mesh or geometry parameters. Its saved output below comes from the actual OneSimulation solver.
"""Follow both Bratu branches using OneSimulation augmented Newton solves."""
import argparse
import matplotlib.pyplot as plt
import numpy as np
from onesim.numerics.linear.matrices.dense_linear_algebra import solve_dense
def branch(parameter=2.4, intervals=16):
if parameter <= 0 or intervals < 4 or intervals % 2:
raise ValueError("Use a positive branch parameter and an even interval count >= 4")
x = np.linspace(0, 1, intervals+1)
exact = 2*np.log(np.cosh(parameter/2)/np.cosh(parameter*(x-.5)))
reference = 2*parameter**2/np.cosh(parameter/2)**2
state, load = exact[1:-1].copy(), reference
h = 1/intervals
for iteration in range(15):
full = np.r_[0., state, 0.]
residual = np.r_[(full[:-2]-2*state+full[2:])/h**2 + load*np.exp(state),
state[intervals//2-1]-exact[intervals//2]]
if np.linalg.norm(residual) < 1e-10:
break
jacobian = np.zeros((intervals, intervals))
jacobian[:-1, :-1] = (np.diag(-2/h**2 + load*np.exp(state))
+ np.diag(np.ones(intervals-2)/h**2, 1)
+ np.diag(np.ones(intervals-2)/h**2, -1))
jacobian[:-1, -1] = np.exp(state)
jacobian[-1, intervals//2-1] = 1
correction = solve_dense(jacobian, -residual)
state += correction[:-1]
load += correction[-1]
assert np.linalg.norm(residual) < 1e-8
return x, np.r_[0., state, 0.], load, reference, np.linalg.norm(residual)
def experiment(parameter=2.4, intervals=16):
x, state, load, reference, residual = branch(parameter, intervals)
print(f"Analytical load: {reference:.9f}; discrete load: {load:.9f}")
print(f"Augmented Newton residual: {residual:.3e}")
refined = branch(parameter, 2*intervals)
assert abs(refined[2]-reference) < abs(load-reference)
print(f"Load error after doubling the mesh: {abs(refined[2]-reference):.3e}")
fig = plt.figure(figsize=(10, 4.6), layout="constrained")
view = fig.add_subplot(121, projection="3d")
xx, aa = np.meshgrid(np.linspace(0, 1, 45), np.linspace(.3, 5, 45))
lam = 2*aa**2/np.cosh(aa/2)**2
field = 2*np.log(np.cosh(aa/2)/np.cosh(aa*(xx-.5)))
view.plot_surface(xx, lam, field, color="#9dc6b9", alpha=.7, linewidth=0)
view.plot(x, np.full_like(x, load), state, color="#ad491d", lw=2.5)
view.set(xlabel="x", ylabel="Load lambda", zlabel="Temperature u", title="Folded family of 1D solutions")
ax = fig.add_subplot(122)
ax.plot(x, 2*np.log(np.cosh(parameter/2)/np.cosh(parameter*(x-.5))), label="Analytical same-midpoint profile")
ax.plot(x, state, "o--", ms=3, label="Augmented OneSimulation solve")
ax.set(xlabel="x", ylabel="Temperature u")
ax.legend(fontsize=8)
fig.savefig("complete-numerics-bratu.png", dpi=170)
return load, residual
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("--parameter", type=float, default=2.4)
parser.add_argument("--intervals", type=int, default=16)
args, _ = parser.parse_known_args()
experiment(args.parameter, args.intervals)
plt.show()
Analytical load: 3.513830356; discrete load: 3.506676842 Augmented Newton residual: 5.459e-13 Load error after doubling the mesh: 1.786e-03
