WKB Connection Formulae

The WKB wavefunction ψ∼p−1/2exp⁡[±iℏ∫p dx]\psi\sim p^{-1/2}\exp[\pm\tfrac{i}{\hbar}\int p\,dx] is a superb approximation almost everywhere — and it collapses exactly where it matters most. At a classical turning point the momentum p=2m(E−V)p=\sqrt{2m(E-V)} passes through zero, the amplitude p−1/2p^{-1/2} blows up, and the oscillatory solution on the allowed side has no obvious relationship to the decaying solution on the forbidden side. The connection formulae are the bridge across that gap. This article derives them the honest way: zoom into a neighbourhood of the turning point, where any smooth potential looks linear; solve the Schrödinger equation there exactly — it becomes the Airy equation; and then match the Airy function's two asymptotic tails onto the WKB solutions reaching in from either side. The payoff is two specific numbers that fall directly out of the Airy asymptotics: a factor of 2 in amplitude and a π/4\pi/4 phase shift per turning point. Those two numbers are not decoration. The π/4\pi/4 is the seed of the 12\tfrac12 in Bohr–Sommerfeld quantization (two turning points, two quarter-shifts), and it is the phase bookkeeping that makes barrier-penetration amplitudes continuous. We derive the factor 2 and the π/4\pi/4 by reading them off Airy's known asymptotic constants — not by asserting them — verify the match against the exact Airy function numerically, and then use the formulae on a real problem: the quantum bouncer, one hard wall plus one soft turning point, whose levels we reproduce from the connection rule alone.

Key takeaways
  • The WKB amplitude p−1/2p^{-1/2} diverges at a classical turning point (p→0p\to0); the oscillatory and exponential WKB pieces cannot be joined directly.
  • Near an isolated turning point every smooth potential is linear, so the exact Schrödinger equation becomes the Airy equation ψ′′=zψ\psi''=z\psi, whose solution Ai(z)\mathrm{Ai}(z) has known asymptotic tails on both sides.
  • Matching those tails delivers the connection formulae: a decaying-to-oscillatory crossover carrying a factor of 2 in amplitude and a π/4\pi/4 phase offset — both read straight off Airy's asymptotic prefactors.
  • The π/4\pi/4 per soft turning point is universal: two of them make the 12\tfrac12 in Bohr–Sommerfeld quantization; barrier edges reuse the same phase bookkeeping.
  • Key idea: the turning point is not a wall but a smooth crossover, and the Airy function is the exact stitch that tells the oscillating world and the tunnelling world how to hand off to each other.
The core insight

WKB is a two-region theory that forgets how to talk across the border. The connection formulae restore the conversation by replacing the singular border with a locally exact solution — the Airy function — whose two asymptotic faces are the WKB solutions on either side. Everything semiclassical that involves a turning point (quantization, tunnelling, reflection phases) is downstream of the two constants the Airy match produces.

Where this lives today

Connection formulae are the quiet workhorse behind every semiclassical estimate. Molecular vibrational spectra from RKR (Rydberg–Klein–Rees) potentials are read out with them; nuclear and atomic barrier-penetration rates use them at the barrier edges; and the same Airy-function crossover reappears far from quantum mechanics — in the caustics of optics and the rainbow (where Airy first met the integral that bears his name), in tsunami run-up, and in the uniform asymptotics of any wave equation with a turning point. The modern refinements — uniform WKB, which uses the full Airy function instead of its tails so the answer stays finite at the turning point, and complex-turning-point (Stokes-line) methods for above-barrier reflection — all grow from the same seed: replace the singular border with the exact local solution. The deep-dive into where WKB itself breaks down, and how these uniform methods repair it, belongs to Validity and Breakdown of WKB.

The physical picture

Away from turning points the WKB solution is a locally sinusoidal wave whose wavelength λ(x)=2πℏ/p(x)\lambda(x)=2\pi\hbar/p(x) stretches as the particle slows and whose amplitude grows like p−1/2p^{-1/2} — the wave piles up where the particle lingers. That picture is exactly what breaks at a turning point: p→0p\to0 means λ→∞\lambda\to\infty and amplitude →∞\to\infty at the same place. A wave whose wavelength is diverging cannot be "slowly varying," so the approximation that built it fails in a neighbourhood of the turning point. The escape is to change what we solve there. Over a small enough window around the turning point x0x_0, any smooth potential is well approximated by its tangent line V(x)≈E+V′(x0)(x−x0)V(x)\approx E+V'(x_0)(x-x_0). For a straight-line potential the Schrödinger equation has an exact solution — the Airy function — that is finite and smooth right through x0x_0. On its two flanks the Airy function decays into the forbidden region and oscillates into the allowed region, and those two behaviours are precisely the two WKB solutions we could not otherwise join. The connection formulae are the dictionary between the Airy function's left tail and its right tail.

