The Rayleigh-Ritz Method

A great many physical laws are stated not as equations of motion but as principles of extremization: a soap film minimizes area, a ray of light minimizes optical path, a quantum ground state minimizes energy. The calculus of variations turns each such principle into an Euler-Lagrange differential equation — the exact condition for stationarity — but that equation is very often one nobody can solve in closed form. The Rayleigh-Ritz method is the escape hatch. Rather than solve the differential equation, it works directly on the functional, and rather than search the whole infinite-dimensional space of admissible functions it searches only a finite-parameter family of trial functions chosen by hand. Within that family the functional is no longer a machine that eats functions; it is an ordinary function of a few numbers, and stationarity is enforced by ordinary partial derivatives. That single move — restrict, then differentiate — converts a hard variational problem into a solvable algebraic one. For a linear trial expansion the algebra is a matrix eigenproblem, and when the functional is the Rayleigh quotient of a self-adjoint operator the method acquires its most celebrated property: the lowest computed value can never fall below the true ground-state eigenvalue. The estimate is not merely approximate but controlled, with a known direction of error, and enlarging the trial family can only push it downward toward the truth. This is why the same recipe reappears wherever physics meets computation — as the finite element method in engineering, as LCAO and Hartree-Fock in quantum chemistry, as spectral methods in fluid dynamics, and most recently as the variational quantum eigensolver on quantum hardware.

Key takeaways
  • The Rayleigh-Ritz method approximates the extremum of a functional by replacing the infinite-dimensional search over all admissible functions with a finite one over a trial family u(x) = Σ cₖ φₖ(x).
  • Stationarity collapses from the Euler-Lagrange differential equation to the algebraic system ∂J/∂cₖ = 0 — a finite set of equations for the coefficients.
  • For the Rayleigh-quotient (eigenvalue) form the conditions become a generalized matrix eigenproblem Hc = λSc, whose lowest root is a rigorous upper bound on the true smallest eigenvalue.
  • Accuracy is set by the trial functions: they must be admissible (satisfy the essential boundary conditions) and, for guaranteed convergence, complete as N → ∞.
  • It is the conceptual ancestor of the finite element method and the working engine of computational quantum chemistry, and it complements the Euler-Lagrange equation exactly when no closed-form solution exists.
  • Key idea: Restrict the functional to a finite-dimensional trial space; stationarity then collapses from a differential equation to the algebraic system ∂J/∂cₖ = 0, and for self-adjoint eigenvalue problems the lowest Ritz value bounds the true eigenvalue from above.

Where this lives today

The Rayleigh-Ritz recipe runs inside a staggering fraction of modern computation. Its direct descendant, the finite element method, is the dominant tool for stress analysis, heat transfer, and electromagnetics: every aircraft wing, bridge, and chip package is validated by Ritz-type minimization over piecewise-polynomial trial functions on a mesh, the variational origin guaranteeing the stability engineers rely on. In quantum chemistry the whole edifice is variational — Hartree-Fock, configuration interaction, and coupled-cluster methods all expand molecular orbitals in fixed atomic-orbital bases and solve a secular equation. Hylleraas's explicitly correlated trial functions push the helium bound of −2.848-2.848 a.u. shown above to the experimental −2.9037-2.9037 a.u. and beyond, to microhartree agreement, using thousands of parameters. Most strikingly, the idea has migrated onto quantum hardware: the variational quantum eigensolver (VQE) prepares a parameterized trial state on a quantum processor, measures its energy, and classically minimizes over the parameters — a Rayleigh-Ritz calculation whose "trial function" is a physical quantum circuit, and where the upper-bound theorem still fixes the sign of the error.

The physical picture

Imagine hunting for the lowest point of a vast, smooth landscape — the functional over every admissible function — but you may walk only along a handful of prescribed roads, the trial family. You find the lowest point reachable from those roads. It can never lie below the true valley floor, but it comes as close as the roads allow, and paving one more road can only lower where you end up. That is the whole method: trade the freedom to go anywhere for a search you can actually finish, and accept an answer whose error you can at least sign. For energy-like functionals the error always points the same way — the estimate sits above the truth — so you know which side of the answer you are on before you know how close.

