Skip to content

Shooting treats the energy in a stationary Schrödinger equation as an unknown parameter in an initial-value problem. One integrates from one boundary and adjusts the energy until the other boundary condition is satisfied. The method is economical for a few one-dimensional states, but forbidden-region growth can make one-sided shooting numerically unstable.

Required background. Boundary conditions in computation specifies the endpoint problem; numerical error and stability separates a root residual from solution accuracy.

The energy-dependent initial-value problem

Section titled “The energy-dependent initial-value problem”

For −αy′′+Vy=Ey-\alpha y''+Vy=Ey, with α=ℏ2/(2m)>0\alpha=\hbar^2/(2m)>0, integrate

y′=z,z′=q(x,E)y,q(x,E)=V(x)−Eα.y'=z,\qquad z'=q(x,E)y, \qquad q(x,E)=\frac{V(x)-E}{\alpha}.

On a regular finite interval [a,b][a,b] with Dirichlet endpoints, choose y(a)=0y(a)=0, z(a)=1z(a)=1. The derivative fixes an arbitrary nonzero scale; the final eigenfunction is normalized later. Define the shooting residual F(E)=y(b;E)F(E)=y(b;E). Eigenvalues are zeros of FF.

Bracket a desired root and use a safeguarded scalar solver. The inner ODE accuracy must be tight enough that the sign and magnitude of FF are resolved. Reducing the root tolerance below the integration error creates a misleading precision claim.

For V=0V=0, a=0a=0, and b=Lb=L, positive energies give

y(x;E)=sin⁡(kx)k,k=E/α,F(E)=sin⁡(kL)k.y(x;E)=\frac{\sin(kx)}k, \qquad k=\sqrt{E/\alpha}, \qquad F(E)=\frac{\sin(kL)}k.

The nonzero roots are kL=nπkL=n\pi with n≥1n\ge1. At E=0E=0, the continuous limit is F(0)=LF(0)=L, not zero. Replacing FF by sin⁡(kL)\sin(kL) without treating k=0k=0 separately introduces a spurious “ground state.” This example tests the initialization as well as the energy search.

At a regular separated Sturm–Liouville problem’s nnth eigenvalue, counting from n=0n=0, the eigenfunction has nn interior nodes. Node counting helps identify which root has been found and exposes skipped levels. Count resolved sign changes away from endpoint roundoff, not fluctuations in an underresolved tail.

Sensitivity equations and safeguarded Newton steps

Section titled “Sensitivity equations and safeguarded Newton steps”

When the initial data are independent of energy, differentiate the ODE with respect to EE. With s=∂Eys=\partial_Ey,

s′′=q(x,E)s−yα,s(a)=s′(a)=0.s''=q(x,E)s-\frac{y}{\alpha}, \qquad s(a)=s'(a)=0.

Then F′(E)=s(b)F'(E)=s(b) can be computed alongside FF, yielding a Newton proposal E−F/F′E-F/F'. Retain a bracket and reject proposals that leave it or rely on an unresolved derivative. If the boundary initial data themselves depend on energy, their derivatives must also be included; the zero sensitivity initial conditions no longer apply.

A small F(E)F(E) depends on the arbitrary solution scale. Use a scale-aware residual or combine it with bracket width and refinement. Periodically rescaling the integrated solution prevents overflow, but the sensitivity bookkeeping must respect that rescaling if Newton derivatives are used.

For the real regular Dirichlet problem above, an exact eigenvalue EnE_n has a nonzero residual derivative. To see why, form Ws=ys′−y′sW_s=ys'-y's from the solution and its energy sensitivity. Their equations give

Ws′=−y2α,Ws(a)=0.W_s'=-\frac{y^2}{\alpha}, \qquad W_s(a)=0.

At an eigenvalue, y(b)=0y(b)=0, so integration yields

F′(En)=s(b;En)=∫aby(x;En)2 dxα y′(b;En).F'(E_n)=s(b;E_n) =\frac{\displaystyle\int_a^b y(x;E_n)^2\,dx} {\alpha\,y'(b;E_n)}.

The endpoint derivative cannot vanish together with y(b)y(b) for a nontrivial regular solution. Thus the root is simple. Close to it, F/F′F/F' estimates the energy error in this fixed boundary-value problem; it is unchanged by an energy-independent rescaling of the shooting solution. An uncertainty δF\delta F in the integrated residual correspondingly produces an energy uncertainty of order ∣δF/F′∣|\delta F/F'|. Neither quantity measures the error caused by replacing an infinite domain with a finite interval.

In a region with approximately constant V−E>0V-E>0, the solutions are e±κxe^{\pm\kappa x}, κ=(V−E)/α\kappa=\sqrt{(V-E)/\alpha}. A tiny contamination of the growing branch eventually overwhelms the desired decaying branch. Smaller time or space steps reduce local error but do not remove the exponential conditioning of a long outward integration.

For a bound state with two tails, integrate stable solutions inward from each side and match near the classically allowed region. Matching methods develops Wronskian and logarithmic-derivative residuals. A logarithmic derivative avoids amplitude overflow but has poles at wavefunction nodes; it is not a universally smooth scalar residual.

For a symmetric potential, parity reduces the problem to a half interval. Even states use y′(0)=0y'(0)=0 with nonzero y(0)y(0); odd states use y(0)=0y(0)=0 with nonzero derivative. Search the parity sectors separately, but do not impose this reduction on an asymmetric potential.

An oscillator with two independent numerical limits

Section titled “An oscillator with two independent numerical limits”

In oscillator units ℏ=m=ω=1\hbar=m=\omega=1, the even ground state satisfies

y′′=(x2−2E)y,y(0)=1,y′(0)=0.y''=(x^2-2E)y, \qquad y(0)=1, \qquad y'(0)=0.