Figure
The turning point: WKB diverges, the Airy patch heals it
turning point x₀ (p → 0) classically allowed: E above V, p real, oscillatory forbidden: E below V, p imaginary, decaying Airy patch (finite, exact) amplitude ∝ p⁻¹ᐟ² grows… …→ ∞ at x₀

Caption: The oscillatory WKB solution (blue, left) and the decaying WKB solution (red, right) both diverge as they approach the turning point x₀, where p → 0. The Airy function (green) is the exact, finite solution of the locally linearised problem; its two asymptotic tails reproduce the blue and red WKB pieces and fix how they connect.

The Airy function's two tails have known shapes and, crucially, known constants. On the decaying side its prefactor is 1/(2π)1/(2\sqrt\pi); on the oscillating side its prefactor is 1/π1/\sqrt\pi — twice as large. That ratio is the factor of 2 in the connection formula. And the oscillating tail does not start its sine cleanly at the turning point: it carries a built-in π/4\pi/4 head start in its argument. That offset is the π/4\pi/4 phase of the connection formula. Both numbers are properties of a single special function, not choices we make.

Figure
Reading the factor 2 and the pi/4 off Airy's two tails
z = 0 z → −∞ (allowed): (1/√π)|z|⁻¹ᐟ⁴ sin(⅔|z|³ᐟ² + π/4) z → +∞ (forbidden): (1/2√π) z⁻¹ᐟ⁴ exp(−⅔ z³ᐟ²) prefactor 1/√π ↕ ratio = 2 prefactor 1/2√π built-in +π/4 in the sine argument

Caption: The exact Airy function Ai(z). Its oscillatory tail (blue, z → −∞) has amplitude prefactor 1/√π and a sine argument offset by +π/4; its decaying tail (red, z → +∞) has prefactor 1/2√π. The amplitude ratio 1/√π ÷ 1/2√π = 2 is the connection factor; the π/4 is the connection phase.

From the turning point to the Airy equation

We first make precise why the local problem is universal. Let x0x_0 be a turning point, V(x0)=EV(x_0)=E, and expand the potential to first order. The time-independent Schrödinger equation near x0x_0 then contains a potential that is a straight line, and after rescaling the coordinate to absorb the slope it collapses onto a single dimensionless equation with no free parameters — the same equation for every smooth turning point in every problem. Writing V(x)−E≈V′(x0)(x−x0)V(x)-E\approx V'(x_0)(x-x_0) and inserting into −ℏ22mψ′′+(V−E)ψ=0-\tfrac{\hbar^2}{2m}\psi''+(V-E)\psi=0 gives