Figure
The variational principle as a landscape. Every trial function u lands on the Rayleigh-quotient surface at a value that can never fall below the true ground-state eigenvalue λ₁, the valley floor. A finite trial space reaches only a restricted set of points; the lowest of them, the Ritz estimate, still sits above λ₁, so the variational error always points one way: λ₁ ≤ R of u.
Restricting to a trial space: the best reachable value still lies above the true minimum direction in function space Rayleigh quotient R of u full landscape over all admissible u true floor λ₁ exact eigenfunction ψ₁ restricted reach of the trial space Ritz estimate E_Ritz variational error ≥ 0, always an upper bound

For an eigenvalue problem the landscape is exactly the Rayleigh quotient of a self-adjoint operator, and the "roads" are the span of the trial functions. Any trial function returns a weighted average of the true eigenvalues, so the value can never undershoot the smallest one; minimizing over the trial space squeezes that average toward the true minimum. This is the variational principle underlying essentially all of quantum chemistry, and it is quantitative: a single well-chosen parameter can capture 98% of the binding energy of the helium atom. The second figure is that calculation — the trial energy of helium against one variational parameter, the effective nuclear charge.

Figure
The helium ground state from one variational parameter. The trial energy E of Z equals Z² − (27/8)Z, a parabola in the effective nuclear charge Z. It bottoms at Z = 27/16 = 1.6875 with E_min = −(27/16)² ≈ −2.848 a.u., which sits just above the experimental −2.9037 a.u. — the upper bound the variational theorem guarantees, capturing 98% of the binding energy from a single number.
Helium E(Z) = Z² − (27/8)Z: minimum at Z = 1.6875 gives −2.848 a.u., above experiment −2.0 −2.5 −3.0 1.0 1.5 2.0 2.5 effective nuclear charge Z trial energy E (a.u.) experiment −2.9037 a.u. E_min = −2.848 a.u. Z = 27/16 = 1.6875 the bound sits above the truth by ≈ 0.056 a.u.

The core equations

The method begins with a single modelling choice: expand the unknown extremal in a finite set of chosen functions. Everything downstream follows from this expansion and the linear algebra it induces.

u(x)=∑k=1Nck ϕk(x)(1)u(x) = \sum_{k=1}^{N} c_k\,\phi_k(x) \qquad (1)

where: u(x)u(x) — trial function approximating the true extremal; ϕk(x)\phi_k(x) — chosen basis (trial) functions, admissible and ideally complete; ckc_k — adjustable coefficients; NN — dimension of the trial space. Reading it: the unknown function collapses to a finite list of numbers c1,…,cNc_1,\dots,c_N, and the answer's quality is fixed the moment the ϕk\phi_k are chosen. Substituting the expansion turns the functional J[u]J[u] into an ordinary function J(c1,…,cN)J(c_1,\dots,c_N), whose stationary points obey the Ritz conditions — the step that demotes a variational problem to a calculus problem.

∂J∂ck=0,k=1,…,N(2)\frac{\partial J}{\partial c_k} = 0,\qquad k=1,\dots,N \qquad (2)

where: JJ — the functional after substitution, now a function of the coefficients; ∂/∂ck\partial/\partial c_k — an ordinary partial derivative. Reading it: the condition δJ=0\delta J = 0 has become NN scalar equations in NN unknowns. For eigenvalue problems the functional is the Rayleigh quotient of a self-adjoint operator. Its value on any trial function is a weighted average of the operator's eigenvalues — the source of the bounding property.

R[u]=⟨u,L^u⟩⟨u,u⟩(3)R[u] = \frac{\langle u,\hat{L}u\rangle}{\langle u,u\rangle} \qquad (3)

where: R[u]R[u] — the Rayleigh quotient; L^\hat{L} — a self-adjoint (Hermitian) linear operator; ⟨ ⋅ ,⋅ ⟩\langle\,\cdot\,,\cdot\,\rangle — the inner product. Reading it: stationary points of RR are exactly the eigenfunctions of L^\hat{L}, and the stationary values its eigenvalues. Inserting the linear expansion into the Rayleigh quotient and applying the Ritz conditions produces a generalized matrix eigenproblem — the computational heart of the method.

∑kHjk ck=λ∑kSjk ck,Hjk=⟨ϕj,L^ϕk⟩,    Sjk=⟨ϕj,ϕk⟩(4)\sum_k H_{jk}\,c_k = \lambda \sum_k S_{jk}\,c_k,\qquad H_{jk}=\langle\phi_j,\hat{L}\phi_k\rangle,\;\; S_{jk}=\langle\phi_j,\phi_k\rangle \qquad (4)

