---
title: The variational principle
heading: A guaranteed upper bound on the ground-state energy
eyebrow: B10 · Lesson 37 · The variational principle
xp: 50
---

::: hook
Perturbation theory needs a solvable problem nearby. When there isn't one, the **variational principle** still works: guess a wave function with an adjustable parameter, compute its average energy, and minimize. The result is never below the true ground-state energy, and a sensible guess usually lands within a few percent. It's how the electrons in a MOSFET's inversion layer were first understood: squeezed against the oxide by the gate field into a triangular well, they occupy quantized subbands whose energies and thickness come from a one-parameter variational wave function, still used in device models today.
:::

::: play
- Electrons in silicon ($m^* = 0.916m_e$ perpendicular to a (100) surface) are pushed against the oxide by a field F, in the triangular well V = eFx. The trial wave function is $\psi \propto xe^{-bx}$.
- The curve is the trial energy ⟨H⟩ against b. Too small a b spreads the electron far into the field (high potential energy); too large squeezes it (high kinetic energy). The minimum is the variational estimate.
- The dashed line is the exact ground energy, from Airy functions. The minimum sits above it, by 5.9% for every field: the trial shape is a little off, and no choice of b fixes that.
:::
:::

```sim plot
view: graph
x: b = 0.2..5 nm^-1
y: E = 0..0.6 eV
slider: F = 0.1..2 step 0.05 = 1 MV/cm
slider: m = 0.19..1 step 0.01 = 0.916
plot: 0.0381/m*b^2 + 1.5*0.1*F/b | label: ⟨H⟩ for this b
plot: 2.33811*(0.0381/m*(0.1*F)^2)^(1/3) | dashed | label: exact ground energy
readout: best b, nm⁻¹ = (3*0.1*F/(4*0.0381/m))^(1/3)
readout: variational energy, eV = 2.47645*(0.0381/m*(0.1*F)^2)^(1/3)
readout: average distance from the oxide, nm = 1.5/(3*0.1*F/(4*0.0381/m))^(1/3)
```

::: predict
## A trial wave function gives ⟨H⟩ = −12 eV for some system. The true ground-state energy must be

- [ ] exactly −12 eV
- [ ] above −12 eV
- [x] at or below −12 eV
- [ ] within 5% of −12 eV

::: reveal
At or below. Any state is a mixture of the true eigenstates, and its average energy is a weighted average of their energies, which can't be lower than the lowest one. So every trial energy is an upper bound on $E_{gs}$, and the lowest trial energy you can find is the best bound. How close it gets depends on the guess, which the principle can't tell you.
:::
:::

::: nameit
## The principle

For any normalized ψ,

$$E_{gs} \le \langle\psi|\hat H|\psi\rangle$$

Proof: write $\psi = \sum c_n\psi_n$; then $\langle H\rangle = \sum\lvert c_n\rvert^2E_n \ge E_{gs}\sum\lvert c_n\rvert^2 = E_{gs}$. Equality holds only if ψ is the ground state.

## How to use it

1. Choose a trial ψ with the right general shape (boundary conditions, symmetry, decay) and one or more parameters.
2. Compute ⟨T⟩ and ⟨V⟩ as functions of the parameters.
3. Minimize. The result is an upper bound.

An error of order ε in ψ makes an error of order ε² in E, so energies come out much better than the wave functions that produce them.

## The triangular well

For V = eFx (x > 0, a wall at 0), with $c = \frac{\hbar^2}{2m^*}$ and the trial $\psi \propto xe^{-bx}$:

$$\langle H\rangle = cb^2 + \frac{3eF}{2b}, \qquad b^3 = \frac{3eF}{4c}, \qquad E_{var} = 2.476\left(c\,e^2F^2\right)^{1/3}$$

The exact answer is $2.338(c\,e^2F^2)^{1/3}$, from the first zero of the Airy function. The electrons sit on average $\langle x\rangle = \frac{3}{2b}$ from the interface, about a nanometer at typical gate fields: this is why a MOSFET's effective oxide thickness includes a few tenths of a nanometer of "quantum" thickness on the silicon side.

## Other results

- Delta well with a Gaussian trial: $-\frac{m\alpha^2}{\pi\hbar^2}$, which is $\frac2\pi$ = 64% of the exact binding.
- Hydrogen with a Gaussian trial: $-\frac{8}{3\pi}(13.6\text{ eV}) = -11.5$ eV, against −13.6 eV.
- Helium, with each electron in a hydrogen orbital of adjustable charge Z: best at $Z = \frac{27}{16}$, giving −77.5 eV against the measured −79.0 eV. Each electron partly screens the nucleus from the other.
:::

::: example
## Estimate the lowest subband energy and the inversion-layer thickness in silicon at 1 MV/cm.

::: solution
1. **The energy scale.** With $c = \frac{0.0381}{0.916}$ = 0.0416 eV·nm² and eF = 0.1 eV/nm,
   $$(c\,e^2F^2)^{1/3} = 0.0746\ \text{eV}$$
