4.10.16 · D2Advanced Topics (Elite Level)

Visual walkthrough — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

2,579 words12 min readBack to topic

Step 1 — What are we actually optimising over?

WHAT. In ordinary calculus you slide a point along a line to find the lowest spot of a curve . In the calculus of variations you slide a whole curve around to find the "best" curve — the one that makes a number called a functional as small (or large) as possible.

A functional is a machine: feed it an entire function, it spits out one number. We write

  • — the whole curve you are choosing (the input to the machine).
  • — its slope at each point (how steep the curve is there).
  • — a little rule that scores the curve locally, at each .
  • — adds up all those local scores from to into one total.
  • — the single output number. The square brackets are a reminder: the input is a function, not a number.

WHY. Before touching constraints we must see the arena clearly: we are searching a space of curves, and each curve is a single point in that abstract space.

PICTURE. Look at the figure. Left: ordinary calculus slides a dot on a hill. Right: variations slide an entire curve; a dial on the side reads the value .

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 2 — What does a constraint look like in curve-space?

WHAT. We now add a second machine, a second functional,

  • — a second local scoring rule (for the catenary it will measure arc-length).
  • — a fixed number we are not allowed to change (the budget: e.g. the length of the chain).
  • — the rule "the total must equal exactly ."

WHY. We may not choose any curve — only curves whose -value is exactly . In the space of all curves, this equation carves out a constraint surface: the set of curves that spend exactly the budget .

PICTURE. Curve-space drawn as a plane. The grey shading is all curves; the cyan surface is the sliver where . We are only ever allowed to walk on the cyan surface. Free Euler–Lagrange would happily walk off it — that is the whole problem.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 3 — One knob is not enough

WHAT. To move a curve we nudge it. The standard nudge uses one bump function and one small number :

  • — the candidate curve we are testing (the "centre").
  • — a chosen wiggle, forced to be at both ends () so the endpoints stay pinned.
  • — a dial: turn it and the wiggle grows or shrinks. At we are back at .

WHY. With one dial , both and become functions of that single number. But we have two demands: keep fixed and make stationary. One dial cannot serve two masters — turning it to keep generally leaves still changing. We are stuck.

PICTURE. A single slider drags the curve. The value (amber) drifts away from as soon as we move — we cannot both hold the budget and hunt for the best .

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 4 — Two knobs: one to obey the budget, one to hunt

WHAT. Use two independent bumps and two dials:

with both vanishing at the ends. Now the two machines collapse into two ordinary two-variable functions:

  • — the value of as an ordinary function of the two dial-settings.
  • — the value of , likewise. At we sit at .

WHY. With two dials we have exactly enough freedom: spend one degree of freedom keeping , and still have one left over to demand is stationary. Crucially, we have now shrunk an infinite-dimensional curve problem into an ordinary two-variable constrained-extremum problem — the kind finite-dimensional Lagrange multipliers already solve.

PICTURE. The plane. The amber curve is (the budget, obeyed). Along it, contour lines of (cyan) show where is bigger or smaller. We must find the point on the amber curve where stops changing.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 5 — The multiplier appears (gradients line up)

WHAT. From ordinary Lagrange multipliers: a point on the constraint curve makes stationary exactly when the two gradients are parallel:

  • — arrow pointing in the direction increases fastest (in the -plane).
  • — arrow pointing where the budget increases fastest; it is perpendicular to the amber constraint curve.
  • — one single number, the Lagrange multiplier: the ratio of the two gradients' lengths.

WHY. If had any component along the amber curve, we could slide that way and improve while staying on budget — not stationary yet. Stationarity means points purely across the curve, i.e. parallel to . That parallel condition is the birth of .

PICTURE. At the winning point the cyan arrow and amber arrow point the same way (one is the other). At a losing point they are misaligned — a red slide-arrow along the curve still improves .

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 6 — Turn the two conditions back into an integral

WHAT. Write out component by component. Because depends on only through , we differentiate under the integral sign:

Now integrate the piece by parts (the boundary terms die because ). Introduce right here the augmented integrand

so that combining collapses the two integrands and into the single , giving for :

  • — the derivative of the whole integral, not of alone; that is what "differentiate under the integral sign" means (justified by the box above).
  • — how the local score changes if the curve rises a bit; — how it changes if the slope changes.
  • — the Euler–Lagrange "bookkeeping" term left over from integration by parts.
  • — the augmented integrand; the whole bracket is exactly .
  • — our bump function, still riding along inside the integral.

WHY. Integration by parts is the tool that removes and leaves only multiplying everything — because only then can we invoke the lemma in Step 7. We use it precisely to trade a derivative-of-the-wiggle for a plain wiggle. And we name now, the instant the bracket appears, so nothing is used before it is defined. (The by-parts step also needs to be in so that exists — guaranteed by the assumption above.)

PICTURE. The by-parts move drawn as a see-saw: the derivative hops off and lands on , while the endpoint terms (shown in faded amber) vanish because the wiggle is pinned to zero at both posts.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 7 — The Fundamental Lemma snaps the bracket to zero

WHAT. We first make precise how one bump function is consumed by the budget. Staying on the constraint means . Since already, Taylor-expand about the origin:

