Back to the on-screen lesson ·

The variational principle

Trial wave functions give upper bounds on the ground energy; minimizing over parameters gives estimates for the oscillator, hydrogen and helium.

Paper packet. Every task here also exists on screen, where it is checked automatically; answers written on paper are not assessed by Nydus. When you are back at a device, enter your answers there.

1. What you will learn

By the end of this lesson you will be able to choose trial wave functions, compute and minimize their energies, and use the results as upper bounds on ground-state energies of systems that cannot be solved exactly.

2. What you already have

You can compute expectation values, expand a state in energy eigenstates, and solve hydrogen and the oscillator exactly. From calculus you know how to minimize a function by setting its derivative to zero. Perturbation theory needed a nearby solvable problem; this lesson's method needs only a good guess, and it works even when no small parameter exists.

3. Words for this lesson

TermWhat it means
Variational principle$\langle\psi\vert \hat{H}\vert \psi\rangle \ge E_{\text{gs}}$ for every normalized $\psi$.
Trial wave functionA guessed wave function with adjustable parameters.
Variational parameterA parameter, such as a width, varied to minimize $\langle H\rangle$.
Upper boundA value guaranteed to be at least as large as the true ground energy.
Effective nuclear chargeThe reduced charge an electron sees when other electrons screen the nucleus.
Electron–electron repulsionThe term $e^2/(4\pi\varepsilon_0\vert \vec{r}_1 - \vec{r}_2\vert )$ that makes helium unsolvable exactly.
ScreeningThe partial cancellation of the nuclear charge by other electrons.

4. Any guess gives an upper bound

Take any normalized wave function $\psi$ and expand it in the unknown energy eigenstates, $\psi = \sum c_n\psi_n$. Then

$$\langle\psi|\hat{H}|\psi\rangle = \sum_n|c_n|^2E_n \ge \sum_n|c_n|^2E_{\text{gs}} = E_{\text{gs}},$$

because every $E_n$ is at least the ground energy and the $|c_n|^2$ add to one. So the variational principle: the energy expectation value of any trial function is an upper bound on the ground-state energy. Equality holds only if $\psi$ is the ground state itself.

The method follows at once. Choose a family of trial functions $\psi(b)$ with adjustable parameters — a width, an effective charge — that has the right general shape. Compute $\langle H\rangle(b)$, and minimize it:

$$\frac{\partial\langle H\rangle}{\partial b} = 0.$$

The minimum is the best estimate the family allows, and because every value is an upper bound, lower is always better. The error in the energy is second order in the error in the wave function: a trial function with a $10$ percent admixture of wrong states gives an energy wrong by only about $1$ percent of the level spacing. That is why modest guesses give good energies.

Another way: picture

Picture the energy as a landscape over the space of all possible wave functions, with its lowest point at the true ground state. Any trial function is a point on that landscape, and its height is its energy, never lower than the bottom. A family of trial functions is a path across the landscape; walking along it to its lowest point gets as close to the bottom as that path allows. A better family is a path that dips closer.

Another way: steps

  1. Choose a trial function with the right symmetry, boundary behavior and rough shape, with one or more parameters.
  2. Normalize it.
  3. Compute $\langle T\rangle$ and $\langle V\rangle$ as functions of the parameters.
  4. Minimize $\langle H\rangle$ by setting derivatives to zero.
  5. Report the minimum as an upper bound; compare with experiment or an exact result if one exists.

5. The method, step by step, and how to check it

  1. Pick a sensible shape. It should vanish where the true state must (at hard walls, at infinity), have the right symmetry and no unnecessary nodes: the ground state has none. Gaussians and exponentials are popular because their integrals are easy.
  2. Normalize, or divide by $\langle\psi|\psi\rangle$ at the end.
  3. Compute the pieces. Kinetic energy usually grows as the function narrows; potential energy in an attractive well usually falls. The competition sets the optimum.
  4. Minimize. Differentiate, set to zero, solve for the parameter, substitute back.