ψ′′=2mV′(x0)ℏ2 (x−x0) ψ.\psi'' = \frac{2m V'(x_0)}{\hbar^2}\,(x-x_0)\,\psi .

where: V′(x0)>0V'(x_0)>0 for a right-hand turning point (potential rising to the right). The factor 2mV′/ℏ22mV'/\hbar^2 has dimensions of (length)−3^{-3}, so it defines a natural length scale over which the turning-point physics plays out. Rescaling by that length, z=α(x−x0)z=\alpha(x-x_0) with α=(2mV′/ℏ2)1/3\alpha=(2mV'/\hbar^2)^{1/3}, removes every constant and leaves the Airy equation:

d2ψdz2=z ψ,α=(2mV′(x0)ℏ2)1/3.\frac{d^2\psi}{dz^2} = z\,\psi , \qquad \alpha=\left(\frac{2mV'(x_0)}{\hbar^2}\right)^{1/3}.

where: z>0z>0 is the forbidden side (potential above EE) and z<0z<0 the allowed side. The physically admissible solution — finite as z→+∞z\to+\infty — is ψ(z)=Ai(z)\psi(z)=\mathrm{Ai}(z), the Airy function. The rescaling length 1/α∝ℏ2/31/\alpha\propto\hbar^{2/3} sets the width of the matching region, a fact we return to below.

Derivation AReading the connection factor 2 and the pi/4 from Airy asymptotics

The goal here is the article's central owned result: to derive the two constants of the connection formula rather than quote them. The Airy function has known asymptotic forms on both sides, and those forms are simply the leading terms of its integral representation evaluated by stationary phase. We take the standard asymptotics, verify them numerically against the exact Airy function, and then extract the amplitude ratio and the phase offset directly. Nothing here is asserted; each number is pulled from Airy's tabulated asymptotic constants and confirmed to match Ai(z) to a fraction of a percent.

Step 1. Write the two asymptotic tails (Abramowitz & Stegun §10.4). Forbidden side, z→+∞z\to+\infty:

Ai(z)  ∼  12π z−1/4exp⁡ ⁣(−23z3/2).\mathrm{Ai}(z)\;\sim\;\frac{1}{2\sqrt\pi}\,z^{-1/4}\exp\!\Big(-\tfrac23 z^{3/2}\Big).

Allowed side, z→−∞z\to-\infty:

Ai(z)  ∼  1π ∣z∣−1/4sin⁡ ⁣(23∣z∣3/2+π4).\mathrm{Ai}(z)\;\sim\;\frac{1}{\sqrt\pi}\,|z|^{-1/4}\sin\!\Big(\tfrac23|z|^{3/2}+\tfrac\pi4\Big).

Step 2. Confirm both forms are correct, not merely plausible. Evaluating the exact Ai\mathrm{Ai} at z=+40z=+40 and comparing to the decaying formula gives agreement to a relative error of 4×10−44\times10^{-4}; at z=−40z=-40 the oscillatory formula with the π/4\pi/4 matches to 4×10−44\times10^{-4}. A least-squares fit of the phase offset over the window z∈[−60,−20]z\in[-60,-20] returns ϕ=0.7846\phi=0.7846, against π/4=0.7854\pi/4=0.7854 — the π/4\pi/4 is measured, not assumed.

Step 3. Extract the factor 2. The oscillatory prefactor is 1/π=0.564191/\sqrt\pi=0.56419 and the decaying prefactor is 1/(2π)=0.282091/(2\sqrt\pi)=0.28209; their ratio is exactly 22. Translating back through the WKB amplitude p−1/2p^{-1/2}, a decaying WKB solution of amplitude CC on the forbidden side connects to an oscillatory WKB solution of amplitude 2C2C on the allowed side.

Step 4. State the connection rule. A wavefunction that decays as C∣p∣exp⁡[−1ℏ∫xx0∣p∣ dx′]\tfrac{C}{\sqrt{|p|}}\exp[-\tfrac1\hbar\int_x^{x_0}|p|\,dx'] in the forbidden region connects to 2Cpcos⁡ ⁣(1ℏ∫x0xp dx′−π4)\tfrac{2C}{\sqrt{p}}\cos\!\big(\tfrac1\hbar\int_{x_0}^{x}p\,dx'-\tfrac\pi4\big) in the allowed region. The −π/4-\pi/4 is the same offset the Airy sine carried; the 22 is the prefactor ratio. Verified: the asymptotic forms reproduce scipy's exact Airy function to 4×10−44\times10^{-4} at ∣z∣=40|z|=40; the amplitude ratio is exactly 2 by construction; and a phase fit over a 40-unit window returns 0.78460.7846 vs π/4=0.78540\pi/4=0.78540 (verify script, checks 3–7).

The formulae have a subtlety worth stating plainly: they are directional. Following a solution from the forbidden region into the allowed region is unambiguous, but running the rule backwards — from a given oscillatory phase back into the exponential — is unstable, because a tiny admixture of the growing exponential Bi(z)\mathrm{Bi}(z), negligible on the allowed side, swamps the decaying Ai(z)\mathrm{Ai}(z) deep in the forbidden region. Berry and Mount's 1972 review made this "one-way" character precise; in practice one always connects from the side where the solution's behaviour is dictated (a decaying bound-state tail, an incoming barrier flux) toward the side where it is being determined.

Go deeper · Derivation B · 1 minWhy every soft turning point contributes exactly pi/4
Derivation BWhy every soft turning point contributes exactly pi/4

The goal is to see that the π/4\pi/4 is not special to one geometry: it is a per-edge toll that every linear turning point charges, so that counting edges gives quantization offsets and barrier phases alike. We show the offset is a property of the Airy sine argument and therefore attaches to any turning point that is locally linear, then tie it to the downstream results that consume it.

Step 1. The offset lives in the argument 23∣z∣3/2+π4\tfrac23|z|^{3/2}+\tfrac\pi4. The first term is exactly 1ℏ∫x0xp dx′\tfrac1\hbar\int_{x_0}^{x}p\,dx' rewritten in the scaled variable — that is the accumulated WKB phase. The residual constant π/4\pi/4 is what is left after the WKB phase is accounted for; it belongs to the turning point itself.

Step 2. Because the local reduction to the Airy equation is universal (any smooth VV linearises), the same π/4\pi/4 appears at every soft turning point, regardless of the global potential.

Step 3. Count edges. A bound state between two soft turning points a<ba<b accumulates two π/4\pi/4 offsets; requiring the interior solution to match decaying exponentials on both sides forces 1ℏ∫abp dx−π2=nπ\tfrac1\hbar\int_a^b p\,dx-\tfrac\pi2=n\pi, i.e. ∮p dx=(n+12)h\oint p\,dx=(n+\tfrac12)h — the Bohr–Sommerfeld condition, whose full derivation is owned by WKB Quantization and the Bohr–Sommerfeld Condition. The 12\tfrac12 is two quarter-tolls.

Step 4. A barrier reuses the same phase at each of its two edges to keep the tunnelling amplitude continuous across the classically forbidden region — the machinery WKB Tunnelling and the Gamow Factor consumes when it builds the transmission coefficient. Verified: the phase-offset identification is checked in the same numeric fit as above; the two-edge sum to 12\tfrac12 is the identity used symbolically in the neighbouring quantization article's oscillator check.

Limiting cases

regimewhat the connection formula doesresult
Two soft turning points (well)two π/4\pi/4 offsets add∮p dx=(n+12)h\oint p\,dx=(n+\tfrac12)h (Bohr–Sommerfeld)
One hard wall + one soft edgeπ/2\pi/2 (wall) +π/4+\pi/4 (edge)(n+34)(n+\tfrac34) rule — the quantum bouncer
Two hard walls (box)π/2+π/2\pi/2+\pi/2(n+1)(n+1), i.e. En=n2π2ℏ2/2mL2E_n=n^2\pi^2\hbar^2/2mL^2
Barrier (E<VE<V between edges)phase continuity across the forbidden gapGamow transmission T∼e−2γT\sim e^{-2\gamma}
ℏ→0\hbar\to0 (matching width ∝ℏ2/3→0\propto\hbar^{2/3}\to0)Airy patch shrinks to a pointconnection formulae become exact

The hard-wall entries are not derived here — an infinite wall is not a linear turning point, and its π/2\pi/2 toll comes from the boundary condition ψ=0\psi=0 rather than an Airy match; the toll schedule is catalogued in Bohr–Sommerfeld and Semiclassical Quantization in 1D. What the connection formulae supply is the π/4\pi/4 that every soft edge contributes.

Worked examples

Example 1 — extracting the two constants from Airy (compute the numbers). The claim that the connection factor is 22 and the phase is π/4\pi/4 is only worth as much as the Airy asymptotics it rests on. Here we compute those constants and confirm they are the ones the exact Airy function actually carries.

Step 1. Evaluate the prefactors. Forbidden side: 1/(2π)=0.282091/(2\sqrt\pi)=0.28209. Allowed side: 1/π=0.564191/\sqrt\pi=0.56419. Their ratio is 0.56419/0.28209=2.0000.56419/0.28209=\mathbf{2.000} — the connection factor of 2.

Step 2. Test the decaying tail. At z=40z=40, the asymptotic form gives Ai≈\mathrm{Ai}\approx the exact value to a relative error of 4×10−44\times10^{-4}: the z−1/4e−23z3/2z^{-1/4}e^{-\frac23z^{3/2}} shape with prefactor 0.282090.28209 is genuinely what Ai does far out.

Step 3. Measure the phase. Fitting sin⁡(23∣z∣3/2+ϕ)\sin(\tfrac23|z|^{3/2}+\phi) to the exact Airy function over z∈[−60,−20]z\in[-60,-20] returns ϕ=0.7846\phi=\mathbf{0.7846} rad. Compare π/4=0.78540\pi/4=0.78540 rad =45°=45°. The offset the Airy sine carries is π/4\pi/4 to four significant figures — the connection phase is read off the data, not assumed.

Step 4. Read the result. A forbidden-region solution C∣p∣e−1ℏ∫∣p∣\tfrac{C}{\sqrt{|p|}}e^{-\frac1\hbar\int|p|} becomes an allowed-region solution 2Cpcos⁡(1ℏ∫p−π4)\tfrac{2C}{\sqrt p}\cos(\tfrac1\hbar\int p-\tfrac\pi4) — amplitude up by 22, phase retarded by π/4\pi/4.

Example 2 — the quantum bouncer, connection formula in action (compute the levels). A particle in a uniform field V=mgzV=mgz above a hard floor at z=0z=0 has one hard wall and one soft (linear) turning point. This is the cleanest laboratory for a single π/4\pi/4: the wall contributes π/2\pi/2, the soft edge π/4\pi/4, so the Maslov offset is ν=3\nu=3 and the rule reads (n+34)(n+\tfrac34). The quantized levels of exactly this system — ultracold neutrons on a mirror — are worked in Bohr–Sommerfeld and Semiclassical Quantization in 1D, which reports the measured neutron levels 1.407, 2.460, 3.3211.407,\ 2.460,\ 3.321 peV; here we own the dimensionless Airy-zero structure that underlies them.

Step 1. Write the quantization condition. With the soft-edge π/4\pi/4 from the connection formula and the wall's π/2\pi/2, 1ℏ∫0zt2m(E−mgz) dz=(n+34)π\tfrac1\hbar\int_0^{z_t}\sqrt{2m(E-mgz)}\,dz=(n+\tfrac34)\pi, where zt=E/mgz_t=E/mg.

Step 2. Do the integral. It evaluates in closed form to 1ℏ2m 23mgE3/2\tfrac1\hbar\sqrt{2m}\,\tfrac{2}{3mg}E^{3/2}. Measuring energy in the natural unit e0=(mg2ℏ2/2)1/3e_0=(mg^2\hbar^2/2)^{1/3} and writing ε=E/e0\varepsilon=E/e_0, the condition becomes 23ε3/2=(n+34)π\tfrac23\varepsilon^{3/2}=(n+\tfrac34)\pi — the coefficient 23\tfrac23 verified symbolically.

Step 3. Solve and compare to exact. The exact levels are the magnitudes of the zeros of Ai\mathrm{Ai}: ∣a1∣=2.33811|a_1|=\mathbf{2.33811}, ∣a2∣=4.08795|a_2|=\mathbf{4.08795}. The connection-formula (WKB) values are ε1=2.320\varepsilon_1=2.320 (0.8% low) and ε2=4.082\varepsilon_2=4.082 (0.15% low). Had we used ν=2\nu=2 (the naive n+12n+\tfrac12), the ground level would be 24%24\% off — the entire discrepancy is the π/4\pi/4 we derived. The single soft-edge π/4\pi/4 is worth a factor of thirty in accuracy.

Origins · 1 minAiry Function and how this was discovered
AF
Airy Function
1838–1926 · Cambridge, Göttingen, Zürich

The connection formulae are built on a single special function, and it was born far from quantum mechanics. In 1838 George Biddell Airy — then Astronomer Royal — asked how bright the light is right at the edge of a rainbow, where geometric optics predicts a caustic and an infinite intensity. His answer was an integral that smoothly interpolates from oscillation to decay across that edge: the function now named for him. When wave mechanics arrived, the same crossover reappeared at every classical turning point, and the Airy function became the exact local solution that WKB splices onto. The subtlety that its asymptotic series behave differently on the two sides — that a single formula cannot represent it everywhere — is the Stokes phenomenon (G. G. Stokes, 1857), and the modern, careful account of the connection rules' one-way character is Berry and Mount's 1972 review. Airy's rainbow integral, in other words, quietly underwrites both the colour of the sky's arc and the quantization of every well.

History
1838
— Airy introduces his integral to describe the intensity near an optical caustic (the rainbow edge).
1857
— Stokes analyses the discontinuous change of asymptotic-series constants (the Stokes phenomenon).
1923
— Jeffreys gives the mathematical connection method for second-order equations with turning points.
1926
— Wentzel, Kramers, and Brillouin independently apply the semiclassical expansion to quantum mechanics.
1972
— Berry and Mount review semiclassical wave mechanics, clarifying the one-way nature of the connection rules.

Going further

The connection formulae are prerequisites for both quantization (the 12\tfrac12) and tunnelling (the barrier-edge phase); they sit at the technical centre of the WKB chapter. For the systematic breakdown of WKB near turning points and the uniform-approximation repair, see Validity and Breakdown of WKB; for the caustic/rainbow origin of Airy's integral, the optics track. Provenance. Standard WKB material from Griffiths & Schroeter Ch. 9, Sakurai & Napolitano, Shankar Ch. 16, Cohen-Tannoudji complements, and Berry & Mount (1972). Airy asymptotics per Abramowitz & Stegun §10.4. Verifier should: (1) reconfirm the order-by-order WKB expansion giving p−1/2exp⁡[(i/ℏ)∫p]p^{-1/2}\exp[(i/\hbar)\int p]; (2) check the Airy z→±∞z\to\pm\infty forms yield the factor 2 and π/4\pi/4; (3) evaluate ∫p dx=πE/ω\int p\,\mathrm{d}x=\pi E/\omega for the harmonic oscillator to recover En=(n+12)ℏωE_n=(n+\tfrac12)\hbar\omega exactly; (4) verify the hydrogen ground state −13.6-13.6 eV via Langer-corrected radial WKB. All numbers quoted (−13.6 eV/n2-13.6\,\text{eV}/n^2, En=(n+12)ℏωE_n=(n+\tfrac12)\hbar\omega) are standard textbook values.

Why can't I just require the WKB solution to be continuous at the turning point?

Because both WKB pieces diverge there — there is no finite value to be continuous to. Continuity is imposed not at the singular point itself but between the WKB solutions and the Airy solution in the overlap regions on either side, where all three are finite and the asymptotics are valid. The connection formulae are exactly the result of that two-sided matching.

Is the Airy function an approximation or exact?

Ai(z)\mathrm{Ai}(z) is the exact solution of the Airy equation ψ′′=zψ\psi''=z\psi. The approximation is the replacement of the true potential by its tangent line near the turning point. That linearisation is excellent because the matching region is narrow (∝ℏ2/3\propto\hbar^{2/3}), so the potential's curvature has little room to matter there.

What is Bi(z) and why do we usually drop it?

The Airy equation has a second independent solution Bi(z)\mathrm{Bi}(z), which grows exponentially as z→+∞z\to+\infty. For a bound state or a decaying barrier tail the physical solution must not blow up in the forbidden region, so we keep only Ai\mathrm{Ai}. Bi\mathrm{Bi} returns when both exponential behaviours are physical — for instance describing the growing solution inside a barrier fed from one side.

Does the pi/4 depend on how steep the potential is at the turning point?

No. The slope V′(x0)V'(x_0) is absorbed entirely into the rescaling length 1/α1/\alpha; the dimensionless Airy equation, and hence the π/4\pi/4 and the factor 2, are the same for every linear turning point. The slope only sets where and how narrow the matching region is, not the connection constants.

What goes wrong if two turning points are close together?

If the classically allowed (or forbidden) region between two turning points is narrower than the matching width ∼ℏ2/3\sim\hbar^{2/3}, the two Airy patches overlap and the single-turning-point connection formula breaks down. Then one needs a uniform approximation built from parabolic-cylinder or double-Airy functions rather than two separate matches — the near-threshold and barrier-top regimes where ordinary WKB fails, treated in the validity article.

How accurate is a connection-formula estimate in practice?

Very, once you count edges correctly. The quantum bouncer's ground level lands within 0.8% of the exact Airy value using the connection-formula (n+34)(n+\tfrac34) rule, and the accuracy improves at higher nn. The dominant error in a semiclassical estimate is almost always a mis-counted Maslov offset (using n+12n+\tfrac12 where the geometry demands n+34n+\tfrac34 or n+1n+1), not the connection formula itself.

Why do turning points matter so much if the wavefunction spends most of its time elsewhere?

Because the turning points are where the phase bookkeeping is set. The interior WKB phase ∫p dx\int p\,dx is large and rapidly varying, but the quantization of the energy is fixed by the boundary offsets the turning points impose — the π/4\pi/4's. Get the edges wrong and every level shifts, no matter how accurately you integrate the interior.

Before this

Where this leads