Skip to content

The Variational Principle

CSIR NET chemistry: variation theorem and proof, trial functions, particle in a box, hydrogen, quartic oscillator and linear variation method.

  • 22 min read
  • Updated
On this page · 13 sections
  1. Prerequisites
  2. The Hook: Why Every Hartree–Fock Energy Is Too High
  3. The Variation Theorem
  4. The Recipe: Nonlinear Variation
  5. The Linear Variation Method
  6. What the Variation Method Can and Cannot Tell You
  7. Memory Tricks
  8. Don’t Confuse
  9. Common Mistakes
  10. Practice
  11. Quick Revision Table
  12. Key Takeaways
  13. What’s Next

Prerequisites

The Hook: Why Every Hartree–Fock Energy Is Too High

The Variation Theorem

Let \( \hat H \) be the Hamiltonian of a system whose lowest exact eigenvalue is \( E_0 \). Let \( \phi \) be any function that is well behaved (single-valued, continuous, square-integrable) and satisfies the same boundary conditions as the true wavefunction. Then

Variation theorem
$$\boxed{W[\phi] = \frac{\int \phi^* \hat H \phi\, d\tau}{\int \phi^*\phi\, d\tau} \;\geq\; E_0}$$

\( W \) is called the variational integral (or Rayleigh ratio). Equality holds if and only if \( \phi \) is the exact ground-state wavefunction (up to a constant factor).

Proof in four lines

  1. The exact eigenfunctions \( \psi_k \) of \( \hat H \), with \( \hat H\psi_k = E_k\psi_k \) and \( E_0 \leq E_1 \leq E_2 \leq \ldots \), form a complete orthonormal set.
  2. Expand the trial function: \( \phi = \sum_k c_k\psi_k \). Then \( \int\phi^*\phi\,d\tau = \sum_k |c_k|^2 \).
  3. \( \int\phi^*\hat H\phi\,d\tau = \sum_k |c_k|^2 E_k \geq E_0\sum_k |c_k|^2 \), because every \( E_k \geq E_0 \) and every \( |c_k|^2 \geq 0 \).
  4. Dividing, \( W \geq E_0 \). The inequality is strict unless every \( c_k \) with \( E_k > E_0 \) is zero, that is, unless \( \phi \) is the ground state.

The proof uses only two facts: the eigenfunctions are complete, and \( E_0 \) is the smallest eigenvalue. Nothing in it depends on the size of the system, which is why the theorem underlies Hartree–Fock and configuration-interaction calculations on molecules of any size.

Three consequences you must be able to state

(a) The variational energy is an upper bound. A calculated variational energy can never be below the exact ground-state energy (of the same Hamiltonian). A reported variational energy below the exact value means an arithmetic error or a different Hamiltonian.

(b) The energy is more accurate than the wavefunction. Write \( \phi = \psi_0 + \epsilon\chi \), where \( \chi \) is orthogonal to \( \psi_0 \) and \( \epsilon \) is small. Then

$$W - E_0 = \frac{\epsilon^2\left(\langle\chi|\hat H|\chi\rangle - E_0\langle\chi|\chi\rangle\right)}{1 + \epsilon^2\langle\chi|\chi\rangle} = O(\epsilon^2)$$

A wavefunction with a 10% error typically gives an energy error of order 1%. The flip side: a good energy does not guarantee a good wavefunction, so properties such as dipole moments or \( \langle r^2\rangle \) computed from a variational wavefunction can be much worse than the energy.

(c) Lower is better, but only for energy. Among trial functions of the same Hamiltonian, the one with the lower \( W \) is closer to the truth in the energy sense. That is the criterion used to fix every parameter.

The Recipe: Nonlinear Variation

