Skip to content
Tutorials Center
My learning

Topics

Lesson 20 of 39 · The Variational Method

The Variational Principle

Learn why any trial wave function gives an upper bound on the ground-state energy, and use it to estimate energies with runnable examples.

Perturbation theory needs a problem you can already solve, plus a small correction. Many real systems offer neither: the helium atom, a molecule, a strongly anharmonic well. The variational method works differently. You guess a wave function, compute its energy, and improve the guess. The guess can be crude, and the method still tells you something precise: the true ground-state energy lies at or below the number you computed.

This lesson states the principle, proves it in a few lines, and uses it on the harmonic oscillator, where we know the right answer and can see how the method behaves. It assumes the material of the Quantum Mechanics track: wave functions, expectation values and the Schrödinger equation.

The statement

Let H be a Hamiltonian with a lowest energy E_0. Take any normalizable function ψ (the trial function). Define its energy functional

Text
E[ψ] = ⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩

The variational principle says

Text
E[ψ] ≥ E_0     for every ψ,   with equality only if ψ is a ground state.

The denominator makes the formula work even if ψ is not normalized.

Proof

The eigenstates |n⟩ of H form a complete set with energies E_0 ≤ E_1 ≤ E_2 ≤ …. Expand the trial state as |ψ⟩ = Σ c_n |n⟩. Then

Text
E[ψ] = Σ |c_n|² E_n / Σ |c_n|²

This is a weighted average of the E_n with non-negative weights. An average of numbers that are all at least E_0 cannot be below E_0. It equals E_0 only when every weight on E_n > E_0 is zero, that is, when ψ is a ground state. That is the whole proof.

Two consequences matter in practice:

  • A better energy is a better wave function. Lower E[ψ] means a closer approximation to the ground state, in the sense that the weights |c_n|² on excited states shrink.
  • Errors in energy are second order. If ψ differs from the true ground state by an amount of size ε, then E[ψ] - E_0 is of order ε². A 10% error in the wave function gives roughly a 1% error in the energy. That is why variational energies are often surprisingly good while other quantities (like the wave function at the origin) are less accurate.

The recipe

  1. Choose a family of trial functions ψ(x; α) with one or more adjustable parameters.
  2. Compute E(α) = ⟨ψ|H|ψ⟩ / ⟨ψ|ψ⟩ analytically or numerically.
  3. Minimize: solve dE/dα = 0.
  4. The minimum value is your upper bound on E_0.

The family should have the right shape: the correct symmetry, boundary behavior and cusps where the potential is singular. The parameter is then only tuning the size or width.

Example: the harmonic oscillator

Use units where ħ = m = ω = 1, so H = p²/2 + x²/2 and the exact ground energy is 1/2.

Try a Gaussian ψ = exp(-α x²). The kinetic expectation value is ⟨T⟩ = α/2 and ⟨x²⟩ = 1/(4α), so

Text
E(α) = α/2 + 1/(8α)

Setting the derivative to zero gives α = 1/2 and E = 1/2. The Gaussian family contains the exact ground state, so the method finds it exactly. Now try a wrong shape, the exponential ψ = exp(-β|x|). Here ⟨T⟩ = β²/2 and ⟨x²⟩ = 1/(2β²), so

Text
E(β) = β²/2 + 1/(4β²)

The minimum is at β⁴ = 1/2, giving E = 1/√2 ≈ 0.7071. That is above 0.5, as the principle demands. The cusp of exp(-β|x|) at the origin costs kinetic energy that the smooth true state avoids.

Python Minimize two trial families for the oscillator

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Why the bound can never be beaten

Try to break the principle on a computer. Discretize the oscillator on a grid so that H becomes a symmetric matrix. Then draw many random vectors, compute E[ψ] = ψᵀHψ / ψᵀψ, and look for one below the lowest eigenvalue. You will not find it, however you generate vectors. Random vectors give large energies (they are very jagged, so the kinetic energy is huge); smoothing them lowers the energy, but never below the bound.

Python Random trial vectors never beat the ground state

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

What the method cannot do

  • It gives an upper bound only. It does not tell you how far above E_0 you are.
  • It targets the ground state. Excited states can be treated if the trial function is made orthogonal to all lower states (or has the right symmetry, such as odd parity), but the bound then needs the lower states to be known exactly.
  • A good energy does not guarantee a good wave function for other observables.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A trial function gives E[ψ] = 0.52 for a system whose exact ground energy is 0.50 (same units). Which statement is guaranteed?

    E[ψ] is a weighted average of all eigenvalues, so it is at least E_0. The ground energy therefore cannot exceed the trial energy.
  2. 2. If the trial wave function has a 5% error (in the sense of an admixture of excited states with amplitude 0.05), the energy error is of order:

    The excited-state weights are |c_n|², so the energy error is proportional to the square of the amplitude error.
  3. 3. Why does the trial function exp(-β|x|) give a worse oscillator energy than exp(-α x²)?

    Both are valid trial functions and both give upper bounds. The Gaussian family contains the exact ground state; the exponential cannot match it.
  4. 4. In the proof, why is E[ψ] ≥ E_0?

    Expanding ψ in eigenstates gives E[ψ] = Σ|c_n|²E_n / Σ|c_n|², an average with non-negative weights over numbers that are all at least E_0.

Summary

  • For any trial state, E[ψ] = ⟨ψ|H|ψ⟩/⟨ψ|ψ⟩ ≥ E_0, with equality only for a ground state.
  • The proof is an average of eigenvalues with non-negative weights.
  • Energy errors are second order in the wave-function error, so energies are better than wave functions.
  • Choose a trial family with the right symmetry and boundary behavior, then minimize over its parameters.
  • The result is always an upper bound; it never says how close you are.

Next: The Helium Ground State by the Variational Method