Constrained Variation and Lagrange Multipliers
Ordinary calculus already knows how to extremize under a side condition: to make stationary on the surface you do not solve but , because the constraint has forbidden some directions of motion. The calculus of variations meets exactly this situation in infinite dimensions. We want a function that makes a functional stationary, but the admissible are fenced in by extra requirements: a fixed length, a fixed area, a normalization, a surface the curve must lie on. Setting over all now gives the wrong answer, because the constraint correlates the variations — they are no longer free to be cancelled one point at a time. The cure is the same idea promoted to function space, and two structurally different constraints appear. An isoperimetric (integral) constraint pins one global number, so a single constant buys back the lost degree of freedom. A holonomic (pointwise) constraint must hold at every — a continuum of constraints — so its multiplier becomes a whole function . Either way the recipe is identical: adjoin the constraint to the functional, extremize freely, and re-impose the constraint to fix the multiplier. What makes the method worth mastering is that the multiplier is almost never mere bookkeeping. It comes out as the tension in a hanging chain, the radius of the optimal circle, the energy eigenvalue of a wave problem, the inverse temperature of a thermal distribution, the reaction on a bead sliding on a wire — one construction quietly underwriting the catenary, the isoperimetric theorem, geodesics, Sturm–Liouville theory, and the constraint forces of Lagrangian mechanics.
- A constrained variational problem makes a functional stationary subject to side conditions — either integral (isoperimetric) constraints or pointwise (holonomic) constraints .
- The method adjoins each constraint to the functional with an undetermined multiplier, turning a constrained problem into free stationarity of the augmented functional .
- An integral constraint costs one constant ; a pointwise constraint holding at every costs a multiplier function determined alongside .
- The multipliers are extra unknowns, fixed by re-imposing the constraints — and their values usually are the physics: tension, reaction, chemical potential, eigenvalue.
- Geometrically the gradient of must lie in the span of the constraint gradients at the extremum, promoting from to function space.
- Classic cases: the hanging chain (catenary), the isoperimetric problem (the circle), geodesics on surfaces, and the eigenvalue problems of Sturm–Liouville theory.
- Key idea: adjoin each constraint to the functional with a multiplier — a constant for an integral constraint, a function λ(x) for a pointwise one — then extremize freely; the multipliers are extra unknowns fixed by re-imposing the constraints.
Adjoin each constraint to the functional with a multiplier — a constant for an integral constraint, a function for a pointwise one — then extremize freely; the multipliers are extra unknowns fixed by re-imposing the constraints.
Where this lives today
The augmented-functional idea has quietly become a load-bearing beam of computational science. In machine learning, the support-vector machine is literally a constrained variational problem: maximize a margin subject to classification inequalities, solved through its Lagrangian dual, where the nonzero multipliers pick out the "support vectors," and its Karush–Kuhn–Tucker conditions are the inequality-constraint generalization of equation (1). In optimal control and spacecraft trajectory design, Pontryagin's maximum principle introduces multiplier functions called costates, and a modern low-thrust interplanetary transfer is found by numerically solving exactly the pointwise-multiplier system of equation (5). In electronic-structure theory, density-functional calculations minimize an energy functional at fixed particle number, and the enforcing multiplier is the chemical potential that sets whether electrons flow between two materials in contact. An open frontier is enforcing hard physical constraints — conservation laws, positivity, incompressibility — inside neural-network surrogates for physics, where naïvely learned models drift off the constraint surface exactly as a bare would.
The physical picture
Imagine every admissible function as a point, and the whole space of functions as a landscape whose height is . Unconstrained, you roll to the bottom straight downhill, along . But a constraint carves a curved surface out of that landscape and forbids you to leave it — you can only slide along it. You stop not where the ground is flat, but where it is flat along the surface: the downhill pull of has been used up in directions you are not allowed to take, and whatever remains of points straight out of the surface, parallel to its gradient . The multiplier is nothing but the ratio between those two parallel vectors.
Why the two constraint types cost different things follows from the same picture. An integral constraint fixes one global number — a length, an area, a normalization — so it removes exactly one degree of freedom, and one constant restores it. A pointwise constraint is far more demanding: holding separately at every , it is really an infinite family of constraints stacked along the interval, each point needing its own multiplier, which assemble into a field . Operationally the multiplier lets you pretend the variations are free: you overcount by one degree of freedom, then spend the multiplier to annihilate the correlated piece of , and the fundamental lemma applies to what is left. The payoff is that this forced-in multiplier turns out to be the quantity you most wanted to know — as the isoperimetric problem shows in one hard number.
The core equations
The starting point is finite-dimensional, and it is worth stating cleanly because the whole method is its infinite-dimensional echo. To extremize on the surface , the gradient of cannot have any component tangent to the surface, so it must be a combination of the constraint normals.
where: — the function being extremized; — the constraint functions, ; — the undetermined multipliers; — a point in . Read it as: at the optimum the objective pushes purely along the constraints' normals, and the record how hard. The variational problem replaces by a functional and by a function. The isoperimetric setup fixes one integral quantity while extremizing another.
where: — the functional to extremize; — the integral constraint functional; — its fixed prescribed value; — the two integrands; — the unknown function with fixed endpoints. Read it as: one number, , is frozen while the whole shape of is otherwise free. Adjoining with a single constant produces an ordinary Euler–Lagrange equation for the augmented integrand — the central result for integral constraints.
where: — the augmented integrand ; — the single constant multiplier. Read it as: solve the ordinary Euler–Lagrange equation, but for instead of ; the constant rides along as an unknown. A pointwise constraint is a different animal. Requiring at every demands a multiplier that can vary with .
where: — the constraint required at every ; — the multiplier function; — several dependent functions. Read it as: enforced pointwise, the constraint's price is a function, not a number. Varying the several then gives an augmented Euler–Lagrange system whose extra term is a generalized constraint force.
where: — runs over the dependent functions; — the generalized force that keeps the solution on the constraint. Read it as: the ordinary equations of motion plus a force normal to the constraint, of strength . The same machinery converts a ratio of integrals into an eigenvalue problem. Extremizing the numerator at fixed denominator turns the Rayleigh quotient into a Sturm–Liouville equation with the multiplier as eigenvalue.
where: — the Sturm–Liouville coefficient functions with weight ; — the multiplier, now identified as the eigenvalue; — the normalization that is being held fixed. Read it as: normalization is the constraint, and its multiplier is the energy. Every case above is one line of a single master recipe: vary the augmented functional freely, then let the constraint pin the multiplier.
where: — the augmented functional; — the constraint that closes the system. Read it as: the multiplier is the one extra unknown that matches the one extra equation, the constraint itself.
The goal is to prove that adjoining an integral constraint with a single constant is not a trick but a theorem: when a competing variation is forced to preserve , stationarity of is equivalent to the ordinary Euler–Lagrange equation for , with a genuine constant fixed by the constraint. The key move is a two-parameter family of variations, so one parameter can be spent enforcing the constraint while the other stays free.
Step 1. Perturb the extremal with two independent bump functions, , both vanishing at the endpoints, and expand to first order. This gives and , where , , and are the Euler–Lagrange expressions of . Why two parameters: a single bump cannot both stay on the constraint and probe an independent direction, so we need one to spend and one to keep.
Step 2. Enforce the constraint to first order, , which reads . This ties and together — they are no longer independent — which is precisely why over "all" variations would be wrong. Why it matters: the correlation between the variations is the whole difficulty; the constraint has removed one direction of freedom.
Step 3. Define (assuming , i.e. the constraint is not degenerate at the extremal). Substituting the constraint relation into gives . Stationarity for the now-free forces , i.e. . Why is a constant: is one fixed number for the extremal, independent of , which is exactly the constant multiplier promised in equation (3).
Step 4. Since is arbitrary, the fundamental lemma of the calculus of variations gives pointwise — the Euler–Lagrange equation for . The extremal is thus a one-parameter family in ; substituting it back into fixes the value of . Why re-imposing the constraint is mandatory: the augmented equation alone is underdetermined, and is the missing equation that closes the count. *Why this is consistent: specializing to , with no -integral recovers the finite-dimensional rule of equation (1).*
Go deeper · Derivation B · 2 minThe hanging chain and its tension
The goal is to show that a uniform flexible chain of fixed length hung between two supports takes a catenary shape , and — the point of the exercise — that the multiplier enforcing the length constraint sets the horizontal tension through . We minimize gravitational potential energy at fixed arclength, so the constraint is integral and the multiplier is a single constant.
Step 1. Write the energy and the constraint. With , the potential energy is , and the fixed length is . Why an integral constraint: the chain's total length is a single frozen number, so exactly one constant multiplier is called for.
Step 2. Adjoin the length with a constant : the augmented integrand is . Absorbing by setting gives the cleaner . Why shift : the multiplier merely relocates the height origin, which already hints that it carries the units of a length.
Step 3. Because has no explicit , the Beltrami identity applies. Computing it gives , a first-order equation. Why Beltrami: an -independent integrand always yields this first integral, dropping the order and sparing us the second-order Euler–Lagrange equation.
Step 4. Rearrange to and integrate; the left side is an inverse hyperbolic cosine, so . The three constants are set by the two endpoints and the length . Why this is the catenary: the hyperbolic cosine is the unique shape whose slope grows in step with the accumulated weight below it.
Step 5. Read off the physics. A force balance on the chain gives the horizontal tension , so the multiplier — hidden inside — is the tension. Raising (pulling the ends harder) increases and flattens the curve, exactly as a tightened clothesline sags less. Why this is the payoff: the constant we were forced to introduce is the single most physical quantity in the problem. *Why this is the standard result: the procedure yields the catenary with , confirming that the multiplier encodes the horizontal tension.*
Go deeper · Derivation C · 1 minGeodesics and the pointwise multiplier
The goal is to derive the equation of a shortest path constrained to a surface , and to see the jump from a constant multiplier to a multiplier function: because the curve must stay on the surface at every point, the multiplier becomes , and the resulting equation says the path curves only as much as the surface forces it to. We minimize arclength subject to a pointwise (holonomic) constraint.
Step 1. Write the length and the constraint. The length is , and the surface condition must hold for all along the curve. Why a multiplier function: an equation that must hold at every parameter value is a continuum of constraints, so its price is a function , not a constant.
Step 2. Adjoin the constraint pointwise: . Applying equation (5) with produces one Euler–Lagrange equation per coordinate, each carrying a term. Why this term is a force: it is exactly the generalized constraint force that pushes the curve back onto the surface.
Step 3. Choose the arclength parameter so that ; the kinetic-like term then reduces to the second derivative and the system collapses to . Why arclength simplifies everything: it removes the square-root normalization and leaves a clean statement about curvature.
Step 4. Interpret it geometrically. The vector is the curve's acceleration, and is the surface normal, so the equation says the path accelerates only along the normal — it never bends within the surface. On a sphere this singles out the great circles, and measures the normal curvature the surface imposes. Why this is a geodesic: a curve that bends only as forced by its surface is the straightest possible path confined to it. *Why this is correct: on the unit sphere the solution is a great circle, and equals the normal curvature the sphere imposes on the path.*
Limiting cases
The augmented machinery collapses onto familiar unconstrained and finite-dimensional results in each limit.
| Case | Result | Meaning |
|---|---|---|
| No constraint | With or absent, and the ordinary Euler–Lagrange equation is recovered. | |
| Finite-dimensional | When the "functional" depends on finitely many variables it is an ordinary function, and the method is calculus Lagrange multipliers. | |
| Pointwise vs integral | A continuum of constraints needs a multiplier field; one global constraint needs a single constant. | |
| Degenerate constraint | If the constraint is stationary at the candidate (an abnormal extremal), the rule may fail and itself must be adjoined with its own multiplier. |
Worked examples
1 · Maximum-entropy dice: the multiplier is an inverse temperature
A six-sided die is loaded so that its long-run mean is instead of the unbiased . Of all distributions with that mean, which is the least presumptuous — the one of maximum entropy — and what does the constraint's Lagrange multiplier turn out to be?
Step 1. Set up the constrained extremum. Maximize the Gibbs entropy subject to two constraints: normalization and the mean . Two constraints means two multipliers, for normalization and for the mean.
Step 2. Extremize the augmented function. Setting gives , hence with absorbing the normalization multiplier. This is the Boltzmann form — an exponential in the constrained quantity, with the multiplier on it.
Step 3. Fix by re-imposing the constraint. Requiring is one transcendental equation for ; solving it numerically gives (equivalently ). The multiplier is negative because we forced the mean above the unbiased value, tilting weight toward the high faces — a formal negative temperature.
Step 4. Read off the distribution and check it. The probabilities are ; they sum to , give by construction, and yield entropy nats — below the unconstrained maximum nats, as it must be once a constraint bites. The multiplier β is exactly the inverse temperature of statistical mechanics: had the constraint been energy, and would be the Boltzmann distribution itself.
2 · Rayleigh–Ritz: the multiplier is an energy eigenvalue
Estimate the ground-state energy of a particle of mass in an infinite square well of width (potential zero on , infinite outside) by extremizing subject to normalization, using the simple trial function .
Step 1. Frame it as a constrained variation. Minimize subject to . Equation (6) tells us the multiplier on the normalization is the energy eigenvalue: the stationary value of the Rayleigh quotient is an upper bound on the true ground-state energy.
Step 2. Form the Rayleigh quotient with the trial function. With , integrate by parts to get . The trial vanishes at both walls, so it is admissible.
Step 3. Evaluate the two integrals. With , the numerator is , and the denominator is . Their ratio is , so .
Step 4. Compare with the exact answer. The true ground state is . The estimate sits just 1.32 % above it — and above, never below, because the multiplier (the stationary Rayleigh quotient) is a rigorous upper bound on the lowest eigenvalue. A crude parabola pins the ground-state energy to better than 2 % in one line — the whole engine of the Rayleigh–Ritz method.
Physics of the portrait
Constrained variation is where geometry, mechanics, and probability meet, and one name presides over all three: the man who turned his predecessors' ad-hoc constraint tricks into a single systematic calculus.
Origins · 1 minJoseph-Louis Lagrange and how this was discovered
Born Giuseppe Lodovico Lagrangia in Turin, Lagrange announced himself at nineteen with a letter to Euler in 1755 that recast the young calculus of variations in purely analytic form — the -operator and systematic treatment of variations that still bear his imprint. Euler, who had built the subject on delicate geometric arguments, was so taken with the cleaner method that he held back his own work so the newcomer could publish first. Over the next decades Lagrange made the multiplier his signature tool. In the Mécanique analytique of 1788 — a book he boasted held not a single diagram — he showed that all of mechanics flows from a variational principle, and that constraints (a bead on a wire, a rigid rod, a rolling contact) need not be solved away by clever coordinates but can be adjoined to the action with undetermined multipliers whose values are the constraint forces themselves. This is the origin of the phrase "Lagrange's undetermined multipliers." Stripped to finite dimensions it is the rule of multivariable calculus; promoted back to function space it is the augmented Euler–Lagrange equation of this article. He spent his last years in Paris presiding over the commission that designed the metric system, and lent his name to the equilibrium points of the three-body problem and the remainder form in Taylor's theorem.
Going further
Texts. Stone & Goldbart, Mathematics for Physics, ch. 1 (Calculus of Variations) · Arfken & Weber, Mathematical Methods for Physicists, 7th ed., ch. 22 · Riley, Hobson & Bence, Mathematical Methods for Physics and Engineering, 3rd ed., ch. 22 · Gelfand & Fomin, Calculus of Variations, ch. 1–2 (the cleanest proof of the isoperimetric rule) · Lanczos, The Variational Principles of Mechanics, ch. II (multipliers as constraint forces) · Hassani, Mathematical Physics, ch. on variational methods. The multiplier theorem (Derivation 1) uses a two-parameter argument; specializing it recovers of equation (1). The catenary is with . The isoperimetric figure uses m, m² for m, saturating . Worked example 1 (maximum-entropy dice, mean ) gives , , nats ; the identification is textbook MaxEnt. Worked example 2 (Rayleigh–Ritz, ) gives versus exact , a 1.32 % upper bound.
Prerequisites. First Variation and Stationarity · Euler–Lagrange Equation · Fundamental Lemma of the Calculus of Variations · Functionals and Function Spaces. Leads to. Isoperimetric Problems · Geodesics as Variational Problems · Lagrangian Mechanics · Hamilton's Principle of Stationary Action.
Ask the tutor: Ask me to work any constrained problem end to end — pick the catenary, the isoperimetric circle, a geodesic, or a Rayleigh–Ritz eigenvalue, and we will build the augmented functional, extremize, and pin down exactly what its multiplier means.
Why can I get away with treating δy as free once I add the multiplier?
Because the multiplier is chosen to cancel exactly the correlated part of the variation. On the constraint surface the variations at different points are linked — you cannot wiggle freely without violating . Derivation 1 shows that adjoining and setting removes that link: the value makes the coefficient of the dependent variation vanish, leaving a genuinely independent variation to which the fundamental lemma applies. So "treating as free" is legitimate precisely because the multiplier has absorbed the constraint's correlation.
When is the multiplier a constant and when is it a function?
It depends on how many constraints you really have. An integral (isoperimetric) constraint such as fixed length or fixed normalization is a single equation about the whole curve, so it removes one degree of freedom and is bought back with one constant . A holonomic (pointwise) constraint such as "the curve lies on this surface" must hold separately at every point of the interval — infinitely many independent conditions — so it requires an independent multiplier at each point, which assembles into a function . A quick test: if you can write the constraint as " number", it is one constant; if it is " for all ", it is a function.
Is the multiplier physically meaningful or just a bookkeeping device?
Almost always meaningful. The reason the method is beloved in physics is that the multiplier you are forced to introduce turns out to be the quantity you most wanted: the horizontal tension in the catenary, the radius of the optimal circle in the isoperimetric problem, the eigenvalue (energy) in Sturm–Liouville and Schrödinger problems, the inverse temperature or chemical potential in statistical mechanics, the reaction force in constrained Lagrangian mechanics. If you ever find yourself discarding a multiplier as clutter, stop and ask what it measures — it is usually the answer.
How does this reduce to the ∇f = λ∇g I learned in multivariable calculus?
Directly. If the "functional" depends on only finitely many variables, , with constraints , there is no integral and no Euler–Lagrange derivative — the augmented condition is just , equation (1). The variational method is the same statement lifted to infinite dimensions, where the gradient becomes the Euler–Lagrange expression and the finite sum of multipliers can become a multiplier function.
What is the difference between a holonomic and an isoperimetric constraint?
An isoperimetric constraint is integral: it fixes the value of a functional, like the total length or the normalization . It constrains a global number and costs one constant multiplier. A holonomic constraint is pointwise and algebraic: a relation the solution must satisfy at every point, like "the bead stays on the wire" — an identity holding everywhere, which costs a multiplier function. The names are historical: "isoperimetric" from the original fixed-perimeter problem, and "holonomic" (from Hertz) for constraints expressible as integrable, position-only relations.
Can the multiplier method ever fail?
Yes, in the degenerate or "abnormal" case. Derivation 1 assumed — that the constraint actually responds to variation at the candidate curve. If instead the constraint is itself stationary there, for all admissible variations, the ratio is undefined and the simple rule breaks down. The fix is the symmetric statement with the two multipliers not both zero, allowing where the objective plays no role. Such extremals are rare in physics, but they are why careful texts state the rule with this extra generality.