B1039 of 55
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

B10 · Lesson 39 · Approximation methods lab

Perturbation theory, the variational principle and WKB, checked against exact numerical answers

Lessons 35 to 38 gave three ways to estimate energies when the Schrödinger equation can't be solved: perturbation theory, the variational principle and WKB. Each has a regime where it shines and one where it fails, and the only honest way to know which you're in is to compare with an exact answer. In this lab you'll compute exact levels by diagonalizing large matrices, then test each approximation against them on the anharmonic oscillator and the triangular well, the MOSFET channel's potential. Units are ħ = m = 1.

  • A particle in the quartic well V=gx4 (ħ = m = 1). The curve is the variational energy for a Gaussian trial function e−bx2 against b; the dashed line is the exact ground-state energy.
  • The curve's minimum always sits above the exact line, as the variational principle guarantees, here by 2%.
  • Change g: both scale as g1/3, so the 2% stays put. The readouts give the variational minimum and the exact value.

Predict

WKB estimates the levels of the quartic well V=x4. Where is it least accurate?

Name it

Exact answers by matrix

Write the Hamiltonian in a large basis, here the harmonic oscillator's states, using x^=a^+a^†2ω and p^=iω2(a^†−a^), and diagonalize. With 60 to 80 basis states the lowest levels converge to many digits. Choosing ω near the problem's natural scale speeds convergence.

The three approximations

  • Perturbation theory for H=H0+λx4: the ground state shifts by 34λ in first order and −218λ2 in second; the series diverges for any λ, so it's useful only while λ is small.
  • Variational: a Gaussian e−bx2 in p22+gx4 gives ⟨H⟩=b2+3g16b2, minimized at b3=3g4 with E=34b: always above the truth.
  • WKB: ∮pdx=(n+12)h, which for x4 becomes En=[(n+12)π22I]4/3 with I=∫011−u4du=0.8740.

Finite differences

For a potential with a hard wall, like the triangular well V=Fx for x > 0, a finite-difference matrix on a grid gives the levels directly; they match En=(F22)1/3an with the Airy zeros an = 2.33811, 4.08795, 5.52056.

Worked example

How well does perturbation theory do for p22+x22+λx4 at λ = 0.01 and λ = 0.1?

Show the solution
  1. At λ = 0.01. The exact ground state is 0.507256, and first order gives 0.5075, within 0.05%.
  2. At λ = 0.1, first order. The exact value is 0.559146, while first order gives 0.575, 2.8% high.
  3. At λ = 0.1, second order. Adding second order gives 0.54875, now 1.9% low.
  4. Why it stops helping. The corrections alternate in sign and eventually grow, since the series is asymptotic: past a few terms, more terms make it worse. For strong anharmonicity the matrix or variational method is the right tool.

Answer at λ = 0.01 first order is within 0.05%; at λ = 0.1 it's 2.8% high, and second order is 1.9% low.

Worked example

What does the Gaussian trial function give for the pure quartic well p22+x4, and how close is it?

Show the solution
  1. Best width. b=(34)1/3=0.9086
  2. Energy. E=34b=0.6814
  3. The exact value. Diagonalizing in a basis of 80 oscillator states gives 0.667986, so the estimate is 2.0% high, with a single parameter.
  4. Why it does so well. A trial function with the right shape, smooth with no nodes, gets the energy right even when its details differ, because errors in the wave function enter the energy only at second order.

Answer the Gaussian gives 0.6814, 2.0% above the exact 0.667986.

Worked example

Compare WKB with the exact levels of the quartic well for n = 0, 1 and 2.

Show the solution
  1. WKB levels. WKB gives 0.5463, 2.3636 and 4.6705.
  2. Exact levels. They're 0.6680, 2.3936 and 4.6968.
  3. Errors. The errors are 18%, 1.3% and 0.6%.
  4. The pattern. It's typical: WKB improves rapidly with n, while the variational method is best for the ground state. Used together, they bracket a problem from both ends.

Answer WKB is 18% off for n = 0, 1.3% for n = 1 and 0.6% for n = 2.

Check

Step 1. Write anharmonic(lam, Nb) that builds 12(p2+x2)+λx4 in the first Nb oscillator states (x^=a^+a^†2) and returns the lowest eigenvalue.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 2. Write variational(g) that minimizes b2+3g16b2 over 30 000 values of b from 0.05 to 3 and returns (b, E).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 3. Write quartic_exact(Nb) returning the lowest three levels of p22+x4 by diagonalizing in Nb oscillator states of frequency ω = 2, with x^=a^+a^†2ω and p^=iω2(a^†−a^).

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 4. Write wkb_quartic(n) returning the WKB estimate of level n of p22+x4: compute I=∫011−u4du with np.trapz (or np.trapezoid) on a million points, then En=[(n+12)π22I]4/3.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

Step 5. Write triangular(F, n) returning the lowest n levels of V=Fx for x > 0 with a hard wall at 0, from a finite-difference matrix on 2000 interior points spanning 0 to 20.

Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.

Check

What does the Gaussian trial function give for the ground state of p22+2x4 (ħ = m = 1)?

Check

Through second order, what is the ground state of 12(p2+x2)+0.03x4?

Explain why

Why is the variational method most accurate for the ground state, while WKB is least accurate there?

Practice

Keep practicing

4 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.