= Gaussian variational energy for the harmonic oscillator
{c}
{title2=$E(\sigma)=1/(8\sigma^2)+\sigma^2/2$}
Use the <quantum harmonic oscillator> in units with reduced <Planck constant> $\hbar=1$, <mass> $m=1$, and <angular frequency> $\omega=1$. Its <Hamiltonian operator> and trial <Gaussian wave packet> are
$$
H=-\frac12\frac{d^2}{dx^2}+\frac{x^2}{2},\qquad \psi_\sigma(x)=(2\pi\sigma^2)^{-1/4}\exp\!\left(-\frac{x^2}{4\sigma^2}\right),\qquad \sigma>0.
$$
This is the same <Gaussian wave packet> used for the <Heisenberg uncertainty relation>: $|\psi_\sigma|^2$ is a <normal distribution> with mean zero and <variance> $\sigma^2$. The <Gaussian integral> gives <wavefunction normalization> and $\langle x^2\rangle=\sigma^2$. These smooth, rapidly decaying trials lie in the <one-dimensional harmonic oscillator form domain> and even in the <operator domain>.
Since $\psi_\sigma'=-x\psi_\sigma/(2\sigma^2)$, <integration by parts> with vanishing boundary terms gives the <kinetic energy> and <potential energy>:
$$
\langle T\rangle=\frac12\int_{\mathbb R}|\psi_\sigma'|^2\,dx=\frac{1}{8\sigma^2},\qquad \langle V\rangle=\frac12\langle x^2\rangle=\frac{\sigma^2}{2},\qquad E(\sigma)=\frac{1}{8\sigma^2}+\frac{\sigma^2}{2}.
$$
Narrow trials cost <kinetic energy>, while broad trials cost <potential energy>. The exact difference
$$
E(\sigma)-\frac12=\frac{(2\sigma^2-1)^2}{8\sigma^2}\geq0
$$
shows that the unique optimal width is $\sigma^2=1/2$, with $E=1/2$. At $\sigma=1/2$ and $\sigma=1$, the trial <energies> are both $5/8=0.625$; the <kinetic energy> and <potential energy> contributions exchange places.
\Image[/gaussian-variational-oscillator-energy.png]
{title=Gaussian oscillator trial energies: widths 0.5 and 1 both give 0.625, while the optimal width gives 0.5}
{description=The <kinetic energy> decreases and the <potential energy> increases with the width of the <Gaussian wave packet>. Their sum touches the exact <ground-state energy> only at $\sigma=1/\sqrt2$.}
Minimizing within this trial family alone establishes $E_0\leq1/2$. To establish exactness, use the <Heisenberg uncertainty relation> to obtain $E_\psi\geq1/2$ for every admissible <quantum state>, as in its existing oscillator example. Together the bounds give $E_0=1/2$. Direct substitution also yields $H\psi_{1/\sqrt2}=\psi_{1/\sqrt2}/2$, agreeing with the <Gaussian eigenstate for a quadratic potential>. This is a useful distinction: the <variational method> supplies the upper bound, while the <Heisenberg uncertainty relation> supplies the complementary lower bound.
Back to article page