Checks. The result must lie above any known exact ground energy. If the trial family contains the exact ground state — a Gaussian for the oscillator — the minimum must reproduce it exactly. At the optimum, a trial function in a Coulomb or harmonic potential satisfies the virial theorem: $\langle T\rangle = -\tfrac{1}{2}\langle V\rangle$ for Coulomb, $\langle T\rangle = \langle V\rangle$ for harmonic, which is a quick test of the algebra.

6. Why the error in the energy is small

Suppose the trial function is the ground state plus a small error, $\psi = \psi_{\text{gs}} + \epsilon\phi$, with $\phi$ orthogonal to $\psi_{\text{gs}}$. Then $\langle H\rangle = E_{\text{gs}} + \epsilon^2(\langle\phi|H|\phi\rangle - E_{\text{gs}}) + \cdots$: the energy error is proportional to $\epsilon^2$. A wave function that is ten percent wrong gives an energy about one percent wrong.

This is the reason the method is so effective for energies, and also its limitation for other quantities. Properties that depend linearly on the wave function's details — the density at the nucleus, the average radius — can be off by the full ten percent even when the energy is excellent. Chemists who use variational methods therefore check more than the energy before trusting a wave function.

7. Helium and electron screening

Helium's Hamiltonian contains the repulsion between its two electrons, $e^2/(4\pi\varepsilon_0r_{12})$, and cannot be solved exactly. Ignoring it gives $2 \times (-54.4) = -108.8$ eV; the measured ground energy is $-79.0$ eV. Treating the repulsion as a first-order perturbation gives $-74.8$ eV, too high.

The variational method does better by letting the electrons respond to each other. Take both electrons in hydrogen-like $1s$ orbitals with an adjustable charge $Z$. The energy works out to $\langle H\rangle = 13.6(2Z^2 - \tfrac{27}{4}Z)$ eV, minimized at $Z = \tfrac{27}{16} = 1.69$, giving $-77.5$ eV, within two percent. The optimal charge is less than $2$ because each electron partly shields the nucleus from the other, by $\tfrac{5}{16}$ of a proton charge. The idea of an effective, screened nuclear charge, born here, is the foundation of how chemists understand atomic sizes and ionization energies across the periodic table.

8. A Gaussian for hydrogen

Hydrogen's true ground state is an exponential, $e^{-r/a}$, which has a cusp at the nucleus. A Gaussian, $e^{-br^2}$, is smooth there and falls off too fast at large $r$, so it cannot be exact. Minimizing anyway gives $b = \tfrac{8}{9\pi a^2}$ and $\langle H\rangle = -\tfrac{8}{3\pi} \times 13.6 = -11.5$ eV, within $15$ percent of the truth.

That modest accuracy has had enormous consequences. Integrals involving Gaussians centered on different atoms are easy to compute, while those with exponentials are not, so almost all quantum chemistry programs expand molecular orbitals in sums of Gaussians. A few Gaussians combined reproduce an exponential to high accuracy; John Pople's 1998 Nobel Prize in Chemistry recognized the Gaussian-based methods that made computational chemistry routine. Every such calculation is a variational minimization over the coefficients of the Gaussians.

9. Excited states and linear combinations

The principle bounds the ground state, but it extends to excited states. If the trial function is made orthogonal to the true ground state — for instance, by giving it the wrong symmetry, such as an odd function in a symmetric well — its energy is an upper bound on the lowest state of that symmetry. An odd Gaussian, $xe^{-bx^2}$, gives the oscillator's first excited state exactly.

More generally, take the trial function as a linear combination of fixed basis functions, $\psi = \sum c_i\phi_i$, and minimize over the coefficients. The condition becomes a matrix eigenvalue problem, and the $n$-th eigenvalue is an upper bound on the $n$-th true energy. This is the Rayleigh–Ritz method, the workhorse of computational physics: it is how band structures, molecular orbitals and nuclear shell-model energies are calculated, with bases of thousands or millions of functions.

10. Choosing a good trial function

