The Variational Method with Trial Functions
Guess a wavefunction, tune its knobs, and watch the energy fall. It falls as low as your guess allows. This is the entire craft of the variational method with trial functions. It sounds almost too simple to be a cornerstone of quantum chemistry. Yet this single idea underlies how chemists estimate ionization energies of atoms nobody can solve exactly. It explains how the helium atom yields to pencil-and-paper analysis. It also shows how Hartree–Fock and density functional theory ultimately get their orbitals. The entire enterprise rests on The Variational Principle. For any normalized trial function, the expectation value of the Hamiltonian never falls below the true ground-state energy. That inequality converts an intractable differential equation into a tractable calculus problem. You minimize a function of a few parameters instead of solving the Schrödinger equation exactly. The physical motivation is concrete. Most atoms and molecules have no closed-form solution to the Schrödinger equation. This is because of electron–electron repulsion. Yet chemists routinely need quantitative energies to explain trends in ionization potentials, bond strengths, and reaction barriers. The variational method lets you build a physically motivated ansatz. It might be a screened hydrogenic orbital, a Gaussian, or a linear combination of atomic orbitals. You encode the chemistry you already understand into a handful of adjustable parameters. This includes nuclear charge, screening, and nodal structure. Then you let calculus do the rest. The output is not just a number. The value of the optimized parameter itself tells a physical story. For example, it may show an effective nuclear charge reduced by electron shielding. This article develops the method in full generality. It then covers two archetypal settings every quantum chemistry student must master. The first is a single continuously adjustable parameter, illustrated by the helium atom's effective nuclear charge. The second is a scaling parameter applied to a fixed trial shape. This is illustrated by the hydrogen atom, where the exact answer lets you check the machinery. Along the way you will see exactly how the Rayleigh quotient is built from an unnormalized trial function. You will see how differentiation under the integral sign produces the stationarity condition. You will also see how the second derivative test confirms you have found a minimum rather than a saddle point. By the end, you will be able to set up the variational integral for any parameterized trial function. You will carry the minimization through explicitly. You will interpret the optimized parameter chemically. And you will know precisely when the method is trustworthy and when it silently misleads. This groundwork feeds directly into Optimizing Variational Parameters. There, multi-parameter and multi-determinant trial functions are tuned simultaneously. It also feeds into Linear Variation and Secular Equations. There, the parameters enter linearly. The minimization becomes a matrix eigenvalue problem instead of ordinary calculus.
- Pick a normalizable trial function containing one or more adjustable parameters .
- Build the Rayleigh quotient ; this always satisfies .
- Minimize over by solving and checking .
- The optimal often has direct physical meaning: an effective nuclear charge, an effective width, an effective bond order.
- The method never gives the exact ground energy unless the trial function happens to contain the true eigenfunction as a special case.
- Excited-state estimates require enforcing orthogonality to lower states, or using symmetry to guarantee it automatically.
- Key idea: minimizing the energy of a parameterized guess over its parameters turns the variational principle into an ordinary calculus problem whose solution bounds — and often closely approximates — the true ground-state energy.
Where this lives today
The variational method with parameterized trial functions is not a historical curiosity; it is the conceptual DNA of essentially all modern quantum chemistry software. Hartree–Fock theory is itself a variational method in which the trial function is a single Slater determinant and the "parameters" are the orbital coefficients — Optimizing Variational Parameters extends the single-knob calculus shown here into the many-parameter self-consistent-field procedure used in every electronic structure package (Gaussian, ORCA, Psi4, Q-Chem). Density functional theory codes likewise build molecular orbitals from linear combinations of basis functions whose coefficients are variationally optimized, following exactly the logic of Linear Variation and Secular Equations once the parameters enter linearly rather than as exponents. In drug design, variationally optimized atomic orbital exponents (Slater-type or contracted Gaussian) underlie the basis sets — STO-3G, 6-31G*, cc-pVTZ — used to compute binding energies between candidate drug molecules and protein targets; every one of those basis functions was itself variationally fitted, historically by matching Gaussian combinations to the shape of accurately known atomic orbitals. In materials science, variational trial functions with scaling parameters describe electron localization in defects and color centers, informing the design of phosphors and semiconductor dopants. Quantum Monte Carlo methods used for benchmark-quality energies in condensed matter physics use explicitly correlated Jastrow-type trial functions — direct intellectual descendants of Hylleraas's -dependent terms — with dozens of variational parameters optimized by stochastic energy minimization on supercomputers. Even the pedagogical helium screening constant derived above reappears, in spirit, every time a chemist rationalizes ionization energy trends across the periodic table using Slater's rules for effective nuclear charge — those empirical screening constants are themselves rough variational estimates systematized into a lookup table.
Ask the tutor: How would the helium screening calculation change if you allowed the two electrons to have different effective nuclear charges instead of a shared ?
The physical picture
The variational method starts from a physical intuition rather than a mathematical trick: if you already have a rough idea of what the ground-state wavefunction should look like — where it peaks, how fast it decays, its nodal structure — you can write down a functional form that captures this shape while leaving one or more parameters open. The parameters represent physical effects you have not yet quantified. In helium, the obvious first guess for each electron is a hydrogen-like 1s orbital, but each electron feels a nuclear charge partially screened by the other electron. Rather than solving the coupled electron–electron problem exactly, you introduce an effective nuclear charge as a free parameter and let the variational principle determine the best value from first principles — no fitting to experimental data required. Once the trial function is chosen, the machinery is completely mechanical. You compute the Rayleigh quotient,
as an explicit function of , using whatever normalization is convenient (the quotient automatically compensates for an unnormalized ). Then you differentiate with respect to , set the derivative to zero, and solve for the stationary point . The variational principle guarantees for every , so the minimum over is the best possible upper bound obtainable from that particular functional form. Crucially, is not merely a number: it is the tightest bound your chosen shape can produce, and the gap measures how well your functional form matches physical reality, independent of the specific parameter values. Geometrically, think of as a landscape sitting entirely on or above the horizontal line . The trial family sweeps out a curve as varies, dipping down to touch the true ground energy only if the family happens to contain the exact ground-state wavefunction. Most families never touch that floor, but a well-chosen family gets remarkably close — often within a few percent of the exact energy, using no more than one or two parameters. This is the central bargain of the variational method: physical insight, encoded in the shape of the trial function, converts an unsolvable differential equation into an elementary problem in single- or multi-variable calculus.
The core ideas
The single equation that defines the whole method is the Rayleigh quotient built from a trial function:
where: is any normalizable trial function depending on parameter(s) ; is the exact molecular or atomic Hamiltonian; is the true ground-state energy; the inequality holds for every value of , not only the optimum. Reading: this is The Variational Principle applied at a single point in parameter space — it says nothing yet about optimization, only that any guess overestimates (or exactly equals) the true energy. The optimization step is the ordinary stationarity condition of single- or multi-variable calculus:
where: is the optimal parameter value; the first condition locates stationary points; the second condition confirms a genuine minimum (not a maximum or inflection) among the stationary points. Reading: because is bounded below by , any interior minimum found this way is the best upper bound attainable from that trial family — you are sliding down the variational landscape until it flattens out. For a trial function built by scaling a fixed reference shape, , there is a shortcut that avoids recomputing integrals from scratch: the scaling theorem,
where: is the kinetic energy operator and the potential energy operator evaluated with the unscaled reference function ; the kinetic contribution scales as because differentiation twice with respect to scaled coordinates brings down two powers of ; the potential (Coulombic, ) contributes one power of from the substitution combined with the volume element. Reading: this quadratic-in-, linear-in- split is why scaling problems (like the hydrogen 1s orbital exponent, or exploring how the electron cloud "breathes" under scaling) always minimize to a clean closed form — you differentiate a simple quadratic, not a transcendental function.
Goal. Using a product of hydrogen-like 1s orbitals with an adjustable effective nuclear charge as trial function for the helium atom's two electrons, find that minimizes the variational energy, and evaluate the resulting bound.
Step 1 — Write the Hamiltonian and trial function. In atomic units, the exact electronic Hamiltonian for helium () is
The trial function is a product of two hydrogenic 1s orbitals sharing a common variational parameter (the effective nuclear charge, not fixed at 2):
This function is already normalized because each hydrogenic 1s orbital is separately normalized.
Step 2 — Split the Hamiltonian into a solvable piece and a perturbation-like piece. Rewrite by adding and subtracting and :
The bracketed terms are exactly the hydrogen-like Hamiltonians with nuclear charge , whose eigenvalue on is (in hartrees, since the 1s hydrogenic energy is with ). This algebraic trick avoids recomputing the kinetic and nuclear-attraction integrals from scratch — you recognize them as scaled hydrogen atom integrals.
Step 3 — Evaluate each expectation value. Because is a simple product, expectation values separate electron-by-electron except for the term:
The first result is the exact hydrogenic 1s energy at charge ; the second is the standard hydrogenic expectation value for . The electron repulsion integral for two 1s orbitals of exponent is a classic result,
Step 4 — Assemble . Summing all pieces (two hydrogenic kinetic-plus-nuclear terms, two screening corrections, one repulsion term):
Collecting terms,
Step 5 — Minimize over . Differentiate and set to zero:
The second derivative is , confirming a genuine minimum. For helium, , so
Step 6 — Evaluate the optimized energy. Substitute back into :
With : hartree. This compares to the experimental helium ground-state energy of hartree — a variational bound that is too high, exactly as the variational principle requires (), and dramatically better than the crude unscreened guess, which gives hartree for the kinetic-plus-nuclear part alone before repulsion is even included, or more precisely hartree, itself already an upper bound but a noticeably looser one than gives.
Go deeper · Derivation B · 2 minScaling a trial hydrogen 1s orbital and recovering the exact answer
Goal. Take the shape of the hydrogen 1s orbital, , treat its exponent as a free scaling parameter rather than fixing it at 1, and show that variational optimization exactly reproduces the true hydrogen ground state — the crucial sanity check that validates the whole machinery.
Step 1 — Define the scaled trial function. Let
which is normalized for every (the same normalization integral that makes hydrogenic 1s orbitals normalized at any nuclear charge). The hydrogen atom Hamiltonian in atomic units is
Step 2 — Apply the scaling theorem. Writing with suitably normalized, the general scaling result gives
where and are the kinetic and (magnitude of) potential expectation values at , i.e. for the unscaled reference function. For the unscaled 1s shape ( is literally the hydrogenic solution), both integrals are elementary:
(These follow from direct integration of and against with the standard normalization; they are the same integrals that give the exact hydrogen ground energy hartree when is substituted, serving as an internal consistency check.)
Step 3 — Assemble . Substituting,
This is an exact quadratic in — no approximation beyond the choice of trial shape has been made yet.
Step 4 — Minimize. Differentiate:
The second derivative confirms a minimum. Substituting back,
Step 5 — Interpret. The variational optimum reproduces the exact hydrogen 1s exponent, and hartree exactly matches the known ground-state energy, eV. This is not a coincidence: because the trial family itself contains the true eigenfunction (at , is exactly the hydrogen 1s orbital), the variational bound becomes an equality. This example is the benchmark that proves the calculus machinery is being executed correctly — any trial family flexible enough to contain the true wavefunction as a special case will always relax to it under minimization, and no residual error remains.
Step 6 — Limiting-case check. As a stress test, consider what happens if the reference shape is not exact, e.g. a Gaussian instead of the exponential. Repeating Steps 2–4 with Gaussian integrals gives a different optimal exponent and an energy of hartree — worse than hartree, as it must be, since the Gaussian shape never coincides with the true exponential 1s orbital no matter how its width is tuned. This illustrates that the quality of the bound is set by the shape, while the scaling parameter only optimizes within that shape.
Worked examples
Example 1 — Foundational: a particle in a box with a parabolic trial function. A particle of mass is confined to an infinite square well of width , . Instead of using the known exact solution , use the simplest polynomial trial function satisfying the boundary conditions :
but to keep the algebra elementary, fix the functional form to the lowest nontrivial polynomial and instead vary a different parameter — a shift in normalization exponent is unnecessary here, so use the standard textbook choice
with no free parameter, and compare against the trial function with one adjustable parameter ,
For a clean, fully asymmetric worked calculation, set first (the parameter-free case) to establish the baseline, then show how introducing improves it. Baseline (). Normalize :
The kinetic energy integral (since inside the box):
With , . Thus
Converting to the usual form : the exact ground energy is , while the trial estimate gives — higher by only , an excellent bound from an utterly elementary polynomial guess containing no adjustable parameter at all. Adding the parameter . This baseline already demonstrates the power of shape; introducing and minimizing (a short but genuine two-term quadratic-over-quadratic optimization, entirely analogous to the derivations above) pushes the bound to to five significant figures — indistinguishable from the exact answer, since the quartic correction supplies exactly the extra curvature the parabola lacks near the walls. The lesson: even one extra parameter, when it captures missing shape near the nodes, can close almost the entire remaining error. Limiting-case check. As (box becomes free space), both and the trial estimate scale as , correctly recovering the free-particle continuum limit where confinement energy vanishes — the ratio of trial to exact energy stays fixed at regardless of , since is an overall energy scale, not a shape parameter.
Example 2 — Applied: the variationally optimized exponent for the hydrogen molecular ion's LCAO orbital. For , a natural trial function is the linear combination of atomic orbitals (LCAO) built from hydrogenic 1s functions on each nucleus, but with the orbital exponent left variational rather than fixed at the free-atom value :
where are electron–nucleus distances to centers and separated by the (fixed, or separately optimized) bond distance . Physically, is expected: the single electron feels two nuclei, so the optimal atomic-like orbital should be more contracted than the free hydrogen atom's 1s orbital (), because the shared electron sits, on average, in a region of enhanced positive potential from both centers. Carrying out the full two-center integral evaluation (overlap , Coulomb , resonance integrals — all textbook two-center integrals expressible via confocal elliptical coordinates) and minimizing simultaneously over both and yields, at the variational optimum,
with a bond dissociation energy of eV, compared to the experimental eV. Freezing (the naive free-atom exponent, no optimization) gives a noticeably worse eV at . The improvement — nearly 0.6 eV recovered, more than 30% of the discrepancy with experiment — comes entirely from allowing one additional variational parameter to respond to the chemical environment: the orbital contracts ( increases from 1 to 1.24) precisely because two nuclei pull the electron density inward relative to an isolated hydrogen atom. Limiting-case check. As (dissociation limit), the optimal exactly, because the electron then sees only one nucleus and the system reduces to an isolated hydrogen atom — the variational method correctly "turns off" the contraction effect precisely when the physical justification for it (having two nearby nuclei) disappears.
Example 3 — Exam/competition level: variational bound for the linear (1D) harmonic oscillator using a non-Gaussian trial function. This example deliberately avoids the "obvious" Gaussian guess (which is already exact for the harmonic oscillator, so it would prove nothing about the method's reliability) and instead uses a Lorentzian-shaped trial function to show how far off a plausible but wrong-shaped guess can be, quantitatively. The Hamiltonian is , with exact ground energy , . Choose the trial function
which is smooth, even, peaked at the origin, and normalizable for — a physically reasonable-looking guess that is not Gaussian. Normalization. Using (a standard Beta-function result), the norm is . Potential energy. Using ,
Kinetic energy. Differentiating twice, , and using the needed integrals and , one finds after integrating by parts (equivalently, using , which avoids fourth-order poles):
Then
Assemble and minimize.
Differentiating,
This gives , which is negative — unphysical, since must be positive for normalizability. The stationary point found by naive differentiation lies outside the admissible domain. This is the pedagogical payoff: the Lorentzian trial function, for this potential, has no interior minimum with ; is monotonically increasing for all (both terms increase with ), so the infimum over the admissible domain is approached as , where — but makes spread out over all space and become non-normalizable in the limit, signaling that this shape is fundamentally unsuited to representing a localized ground state and the variational search must be redirected (e.g., restricting to a physically sensible range, or, better, abandoning this trial family in favor of a Gaussian). Contrast with the correct shape. Repeating the identical procedure with a Gaussian gives the textbook result , minimized at , reproducing exactly — because the Gaussian is the true ground state shape. The Lorentzian's total failure to produce an interior minimum, set directly against the Gaussian's exact success, is the sharpest possible illustration that the variational method's quality is bounded by the shape you choose, not by how many parameters you throw at it.
Limiting cases, scope & common traps
| Situation | What happens | Why |
|---|---|---|
| Trial family contains the exact eigenfunction | exactly | The variational bound becomes an equality once the true wavefunction is reachable within the family (Example: scaled hydrogen 1s, Derivation 2) |
| Trial shape is qualitatively wrong (wrong asymptotic decay, wrong nodal count) | can be badly above , or minimization may fail to converge to a physical | The parameter can only rescale a fixed shape; it cannot fix a fundamentally wrong functional form (Example 3, Lorentzian case) |
| More parameters added to a reasonable shape | monotonically decreases (never increases) as parameters are added | Each additional degree of freedom enlarges the trial family, so the minimum over a larger set is at least as low |
| Excited states, naive treatment | Direct minimization of for an excited-state-shaped is not guaranteed to bound the corresponding excited energy unless orthogonality to all lower states is enforced | The basic variational theorem is proved only for the true ground state; a separate orthogonality-constrained theorem is needed for excited states |
| limit in the helium screening example | Recovers unscreened, poorer bound | Removing the freedom to screen forces the electrons to see the bare nuclear charge, worsening the bound relative to |
| Very large parameter count (many-parameter, many-Gaussian expansions) | Approaches the exact energy asymptotically but computational cost grows quickly | This is the practical basis of modern basis-set quantum chemistry, though full convergence is a separate topic from the two-parameter examples here |
The chemist behind it
The variational method as used in quantum chemistry traces to the mathematical variational principle developed by Lord Rayleigh and Walter Ritz for vibration problems in classical mechanics, later carried directly into quantum theory once Schrödinger's equation appeared. The chemist most associated with turning this into a working tool for electronic structure is Egil Hylleraas, whose 1929 calculation of the helium ground-state energy — using trial functions with explicit electron–electron distance dependence, going well beyond the simple screened-orbital product used above — achieved agreement with experiment to a fraction of a percent, a stunning result for a three-body Coulomb problem with no closed-form solution. Hylleraas showed that adding physically motivated correlation terms (functions of directly, not just and separately) to the trial function captures the instantaneous avoidance electrons exhibit around each other, an effect the simple product-of-orbitals trial function used in the derivation above cannot describe at all.
Origins · 1 minEgil Andersen Hylleraas and how this was discovered
Hylleraas worked at the University of Oslo and briefly with Max Born in Göttingen during the crucial years just after Schrödinger's 1926 papers, when almost no one had demonstrated that the new quantum mechanics could handle a genuinely interacting few-electron system quantitatively. His treatment of helium, published in 1929, remains a foundational demonstration that variational trial functions — built from physical insight about electron correlation rather than brute-force numerical solution — could rival experimental spectroscopic precision. The coordinates he introduced for two-electron atoms, built from , , and together, are still called Hylleraas coordinates and remain the gold-standard approach for benchmark two- and three-electron atomic calculations today.
Why does minimizing the energy over a parameter give an upper bound rather than the exact answer?
The variational theorem proves that for any normalized trial function, , with equality only if happens to be the true ground-state eigenfunction. Minimizing over a parameter searches only within the restricted family of functions your particular functional form can produce; unless that family is flexible enough to contain the true eigenfunction exactly, the minimum you find will still sit above . The size of the gap depends entirely on how well the chosen shape matches reality — a poorly chosen shape can leave a large residual error even after perfect optimization, while a well-chosen shape (like the scaled hydrogenic exponential for the hydrogen atom itself) can close the gap to zero.
How do you know whether a stationary point found by is a minimum and not a maximum or saddle?
You apply the ordinary second-derivative test from single-variable calculus: compute at the stationary point and confirm it is positive. In the helium example, everywhere, so the single stationary point found is unambiguously a minimum. In multi-parameter problems the analogous test uses the Hessian matrix of second partial derivatives, requiring it to be positive definite. Physically, because the variational energy is bounded below by for the entire trial family, an interior stationary point of a smooth, well-behaved landscape is very often a minimum, but the algebraic check should always be performed rather than assumed.
Can the variational method be used directly for excited states?
Yes, but only with an added condition: the basic theorem applies strictly to the ground state. To bound an excited-state energy, the trial function must be constrained to be orthogonal to the exact ground state (and to all lower excited states), giving for the first excited state, and so on. In practice this orthogonality is often enforced automatically by symmetry — for example, a trial function with odd parity cannot overlap with an even-parity ground state, so minimizing its energy directly bounds the lowest odd-parity excited state without any extra machinery.
Why did the Lorentzian trial function fail so badly for the harmonic oscillator, when it looked like a reasonable smooth, peaked, normalizable guess?
The failure traces to the asymptotic decay of the Lorentzian, which falls off as at large , far too slowly compared to the true Gaussian ground state's decay. Because the harmonic potential grows as , any trial function with heavy power-law tails samples arbitrarily large potential energy from its slowly decaying wings, and the competition between kinetic energy (favoring spreading out, lowering ) and potential energy (favoring localization) never balances at a finite width for this particular shape. This example demonstrates that qualitative features like tail behavior, not just the number of adjustable parameters, determine whether a trial family can succeed at all.
Is there a general rule for choosing a good trial function before doing any calculation?
The most reliable strategy is to encode as much correct physics as possible into the shape: correct nodal structure (matching the number of nodes expected for the state you are approximating), correct short-range behavior (a cusp at coalescence points, as required by the Kato cusp condition for Coulombic systems), and correct long-range decay (exponential falloff at a rate set by the ionization energy, for bound atomic and molecular states). Parameters are then reserved for quantities you are genuinely uncertain about, such as effective nuclear charges, orbital exponents, or mixing coefficients between basis functions, which is exactly the strategy used for the helium screening constant and the LCAO exponent in the worked examples above.
How does this single-parameter variational method relate to modern electronic structure calculations like Hartree-Fock or DFT?
Hartree–Fock theory is a direct multi-parameter generalization: instead of one scalar , the "parameters" are the coefficients of atomic orbitals inside molecular orbitals, and the trial function is an antisymmetrized product (Slater determinant) built from those orbitals. Minimizing the energy with respect to all orbital coefficients simultaneously, subject to orthonormality constraints, produces the Hartree–Fock equations — the direct multi-parameter descendant of the single- calculus practiced here. Optimizing Variational Parameters develops that generalization explicitly, while Linear Variation and Secular Equations handles the special (and extremely common) case where the parameters enter the trial function linearly, turning the minimization into a matrix eigenvalue problem rather than ordinary calculus.
Why does the helium calculation split the Hamiltonian into hydrogen-like pieces plus correction terms rather than just brute-force integrating the full Hamiltonian against the trial function?
Splitting the Hamiltonian is a technique for exploiting integrals you already know rather than a change to the underlying physics. Because is the exact eigenfunction of a hydrogen-like Hamiltonian with nuclear charge , expectation values of the bracketed kinetic-plus-attraction operator are known immediately, without any explicit integration, as per electron. Only the leftover screening term and the genuinely new electron-repulsion integral require separate evaluation, and both happen to be standard integrals over hydrogenic 1s functions available in closed form. This bookkeeping trick is standard throughout perturbative and variational treatments of many-electron atoms.