where: HjkH_{jk} — Hamiltonian (or stiffness) matrix elements; SjkS_{jk} — overlap (or mass) matrix, the identity for an orthonormal basis; λ\lambda — the Ritz eigenvalue estimate. Reading it: the operator problem has become the finite matrix problem Hc=λScH\mathbf{c}=\lambda S\mathbf{c}, solvable by standard linear algebra. The Ritz eigenvalues are the roots of the secular equation, the determinant that makes the eigenproblem nontrivially solvable.

det⁡ ⁣(H−λS)=0(5)\det\!\big(H-\lambda S\big) = 0 \qquad (5)

where: det⁡\det — the determinant; its NN roots λ1Ritz≤⋯≤λNRitz\lambda_1^{\mathrm{Ritz}}\le\cdots\le\lambda_N^{\mathrm{Ritz}} are the Ritz values. Reading it: this is the LCAO secular equation of quantum chemistry and the eigenfrequency condition of structural mechanics — one object. The lowest Ritz value obeys the variational upper-bound principle — the single fact that elevates the method from an approximation to a controlled one.

λ1≤R[u]for every admissible u(6)\lambda_1 \le R[u]\quad\text{for every admissible }u \qquad (6)

where: λ1\lambda_1 — the smallest exact eigenvalue of L^\hat{L}. Reading it: no trial function, however crude, can push the Rayleigh quotient below the true ground state — the error has a guaranteed sign. Many mechanics and quantum problems arrive as a Sturm-Liouville energy functional, whose stationarity is the eigenvalue problem the method attacks.