Setting and keeping only first order (the terms are negligible for the infinitesimal variations that define stationarity) gives the first-order necessary condition for staying on budget:

This single equation ties to : pick freely and is forced. In bump-language we need so that can spend itself enforcing the budget.

Recall Why can we always find such an

? (non-degeneracy) Write evaluated at . The regular (normal) case is : the constraint-gradient does not vanish identically. Then on some subinterval, and by the same bump-construction used in the Fundamental Lemma we can build an supported there with . So a suitable exists exactly when the problem is regular. The failing case is the abnormal case handled separately in Step 9.

Now apply the lemma to the free direction . The Fundamental Lemma of the Calculus of Variations says: if for every smooth vanishing at the ends, then everywhere. With (the bracket named in Step 6), it must vanish:

  • — the augmented integrand introduced in Step 6: maximise-target minus times budget-cost.
  • The boxed equation is just the ordinary Euler–Lagrange equation, run on instead of .
  • is exactly the number that made the two directions' contributions cancel, i.e. the multiplier from the linearised constraint above.

WHY. The linearisation shows precisely why we needed two bumps: one to satisfy (via ), one to remain free for the lemma. And an integral that is zero against every free wiggle can only mean the multiplied function is zero — otherwise pick a bump concentrated where it is positive and the integral would be positive.

PICTURE. Suppose the bracket were positive on some interval (amber hump). Choose a wiggle (cyan) that is a bump exactly there and zero elsewhere. Then — a contradiction. So must be flat zero.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 8 — Counting unknowns (why nothing is left dangling)

WHAT. The boxed ODE is second order, so its general solution carries two constants , plus the still-unknown . That is three unknowns. We have exactly three conditions:

  • The two boundary conditions pin the endpoints.
  • The constraint equation is what finally determines — the price of the budget.

WHY. A common fear is that is a loose end. It is not: the budget equation is one extra equation, and it is exactly the one that fixes . Books that "set to anything" quietly break this count — see the parent's Mistake box.

PICTURE. A ledger: three unknown columns (, , ) balanced against three condition rows (two posts + one budget). Every unknown has a home.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

Step 9 — Edge and degenerate cases

WHAT & WHY. The rule quietly assumes a few things; here is what happens when they fail.

  • (constraint is slack / non-binding). Then and we recover the free Euler–Lagrange solution. This happens when the unconstrained optimum already satisfies by luck — the budget wasn't fighting us. By the shadow-price reading , a zero price means "one more unit of budget buys no improvement."
  • The abnormal case (, i.e. ). If is itself a stationary point of (its constraint-gradient vanishes identically, so no from Step 7 exists), the gradients cannot be made parallel by any ; the tidy rule needs a more general form. Rare, but real.
  • Pointwise vs integral constraint. If the constraint is holonomic, for every (not just its integral), one constant is far too few — you need a whole function , one price per point. Isoperimetric (integral) constraints get one constant ; this is the single most common confusion.

PICTURE. Three mini-panels: (a) the constraint contour passes right through the free optimum → ; (b) , arrows can't align (abnormal); (c) integral budget (one price) vs pointwise budget (a price at every ).

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)

The one-picture summary

Everything above, compressed: we ride the amber budget-surface ; among curves on it we seek where the cyan value-contours stop changing; that happens where the gradients align, which births ; feeding into Euler–Lagrange and closing with the budget equation delivers the extremal — a catenary for the hanging chain, a circular arc for Dido's fixed-perimeter problem.

Figure — Isoperimetric problems — constraints (Lagrange multipliers in variational sense)
Recall Feynman retelling of the whole walkthrough

Picture yourself choosing not a number but a whole curve — a shape. A machine reads the shape and gives you a score ; you want the best score. But there's a rule: a second machine reading the same shape must always read exactly (say, the shape must use exactly this much string). So you're only allowed to walk on the "budget surface" where the second machine reads .

To move a shape you wiggle it. One wiggle-dial isn't enough — turning it to keep the string-length right leaves you no freedom to hunt for the best score. So you use two dials. Now both machines are just ordinary two-number functions, and the classic Lagrange-multiplier idea kicks in: at the best allowed shape, the "improve- arrow" points straight across the budget line, parallel to the "increase- arrow." Their ratio is one number, .

Translate that arrow-alignment back into the integral, integrate by parts to strip the wiggle's slope, and use the fact that "zero against every wiggle means zero everywhere" to get a clean equation: run Euler–Lagrange on . You end with three unknowns and three conditions (two endpoints + the budget), so nothing dangles. Fixed string, biggest field → a circle. That's the whole story.


Quick self-checks:

Why won't one wiggle-dial work?
One dial can't both keep and leave freedom to make stationary — it over-determines the search.
What geometric fact births ?
On the budget surface, stationarity forces parallel to ; their length-ratio is .
Why integrate by parts in Step 6?
To turn into , so the Fundamental Lemma can act on a plain wiggle and force the bracket to zero.
What determines numerically?
The constraint equation — the third condition alongside the two boundary conditions.
What does mean?
The constraint is slack; the free optimum already met the budget, and one more unit of budget buys no improvement.