Physical insight goes into the choice. Near a hard wall the trial function must vanish; near a Coulomb singularity it should have a cusp; far away it should decay at the rate set by the binding energy. For a particle in a box, $x(a - x)$ vanishes at both walls and has no nodes, and it gives $\langle H\rangle = 5\hbar^2/ma^2$, just $1.3$ percent above the true $\pi^2\hbar^2/2ma^2$.

For a new problem, the art is to include the features you are sure of and leave parameters for those you are not. Modern variational Monte Carlo and neural-network wave functions push this to the limit, using millions of parameters to describe many-electron systems. But the logic is the same as in this lesson: every trial gives an upper bound, and the lowest bound wins.

11. In the world: computational chemistry

Pharmaceutical companies, battery developers and materials scientists run millions of quantum chemistry calculations a year. Nearly all of them are variational. In the Hartree–Fock method, each electron moves in the average field of the others, and its orbital is expanded in a basis of Gaussian functions whose coefficients are chosen to minimize the energy. More accurate methods add combinations of excited configurations, again minimizing.

Because every result is an upper bound, a larger, more flexible basis always lowers the computed energy, and chemists extrapolate toward the complete-basis limit. Density functional theory, used in most materials calculations, rests on a variational principle for the electron density proved by Walter Kohn, who shared the 1998 Nobel Prize in Chemistry with John Pople. Calculations of this kind, run on supercomputers at national laboratories such as Oak Ridge and Argonne, now screen candidate catalysts and battery materials before anyone makes them in the lab.

12. In the world: helium-like ions in hot plasmas

In the Sun's corona and in fusion experiments, temperatures of millions of kelvins strip atoms down to one or two electrons. Helium-like ions — carbon with four electrons removed, oxygen with six, iron with twenty-four — emit characteristic x-ray lines whose ratios measure the plasma's temperature and density. NASA's Chandra X-ray Observatory uses such lines to study the gas in galaxy clusters and around black holes.

The simple variational estimate of this lesson captures these ions surprisingly well. With $Z_{\text{eff}} = Z - \tfrac{5}{16}$, the predicted energy to remove one electron from helium-like carbon is $390$ eV, against a measured $392$ eV, and the error shrinks as $Z$ grows because the electron–electron repulsion becomes a smaller fraction of the total. Precision work adds many more variational parameters: calculations of helium's ground state now agree with experiment to better than one part in a billion.

13. A variational estimate cannot fall below the true energy

Because the method gives upper bounds, a result below the known ground energy always signals an error — an unnormalized trial function, a sign slip in the potential, or a function that violates a boundary condition. That is a valuable check. It also means that among competing trial functions, the lower energy is always the better approximation to the ground-state energy, with no need to know the exact answer.

A second misconception is that a good energy means a good wave function. Because the energy error is second order in the wave function's error, a function can give an energy within one percent while its shape is off by ten. A Gaussian for hydrogen misses the cusp at the nucleus completely yet gets the energy within fifteen percent.

14. The oscillator with a Gaussian trial

  1. Choose the trial function.

    $\psi = \left(\dfrac{2b}{\pi}\right)^{1/4}e^{-bx^2}$

    Normalized, with one width parameter $b$.

  2. Compute the kinetic energy.

    $\langle T\rangle = \dfrac{\hbar^2b}{2m}$

    Narrower means more kinetic energy.

  3. Compute the potential energy.

    $\langle V\rangle = \tfrac{1}{2}m\omega^2\langle x^2\rangle = \tfrac{1}{2}m\omega^2 \cdot \dfrac{1}{4b} = \dfrac{m\omega^2}{8b}$

    Wider means more potential energy.

  4. Minimize the sum.

    $\dfrac{\hbar^2}{2m} - \dfrac{m\omega^2}{8b^2} = 0 \quad\Rightarrow\quad b = \dfrac{m\omega}{2\hbar}$

    Set the derivative with respect to $b$ to zero.

  5. Substitute the optimum back.

    $\langle H\rangle_{\min} = \dfrac{\hbar\omega}{4} + \dfrac{\hbar\omega}{4} = \dfrac{1}{2}\hbar\omega$

    Exact, because the true ground state is a Gaussian.