E[u]=∫ab ⁣[p(x) u′2+q(x) u2] dx  −  λ ⁣∫ab ⁣r(x) u2 dx(7)E[u] = \int_a^b\!\Big[p(x)\,u'^2+q(x)\,u^2\Big]\,\mathrm{d}x \;-\; \lambda\!\int_a^b\! r(x)\,u^2\,\mathrm{d}x \qquad (7)

where: p,q,rp,q,r — Sturm-Liouville coefficient functions with p,r>0p,r>0; λ\lambda — the eigenvalue, a Lagrange multiplier enforcing the rr-weighted normalization. Reading it: the first integral is the "stiffness" energy, the second the "mass" normalization, and their ratio is the Rayleigh quotient (3).

Derivation AReducing the functional to the Ritz algebraic system

The goal is to show how the exact stationarity condition δJ=0\delta J = 0 over an infinite-dimensional function space degenerates, once the search is restricted to a finite trial family, into the finite algebraic system ∂J/∂ck=0\partial J/\partial c_k = 0, and how for the Rayleigh quotient that system becomes the generalized matrix eigenproblem Hc=λScH\mathbf{c}=\lambda S\mathbf{c}. We follow the chain from the variation, through the linear expansion, to the secular determinant, so the recipe is justified rather than merely asserted.

Step 1. On the trial manifold every admissible variation is built from the coefficients alone: δu=∑kδck ϕk\delta u = \sum_k \delta c_k\,\phi_k, because the ϕk\phi_k are fixed and only the ckc_k are free. Why: this restriction shrinks an uncountable freedom (any δu\delta u) down to NN real knobs, and it is the only modelling assumption in the whole method.

Step 2. The first variation therefore contracts by the chain rule to δJ=∑k=1N(∂J/∂ck) δck\delta J = \sum_{k=1}^N (\partial J/\partial c_k)\,\delta c_k. Since the δck\delta c_k are independent and arbitrary, δJ=0\delta J = 0 forces each to vanish, giving the Ritz conditions ∂J/∂ck=0\partial J/\partial c_k = 0. Why: the fundamental lemma of the calculus of variations, which needed an arbitrary function in the Euler-Lagrange case, here needs only arbitrary numbers — the same logic, finite-dimensional.

Step 3. Specialize JJ to the Rayleigh quotient and insert the expansion. With Hjk=⟨ϕj,L^ϕk⟩H_{jk}=\langle\phi_j,\hat{L}\phi_k\rangle and Sjk=⟨ϕj,ϕk⟩S_{jk}=\langle\phi_j,\phi_k\rangle, the quotient becomes a ratio of quadratic forms, R=(c†H c)/(c†S c)R = (\mathbf{c}^{\dagger} H\,\mathbf{c})/(\mathbf{c}^{\dagger} S\,\mathbf{c}). Why: the matrices HH and SS absorb every integral once and for all, so the rest is pure linear algebra in the coefficient vector c\mathbf{c}.

Step 4. Differentiate the ratio and set ∂R/∂cj∗=0\partial R/\partial c_j^{*}=0. By the quotient rule the numerator gradient must be parallel to the denominator gradient, with proportionality constant RR itself; this yields ∑kHjkck=R∑kSjkck\sum_k H_{jk}c_k = R\sum_k S_{jk}c_k, that is Hc=λScH\mathbf{c}=\lambda S\mathbf{c} with λ=R\lambda = R. Why: stationarity of a Rayleigh quotient is algebraically identical to an eigenvalue condition — stationary values are eigenvalues, stationary vectors eigenvectors, which is why Ritz values approximate the true spectrum.

Step 5. A nonzero c\mathbf{c} exists only when det⁡(H−λS)=0\det(H-\lambda S)=0, the secular equation, whose NN roots are the Ritz eigenvalues. Why: this determinant is the practical output — the same secular equation solved in LCAO molecular-orbital theory and in the modal analysis of a vibrating structure.

Go deeper · Derivation B · 1 minThe variational upper bound on the ground state
Derivation BThe variational upper bound on the ground state

The aim here is to prove the theorem that makes Rayleigh-Ritz trustworthy: for any self-adjoint operator with a discrete spectrum bounded below, the Rayleigh quotient of every admissible trial function is greater than or equal to the smallest eigenvalue, with equality only for the exact ground state. This guarantees that the method returns an upper bound and that improving the trial space can only lower — never raise — the estimate, turning approximation into a controlled, one-sided statement.

Step 1. Let {ψn}\{\psi_n\} be the complete orthonormal eigenbasis of L^\hat{L} with L^ψn=λnψn\hat{L}\psi_n=\lambda_n\psi_n and ordered eigenvalues λ1≤λ2≤⋯\lambda_1\le\lambda_2\le\cdots. Expand any admissible trial function as u=∑nanψnu = \sum_n a_n\psi_n. Why: completeness of the eigenbasis is what lets an arbitrary trial function be analysed in terms of the very eigenvalues we are trying to bound.

Step 2. Because L^\hat{L} is self-adjoint the cross terms diagonalize, and the Rayleigh quotient becomes R[u]=(∑n∣an∣2λn)/(∑n∣an∣2)R[u] = \big(\sum_n |a_n|^2\lambda_n\big)\big/\big(\sum_n |a_n|^2\big) — a convex weighted average of the eigenvalues with non-negative weights ∣an∣2|a_n|^2. Why: writing RR as a genuine weighted mean is the crux; a mean of numbers can never be smaller than the smallest number entering it.

Step 3. Replace every λn\lambda_n in the numerator by the smallest, λ1\lambda_1: since λn≥λ1\lambda_n\ge\lambda_1, we get R[u]≥λ1(∑n∣an∣2)/(∑n∣an∣2)=λ1R[u] \ge \lambda_1\big(\sum_n |a_n|^2\big)\big/\big(\sum_n |a_n|^2\big) = \lambda_1. Equality holds only if an=0a_n=0 for every λn>λ1\lambda_n>\lambda_1, i.e. uu is exactly a ground state. Why: this is the upper-bound theorem in one line, and it shows the error is second order — a first-order-wrong wavefunction still gives a second-order-accurate energy, the reason one-parameter estimates work so well.

Step 4. Within a trial subspace the lowest Ritz value is the minimum of RR over that subspace, hence still ≥λ1\ge\lambda_1; enlarging the subspace can only lower it, giving monotone convergence from above. The Hylleraas-Undheim-MacDonald theorem extends this: the mm-th Ritz value bounds the mm-th true eigenvalue, all moving down monotonically as the basis grows. Why: this promotes the single-state bound to the whole computed spectrum, justifying excited-state estimates from a Ritz calculation.

Go deeper · Derivation C · 1 minEssential and natural boundary conditions in the Ritz reduction
Derivation CEssential and natural boundary conditions in the Ritz reduction

The purpose of this derivation is to settle a question that trips up every newcomer: which boundary conditions the trial functions must satisfy and which they may ignore. Integrating the Sturm-Liouville energy functional by parts exposes an explicit boundary term, and shows that essential (Dirichlet) conditions must be imposed by hand, whereas natural (Neumann-type) conditions are delivered for free by stationarity as the trial space is enlarged.

Step 1. Vary the energy functional (7). The first variation contains ∫ab2(p u′ δu′+q u δu−λr u δu) dx\int_a^b 2\big(p\,u'\,\delta u' + q\,u\,\delta u - \lambda r\,u\,\delta u\big)\,\mathrm{d}x, with δu′\delta u' alongside δu\delta u. Why: the derivative of the variation forces an integration by parts, and integration by parts always generates a boundary term.

Step 2. Integrate the p u′ δu′p\,u'\,\delta u' term by parts: ∫abp u′ δu′ dx=[p u′ δu]ab−∫ab(p u′)′ δu dx\int_a^b p\,u'\,\delta u'\,\mathrm{d}x = \big[p\,u'\,\delta u\big]_a^b - \int_a^b (p\,u')'\,\delta u\,\mathrm{d}x. The interior integral reassembles the Sturm-Liouville operator; the bracket is the boundary term. Why: the bulk term recovers the differential equation, so the whole boundary-condition question sits in the surviving bracket [p u′ δu]ab[p\,u'\,\delta u]_a^b.

