Variational Estimate for the Harmonic Oscillator
The harmonic oscillator is an unusually transparent test of the variational method. Its exact ground state and energy are already known, so every step of a trial-state calculation can be checked: admissibility, normalization, expectation values, optimization, the upper bound, and the quality of the optimized state.
The calculation also succeeds in the strongest possible way. A one-parameter Gaussian family contains the exact ground state, and minimizing its width recovers both the oscillator length and the zero-point energy. That success is a property of this well-matched ansatz, not a general promise that a one-parameter variational calculation will be exact.
This page owns the worked variational calculation. The exact spectrum and Hermite-function eigenstates remain in Quantum Harmonic Oscillator, while the general upper-bound proof belongs to the Variational Principle.
Problem and Natural Scale
Section titled “Problem and Natural Scale”Consider a particle of mass in one dimension with
The parameters satisfy and .
In the position representation,
so the energy quadratic form is
The competing terms identify a natural length,
We will recover this scale by optimization rather than insert it into the trial state from the start.
Gaussian Trial State
Section titled “Gaussian Trial State”Choose the normalized, real, even family
The width parameter is restricted to .
The parameter controls the wavefunction width. It is not the position standard deviation. Since
the variance will be .
This family is admissible for every : each state is square-integrable, smooth, even, and has finite kinetic and potential energy. The positivity restriction prevents a redundant sign convention and is naturally enforced by a logarithmic parameter such as .
The same family is often written using an inverse-square width,
as
Both parameterizations describe exactly the same set of rays. Mixing their meanings is a common source of reciprocal-width errors.
Normalization and Moments
Section titled “Normalization and Moments”The required Gaussian integrals are
and
The first confirms
Parity gives
and the second moment is
Thus
The fourth moment,
will later provide an energy-variance check.
Kinetic-Energy Expectation
Section titled “Kinetic-Energy Expectation”Differentiate the trial state:
Direct substitution gives
Integration by parts supplies a useful check. The Gaussian and its derivative vanish at infinity, so
This form makes positivity explicit. Narrowing the state increases its momentum gradients and makes the kinetic energy diverge as .
The corresponding momentum moments are
and therefore
Every member of the family saturates
Minimum uncertainty alone does not select the ground-state width; the Hamiltonian determines which minimum-uncertainty Gaussian has the lowest energy.
Potential-Energy Expectation
Section titled “Potential-Energy Expectation”The quadratic potential requires only :
The potential term has the opposite width dependence from the kinetic term. A broad state reduces gradients but samples larger values of .
Energy Functional
Section titled “Energy Functional”Adding the two contributions gives
The upper-bound theorem guarantees
for every , where is the true ground-state energy. It does not yet tell us which width gives the best bound.
Introduce the dimensionless width ratio
Using , the energy becomes
All dimensions have disappeared. The two terms are the kinetic and potential contributions in units of .
The kinetic contribution falls as while the potential contribution rises as . Their sum has its unique minimum at , where the two contributions are equal and the Gaussian coincides with the exact ground state.
The limiting behavior is physically sensible:
| Width regime | Kinetic energy | Potential energy | Total energy |
|---|---|---|---|
| diverges | tends to zero | diverges | |
| tends to zero | diverges | diverges |
Optimization
Section titled “Optimization”Differentiating with respect to the dimensional width gives
The stationary equation is
or
Because , the only stationary width is
The second derivative is
which is positive for every . In particular,
The stationary point is therefore the unique global minimum. Substitution gives
Optimization without calculus
Section titled “Optimization without calculus”The dimensionless expression can also be rearranged as
Equality holds only at . This is the arithmetic–geometric-mean inequality in a form that displays the nonnegative energy excess.
Logarithmic width
Section titled “Logarithmic width”For numerical work, write
Then positivity is automatic and
The optimum is . Near it,
The absence of a linear term is the local stationarity expected at a variational optimum. General parameter gradients, Hessians, and reparameterizations are developed in Variational Parameters.
Why the Bound Becomes Exact
Section titled “Why the Bound Becomes Exact”At the optimum,
which is the exact normalized oscillator ground state. The variational family happened to contain the target eigenvector.
This can be checked without importing the known spectrum. Acting with the Hamiltonian on a general family member gives the local-energy expression
At , the coefficient of vanishes and
Thus the optimized state is not merely stationary inside the Gaussian family. It satisfies the full eigenvalue equation.
For , the local energy depends on , so the state is not an eigenstate. Its energy variance is
It vanishes only at . For a normalized state in the operator domain, this variance is also the squared residual norm,
Energy minimization and residual vanishing therefore agree at the optimum in this example. In a restricted family that does not contain an eigenstate, the minimum energy generally has a nonzero residual outside the trial tangent space.
The Variational Monte Carlo Preview recasts this same local energy as a sampled estimator and explains how its variance controls both residual diagnostics and statistical uncertainty.
Exact Comparison and Error Measures
Section titled “Exact Comparison and Error Measures”The exact ground-state energy is
so the variational excess at arbitrary width is
In the logarithmic coordinate,
The squared overlap with the exact ground state is
Near the optimum,
while
Both are second order here, but they quantify different objects. In more complicated variational families, a small energy error need not imply that every observable or wavefunction feature is comparably accurate.
Virial and Uncertainty Interpretations
Section titled “Virial and Uncertainty Interpretations”At the stationary width,
This is the harmonic-oscillator virial relation. In the present one-parameter family, changing is a scale transformation: the kinetic term scales as and the quadratic potential as . Stationarity under that scaling forces the two terms to balance.
Every trial Gaussian also saturates the position–momentum uncertainty relation. The optimizer chooses the member whose position and momentum spreads balance the coefficients in the Hamiltonian. The broader physical interpretation of this balance belongs to Zero-Point Energy.
A wrong-width centered Gaussian is a squeezed vacuum relative to the oscillator’s natural quadratures. With , its energy is
The sign convention for the squeezing parameter may reverse , but the energy is unchanged. The state interpretation is developed in Squeezed States: First Encounter.
Adding Center and Mean Momentum
Section titled “Adding Center and Mean Momentum”The centered real ansatz already respects the parity and time-reversal properties of the nondegenerate ground state. To see what those choices save, enlarge the family to
Its moments are
and
Therefore
Every added term is nonnegative. The optimizer returns
Building exact symmetries into the ansatz removed two parameters whose optimum was known in advance. Displacements and phase-space motion become useful for different targets, such as coherent states and displaced oscillators, but they do not improve this ground-state calculation.
A Deliberately Imperfect Trial Family
Section titled “A Deliberately Imperfect Trial Family”Exact recovery can hide the distinction between the theorem and the ansatz. Consider instead the normalized exponential
This state has the correct even parity and is in the Hamiltonian’s quadratic-form domain, but its cusp and exponential tail do not match the smooth Gaussian oscillator ground state.
Using the form expression for kinetic energy,
and
Its variational energy is
For ,
Stationarity gives
and hence
This is a valid but non-exact upper bound. The optimizer has found the best state in the exponential family; it cannot remove the family’s structural mismatch.
The cusp also illustrates why the form domain matters. A naive second derivative of misses a delta distribution at the origin. The positive quadratic-form expression using the weak first derivative gives the correct variational kinetic energy without pretending that lies in the strong operator domain.
Lessons for Ansatz Design
Section titled “Lessons for Ansatz Design”- Use natural scales without hard-coding the answer. The Hamiltonian suggests a competition between localization and spreading; optimization recovers .
- Respect exact symmetry. A real even ansatz is sufficient for the nondegenerate centered ground state.
- Track conventions. The wavefunction width , probability standard deviation , and inverse width are different quantities.
- Nondimensionalize early. The single ratio exposes the universal optimization problem.
- Separate optimization error from ansatz error. The Gaussian optimum has neither; the exponential optimum retains ansatz error.
- Check more than stationarity. Boundary behavior, second derivatives, limiting cases, residuals, and comparison with known results all test the calculation.
- Do not generalize accidental exactness. A family gives the exact energy only when it contains a ground-state vector or another equality condition is met.
The same Gaussian width calculation becomes nontrivial after adding an anharmonic term. The quartic example in Variational Parameters shows how the optimum shifts when the exact ground state is no longer Gaussian. Gaussian Variational Methods generalizes the ansatz to coupled coordinates, positive-definite width matrices, and correlated Gaussian bases.
Common Mistakes
Section titled “Common Mistakes”- Calling the standard deviation instead of .
- Forgetting that the normalization factor depends on the variational width.
- Dropping the minus sign in .
- Missing the factor of in .
- Minimizing kinetic or potential energy separately instead of their sum.
- Keeping the unphysical negative solution of even though .
- Concluding that every minimum-uncertainty Gaussian is an oscillator ground state.
- Treating a stationary point as sufficient without checking curvature or global limits.
- Claiming that the variational method is generally exact because this family contains the exact answer.
- Applying the strong second-derivative formula to a cusp without accounting for distributions or using the quadratic form.
Exercises
Section titled “Exercises”1. Reparameterize by inverse width
Section titled “1. Reparameterize by inverse width”Set and derive the energy . Find the minimizing and verify that it corresponds to .
Solution
Substituting gives
The derivative is
Stationarity requires
The positive solution is
Therefore and .
2. Prove the global bound algebraically
Section titled “2. Prove the global bound algebraically”Starting from
show without differentiation that for every . Determine the equality condition.
Solution
Complete a square:
Equality requires . Since , this gives .
3. Derive the displaced-packet energy
Section titled “3. Derive the displaced-packet energy”For in the text, compute and , then derive the full energy functional and its minimum.
Solution
Writing , the probability density is an even Gaussian in . Hence
so
The phase shifts the momentum mean by without changing its variance:
Therefore
The last two terms are minimized at , and the width terms are minimized at . The global minimum is .
4. Check the energy variance
Section titled “4. Check the energy variance”Use the local energy and the Gaussian moments to derive
Why does its vanishing give stronger information than ?
Solution
Write the local energy as
where
Only the term fluctuates. Since
we obtain
Substituting and yields the stated expression. It vanishes only when .
The condition means that the residual is orthogonal to the single tangent direction generated by changing . Zero variance means the full residual vanishes, so the state is an exact eigenstate.
5. Optimize the exponential trial state
Section titled “5. Optimize the exponential trial state”Verify the normalization and moments of . Derive its optimized energy and compare it with the exact ground energy.
Solution
Normalization follows from
For ,
so the form-domain kinetic energy is
Also,
Thus
The stationary equation is
so . Substitution gives
This exceeds the exact value , as the variational theorem requires. The excess is caused by ansatz mismatch, not incomplete optimization.
6. Extend to an isotropic oscillator in d dimensions
Section titled “6. Extend to an isotropic oscillator in d dimensions”For
use the product Gaussian
Find the optimized width and energy.
Solution
Each Cartesian factor contributes independently,
Therefore
Multiplication by the positive constant does not change the minimizing width, so
The optimized energy is
The product family contains the exact isotropic-oscillator ground state, so the bound is saturated.
References
Section titled “References”- R. Shankar, Principles of Quantum Mechanics, 2nd ed. (Springer, 1994), chapters on the variational principle and harmonic oscillator.
- D. J. Griffiths and D. F. Schroeter, Introduction to Quantum Mechanics, 3rd ed. (Cambridge University Press, 2018), for the oscillator and elementary variational estimates.
- C. Cohen-Tannoudji, B. Diu, and F. Laloë, Quantum Mechanics, Vol. 1, 2nd ed. (Wiley-VCH, 2020), for Gaussian wave packets, the oscillator, and variational reasoning.
- M. Reed and B. Simon, Methods of Modern Mathematical Physics, Vol. IV: Analysis of Operators (Academic Press, 1978), for the min–max principle and quadratic-form formulation. Bibliographic record.
- W. Ritz, “Über eine neue Methode zur Lösung gewisser Variationsprobleme der mathematischen Physik”, Journal für die reine und angewandte Mathematik 135, 1–61 (1909), for the historical variational method.