Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Nonlinear Solvers and Continuation

    A nonlinear boundary equation can have two solutions at the same parameter, or no solution at all. Newton's method sees only a local linearization: its convergence does not enumerate the branches, and its failure does not prove that a solution is absent. Continuation turns isolated solves into a study of a solution family.

    We first follow an exactly known fold in the Bratu equation. We then transfer the numerical construction to a scalar kink with a localized change in its quartic coupling. These are separate equations: the first calibrates branch tracking, while the second supplies a field-theory application without assuming that its branch also folds.

    Preparation: Boundary discretization, Jacobians, and the scalar kink. Finite differences introduces the mesh equations.

    Newton solves a local problem

    Let a discretized boundary equation be F(u,λ)=0F(u,\lambda)=0, with u∈RNu\in\mathbb R^N and a real control parameter λ\lambda. At fixed λ\lambda, Newton's step is

    J(uk,λ) δu=−F(uk,λ),uk+1=uk+αδu,J=∂F∂u.(1)J(u_k,\lambda)\,\delta u=-F(u_k,\lambda),\qquad u_{k+1}=u_k+\alpha\delta u, \qquad J=\frac{\partial F}{\partial u}. \tag{1}

    Here α=1\alpha=1 gives ordinary Newton iteration; a damped method decreases α\alpha until a chosen residual merit function improves. The local quadratic-convergence statement requires a sufficiently good initial guess, a nonsingular Jacobian at the solution, and appropriate smoothness. It does not promise that a distant initial guess finds a specified branch.

    Scaling matters. A residual containing second differences naturally carries factors of h−2h^{-2}, while a boundary residual may not. A tiny residual is an algebraic statement about the chosen equations; its relation to solution error depends on the inverse Jacobian and discretization error. Damping protects against some poor steps, but cannot turn a nonexistent fixed-parameter solution into an existing one.

    An exact fold on a specified interval

    The Bratu problem is

    u′′+λeu=0,u(0)=u(1)=0,λ>0.(2)u''+\lambda e^u=0,\qquad u(0)=u(1)=0, \qquad \lambda>0. \tag{2}

    Its positive solutions are described by

    uθ(x)=−2log⁡cosh⁡[θ(x−1/2)]cosh⁡(θ/2),λ(θ)=2θ2cosh⁡2(θ/2),θ>0.(3)u_\theta(x)=-2\log\frac{\cosh[\theta(x-1/2)]}{\cosh(\theta/2)}, \qquad \lambda(\theta)=\frac{2\theta^2}{\cosh^2(\theta/2)}, \qquad \theta>0. \tag{3}

    Twice differentiating verifies the ODE and the two boundary values. Conversely, u′′<0u''<0 makes a solution concave with one maximum. The autonomous first integral gives equal travel times from that maximum to the equal endpoint values, placing it at 1/21/2; integrating from the maximum produces (3). The interval matters: using a formula normalized on [−1,1][-1,1] without rescaling would change the parameter by a factor of four.

    Differentiating log⁡λ\log\lambda gives

    λ′(θ)λ(θ)=2θ−tanh⁡(θ/2).(4)\frac{\lambda'(\theta)}{\lambda(\theta)} =\frac2\theta-\tanh(\theta/2). \tag{4}

    The turning point therefore satisfies θ∗tanh⁡(θ∗/2)=2\theta_*\tanh(\theta_*/2)=2. Numerically,

    θ∗≃2.39935728,λ∗≃3.51383072,u∗(1/2)≃1.18684217.(5)\theta_*\simeq2.39935728,\qquad \lambda_*\simeq3.51383072,\qquad u_*(1/2)\simeq1.18684217. \tag{5}

    For 0<λ<λ∗0<\lambda<\lambda_* there are two solutions, coalescing at the fold. The exact family proves the absence of a positive solution above λ∗\lambda_*; a failed iteration alone would not prove it.

    On a uniform grid with NN interior points and h=1/(N+1)h=1/(N+1), the equations are

    Fi=ui+1−2ui+ui−1h2+λeui=0,J=D2+λdiag⁡(eu).(6)F_i=\frac{u_{i+1}-2u_i+u_{i-1}}{h^2}+\lambda e^{u_i}=0, \qquad J=D_2+\lambda\operatorname{diag}(e^u). \tag{6}

    The endpoint values are inserted before solving for the interior unknowns. At a fold, JJ is singular: changing λ\lambda is no longer a regular way to parameterize the curve. This is a failure of that parameterization, not the end of the solution curve. See Dickson et al., §§2.1–2.2 (PDF).

    Continuing through the fold

    Write z=(u,λ)z=(u,\lambda) and choose the metric

    ⟨δz,δw⟩h=h δuTδwu+δλ δwλ.(7)\langle\delta z,\delta w\rangle_h =h\,\delta u^T\delta w_u+\delta\lambda\,\delta w_\lambda. \tag{7}

    The spatial weight prevents the norm of a fixed smooth profile from growing merely because the grid is refined. The relative scale assigned to λ\lambda remains an explicit algorithm choice; rescaling it changes the steps, not the physical branch.

    A tangent t=(tu,tλ)t=(t_u,t_\lambda) obeys

    Jtu+Fλtλ=0,⟨t,t⟩h=1.(8)Jt_u+F_\lambda t_\lambda=0,\qquad \langle t,t\rangle_h=1. \tag{8}

    Align its sign with the previous tangent. From a converged point z0z_0, predict zpred=z0+Δs t0z_{\rm pred}=z_0+\Delta s\,t_0. Correct by solving the original equations and the additional condition

    F(u,λ)=0,⟨t0,z−zpred⟩h=0.(9)F(u,\lambda)=0,\qquad \langle t_0,z-z_{\rm pred}\rangle_h=0. \tag{9}

    The second equation defines a hyperplane normal to the old tangent. It does not force the corrected solution to remain on the tangent line. Newton's corrector uses the bordered matrix

    (JFλhtu,0Ttλ,0).(10)\begin{pmatrix} J&F_\lambda\\ h t_{u,0}^{T}&t_{\lambda,0} \end{pmatrix}. \tag{10}

    Why can this work when JJ is singular? At a simple fold, assume rank⁡J=N−1\operatorname{rank}J=N-1, with right and left null vectors v,wv,w, and

    wTFλ≠0,wTFuu[v,v]≠0.(11)w^T F_\lambda\ne0,\qquad w^T F_{uu}[v,v]\ne0. \tag{11}

    The first condition makes the augmented derivative [J Fλ][J\ F_\lambda] full rank. The second makes the turning quadratic rather than a higher-order degeneracy. At the fold, tλ=0t_\lambda=0 and tut_u points along vv. For a sufficiently accurate tangent, the extra row in (10) fixes that remaining null direction. These are local hypotheses, not conclusions warranted by one successful augmented solve. The precise assumptions and condition estimates are discussed in Dickson et al., §2.2 and the subsequent analysis (PDF).

    A nonsingular bordered system also need not be uniformly well conditioned under arbitrary mesh or unit changes. The retained raw Euclidean condition numbers grow with NN; preconditioning and scaling remain relevant even though continuation crosses the fold.

    Following and locating the branch

    The companion nonlinear_branch.py starts at λ=0.1\lambda=0.1 from a zero profile, then follows the branch with N=63,127,255N=63,127,255 and Δs=0.1,0.05\Delta s=0.1,0.05. Its corrector uses a Euclidean residual merit function, Armijo coefficient 10−410^{-4} and halving of a rejected step. Every failed corrector and retry would be retained; these six branch runs required none and reached the upper branch near λ=1\lambda=1.

    The largest sampled value of λ\lambda is not a precision estimate of the fold. Instead, the calculation refines a nearby numerical point by solving

    F(u,λ)=0,J(u,λ)v=0,hvTv=1.(12)F(u,\lambda)=0,\qquad J(u,\lambda)v=0,\qquad h v^Tv=1. \tag{12}

    Its Jacobian includes derivatives of JvJv with respect to both uu and λ\lambda. A directional finite-difference check of this complete Jacobian gives relative discrepancies below 3×10−93\times10^{-9} in the retained runs.

    Interior pointsRefined discrete foldDifference from the exact fold
    63633.513384373.51338437−4.46×10−4-4.46\times10^{-4}
    1271273.513719143.51371914−1.12×10−4-1.12\times10^{-4}
    2552553.513802823.51380282−2.79×10−5-2.79\times10^{-5}

    Halving hh reduces the fold error by about four, as expected for the centered stencil. Halving Δs\Delta s changes the refined fold only at the numerical floor; it mainly changes how densely the branch is traversed. The solver residual at N=255N=255 is about 4.4×10−114.4\times10^{-11}, far smaller than the discretization error in λ∗\lambda_*. Reporting the residual as the fold accuracy would conceal that difference.

    At λ=1\lambda=1 and N=127N=127, fixed-parameter Newton from zero finds a peak near 0.140540.14054. Starting from 16x(1−x)16x(1-x) finds the other branch, with peak near 4.091454.09145. A zero-start attempt at λ=3.6\lambda=3.6 terminates with a failed line search and residual about 0.3800.380. The failure is retained. Its interpretation as a parameter beyond the fold comes from (3), not from the error message.

    The next figure compares the actual continuation points with the exact family and shows the scalar profiles introduced below.

    Numerical pseudo-arclength points follow the two Bratu branches through their fold; a separate localized scalar coupling changes kink width and center slope.

    Left: the exact Bratu family and the retained N=127N=127, Δs=0.1\Delta s=0.1 continuation. Right: independently solved scalar profiles on [0,8][0,8], displayed through y=4y=4. The Bratu parameter λ\lambda and the scalar coupling deformation aa belong to different equations.

    A nonlinear scalar family

    Consider the dimensionless static energy

    Ea[f]=∫−RR[12f′2+12ga(y)(f2−1)2]dy,ga(y)=1+asech⁡2y,a>−1.(13)\mathcal E_a[f]=\int_{-R}^{R} \left[\frac12 f'^2+\frac12g_a(y)(f^2-1)^2\right]dy, \qquad g_a(y)=1+a\operatorname{sech}^2y, \qquad a>-1. \tag{13}

    The positive quartic coefficient is an externally specified spatial function. It preserves the two asymptotic vacua but breaks continuous translation symmetry. The odd, centered boundary problem is

    f′′=2ga(y)f(f2−1),f(0)=0,f(R)=1.(14)f''=2g_a(y)f(f^2-1),\qquad f(0)=0,\quad f(R)=1. \tag{14}

    At a=0a=0 the infinite-domain solution is tanh⁡y\tanh y. It is not the exact solution of (14) at finite RR, since tanh⁡R≠1\tanh R\ne1.

    Discretizing (14) gives a tridiagonal Jacobian with diagonal

    −2h2−2ga(yi)(3fi2−1)(15)-\frac2{h^2}-2g_a(y_i)(3f_i^2-1) \tag{15}

    and off-diagonal entries h−2h^{-2}. On each mesh, solve successively at a=−0.5,0,0.5,1a=-0.5,0,0.5,1, using the previous solution as the next initial guess. Natural parameter continuation suffices for this retained segment. Other branches and their stability require separate continuation and perturbation calculations.

    The scan varies R=6,8,10R=6,8,10 and h=1/16,1/32,1/64h=1/16,1/32,1/64, comparing with adaptive collocation at tolerances 10−810^{-8} and 10−1010^{-10}. The adaptive method and its residual tolerance follow the SciPy 1.13.1 documentation. At R=8R=8, the tight collocation results are:

    Coupling deformationCenter slopeFull symmetric-interval energy
    a=−0.5a=-0.50.834615330.834615331.053549861.05354986
    a=0a=01.000000001.000000001.333333331.33333333
    a=0.5a=0.51.165647021.165647021.587805991.58780599
    a=1a=11.326236701.326236701.820059191.82005919

    For a=1a=1, the maximum finite-difference profile error decreases from 4.32×10−44.32\times10^{-4} to 1.08×10−41.08\times10^{-4} to 2.70×10−52.70\times10^{-5} under the two mesh refinements. The corresponding algebraic residuals are already below 10−1210^{-12}. Changing the collocation tolerance changes the retained energies by at most 6.2×10−126.2\times10^{-12} across the scan. These comparisons separate mesh error from solver convergence; they do not establish a continuum quantum-field-theory observable.

    A useful check survives the loss of translation symmetry. Define the static stress

    T(y)=12f′2−12ga(y)(f2−1)2.(16)\mathcal T(y)=\frac12f'^2-\frac12g_a(y)(f^2-1)^2. \tag{16}

    Using the equation of motion cancels the terms proportional to f′f', leaving

    T′(y)=−12ga′(y)(f2−1)2.(17)\mathcal T'(y)=-\frac12g_a'(y)(f^2-1)^2. \tag{17}

    Thus the stress is not constant when the coupling varies. The integrated identity is satisfied within 10−1010^{-10} in the retained collocation calculations. It checks a physical consequence of the inhomogeneity rather than merely reevaluating the same local residual.

    Along a stationary family with fixed boundary values, variations of ff contribute no bulk or endpoint term to the energy derivative. Hence

    dEada=∫0Rsech⁡2y (f2−1)2dy.(18)\frac{d\mathcal E_a}{da} =\int_0^R\operatorname{sech}^2y\,(f^2-1)^2dy. \tag{18}

    At a=0a=0 and infinite RR, this is 8/158/15. A centered energy difference at a=±10−3a=\pm10^{-3} agrees with the integral derivative to about 3.8×10−93.8\times10^{-9} across the retained radii, including the expected finite-difference step error. This checks both the stationary-family interpretation and the factor from the two symmetric halves.

    Summary

    Newton iteration finds a nearby root, whereas continuation organizes roots into a family. Pseudo-arclength changes the parameterization so that a regular curve can pass through a simple fold. Check the fold conditions, refine the spatial equations separately from the continuation step, and preserve failed attempts. For a field profile, boundary limits and physical identities provide information that a small nonlinear residual alone cannot supply.

    Exercises

    1. Why the border removes the null direction

    Derive the fold condition from (3). Assuming (11), prove that the bordered matrix at the fold is nonsingular when its last row is the exact tangent row. Explain the additional role of the quadratic condition.

    Solution

    Equation (4) vanishes when θtanh⁡(θ/2)=2\theta\tanh(\theta/2)=2. The left-hand side is strictly increasing for positive θ\theta, so there is one such point. The derivative of 2/θ−tanh⁡(θ/2)2/\theta-\tanh(\theta/2) is strictly negative; consequently λ′′(θ∗)<0\lambda''(\theta_*)<0 and it is a maximum.

    Suppose the bordered matrix annihilates (δu,δλ)(\delta u,\delta\lambda). Its first row is Jδu+Fλδλ=0J\delta u+F_\lambda\delta\lambda=0. Multiplication by wTw^T gives δλ=0\delta\lambda=0 because wTFλ≠0w^TF_\lambda\ne0. Then δu=cv\delta u=cv. At the fold, the tangent has tλ=0t_\lambda=0 and tut_u proportional to vv, so its metric pairing with (cv,0)(cv,0) vanishes only when c=0c=0. The kernel is trivial.

    Differentiate F(u(s),λ(s))=0F(u(s),\lambda(s))=0 twice at the fold. Since λ′=0\lambda'=0, multiplying the second derivative by wTw^T yields

    λ′′=−wTFuu[u′,u′]wTFλ.\lambda''=-\frac{w^TF_{uu}[u',u']}{w^TF_\lambda}.

    The numerator condition in (11) ensures a nonzero quadratic turning. Without it, the augmented curve may still be regular but its stationary parameter value can have higher-order behavior. A successful bordered solve by itself does not classify that behavior.

    2. Energy and stress with a varying coupling

    Starting from (13), derive (17) and (18). Evaluate the latter in the infinite-domain a=0a=0 solution and explain why using a translation-invariant stress conservation law would be incorrect for a≠0a\ne0.

    Solution

    Differentiate (16):

    T′=f′f′′−2gaf(f2−1)f′−12ga′(f2−1)2.\mathcal T'=f'f''-2g_a f(f^2-1)f' -\frac12g_a'(f^2-1)^2.

    The first two terms cancel by (14), proving (17). The external spatial coupling exchanges momentum with the field, so a constant field stress is not expected.

    For the energy derivative, integrate the variation of f′f' by parts. The Euler–Lagrange term vanishes on a solution, and fixed endpoint values remove the boundary term. Only the explicit coupling derivative remains:

    dEada=12∫−RRsech⁡2y(f2−1)2dy.\frac{d\mathcal E_a}{da} =\frac12\int_{-R}^{R}\operatorname{sech}^2y(f^2-1)^2dy.

    The integrand is even, giving (18). For f=tanh⁡yf=\tanh y, it becomes sech⁡6y\operatorname{sech}^6y. Set t=tanh⁡yt=\tanh y:

    ∫0∞sech⁡6y dy=∫01(1−t2)2dt=1−23+15=815.\int_0^\infty\operatorname{sech}^6y\,dy =\int_0^1(1-t^2)^2dt =1-\frac23+\frac15=\frac8{15}.

    The finite-RR problem has its own stationary derivative, with its own profile; it approaches this limit as the boundary is taken away.

    References

    Scrollable formula. Use Left and Right arrow keys to reveal hidden content.

    Scrollable table. Use Left and Right arrow keys to reveal hidden columns.

    Scrollable figure. Use Left and Right arrow keys to reveal hidden content.