Step 3. For the variation to be stationary the boundary term must vanish. There are two ways to kill it at each endpoint: pin the value so δu=0\delta u=0 there (an essential condition, e.g. u(a)=0u(a)=0), or leave uu free and let stationarity enforce p u′=0p\,u'=0 there (a natural condition). Why: essential conditions constrain the trial space in advance because δu\delta u is not free at a pinned end, so the trial functions must already satisfy them to be admissible.

Step 4. Consequently the ϕk\phi_k must satisfy the essential conditions exactly but not the natural ones, which are approached automatically as NN grows because the extra freedom drives p u′→0p\,u'\to0 at the free ends. Why: this is the practical rule — impose Dirichlet-type conditions on the ansatz and trust the machinery to supply the Neumann-type ones; forgetting the first half silently invalidates the bound.

Limiting cases

The method's behaviour is dictated by the trial space and by whether the operator is self-adjoint:

CaseResultMeaning
Complete basis, N→∞N\to\inftyλNRitz⟶λexact\lambda_N^{\mathrm{Ritz}}\longrightarrow\lambda_{\mathrm{exact}}A complete trial set makes the Ritz estimate converge monotonically from above to the true extremum.
Exact solution inside the familyuexact∈span{ϕk}⇒JRitz=Jexactu_{\mathrm{exact}}\in\mathrm{span}\{\phi_k\}\Rightarrow J_{\mathrm{Ritz}}=J_{\mathrm{exact}}If the true extremal already lives in the trial space, the method returns it exactly.
Single parameter, N=1N=1dJ(c)/dc=0\mathrm{d}J(c)/\mathrm{d}c=0Reduces to one-variable minimization — the crudest but most transparent estimate, e.g. the helium ZZ-scaling.
Self-adjoint eigenvalue problemλ1Ritz≥λ1exact\lambda_1^{\mathrm{Ritz}}\ge\lambda_1^{\mathrm{exact}}The lowest Ritz value is a strict upper bound, with equality only if the trial space contains the ground state.
Non-self-adjoint / indefinite functionalno one-sided boundWithout self-adjointness the Rayleigh quotient is not a weighted average, so stationary values need not bound the spectrum.

Worked examples

1 · Infinite square well by a quadratic ansatz (fully worked)

A particle lives in the infinite well V=0V=0 on 0≤x≤a0\le x\le a, with u(0)=u(a)=0u(0)=u(a)=0. Estimate the ground-state energy with a single parameter-free polynomial trial function. Use ℏ=m=1\hbar=m=1.

Step 1. Choose the simplest admissible ansatz — a quadratic vanishing at both walls: u(x)=x(a−x)u(x)=x(a-x). It satisfies the essential conditions with no free parameters, so no minimization is needed.