15. A polynomial for the square well

  1. Choose a trial function that vanishes at the walls.

    $\psi = Ax(a - x), \qquad 0 \le x \le a$

    No nodes inside, like the true ground state.

  2. Normalize the trial function.

    $|A|^2\displaystyle\int_0^a x^2(a - x)^2\,dx = |A|^2\dfrac{a^5}{30} = 1$

    So $|A|^2 = 30/a^5$.

  3. Compute the kinetic energy.

    $\langle H\rangle = \dfrac{\hbar^2}{2m}\displaystyle\int_0^a|\psi'|^2\,dx = \dfrac{\hbar^2}{2m} \cdot \dfrac{30}{a^5} \cdot \dfrac{a^3}{3}$

    Integrating by parts turns $-\psi\psi''$ into $|\psi'|^2$; $\int_0^a(a - 2x)^2dx = a^3/3$.

  4. Simplify the estimate.

    $\langle H\rangle = \dfrac{5\hbar^2}{ma^2}$

    No parameter to vary: this is a single guess.

  5. Compare with the exact result.

    $E_1 = \dfrac{\pi^2\hbar^2}{2ma^2} = \dfrac{4.935\hbar^2}{ma^2}$

    The infinite well's ground energy.

  6. Find the error.

    $\dfrac{5}{4.935} = 1.013$

    Only $1.3$ percent high, and above, as promised.

16. Helium with an effective charge

  1. Choose the trial function.

    $\psi = \psi_{100}^{(Z)}(r_1)\,\psi_{100}^{(Z)}(r_2)$

    Both electrons in hydrogen-like orbitals of adjustable charge $Z$.

  2. Compute the kinetic energy.

    $\langle T\rangle = 2 \times 13.6Z^2\ \text{eV}$

    Each hydrogen-like orbital has kinetic energy $13.6Z^2$ eV.

  3. Compute the attraction to the real nucleus.

    $\langle V_{\text{nuc}}\rangle = 2 \times (-2 \times 27.2Z)\ \text{eV} = -108.8Z\ \text{eV}$

    Charge $2$, with $\langle 1/r\rangle = Z/a$ and $e^2/4\pi\varepsilon_0a = 27.2$ eV.

  4. Compute the repulsion between electrons.

    $\langle V_{ee}\rangle = \tfrac{5}{8}Z \times 27.2\ \text{eV} = 17Z\ \text{eV}$

    A standard integral over both electrons' densities.

  5. Add the pieces.

    $\langle H\rangle = 27.2Z^2 - 108.8Z + 17Z = 13.6\left(2Z^2 - \tfrac{27}{4}Z\right)\ \text{eV}$

    A quadratic in $Z$.

  6. Minimize over the charge.

    $4Z - \tfrac{27}{4} = 0 \quad\Rightarrow\quad Z = \tfrac{27}{16} = 1.69$

    Less than $2$: screening.

  7. Evaluate the estimate.

    $\langle H\rangle_{\min} = -2\left(\tfrac{27}{16}\right)^2 \times 13.6 = -77.5\ \text{eV}$

    Above the measured $-79.0$ eV, as it must be.

  8. Compare with first-order perturbation theory.

    $Z = 2: \quad \langle H\rangle = 13.6(8 - 13.5) = -74.8\ \text{eV}$

    Letting $Z$ vary lowers the bound by $2.7$ eV.

17. Your turn: with the Gaussian trial for the oscillator, what is $\langle H\rangle$ at $\beta = 2$, in units of $\hbar\omega$?

  1. Write the estimate.

    $\dfrac{\langle H\rangle}{\hbar\omega} = \dfrac{\beta}{2} + \dfrac{1}{8\beta}$

    Kinetic plus potential.

  2. Substitute the value.

    $\dfrac{2}{2} + \dfrac{1}{16}$

    $\beta = 2$.

  3. Your turn: work this step out. Its working is at the end of the packet.

    Evaluate the estimate.

