Skip to content
QFT.org

Search QFT.org

Enter a word or phrase.

    You can also browse the main navigation and chapter contents.

    Shooting and Boundary Matching

    A bound-state wavefunction must satisfy conditions at two ends of space. Integrating from one end is easy; preventing a tiny unwanted solution from dominating at the other end is often the difficult part. The scalar kink provides an unusually useful test: its bound-state energy and wavefunction are known, but a numerical method must recover them without putting that answer into the boundary condition.

    Preparation: Second-order ODEs, linear dependence of solutions, and the kink fluctuation problem. Spectral collocation provides the comparison method.

    An odd mode on the half-line

    For the dimensionless kink coordinate y=mx/2y=mx/2, the fluctuation equation is

    L2ψ=Eψ,L2=−d2dy2+4−6sech⁡2y,E=4ω2m2.(1)\mathcal L_2\psi=E\psi,\qquad \mathcal L_2=-\frac{d^2}{dy^2}+4-6\operatorname{sech}^2y, \qquad E=\frac{4\omega^2}{m^2}. \tag{1}

    The full-line translation mode is even and has E=0E=0. We select the odd sector by solving on y≥0y\geq0 with ψ(0)=0\psi(0)=0 and a square-integrable tail. The shape mode is

    E∗=3,ψ∗(y)=3sech⁡ytanh⁡y,∫0∞ψ∗2dy=1.(2)E_*=3,\qquad \psi_*(y)=\sqrt3\operatorname{sech}y\tanh y, \qquad \int_0^\infty\psi_*^2dy=1. \tag{2}

    The continuum begins at E=4E=4. Equation (2) will check the calculation; it will not supply its unknown decay constant.

    For a trial E<4E<4, define κ(E)=4−E\kappa(E)=\sqrt{4-E}. Far from the kink, the two independent solutions behave as e−κye^{-\kappa y} and e+κye^{+\kappa y}. A small growing admixture therefore has a relative effect proportional to e2κye^{2\kappa y}. A well-posed boundary problem can produce an ill-conditioned initial-value formulation. This distinction, and its remedy by matching shorter integrations, is developed in Süli, §6.1, pp. 62–65 (PDF).

    Local data that retain the eigenvalue

    Write the ODE as a first-order system,

    ddy(ψv)=(v[U(y)−E]ψ),U(y)=4−6sech⁡2y.(3)\frac{d}{dy}\begin{pmatrix}\psi\\v\end{pmatrix} =\begin{pmatrix}v\\\bigl[U(y)-E\bigr]\psi\end{pmatrix}, \qquad U(y)=4-6\operatorname{sech}^2y. \tag{3}

    The origin is regular. Since the overall scale is arbitrary, choose ψ(0)=0\psi(0)=0 and v(0)=1v(0)=1. Expanding U=−2+6y2+O(y4)U=-2+6y^2+O(y^4) gives

    ψ(y)=y−E+26y3+(E+2)2+36120y5+O(y7).(4)\psi(y)=y-\frac{E+2}{6}y^3 +\frac{(E+2)^2+36}{120}y^5+O(y^7). \tag{4}

    This series also supplies consistent data at a small positive starting coordinate when a different problem makes the endpoint inconvenient. Here the exact origin conditions are simpler, and starting at 10−410^{-4} with (4) is a separate check.

    At a large but finite RR, using ψ′(R)=−ψ(R)\psi'(R)=-\psi(R) would insert the exact decay exponent of (2). Instead expand the trial decaying solution as

    ψ(y)=e−κy∑n=0∞ansn,s=e−2y,a0=1.(5)\psi(y)=e^{-\kappa y}\sum_{n=0}^{\infty}a_n s^n, \qquad s=e^{-2y},\qquad a_0=1. \tag{5}

    Since U=4−24s/(1+s)2U=4-24s/(1+s)^2, substituting into the differential equation and equating powers of ss yields

    an=−6n(κ+n)∑j=1n(−1)j−1jan−j.(6)a_n=-\frac{6}{n(\kappa+n)} \sum_{j=1}^n(-1)^{j-1}j a_{n-j}. \tag{6}

    Truncation at order pp gives the logarithmic derivative

    ℓp(E,R)=−κ−2∑n=1pnane−2nR∑n=0pane−2nR.(7)\ell_p(E,R)=-\kappa -2\frac{\sum_{n=1}^{p}n a_n e^{-2nR}} {\sum_{n=0}^{p}a_n e^{-2nR}}. \tag{7}

    Every trial energy changes both κ\kappa and the coefficients. The denominator must remain nonzero; the retained radii and trial-energy bracket satisfy this condition. Set the right initial vector to (ψR,vR)=(1,ℓp)(\psi_R,v_R)=(1,\ell_p) and integrate inward. This normalization avoids an extremely small endpoint amplitude while preserving the one-dimensional space of allowed solutions.

    Matching solutions instead of large endpoint values

    Integrate the left solution from zero and the right solution from RR to a common ymy_m. At the correct energy they must be linearly dependent. Their Wronskian supplies the condition

    W(E)=ψL(ym)vR(ym)−vL(ym)ψR(ym)=0.(8)W(E)=\psi_L(y_m)v_R(y_m)-v_L(y_m)\psi_R(y_m)=0. \tag{8}

    There is no first-derivative term in (1), so the Wronskian of two exact solutions at the same EE is independent of ymy_m. A numerically useful residual is

    D(E)=W(E)ψL2+vL2ψR2+vR2.(9)D(E)=\frac{W(E)} {\sqrt{\psi_L^2+v_L^2}\sqrt{\psi_R^2+v_R^2}}. \tag{9}

    The two norms must be finite and nonzero. Multiplying either solution by a nonzero constant leaves the zero of DD unchanged. A bracketed scalar root finder then adjusts EE.

    A logarithmic-derivative mismatch, vL/ψL−vR/ψRv_L/\psi_L-v_R/\psi_R, works away from zeros of either wavefunction. Its poles can be mistaken for sign-changing roots. Equation (9) avoids those division poles. It does not prevent overflow during an excessively long integration; normalization, subdivision or propagation of a stable subspace may still be necessary.

    This is two-sided shooting. In a general multiple-shooting scheme, divide the interval at y0,…,yMy_0,\ldots,y_M, assign an initial vector zjz_j to each segment, and let Φj\Phi_j denote its numerical flow. The nonlinear system contains

    zj+1−Φj(zj,E)=0(10)z_{j+1}-\Phi_j(z_j,E)=0 \tag{10}

    together with the endpoint conditions and a normalization. Its Jacobian couples neighboring segments through the flow sensitivities. The larger algebraic system replaces one badly conditioned long propagation by shorter ones; it does not remove the need to control integration and matching errors. See Süli, Eqs. (107)–(109) (PDF).

    What the retained calculation resolves

    The companion kink_shooting.py uses DOP853 integrations, a bracket 2<E<3.82<E<3.8, and ym=1.5y_m=1.5. It scans R=3,4,6,8,12R=3,4,6,8,12, tail orders p=0,1,2p=0,1,2, and relative ODE tolerances from 10−810^{-8} to 10−1210^{-12}. The root tolerance is 5×10−135\times10^{-13} in EE. Selected signed energy errors at the tightest ODE tolerance are:

    EndpointLeading tail, p=0p=0First correction, p=1p=1Second correction, p=2p=2
    R=3R=34.33×10−44.33\times10^{-4}−3.62×10−6-3.62\times10^{-6}1.89×10−81.89\times10^{-8}
    R=4R=48.08×10−68.08\times10^{-6}−9.05×10−9-9.05\times10^{-9}6.59×10−126.59\times10^{-12}
    R=6R=62.72×10−92.72\times10^{-9}1.07×10−131.07\times10^{-13}1.61×10−131.61\times10^{-13}
    R=8R=81.08×10−121.08\times10^{-12}1.67×10−131.67\times10^{-13}1.69×10−131.69\times10^{-13}

    The early improvement reflects better boundary data. The later plateau is numerical: more tail terms cannot establish extra digits once integration, root finding and rounding dominate. These are deterministic errors against a known answer, not statistical uncertainties.

    The figure contrasts this successful matching calculation with an unstable outward integration. Even exact input E=3E=3 accumulates numerical growing contamination; an explicit shift of 10−1010^{-10} makes it much larger.

    Tail corrections reduce the bound-state energy error, while forward integration amplifies small energy and integration errors exponentially.

    Left: two-sided shooting with ODE relative tolerance 10−1210^{-12}. Right: forward integration from (ψ,ψ′)=(0,1)(\psi,\psi')=(0,1), compared with the unnormalized exact shape sech⁡ytanh⁡y\operatorname{sech}y\tanh y. The right panel measures relative error in a rapidly decaying quantity; it is not an instability of the physical bound state.

    At y=12y=12, the relative forward error is about 1.35×10−41.35\times10^{-4} for input E=3E=3 and −0.110-0.110 for input E=3+10−10E=3+10^{-10}. By y=20y=20, their magnitudes reach roughly 1.2×1031.2\times10^3 and 9.8×1059.8\times10^5. Higher precision or tighter tolerances can postpone this amplification. They do not make the outward propagation insensitive to an unwanted growing component. Changing only the initial derivative would rescale the odd solution, so it would not be a meaningful test of this mechanism.

    Independent boundary and collocation checks

    The potential admits an exact decaying solution for any positive κ\kappa:

    ψR(y;κ)=e−κy[κ2+3κtanh⁡y+3tanh⁡2y−1](κ+1)(κ+2).(11)\psi_R(y;\kappa)= \frac{e^{-\kappa y} [\kappa^2+3\kappa\tanh y+3\tanh^2y-1]} {(\kappa+1)(\kappa+2)}. \tag{11}

    It follows by applying (−∂y+2tanh⁡y)(−∂y+tanh⁡y)(-\partial_y+2\tanh y)(-\partial_y+\tanh y) to e−κye^{-\kappa y} and normalizing the large-yy coefficient. Direct substitution checks (1). At the origin, its numerator is κ2−1\kappa^2-1; the positive root is κ=1\kappa=1, hence E=3E=3. This provides an independent exact-boundary control, distinct from the truncated expansion used above.

    The companion also solves the same finite Robin problem by adaptive collocation, treating EE as an unknown parameter. There are two first-order equations plus one parameter, so three boundary conditions are needed:

    ψ(0)=0,ψ′(0)=1,ψ′(R)−ℓp(E,R)ψ(R)=0.(12)\psi(0)=0,\qquad \psi'(0)=1,\qquad \psi'(R)-\ell_p(E,R)\psi(R)=0. \tag{12}

    For R=4,8R=4,8 and p=0,2p=0,2, collocation and tight shooting agree within 6.0×10−126.0\times10^{-12} in the retained comparisons. The SciPy 1.13.1 solve_bvp documentation describes its fourth-order collocation and residual tolerance. That tolerance is not a bound on the true eigenvalue error. Agreement between two solvers first establishes consistency for (12); only comparison with the infinite-domain answer tests the remaining boundary approximation.

    A separate Dirichlet control imposes ψ(R)=0\psi(R)=0, matching the finite-box problem in spectral collocation. It gives E=3.00812872E=3.00812872 at R=4R=4 and E=3.00000270087E=3.00000270087 at R=8R=8. These are correct finite-box energies, not failures to reproduce the Robin result.

    Finally, join the matched solutions and normalize them on [0,R][0,R]. At R=8R=8, the numerical and exact profiles, each normalized on that interval, differ in L2L^2 norm by 2.8×10−132.8\times10^{-13}. The full half-line exact state still has tail probability (squared L2L^2 norm)

    ∫R∞ψ∗2dy=1−tanh⁡3R,(13)\int_R^\infty\psi_*^2dy=1-\tanh^3R, \tag{13}

    about 6.75×10−76.75\times10^{-7} at R=8R=8. The excellent comparison of two finite-interval normalized profiles must not be reported as that small a full half-line truncation error.

    Summary

    A useful shooting residual matches allowed solution spaces rather than a large endpoint amplitude. Keep the eigenvalue in the boundary asymptotics, integrate in stable directions, and test matching-point independence. Compare algorithms for identical boundary conditions before interpreting an infinite-domain limit. Coordinate maps and singular endpoints solve this same mode without a finite endpoint, at the price of a singular coordinate representation.

    Exercises

    1. The first boundary correction

    Derive a1a_1 in (5), obtain the first corrected logarithmic derivative, and explain why fixing κ=1\kappa=1 for all trial energies changes the eigenvalue problem.

    Solution

    The coefficient of e−(κ+2)ye^{-(\kappa+2)y} in ψ′′−κ2ψ=−24sψ+O(s2ψ)\psi''-\kappa^2\psi=-24s\psi+O(s^2\psi) gives 4(κ+1)a1=−244(\kappa+1)a_1=-24. Thus a1=−6/(κ+1)a_1=-6/(\kappa+1) and

    ℓ1=−κ−2a1e−2R1+a1e−2R=−κ+12e−2Rκ+1−6e−2R.\ell_1=-\kappa-\frac{2a_1e^{-2R}}{1+a_1e^{-2R}} =-\kappa+\frac{12e^{-2R}}{\kappa+1-6e^{-2R}}.

    This approximation requires the denominator to remain nonzero and the omitted tail terms to be small. At the physical root κ=1\kappa=1, the correction is positive: the shape's logarithmic derivative approaches −1-1 from above.

    For a trial EE, the asymptotic equation is ψ′′=(4−E)ψ\psi''=(4-E)\psi. Its decaying solution has exponent 4−E\sqrt{4-E}, not a fixed number. Freezing κ\kappa therefore imposes the wrong Robin condition except at the answer. It can accidentally return a convincing energy in this known example while failing to define the intended energy-dependent decaying subspace.

    2. A pole is not a matching zero

    Show how independent rescalings affect (8)–(9). Then use the solutions u(y)=yu(y)=y and v(y)=y−1v(y)=y-1 of ψ′′=0\psi''=0 to exhibit a logarithmic-derivative pole without a Wronskian zero.

    Solution

    Under u↦auu\mapsto au and v↦bvv\mapsto bv, with nonzero real constants, the Wronskian becomes abWabW. Its normalized form becomes sgn⁡(ab)D\operatorname{sgn}(ab)D. The root set is unchanged, although its plotted sign can reverse.

    For the two linear solutions,

    uv′−u′v=y−(y−1)=1.uv'-u'v=y-(y-1)=1.

    They are linearly independent everywhere. Nevertheless,

    u′u−v′v=1y−1y−1\frac{u'}u-\frac{v'}v=\frac1y-\frac1{y-1}

    has poles at zero and one. A sign change across either pole does not identify a root of the matching determinant. A bracketed root finder requires a continuous residual on its bracket; testing that requirement is part of choosing the residual, not a task the root finder can infer from endpoint signs.

    References

    • SciPy developers, SciPy 1.13.1 Reference Guide, scipy.integrate.solve_bvp, especially unknown parameters, residual control, and the eigenparameter example.
    • Endre Süli, Numerical Solution of Ordinary Differential Equations, University of Oxford lecture notes, §6.1, pp. 62–65, author-hosted notes (PDF).

    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.