graph TD
    A["Choose a trial function phi with
adjustable parameter(s) alpha"] --> B["Check: correct boundary
conditions and symmetry"] B --> C["Compute W of alpha =
integral of phi H phi over integral of phi squared"] C --> D["Set dW/d alpha = 0
and solve for alpha"] D --> E["Substitute back:
W min is an upper bound to E0"] E --> F["Compare with exact value
or with a better trial function"]

A useful shortcut: with \( \hat H = \hat T + \hat V \), compute \( \langle T\rangle \) and \( \langle V\rangle \) separately as functions of the parameter. Kinetic energy grows when a function is squeezed; potential energy usually falls. The optimum balances the two.

Worked example 1: particle in a box with a parabola

The exact ground state of a particle in a box of length \( L \) is \( \sqrt{2/L}\sin(\pi x/L) \) with \( E_1 = \frac{h^2}{8mL^2} = \frac{\pi^2\hbar^2}{2mL^2} \). Try the simplest polynomial that vanishes at both walls, \( \phi = x(L - x) \).

  • Normalisation integral: \( \int_0^L x^2(L - x)^2\,dx = \frac{L^5}{30} \).
  • Since \( \phi'' = -2 \), \( \hat H\phi = -\frac{\hbar^2}{2m}(-2) = \frac{\hbar^2}{m} \), so the numerator is \( \frac{\hbar^2}{m}\int_0^L x(L - x)\,dx = \frac{\hbar^2}{m}\cdot\frac{L^3}{6} \).
$$W = \frac{\hbar^2L^3/6m}{L^5/30} = \frac{5\hbar^2}{mL^2} = \frac{5h^2}{4\pi^2 mL^2} \approx 0.1267\,\frac{h^2}{mL^2}$$

The exact value is \( 0.125\,h^2/mL^2 \). The ratio \( W/E_1 = 10/\pi^2 \approx 1.013 \): an error of about 1.3%, above the exact value as it must be. There is no parameter here, yet the bound is already good because \( x(L-x) \) has the right shape: no nodes inside the box, symmetric about the centre, zero at both walls.

Worked example 2: hydrogen atom, two trial functions

Work in atomic units (\( \hbar = m_e = e = 4\pi\varepsilon_0 = 1 \); energy in hartree, \( E_h \approx 27.2 \) eV). The exact ground-state energy is \( -\frac{1}{2}E_h = -13.6 \) eV.

Trial function\( \langle T\rangle \)\( \langle V\rangle \)Optimum\( W_{\min} \)
\( e^{-\zeta r} \)\( \frac{\zeta^2}{2} \)\( -\zeta \)\( \zeta = 1 \)\( -0.5\,E_h \) (exact)
\( e^{-\alpha r^2} \)\( \frac{3\alpha}{2} \)\( -2\sqrt{\frac{2\alpha}{\pi}} \)\( \alpha = \frac{8}{9\pi} \approx 0.283 \)\( -\frac{4}{3\pi}E_h \approx -0.424\,E_h \approx -11.5 \) eV

For the exponential, \( dW/d\zeta = \zeta - 1 = 0 \) recovers the exact 1s function: the trial family contained the answer. For the Gaussian, \( dW/d\alpha = \frac{3}{2} - \sqrt{\frac{2}{\pi\alpha}} = 0 \) gives \( \alpha = \frac{8}{9\pi} \), and the energy is about 85% of the exact value. A Gaussian has zero slope at the nucleus and decays too fast at large \( r \), so it misses the cusp and the tail. (Quantum chemistry programs still use Gaussians, but as linear combinations of several, because their integrals are easy.)

Worked example 3: the quartic oscillator

For \( V = bx^4 \) there is no closed-form solution, so this is a genuine use of the method. Take \( \phi = e^{-\alpha x^2} \). Standard Gaussian integrals give

$$\langle T\rangle = \frac{\hbar^2\alpha}{2m}, \qquad \langle x^4\rangle = \frac{3}{16\alpha^2}, \qquad W(\alpha) = \frac{\hbar^2\alpha}{2m} + \frac{3b}{16\alpha^2}$$

Setting \( dW/d\alpha = 0 \): \( \alpha^3 = \frac{3bm}{4\hbar^2} \). At the optimum the potential term equals half the kinetic term (the virial theorem for \( x^4 \): \( 2\langle T\rangle = 4\langle V\rangle \)), so

$$W_{\min} = \frac{3\hbar^2\alpha}{4m} = \frac{3}{4}\left(\frac{3}{4}\right)^{1/3}\left(\frac{\hbar^4 b}{m^2}\right)^{1/3} \approx 0.681\left(\frac{\hbar^4 b}{m^2}\right)^{1/3}$$

A numerical solution of the Schrödinger equation for this potential gives a coefficient of about 0.668, so the one-parameter Gaussian is about 2% high.

For the ordinary harmonic oscillator \( V = \frac{1}{2}m\omega^2x^2 \), the same Gaussian gives \( W(\alpha) = \frac{\hbar^2\alpha}{2m} + \frac{m\omega^2}{8\alpha} \), minimised at \( \alpha = \frac{m\omega}{2\hbar} \) with \( W_{\min} = \frac{1}{2}\hbar\omega \), the exact answer.

Variational bounds for excited states

The theorem bounds the lowest state of the symmetry class the trial function belongs to. If \( \phi \) is orthogonal to the exact ground state, the \( c_0 \) term vanishes and \( W \geq E_1 \).

You rarely know \( \psi_0 \) exactly, but symmetry often guarantees orthogonality:

  • For a potential symmetric about the origin (box centred at zero, oscillator), the ground state is even. Any odd trial function is automatically orthogonal to it, so its \( W \) is an upper bound to the first excited state.
  • For the box of length \( L \): \( \phi = x(L - x)(L - 2x) \), odd about \( L/2 \), gives \( W = 21\hbar^2/mL^2 \) against the exact \( E_2 = 2\pi^2\hbar^2/mL^2 \approx 19.74\,\hbar^2/mL^2 \), about 6% high.
  • For the oscillator, \( \phi = x e^{-\alpha x^2} \) gives exactly \( \frac{3}{2}\hbar\omega \).
  • For atoms, a trial function with a different orbital angular momentum or spin (a 2p-type or a triplet function) bounds the lowest state of that symmetry.

The Linear Variation Method

Instead of a nonlinear parameter, build \( \phi \) as a linear combination of \( n \) fixed basis functions:

$$\phi = \sum_{j=1}^{n} c_j f_j$$

Define \( H_{ij} = \int f_i^*\hat H f_j\,d\tau \) and \( S_{ij} = \int f_i^* f_j\,d\tau \). Minimising \( W \) with respect to every \( c_i \) gives the secular equations

$$\sum_{j=1}^{n}\left(H_{ij} - W S_{ij}\right)c_j = 0, \qquad i = 1, \ldots, n$$

A non-trivial solution requires the secular determinant to vanish:

$$\boxed{\det\left|H_{ij} - W S_{ij}\right| = 0}$$

This is a polynomial of degree \( n \) in \( W \), with \( n \) real roots \( W_1 \leq W_2 \leq \ldots \leq W_n \).

Roots as bounds (Hylleraas–Undheim–MacDonald)
Each root is an upper bound to the corresponding exact level: \( W_1 \geq E_0 \), \( W_2 \geq E_1 \), …, \( W_n \geq E_{n-1} \). Adding a basis function never raises any root.

So the linear method gives approximate excited states for free, and enlarging the basis improves all of them at once. This is how basis-set convergence works in practice.

The two-function case

For two basis functions with \( H_{11}, H_{22}, H_{12} = H_{21} \) (real) and overlap \( S \):

$$\begin{vmatrix} H_{11} - W & H_{12} - WS \\ H_{12} - WS & H_{22} - W \end{vmatrix} = 0$$

Orthogonal basis, \( S = 0 \):

$$W_{\pm} = \frac{H_{11} + H_{22}}{2} \mp \sqrt{\left(\frac{H_{22} - H_{11}}{2}\right)^2 + H_{12}^2}$$

The lower root lies below \( H_{11} \) and the upper root above \( H_{22} \): mixing pushes the levels apart. The push is large when the diagonal energies are close and the coupling is strong, and small when they are far apart.

Identical diagonal elements, \( H_{11} = H_{22} = \alpha \), \( H_{12} = \beta \), overlap \( S \):

$$W_{\pm} = \frac{\alpha \pm \beta}{1 \pm S}$$

with coefficients \( c_1 = \pm c_2 \). This is the LCAO result for H₂⁺ (and, with \( S = 0 \), the Hückel result for ethylene, \( E = \alpha \pm \beta \)). Because \( \beta < 0 \), the in-phase combination is lower. With \( S > 0 \), the antibonding root is raised by more than the bonding root is lowered:

$$W_+ - \alpha = \frac{\beta - \alpha S}{1 + S}, \qquad W_- - \alpha = -\frac{\beta - \alpha S}{1 - S}$$

The two shifts have the same numerator but different denominators, so \( |W_- - \alpha| > |W_+ - \alpha| \) whenever \( S > 0 \). Practice Q5 below puts numbers on it. The applications page uses this result with real H₂⁺ integrals.

What the Variation Method Can and Cannot Tell You

QuestionAnswer
Is \( W_{\min} \geq E_0 \)?Always, for a legal trial function of the same Hamiltonian
Is the better-energy wavefunction better for every property?No. Energy is second-order in the wavefunction error; other properties are usually first-order
Does the method give a lower bound?No. It gives only upper bounds (lower bounds need separate methods)
Does it bound excited states?Yes, if \( \phi \) is orthogonal to all lower states (often by symmetry), or via the higher roots of the linear method
Does the optimised scale parameter satisfy the virial theorem?Yes
Must the trial function be normalised?No, if you use the ratio \( W = \langle\phi\vert H\vert \phi\rangle/\langle\phi\vert \phi\rangle \)

Memory Tricks

Don’t Confuse

ThisvsThat
Variational energy: upper bound to \( E_0 \)Perturbation energy beyond first order: can lie above or below \( E_0 \)
Trial function with the exact form (exponential for H): exact energyGaussian for H: 85% of the binding energy
Linear parameters: secular determinant, many rootsNonlinear parameters: \( dW/d\alpha = 0 \), one optimum per minimum
Odd trial function in a symmetric potential: bounds \( E_1 \)Even trial function: bounds \( E_0 \)
\( W_\pm = (\alpha \pm \beta)/(1 \pm S) \) (with overlap)Hückel \( E = \alpha \pm \beta \) (overlap neglected)
Lower energy: better energyLower energy: not necessarily better dipole moment or \( \langle r^2 \rangle \)

Common Mistakes

Practice

All questions below are original practice questions written for this page. They are not from any CSIR NET paper.

Level 1: Foundation

  1. A student’s variational calculation on the hydrogen atom gives \( -14.0 \) eV. What can you conclude?
  2. For the linear variation method with three basis functions, how many roots does the secular determinant have, and what does each bound?
  3. What is \( W \) for \( \phi = e^{-\zeta r} \) for hydrogen at \( \zeta = 1 \) (in hartree)?
Answers
  1. There is an error (in the integrals or the Hamiltonian). The exact energy is \( -13.6 \) eV, and a variational energy cannot be lower.
  2. Three roots. \( W_1 \geq E_0 \), \( W_2 \geq E_1 \), \( W_3 \geq E_2 \).
  3. \( -0.5\,E_h \). \( W = \zeta^2/2 - \zeta = 0.5 - 1 = -0.5 \): the trial function is the exact 1s orbital.

Level 2: Part B Style

Practice Q1. The trial function \( \phi = x(L - x) \) is used for a particle in a one-dimensional box of length \( L \). The variational energy is:

(a) \( \frac{h^2}{8mL^2} \) (b) \( \frac{5\hbar^2}{mL^2} \) (c) \( \frac{\hbar^2}{6mL^2} \) (d) \( \frac{10\hbar^2}{mL^2} \)

Answer: (b)

Numerator \( \frac{\hbar^2}{m}\int_0^L x(L - x)dx = \frac{\hbar^2L^3}{6m} \); denominator \( \int_0^L x^2(L - x)^2dx = \frac{L^5}{30} \). Ratio \( 5\hbar^2/mL^2 \), about 1.3% above the exact \( \pi^2\hbar^2/2mL^2 \approx 4.93\hbar^2/mL^2 \).

(a) is the exact energy, which a non-exact trial function cannot reach. (c) is the numerator divided by \( L^5 \) without the factor 30. (d) doubles the kinetic term.

Practice Q2. For the hydrogen atom with trial function \( e^{-\alpha r^2} \), \( W(\alpha) = \frac{3\alpha}{2} - 2\sqrt{\frac{2\alpha}{\pi}} \) (atomic units). The optimum \( \alpha \) and \( W_{\min} \) are:

(a) \( \frac{8}{9\pi},\ -\frac{4}{3\pi} \) (b) \( \frac{2}{\pi},\ -\frac{1}{2} \) (c) \( \frac{8}{9\pi},\ -\frac{8}{3\pi} \) (d) \( \frac{4}{9\pi},\ -\frac{2}{3\pi} \)

Answer: (a)

\( dW/d\alpha = \frac{3}{2} - \sqrt{\frac{2}{\pi\alpha}} = 0 \Rightarrow \alpha = \frac{8}{9\pi} \). Then \( \frac{3\alpha}{2} = \frac{4}{3\pi} \) and \( 2\sqrt{2\alpha/\pi} = 2\cdot\frac{4}{3\pi} = \frac{8}{3\pi} \), so \( W = \frac{4}{3\pi} - \frac{8}{3\pi} = -\frac{4}{3\pi} \approx -0.424\,E_h \).

(c) quotes \( \langle V\rangle \), not \( W \). (b) would be the exact energy, impossible for a Gaussian.

Practice Q3. For a one-dimensional harmonic oscillator, the trial function \( \phi = x\,e^{-\alpha x^2} \), optimised over \( \alpha \), gives:

(a) a value strictly above \( \frac{3}{2}\hbar\omega \), since a one-parameter trial function cannot be exact (b) exactly \( \frac{3}{2}\hbar\omega \) (c) a value below \( \frac{3}{2}\hbar\omega \) (d) exactly \( \frac{1}{2}\hbar\omega \)

Answer: (b)

\( \phi \) is odd, hence orthogonal to the even ground state; its \( W \) bounds \( E_1 \) from above. At \( \alpha = m\omega/2\hbar \) it is the exact first excited state, so \( W_{\min} = \frac{3}{2}\hbar\omega \) exactly.

(a) is wrong because the trial family contains the exact first excited state, so the bound is reached. (c) is impossible: an odd trial function cannot give less than \( E_1 \). (d) would need a function with a component along the even ground state.

Practice Q4. For two orthogonal basis functions with \( H_{11} = -8 \) eV, \( H_{22} = -8 \) eV and \( H_{12} = -1.5 \) eV, the two linear-variation energies are:

(a) \( -8 \) and \( -8 \) eV (b) \( -9.5 \) and \( -6.5 \) eV (c) \( -11 \) and \( -5 \) eV (d) \( -9.5 \) and \( -8 \) eV

Answer: (b)

Degenerate diagonal, \( S = 0 \): \( W = \alpha \pm \beta = -8 \mp 1.5 \), giving \( -9.5 \) and \( -6.5 \) eV. The splitting is \( 2|H_{12}| = 3 \) eV, symmetric about \( -8 \) eV because the overlap is zero.

Level 3: Part C Style

Practice Q5. Two identical atomic orbitals have \( \alpha = H_{11} = H_{22} = -11.0 \) eV, \( \beta = H_{12} = -3.0 \) eV and overlap \( S = 0.25 \). Which of the following statements are correct?

  1. The bonding energy is \( -11.2 \) eV.
  2. The antibonding energy is about \( -10.67 \) eV.
  3. The antibonding level is raised above \( \alpha \) by more than the bonding level is lowered below it.
  4. Setting \( S = 0 \) would give \( -14.0 \) and \( -8.0 \) eV.

(a) 1 and 2 only (b) 1, 2 and 3 only (c) 1, 2, 3 and 4 (d) 3 and 4 only

Answer: (c) 1, 2, 3 and 4
  1. Correct. \( W_+ = (\alpha + \beta)/(1 + S) = -14.0/1.25 = -11.2 \) eV.
  2. Correct. \( W_- = (\alpha - \beta)/(1 - S) = -8.0/0.75 \approx -10.67 \) eV.
  3. Correct. Lowering \( 0.20 \) eV; raising \( 0.33 \) eV. (With such a large \( \alpha S \) term both shifts are small; the asymmetry is the point.)
  4. Correct. \( \alpha \pm \beta = -14.0, -8.0 \) eV.

Statement 3 is the formal reason why a filled bonding plus filled antibonding pair (He₂) is net repulsive.

Practice Q6. Four research groups report ground-state energies for the hydrogen atom (exact \( -0.5000\,E_h \)), each from a variational calculation with the exact non-relativistic Hamiltonian:

GroupTrial functionReported \( W_{\min} \) (\( E_h \))
Pone Gaussian\( -0.4244 \)
Qsum of three Gaussians\( -0.4970 \)
R\( e^{-\zeta r} \)\( -0.5000 \)
Ssum of six Gaussians\( -0.5030 \)

Which statements are correct?

  1. Group S has made an error.
  2. Group R’s optimised \( \zeta \) must be 1.
  3. Group Q’s wavefunction necessarily gives a more accurate \( \langle r\rangle \) than group P’s.
  4. Adding more Gaussians to group Q’s set cannot raise the energy.

(a) 1, 2 and 4 only (b) 1 and 3 only (c) 2, 3 and 4 only (d) 1, 2, 3 and 4

Answer: (a) 1, 2 and 4 only
  1. Correct. \( -0.5030 < -0.5000 \) is impossible for a variational result.
  2. Correct. \( W(\zeta) = \zeta^2/2 - \zeta \) reaches \( -0.5 \) only at \( \zeta = 1 \).
  3. Wrong. A lower energy usually goes with a better wavefunction, but the theorem guarantees nothing for other properties. “Necessarily” makes it false.
  4. Correct. Enlarging a linear basis can only lower (or leave unchanged) each root.

Practice Q7. For a particle in a box from \( 0 \) to \( L \), a student wants an upper bound to the second level \( E_2 = \frac{4h^2}{8mL^2} \) and uses \( \phi = x(L - x)(L - 2x) \). The result is \( W = 21\hbar^2/mL^2 \). Which statements are correct?

  1. \( \phi \) is antisymmetric about \( x = L/2 \), so it is orthogonal to the exact ground state.
  2. \( W \) exceeds \( E_2 \) by about 6%.
  3. \( W \) is also a valid upper bound to \( E_1 \).
  4. The trial function \( x^2(L - x) \) would also give a guaranteed upper bound to \( E_2 \).

(a) 1, 2 and 3 only (b) 1 and 2 only (c) 2 and 4 only (d) 1, 2, 3 and 4

Answer: (a) 1, 2 and 3 only
  1. Correct. The exact ground state is symmetric about \( L/2 \); the product of an even and an odd function integrates to zero.
  2. Correct. \( E_2 = 4\pi^2\hbar^2/2mL^2 = 2\pi^2\hbar^2/mL^2 \approx 19.74\,\hbar^2/mL^2 \). \( 21/19.74 \approx 1.064 \).
  3. Correct. Any legal trial function bounds \( E_1 \) from above, and \( 21 > 4.93 \) trivially.
  4. Wrong. \( x^2(L - x) \) has no definite symmetry about \( L/2 \) and is not orthogonal to the ground state, so it bounds only \( E_1 \). It has no interior node at all.

Quick Revision Table

IdeaFact
Variation theorem\( W = \langle\phi\vert H\vert \phi\rangle/\langle\phi\vert \phi\rangle \geq E_0 \); equality only for the exact \( \psi_0 \)
Proofexpand \( \phi = \sum c_k\psi_k \); \( \sum\vert c_k\vert ^2E_k \geq E_0\sum\vert c_k\vert ^2 \)
Legal trial functionwell behaved, same boundary conditions
Accuracy\( \epsilon \) error in \( \phi \) gives \( \epsilon^2 \) error in \( W \)
Box, \( x(L-x) \)\( 5\hbar^2/mL^2 \); 1.3% high
Box, \( x(L-x)(L-2x) \)\( 21\hbar^2/mL^2 \) vs \( E_2 \approx 19.74\,\hbar^2/mL^2 \)
H, \( e^{-\zeta r} \)\( \zeta = 1 \), exact \( -0.5\,E_h \)
H, \( e^{-\alpha r^2} \)\( \alpha = 8/9\pi \), \( W = -4/3\pi\,E_h \approx -11.5 \) eV
Oscillator, Gaussianexact \( \frac{1}{2}\hbar\omega \); \( xe^{-\alpha x^2} \) gives exact \( \frac{3}{2}\hbar\omega \)
Quartic, Gaussian\( 0.681\,(\hbar^4b/m^2)^{1/3} \) vs about 0.668 numerically
Secular determinant\( \det\vert H_{ij} - WS_{ij}\vert = 0 \); \( n \) roots bound \( n \) lowest levels
Two identical functions\( W_\pm = (\alpha \pm \beta)/(1 \pm S) \)
Orthogonal 2 × 2mean \( \mp\sqrt{(\Delta/2)^2 + H_{12}^2} \)

Key Takeaways

What’s Next