JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Constraints & Several Variables

What is the largest area a fixed length of fence can enclose, and what shape does a hanging chain take? These are constrained variational problems — and the Euler-Lagrange machinery stretches gracefully to handle constraints, several unknown functions at once, and even boundaries you are free to slide.

A fixed length, a free shape

The earlier guides in this rung optimized a functional J[y] = integral of L(x, y, y') dx over all curves with fixed endpoints, and the condition for a stationary curve was the Euler-Lagrange equation. But the most famous problem of the whole subject does not fit that frame cleanly. Legend tells of Queen Dido, who was promised as much land as she could enclose with a single oxhide cut into a thin strip: given a string of fixed length P, what closed curve encloses the greatest area? This is the original isoperimetric problem (iso = equal, perimeter), and the catch is that we are no longer free to vary the curve any way we like — every competing curve must keep the SAME perimeter P. We must extremize one functional, the area, while a second functional, the length, is held fixed.

If this smells like the constrained optimization you met in finite dimensions, your nose is exactly right. Recall the finite-dimensional Lagrange multiplier: to extremize f(x) subject to g(x) = c, you do not fight the constraint directly — you form f - lambda g and look for an unconstrained stationary point of that combination, letting the number lambda absorb the constraint. The calculus of variations inherits this idea wholesale. The unknowns are now whole functions instead of points, and the objective and constraint are integrals instead of ordinary functions, but the recipe survives the upgrade unchanged in spirit.

Lagrange multipliers for functionals

Here is the method in one clean sentence. To extremize J[y] = integral of L dx subject to a fixed-value constraint K[y] = integral of M dx = c, introduce a single constant lambda and instead extremize the combined functional J - lambda K = integral of (L - lambda M) dx, treating that as an ordinary unconstrained problem. This is the Lagrange multiplier for functionals. Concretely: write the modified integrand H = L - lambda M, run the ordinary Euler-Lagrange equation on H, and you get a differential equation containing the unknown number lambda. You then have one more equation than before, but also one more unknown — and the missing equation is exactly the constraint K[y] = c itself, which pins lambda down. Counting matches, and the system closes.

Isoperimetric / constrained variational problem

  extremize   J[y] = integral_a^b  L(x, y, y') dx
  subject to  K[y] = integral_a^b  M(x, y, y') dx = c   (fixed)

Step 1   Form  H = L - lambda * M     (one unknown constant lambda)

Step 2   Euler-Lagrange on H:
         d/dx ( dH/dy' )  -  dH/dy  =  0

Step 3   Solve the ODE for y(x); the answer carries lambda along.

Step 4   Impose K[y] = c  to fix lambda  (and use boundary data for
         the integration constants).
The four-step recipe. The lone multiplier lambda is a number, not a function, because the constraint pins a single scalar (the perimeter, the volume, the area) to a fixed value.

Run this on Queen Dido's problem and the answer is the one your intuition has been whispering: among all closed curves of a given length, the circle encloses the greatest area. When you write area and length as integrals, form H, and apply Euler-Lagrange, the resulting equation says the curvature is constant everywhere — and a plane curve of constant curvature is precisely a circle. The multiplier lambda turns out to equal the radius. The same machinery, with the roles of the two functionals swapped, also proves the dual statement: among all curves enclosing a given area, the circle has the shortest perimeter. One method, settled by a single number.

The hanging chain, decided by a multiplier

The most physical isoperimetric problem is the catenary — the shape of a flexible chain of fixed length L hung between two posts. Nature settles it by a beautifully lazy principle: the chain droops into whatever shape puts its center of mass as LOW as possible, minimizing gravitational potential energy. That energy is proportional to integral of y ds = integral of y sqrt(1 + y'^2) dx, the height weighted along the arc. But the chain cannot stretch, so its total length integral of sqrt(1 + y'^2) dx = L is the fixed constraint. Lower the height, hold the length: an isoperimetric problem to the bone.

Form H = (y - lambda) sqrt(1 + y'^2) — the height integrand minus lambda times the length integrand. Because H has no explicit x in it, you may skip the full Euler-Lagrange equation and use the shortcut from an earlier guide, the Beltrami identity, which hands you a first integral immediately: H - y' (dH/dy') = constant. Working that through gives y - lambda = C cosh((x - x0)/C), the hyperbolic cosine. The chain hangs as a catenary, not the parabola so many people guess. The multiplier lambda has clean physical meaning here too: it merely sets the height of the reference level, the constant vertical shift, while the length constraint fixes the sag parameter C. The same shape, upturned, is the arch that stands in pure compression — which is why it appears in cathedral vaults and the Gateway Arch.

Several functions, several variables

Real problems rarely involve a single unknown curve y(x). A planet traces a path with several coordinates x(t), y(t), z(t); a vibrating system has many displacements at once. Suppose the integrand depends on several functions, L(t, y1, y2, ..., y1', y2', ...). The variational principle barely changes: you may wiggle each function independently, so each one must separately make the functional stationary. The result is ONE Euler-Lagrange equation per unknown function, d/dt(dL/dyk') - dL/dyk = 0 for every k, coupled together through the shared integrand. The single equation becomes a system of equations, one per degree of freedom — and these coupled equations are exactly the way Hamilton's principle reproduces Newton's laws for a whole mechanical system, one equation of motion per coordinate.

There is a second, genuinely different generalization: the unknown can be a function of several VARIABLES, like a height u(x, y) over a region. Then the functional is a double integral, J[u] = double integral of L(x, y, u, u_x, u_y) dx dy, where u_x and u_y are partial derivatives. Varying u and demanding stationarity now produces not an ordinary differential equation but a PARTIAL differential equation: d/dx(dL/du_x) + d/dy(dL/du_y) - dL/du = 0. The cleanest example is the soap film, the minimal surface spanning a wire loop: minimizing area gives Laplace's equation as a first approximation for gentle films, the same Laplace equation that governs steady heat and electrostatics — so a stretched membrane and a temperature field obey the same law, both being what nature does when it minimizes an energy.

When the endpoint is free to move

Every problem so far fixed both endpoints of the curve. But sometimes one end is free to slide. Imagine a wire bead that must start at a fixed post but may end anywhere along a vertical rail — where on the rail does the optimal path meet it? When we derived the Euler-Lagrange equation, the integration by parts spat out a boundary term, and we made it disappear by insisting the variation vanish at both ends (fixed endpoints leave no room to wiggle). With a free endpoint that escape route is gone: the variation does NOT vanish there, so the boundary term must vanish on its own. Setting it to zero gives a condition the solution must satisfy AT the free end, over and above the Euler-Lagrange equation in the interior.

That self-imposed condition is the natural boundary condition. For the standard integrand L(x, y, y'), it reads dL/dy' = 0 at the free end. These conditions are 'natural' because you do not impose them by hand from the physics of the boundary — the variational principle GENERATES them for free, as the price of leaving the endpoint loose. They are precisely the natural boundary conditions, and their physical readings are vivid: for a beam whose end is unsupported, the natural condition says the bending moment there is zero; for the soap film on an open edge, it says the film meets the edge at a right angle; for a heated rod with an exposed end, it encodes that no heat flux is prescribed there. A free end does not mean 'no condition' — it means a condition the mathematics chooses for you.