Step 2. Kinetic numerator. With H^=−12 d2/dx2\hat H=-\tfrac12\,\mathrm{d}^2/\mathrm{d}x^2, integrate by parts to ⟨u∣H^∣u⟩=12∫0a(u′)2 dx\langle u|\hat H|u\rangle=\tfrac12\int_0^a (u')^2\,\mathrm{d}x. Here u′=a−2xu'=a-2x and ∫0a(a−2x)2 dx=a3/3\int_0^a (a-2x)^2\,\mathrm{d}x=a^3/3, so the numerator is a3/6a^3/6.

Step 3. Normalization denominator: ⟨u∣u⟩=∫0ax2(a−x)2 dx=a5/30\langle u|u\rangle=\int_0^a x^2(a-x)^2\,\mathrm{d}x = a^5/30, a standard beta-function integral a5B(3,3)=a5⋅4/120a^5 B(3,3)=a^5\cdot 4/120.

Step 4. Form the quotient: ERitz=a3/6a5/30=5a2E_{\mathrm{Ritz}}=\dfrac{a^3/6}{a^5/30}=\dfrac{5}{a^2}. The exact ground state is E1=π2/(2a2)≈4.9348/a2E_1=\pi^2/(2a^2)\approx 4.9348/a^2, so the estimate exceeds it by 5/4.9348−1≈1.3%5/4.9348-1\approx 1.3\% and lies above it, as the upper-bound theorem demands. E_Ritz = 5/a² ≥ 4.9348/a² = E₁, a 1.3% overestimate.

2 · Fundamental frequency of a vibrating string (Rayleigh's original method)

A uniform string of length LL, tension TT, and linear density ρ\rho is fixed at both ends. Estimate its fundamental angular frequency from a trial shape.

Step 1. For the wave equation the Rayleigh quotient is ω2=T∫0L(u′)2 dxρ∫0Lu2 dx\omega^2 = \dfrac{T\int_0^L (u')^2\,\mathrm{d}x}{\rho\int_0^L u^2\,\mathrm{d}x}, an upper bound on ω12\omega_1^2 for any admissible shape uu.

Step 2. Reuse the admissible parabola u=x(L−x)u=x(L-x), pinning both ends. The integrals are the ones already evaluated: ∫0L(u′)2=L3/3\int_0^L (u')^2=L^3/3 and ∫0Lu2=L5/30\int_0^L u^2=L^5/30.

Step 3. Hence ω2=Tρ⋅L3/3L5/30=10L2Tρ\omega^2=\dfrac{T}{\rho}\cdot\dfrac{L^3/3}{L^5/30}=\dfrac{10}{L^2}\dfrac{T}{\rho}, giving ωRitz=10LT/ρ≈3.162LT/ρ\omega_{\mathrm{Ritz}}=\dfrac{\sqrt{10}}{L}\sqrt{T/\rho}\approx\dfrac{3.162}{L}\sqrt{T/\rho}.

Step 4. The exact fundamental is ω1=πLT/ρ≈3.1416LT/ρ\omega_1=\dfrac{\pi}{L}\sqrt{T/\rho}\approx\dfrac{3.1416}{L}\sqrt{T/\rho}, so the estimate is high by only 0.65%0.65\%, again an upper bound — the same one-parameter shape that estimated a quantum energy now estimates a classical frequency. ω_Ritz = √10/L·√(T/ρ), just 0.65% above the exact π/L·√(T/ρ).

3 · Helium ground state by scaled nuclear charge (fully worked)

Two electrons orbit a nucleus of true charge 22. Estimate the ground-state energy using a product of hydrogen-like 1s orbitals whose effective charge ZZ is a single variational parameter. Atomic units.

Step 1. Trial state: ψ(r1,r2)=Z3π e−Z(r1+r2)\psi(\mathbf r_1,\mathbf r_2)=\dfrac{Z^3}{\pi}\,e^{-Z(r_1+r_2)}, a normalized product of 1s orbitals with adjustable ZZ. Screening should push ZZ below the bare 22.

Step 2. Energy expectation. Kinetic plus electron-nucleus pieces give Z2−4ZZ^2-4Z (kinetic Z2Z^2 from two electrons, attraction −2⋅2Z-2\cdot 2Z with true charge 22), and the electron-electron repulsion integral contributes +58Z+\tfrac58 Z, so E(Z)=Z2−4Z+58Z=Z2−278ZE(Z)=Z^2-4Z+\tfrac58 Z=Z^2-\tfrac{27}{8}Z.

Step 3. Minimize: dE/dZ=2Z−278=0⇒Z=2716=1.6875\mathrm{d}E/\mathrm{d}Z=2Z-\tfrac{27}{8}=0\Rightarrow Z=\tfrac{27}{16}=1.6875. Each electron screens about 0.310.31 of a charge from the other.

Step 4. Evaluate: Emin⁡=−(27/16)2=−729/256≈−2.848E_{\min}=-\big(27/16\big)^2=-729/256\approx-2.848 a.u. Experiment is −2.9037-2.9037 a.u.; the estimate lies above it, capturing about 98%98\% of the binding energy from one number. E_min = −(27/16)² ≈ −2.848 a.u. ≥ −2.9037 a.u. (experiment), 98% captured.

Physics of the portrait

The method carries two names because it was invented twice — once as a physicist's shortcut for bounding frequencies, once as a general theory of variational problems — and the join between them is one of the more poignant episodes in mathematical physics.

Origins · 1 minWalther Ritz and how this was discovered
WR
Walther Ritz
1878–1909 · the calculus of variations made computational

Walther Ritz was a Swiss theoretical physicist whose short life produced a method used by millions of computers every day. Born in Sion in 1878, he studied at Göttingen under Woldemar Voigt and was first known for the Rydberg-Ritz combination principle in spectroscopy. His lasting monument is the 1908–1909 work setting out a general procedure for the "problems of mathematical physics" that reduce to minimizing a functional: expand the unknown in a finite series of chosen functions, substitute into the energy integral, and minimize over the coefficients — the method now taught as Rayleigh-Ritz. He demonstrated it triumphantly on the vibrating clamped plate, reproducing the intricate nodal patterns of Chladni's sand figures that had defeated exact analysis for a century. Lord Rayleigh, who had used trial shapes to bound fundamental frequencies in his 1877 Theory of Sound, noted in 1911 that the essential variational idea was already his; historians credit Rayleigh with the bounding principle and Ritz with the systematic multi-parameter method, and the hyphenated name honours both. Ritz did not live to see the argument: gravely ill with tuberculosis, he died in Göttingen in July 1909, months after his landmark papers, at the age of 31. His finite-series idea, later fused with piecewise-polynomial trial functions by Richard Courant, grew into the finite element method — arguably the most widely used numerical technique in all of engineering.

History
1877
— Rayleigh's Theory of Sound estimates fundamental frequencies from assumed trial shapes
1908
— Ritz formulates the general method of minimizing functionals over finite trial families
1909
— Ritz solves the clamped-plate (Chladni figure) problem, then dies of tuberculosis at 31
1911
— Rayleigh publishes a note on the method's relation to his earlier bounding principle
1943
— Courant fuses Ritz's idea with piecewise trial functions, seeding the finite element method

Going further

Texts. Stone & Goldbart, Mathematics for Physics (2009), Ch. 1 (calculus of variations) · Arfken, Weber & Harris, Mathematical Methods for Physicists, 7th ed., Ch. 22 · Hassani, Mathematical Physics, 2nd ed., Ch. on variational methods · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., Ch. 22 · Gelfand & Fomin, Calculus of Variations (1963), Ch. 8 · Courant & Hilbert, Methods of Mathematical Physics, Vol. 1, Ch. VI. The key numerical checks across the worked examples are: (1) the square-well integrals ∫0a(a−2x)2 dx=a3/3\int_0^a(a-2x)^2\,\mathrm{d}x=a^3/3 and ∫0ax2(a−x)2 dx=a5/30\int_0^a x^2(a-x)^2\,\mathrm{d}x=a^5/30, giving ERitz=5/a2E_{\mathrm{Ritz}}=5/a^2 versus exact π2/(2a2)≈4.9348/a2\pi^2/(2a^2)\approx4.9348/a^2 (1.3% high); (2) the string frequency ω2=(10/L2)(T/ρ)\omega^2=(10/L^2)(T/\rho), i.e. 10/L≈3.162/L\sqrt{10}/L\approx3.162/L versus exact π/L≈3.1416/L\pi/L\approx3.1416/L (0.65% high); (3) the helium energy E(Z)=Z2−278ZE(Z)=Z^2-\tfrac{27}{8}Z, minimum at Z=27/16=1.6875Z=27/16=1.6875, Emin⁡=−(27/16)2≈−2.848E_{\min}=-(27/16)^2\approx-2.848 a.u. versus experiment −2.9037-2.9037 a.u.; (4) the upper-bound theorem λ1≤R[u]\lambda_1\le R[u] follows from expanding any trial function in the eigenbasis of L^\hat{L}, as shown in the derivation above.

Prerequisites. Functionals and Function Spaces · First Variation and Stationarity · Euler-Lagrange Equation · Natural and Essential Boundary Conditions. Leads to. Constrained Variation and Lagrange Multipliers · Isoperimetric Problems · Hamilton's Principle of Stationary Action.

Ask the tutor: Ask me to run a two-term Ritz calculation on the square well and watch the estimate drop monotonically toward the exact answer, always from above.

How is the Rayleigh-Ritz method different from just solving the Euler-Lagrange equation?

They are two routes to the same stationary point, taken from opposite directions. The Euler-Lagrange equation is the exact condition δJ=0\delta J=0 over the whole function space; it is a differential equation, and if you can solve it you have the exact extremal. Rayleigh-Ritz never forms that differential equation — it restricts the search to a finite trial family and imposes stationarity there, producing algebra instead. When the Euler-Lagrange equation is unsolvable in closed form, which is the usual situation for real geometries and potentials, the Ritz route still delivers a controlled numerical answer, and as the trial space is completed the two solutions coincide.

Why is the estimate always an upper bound rather than sometimes too high and sometimes too low?

Because for a self-adjoint operator the Rayleigh quotient of any trial function is a genuine weighted average of the true eigenvalues, with non-negative weights given by the squared expansion coefficients. A weighted average can never be smaller than the smallest number entering it, so the quotient can never fall below the lowest eigenvalue and the error has a fixed sign. This one-sidedness is what makes the method a bound rather than merely an approximation: even a poor trial function gives a rigorous ceiling on the ground-state energy, and improving the trial space can only lower that ceiling.

Why can a crude one-parameter trial function give such an accurate energy?

Because the energy error is second order in the wavefunction error. If your trial function differs from the true ground state by a small first-order amount, the Rayleigh quotient differs from the true energy only at second order — the linear term vanishes precisely because you sit at a stationary point. This is why the quadratic square-well ansatz lands within 1.3% and one screening parameter captures 98% of helium's binding energy: the wavefunction can be visibly wrong in detail while the energy it predicts is remarkably close, which is what makes variational estimates so useful.

What is the overlap matrix S, and when is it just the identity?

The overlap matrix Sjk=⟨ϕj,ϕk⟩S_{jk}=\langle\phi_j,\phi_k\rangle records how non-orthogonal the trial functions are. For an orthonormal basis SS is the identity and the problem collapses to Hc=λcH\mathbf c=\lambda\mathbf c. But the physically natural choices — atomic orbitals on different atoms, or overlapping tent functions — are not orthogonal, so SS has off-diagonal entries and you solve the generalized problem Hc=λScH\mathbf c=\lambda S\mathbf c. It is the "mass matrix" of mechanics and the "overlap integrals" of quantum chemistry, and keeping it prevents the double-counting a non-orthogonal basis would introduce.

Does the method give excited states as well as the ground state?

Yes, through the higher roots of the secular equation. Solving det⁡(H−λS)=0\det(H-\lambda S)=0 for an NN-dimensional trial space returns NN Ritz values, and the Hylleraas-Undheim-MacDonald theorem guarantees that the mm-th Ritz value is an upper bound to the mm-th true eigenvalue, all of them decreasing monotonically as the basis grows, with orthogonality to the lower states enforced automatically by diagonalizing the full matrix. The catch, flagged in the warning above, is that this clean interlacing holds only with the full self-adjoint matrix structure; a single excited-state estimate computed ad hoc is not automatically a bound.

How does Rayleigh-Ritz become the finite element method?

By choosing the trial functions to be local instead of global. In the classical method the ϕk\phi_k are smooth functions spanning the whole domain; in the finite element method they are little "tent" functions, each nonzero only on a few cells of a mesh. Substituting these into the same energy functional produces the same matrices HH and SS — now the stiffness and mass matrices — except sparse, because distant tent functions do not overlap. That sparsity makes enormous problems tractable, and the variational origin guarantees stability and energy-bounding properties. Courant's 1943 paper is the recognized bridge between the two.

Before this

Where this leads