18. Guided practice

Two trial functions for the same potential give $\langle H\rangle = 43$ meV and $\langle H\rangle = 51$ meV. What can you conclude about the true ground-state energy $E_{\text{gs}}$?

19. Guided practice

Complete the worked solution: for an oscillator with $\hbar\omega = 9$ meV, a Gaussian trial gives $\langle H\rangle = \hbar\omega\left(\tfrac{\beta}{2} + \tfrac{1}{8\beta}\right)$. Evaluate it at the best width and at $\beta = 1$, and find how much worse the second is.

  1. Evaluate at the best width.

    $\langle H\rangle_{1/2} = \tfrac{1}{2}\hbar\omega =$ m meV

    The exact ground energy: the trial family contains the true state.

  2. Evaluate at the wider-than-optimal parameter.

    $\langle H\rangle_{1} = \tfrac{5}{8}\hbar\omega =$ o meV

    $\tfrac{1}{2} + \tfrac{1}{8}$.

  3. Subtract to find the excess.

    $\langle H\rangle_{1} - \langle H\rangle_{1/2} =$ x meV

    A poor parameter overshoots, never undershoots.

20. Guided practice

Match each part of the variational method to its statement.

$\langle H\rangle \ge E_{\text{gs}}$$\partial\langle H\rangle/\partial b = 0$$\tfrac{27}{16}$$-11.5$ eV
the variational principle
choosing the parameters
helium's effective charge
a Gaussian trial for hydrogen

21. Practice

A trial function $e^{-bx^2}$ is used for an oscillator with $\hbar\omega = 56$ meV. With $\beta = b\hbar/m\omega$, the estimate is $\langle H\rangle = \hbar\omega\left(\tfrac{\beta}{2} + \tfrac{1}{8\beta}\right)$. Fill in $\langle H\rangle$, in meV, for each $\beta$.

$\langle H\rangle$ (meV)
$\beta = \tfrac{1}{4}$
$\beta = \tfrac{1}{2}$
$\beta = 1$
$\beta = 2$

22. Practice

For helium, a trial function with both electrons in hydrogen-like ground-state orbitals of charge $Z$ gives $\langle H\rangle = 13.6\left(2Z^2 - \tfrac{27}{4}Z\right)$ eV. What is the estimate for $Z = 1.7$, in eV?

Answer: eV

23. Practice

Use the trial function $\psi = Ae^{-br^2}$ to estimate the ground-state energy of a one-electron ion with nuclear charge $Z = 4$, in eV. Take the true hydrogen ground energy as $-13.6$ eV for comparison.

Answer: eV

24. Somewhere new

Astronomers identify helium ($Z = 2$, two electrons) in hot plasmas from its spectrum. Using the variational estimate with effective charge $Z - \tfrac{5}{16}$ for both electrons, estimate the energy needed to remove one electron, in eV.

Answer: eV

25. Lesson test

Lesson test: one question per skill, one attempt each, no hints. Your answers are checked when you submit.

26. Test question

A trial function $e^{-bx^2}$ is used for an oscillator with $\hbar\omega = 88$ meV. With $\beta = b\hbar/m\omega$, the estimate is $\langle H\rangle = \hbar\omega\left(\tfrac{\beta}{2} + \tfrac{1}{8\beta}\right)$. Fill in $\langle H\rangle$, in meV, for each $\beta$.

$\langle H\rangle$ (meV)
$\beta = \tfrac{1}{4}$
$\beta = \tfrac{1}{2}$
$\beta = 1$
$\beta = 2$

27. What you can do now

You can estimate ground-state energies variationally. Explain to someone why a lower variational estimate is always the better one.

Working for the steps left to you

17. Your turn: with the Gaussian trial for the oscillator, what is $\langle H\rangle$ at $\beta = 2$, in units of $\hbar\omega$?, step 3

$\dfrac{\langle H\rangle}{\hbar\omega} = 1.0625$

Well above the true $0.5$: too narrow a guess.