The whole-line energy is E0=1/2E_0=1/2. Replacing its decaying tail by y(L)=0y(L)=0 instead defines an oscillator confined by walls at ±L\pm L. Wagner’s shooting examples discuss this parity reduction and the difficulty of the growing forbidden-region solution. The following calculation keeps the finite boundary and integration step separate.

Integrate the two first-order equations with classical fourth-order Runge–Kutta, using constant step h=L/Nh=L/N. Bisect the ground-state bracket [0.45,0.65][0.45,0.65] for 45 iterations, evaluating the integrated endpoint Fh(E)=yh(L;E)F_h(E)=y_h(L;E) at each trial energy. Repeating for three boundaries gives:

Step hh Energy at L=2L=2 Energy at L=3L=3 Energy at L=4L=4
0.1000.100 0.53746228160.5374622816 0.50039165810.5003916581 0.50000100830.5000010083
0.0500.050 0.53746127670.5374612767 0.50039111900.5003911190 0.50000052340.5000005234
0.0250.025 0.53746121350.5374612135 0.50039108520.5003910852 0.50000049290.5000004929

For each fixed LL, successive energy differences decrease by approximately sixteen, as expected for fourth-order integration in this resolved range. Yet the three columns approach different limits. The finite-boundary energies are approximately 0.53746120930.5374612093, 0.50039108290.5003910829, and 0.50000049090.5000004909. In particular, L=2L=2 retains an error of about 0.037460.03746 relative to the whole-line energy even though all the unrounded numerical roots have ∣Fh∣<10−11|F_h|<10^{-11} with the stated initial scale. The small residual means that the numerical endpoint equation was solved accurately; rounding the displayed energies can increase that residual.

One independent check of these finite-boundary limits uses the exact even solution

y(x;E)=e−x2/2 1F1 ⁣(1−2E4;12;x2).y(x;E)=e^{-x^2/2}\, {}_1F_1\!\left(\frac{1-2E}{4};\frac12;x^2\right).

Here 1F1{}_1F_1 is the solution of Kummer’s equation analytic at zero, normalized to one there. With t=x2t=x^2 and y=e−t/2w(t)y=e^{-t/2}w(t), the oscillator equation becomes tw′′+(1/2−t)w′−(1−2E)w/4=0t w''+(1/2-t)w'-(1-2E)w/4=0, fixing the parameters above; the NIST definition also supplies a convergent series for evaluating it. Its zeros at x=Lx=L give the quoted limits. An independently refined finite-difference Hamiltonian on the same interval approaches the same limits. The Harmonic Oscillator Spectrum lab provides that matrix calculation and its separate mesh and boundary studies.

Enlarging LL removes the artificial-wall error but worsens the conditioning of outward shooting. For longer forbidden regions, use inward propagation or two-sided matching and repeat both refinements. A smaller root tolerance cannot replace either one.

For a regular three-dimensional radial problem, the reduced function behaves as u(r)∼rℓ+1u(r)\sim r^{\ell+1} near the origin. Begin at a small positive r0r_0 using a Frobenius expansion and its derivative, rather than evaluating a singular coefficient at zero. Coulomb and other singular potentials require the appropriate next terms and domain assumptions.

Vary r0r_0, outer boundary, ODE tolerance, and root tolerance independently. A stable energy under one of these changes does not establish convergence in the others. Normalize with the correct radial measure: u=rRu=rR has norm ∫∣u∣2dr\int|u|^2dr.

For each reported state, retain energy, node count, boundary residual, normalization, and an independent comparison with a matrix discretization or analytic limit. Shooting excels at low-dimensional boundary-value problems; it is not the natural method for a generic high-dimensional many-body Hamiltonian.

Why does setting both y(a)=0y(a)=0 and y′(a)=0y'(a)=0 make a linear shooting calculation useless?

Solution

Uniqueness of the regular linear initial-value problem gives the identically zero solution for every energy. Its right boundary residual vanishes trivially and contains no spectral information. One unconstrained amplitude or derivative must be nonzero.

For the free Dirichlet problem, use the sensitivity identity to find F′(En)F'(E_n) at En=α(nπ/L)2E_n=\alpha(n\pi/L)^2. How would multiplying the initial derivative by 10−810^{-8} affect FF and the local estimate F/F′F/F'?

Solution

With y=sin⁡(knx)/kny=\sin(k_nx)/k_n, the integral of y2y^2 is L/(2kn2)L/(2k_n^2) and y′(L)=(−1)ny'(L)=(-1)^n. Hence

F′(En)=(−1)nL2En.F'(E_n)=(-1)^n\frac{L}{2E_n}.

Both FF and F′F' acquire the factor 10−810^{-8} when the initial derivative is rescaled. A fixed absolute residual threshold then becomes easier to satisfy without improving the energy, while F/F′F/F' remains unchanged wherever that ratio is resolved. This local estimate still refers to the chosen finite-interval problem.

  • Ascher, U. M., R. M. M. Mattheij, and R. D. Russell, Numerical Solution of Boundary Value Problems for Ordinary Differential Equations, SIAM, 1995 — shooting, conditioning, and multiple shooting.
  • LeVeque, R. J., Finite Difference Methods for Ordinary and Partial Differential Equations, SIAM, 2007 — initial-value integration and boundary-value verification.
  • National Institute of Standards and Technology, Digital Library of Mathematical Functions, §13.2 — Kummer’s differential equation and the defining series for 1F1{}_1F_1 used in the independent finite-boundary check.
  • Wagner, Marc, Numerical Methods in Physics, Goethe-Universität Frankfurt am Main, Summer 2018, §§6.2.1–6.2.2 — box and oscillator shooting, parity conditions, and outward-integration instability.