2. **Variational energy.**
   $$2.476 \times 0.0746 = 0.185\ \text{eV}$$
   5.9% above the exact 0.175 eV.
3. **Best b.**
   $$\begin{aligned} b &= \left(\frac{3 \times 0.1}{4 \times 0.0416}\right)^{1/3} \\ &= 1.22\ \text{nm}^{-1} \end{aligned}$$
   so the electrons sit on average 1.23 nm from the oxide.

**Answer:** the lowest subband is at about 0.185 eV (exact 0.175 eV), and the layer is about 1.23 nm thick.
:::
:::

::: example
## Why does helium's variational charge come out as 27/16 rather than 2?

::: solution
1. **The trial state.** Put both electrons in hydrogen-like 1s orbitals with an adjustable charge Z.
2. **The three energies.** Their kinetic energy is $2Z^2(13.6)$ eV, their attraction to the real nucleus (charge 2) is $-8Z(13.6)$ eV, and their repulsion is $+\frac54Z(13.6)$ eV, so
   $$E(Z) = 27.2\left(Z^2 - \frac{27}{8}Z\right)\ \text{eV}$$
3. **Minimize.** That's smallest at $Z = \frac{27}{16}$.
4. **Why it's less than 2.** Each electron sees the nucleus partly shielded by the other, so it behaves as though Z were 1.69, and the energy, −77.5 eV, beats the unscreened guess (Z = 2, −74.8 eV) by nearly 3 eV.

**Answer:** each electron screens the nucleus from the other, so the best charge is $\frac{27}{16}$ = 1.69, giving −77.5 eV.
:::
:::

::: example
## Use a Gaussian trial function $e^{-bx^2}$ for a delta well of strength α = 0.1 eV·nm. How close does it get to the exact bound state?

::: solution
1. **The energy of the trial state.**
   $$\langle H\rangle = \frac{\hbar^2b}{2m} - \alpha\sqrt{\frac{2b}{\pi}}$$
2. **Minimize.** It's smallest at $b = \frac{2m^2\alpha^2}{\pi\hbar^4}$, giving
   $$\langle H\rangle_\text{min} = -\frac{m\alpha^2}{\pi\hbar^2}$$
3. **Compare with the exact energy.**
   $$-\frac{m\alpha^2}{2\hbar^2} = -65.6\ \text{meV}$$
   so the Gaussian gives $\frac2\pi$ of it: −41.8 meV.
4. **Why it falls short.** The estimate is above the truth, as the variational principle promises, but only 64% of the binding: a Gaussian is smooth at the origin, while the true state has a sharp cusp there. A trial function needs the right shape where the potential is strongest.

**Answer:** the Gaussian gives −41.8 meV against the exact −65.6 meV, 64% of the binding.
:::
:::

::: check
given: F = 0.3 | 1 | 1.5; m = 0.19 | 0.916
answer: 2.33811*(0.0381/m*(0.1*F)^2)^(1/3)
unit: eV
tolerance: 0.5%

## What's the exact ground-state energy of an electron with $m^*$ = {m}$m_e$ in a triangular well with field {F} MV/cm?

::: right
Right. $2.338\left(\frac{\hbar^2}{2m^*}e^2F^2\right)^{1/3}$ = {answer} eV.
:::

::: misses
- [2.47645*(0.0381/m*(0.1*F)^2)^(1/3)] That's the variational estimate, 5.9% high.
- [any] Not yet. eF = 0.1 eV/nm per MV/cm.
:::
:::

::: check
given: F = 0.5 | 1 | 2; m = 0.19 | 0.916
answer: 1.5/(3*0.1*F/(4*0.0381/m))^(1/3)
unit: nm
tolerance: 0.5%

## For $\psi \propto xe^{-bx}$ in the triangular well (field {F} MV/cm, $m^*$ = {m}$m_e$), how far from the interface is the electron on average, at the best b?

::: right
Right. $\langle x\rangle = \frac{3}{2b}$ with $b = (3eF/4c)^{1/3}$: {answer} nm.
:::

::: misses
- [1/(3*0.1*F/(4*0.0381/m))^(1/3)] That's 1/b; the average of $x^3e^{-2bx}$ against $x^2e^{-2bx}$ gives $\frac{3}{2b}$.
- [any] Not yet. Minimize $cb^2 + \frac{3eF}{2b}$.
:::
:::

::: check
given: a = 0.1 | 0.2 | 0.4
answer: -a^2/(2*pi*0.0381)
unit: eV
tolerance: 0.5%

## What does a Gaussian trial function give for the ground state of a delta well with α = {a} eV·nm?

::: right
Right. $-\frac{m\alpha^2}{\pi\hbar^2} = -\frac{\alpha^2}{2\pi(0.0381)}$ = {answer} eV, 64% of the exact binding.
:::

::: misses
- [-a^2/(4*0.0381)] That's the exact energy; the Gaussian guess is higher.
- [any] Not yet. Minimize $\frac{\hbar^2b}{2m} - \alpha\sqrt{2b/\pi}$.
:::
:::

::: check
given: Z = 1 | 2 | 3
answer: -8/(3*pi)*13.6057*Z^2
unit: eV
tolerance: 0.5%

## A Gaussian trial function for a one-electron ion with charge Z = {Z}: what's the best energy?

::: right
Right. $-\frac{8}{3\pi}(13.6Z^2)$ = {answer} eV.
:::

::: misses
- [-13.6057*Z^2] That's the exact energy; the Gaussian lacks the cusp at the nucleus.
- [any] Not yet. Hydrogen's Gaussian estimate is $\frac{8}{3\pi}$ of the exact.
:::
:::

::: check
given: b = 1 | 2 | 4; F = 0.5 | 1
answer: 0.0381/0.916*b^2 + 1.5*0.1*F/b
unit: eV
tolerance: 0.5%

## For silicon ($m^* = 0.916m_e$) in a {F} MV/cm triangular well, what's ⟨H⟩ for the trial $xe^{-bx}$ with b = {b} nm⁻¹?

::: right
Right. $\frac{\hbar^2b^2}{2m^*} + \frac{3eF}{2b}$ = {answer} eV.
:::

::: misses
- [0.0381/0.916*b^2] Add the potential energy, $eF\langle x\rangle = \frac{3eF}{2b}$.
- [any] Not yet. ⟨T⟩ = $\frac{\hbar^2b^2}{2m^*}$ and ⟨x⟩ = $\frac{3}{2b}$.
:::
:::

::: check
kind: choice

## Two trial functions give −11.5 eV and −13.2 eV for the same atom. Which is the better estimate?

- [ ] −11.5 eV, because it's closer to zero
- [x] −13.2 eV, because both are upper bounds and it's lower
- [ ] Their average
- [ ] There's no way to tell

::: misses
- [1] Both bound the true energy from above; the lower bound is tighter.
- [3] The average is worse than the better of the two.
- [4] The upper-bound property tells you: lower is better.
:::
:::

::: check
kind: parts
given: a = 0.05 | 0.1 | 0.3

## A delta well has strength α = {a} eV·nm ($\frac{\hbar^2}{2m}$ = 0.0381 eV·nm²).

::: part
answer: -a^2/(4*0.0381)*1000
unit: meV
tolerance: 0.5%

### What is its exact bound-state energy?

::: misses
- [any] $-\frac{m\alpha^2}{2\hbar^2} = -\frac{\alpha^2}{4 \times 0.0381}$.
:::
:::

::: part
answer: -a^2/(4*0.0381)*2/pi*1000
unit: meV
tolerance: 0.5%

### What does the best Gaussian trial function give?

::: misses
- [any] The Gaussian gives $\frac2\pi$ of the exact binding.
:::
:::
:::

::: check
kind: derivation
vars: b = 1000000000000000..1000000000000000000000, a = 0.000000000000000000000000000001..0.0000000000000000000000000001, m = 0.00000000000000000000000000000005..0.000000000000000000000000000001

## A Gaussian $e^{-bx^2}$ tried on a delta well of strength α (write a), mass m.

::: step
answer: (1.0546e-34)^2*b/(2*m) - a*sqrt(2*b/pi)

### What is ⟨H⟩?
:::

::: step
answer: 2*m^2*a^2/(pi*(1.0546e-34)^4)

### Which b minimizes it?
:::

::: right
Right. Setting $\frac{d\langle H\rangle}{db} = 0$ balances the kinetic cost against the potential gain.
:::
:::

::: explain
## Why does a fairly rough trial wave function often give a good energy?

::: model
Write the trial function as the true ground state plus a small error, a mixture of excited states with amplitudes of order ε. The energy is a weighted average of the eigenvalues with weights equal to the squared amplitudes, so the excited states change the energy only in proportion to ε². A trial function that's 20% wrong in shape typically gives an energy only a few percent high. This is also why the variational principle is good for energies but less reliable for quantities like the average position, which depend linearly on the error.
:::
:::

::: practice

::: check
given: F = 0.2 | 1.8; m = 0.19 | 0.916
answer: 2.33811*(0.0381/m*(0.1*F)^2)^(1/3)
unit: eV
tolerance: 0.5%

## Exact triangular-well energy at {F} MV/cm, $m^*$ = {m}$m_e$?

::: misses
- [any] $2.338(c\,e^2F^2)^{1/3}$.
:::
:::

::: check
given: F = 0.4 | 1.6; m = 0.19 | 0.916
answer: 2.47645*(0.0381/m*(0.1*F)^2)^(1/3)
unit: eV
tolerance: 0.5%

## Variational estimate with $xe^{-bx}$ at {F} MV/cm, $m^*$ = {m}$m_e$?

::: misses
- [any] $2.476(c\,e^2F^2)^{1/3}$.
:::
:::

::: check
given: a = 0.05 | 0.1 | 0.15 | 0.2 | 0.3 | 0.5
answer: -a^2/(2*pi*0.0381)
unit: eV
tolerance: 0.5%

## Gaussian estimate for a delta well, α = {a} eV·nm?

::: misses
- [any] $-\frac{\alpha^2}{2\pi(0.0381)}$.
:::
:::
:::
