Euler–Lagrange equations and boundary terms
Derive an interior differential equation without losing the endpoint information carried by integration by parts.
On this page
The question for today
What you’ll understand
- Derive the Euler–Lagrange equation from arbitrary interior variations.
- Track the boundary term before imposing endpoint constraints.
- Use a convex quadratic expansion to prove a candidate minimizes.
The first variation initially contains both a perturbation and its derivative. Integration by parts moves the derivative onto an energy coefficient and reveals a differential equation for the candidate shape. The discarded-looking endpoint term is equally informative: it vanishes only when the endpoint constraints make it vanish. A reliable derivation writes that term first and imposes the actual constraints afterward. This procedure produces an interior equation, a possible boundary condition, and a clear distinction between the necessary stationarity calculation and any subsequent proof of minimality.
Use test functions supported in the interior
Assume the integrand is twice continuously differentiable near the candidate graph, the candidate is twice continuously differentiable, and perturbations are continuously differentiable with fixed endpoint values. These classical hypotheses justify the chain rule and integration by parts on the compact interval. Start with compactly supported smooth perturbations, which vanish near both endpoints. If stationarity holds for all of them, the continuous coefficient multiplying the perturbation after integration by parts must vanish in the interior.
The fundamental lemma explains this last step. If a continuous residual were positive at some interior point, it would stay positive on a small interval. A nonnegative smooth perturbation supported there would make its integral against the residual positive, contradicting stationarity. Negative residuals are treated by changing the sign. Thus an integral identity for every localized perturbation becomes a pointwise differential equation. With less regular residuals, the corresponding statement is almost-everywhere or distributional, not automatically classical.
Partial derivatives and total derivatives do different jobs
When computing and , treat the position and slope arguments as independent variables. Only afterward substitute the candidate function and its derivative. The derivative with respect to the interval coordinate is then a total derivative along that candidate, so it can involve the second derivative of the function. Mixing these two operations can omit terms or incorrectly differentiate a coefficient twice. Writing the integrand with a separate slope symbol is a simple way to keep the operations distinct.
For , the equation is . The negative sign reflects integration by parts, and can be checked by testing a positive load between zero endpoints: the minimizing displacement is positive and concave downward. If the function is only in , retain the weak form for all homogeneous test functions. This requires no classical second derivative and is the natural starting point for finite-element approximations and existence arguments.
Prove minimality separately
An Euler–Lagrange solution need not minimize a nonconvex functional. For the derivative-energy functional with a linear load, however, an exact expansion around a stationary candidate proves a stronger conclusion. Every competitor is the candidate plus a homogeneous perturbation. The linear term vanishes by weak stationarity, leaving one half the squared derivative norm. This quantity is nonnegative and is zero only for a constant perturbation, which the zero endpoint traces force to be zero. The stationary candidate is therefore the unique global minimizer.
Notice the order of the reasoning: solve or identify a candidate, verify the weak equation, then compare the full objective for arbitrary competitors. If instead you only check one convenient family of trial functions, your result proves optimality inside that family. General existence can be established even without an explicit formula, but requires compactness and lower semicontinuity rather than a claim that a differential equation ought to have a solution. These distinctions become important for nonlinear energies, rough coefficients, and higher-dimensional problems.
Work it through
A uniformly loaded one-dimensional membrane
Minimize over . Find the candidate, its energy, and a global comparison proof.
The Euler–Lagrange equation is . Integrating and imposing the two zero traces gives .
Its derivative-square integral is , and its displacement integral is . Therefore .
For every , stationarity gives . Expanding the objective yields , with equality only for .
The parabola x(1 − x) is the unique global minimizer in the stated Sobolev class, with energy −1/6.
The living notebook
Explore the model
Interactive lab · function
Inspect the candidate through its quadratic part
Reset and set both . Predict the quadratic component and slope . Add the linear component on paper: the loaded solution becomes with slope zero there. Reset and set both ; adding makes the endpoint zero. The instrument plots only , so the added linear term and boundary-value solution must be reconstructed explicitly.
- y at chosen x
- 0.608
- Tangent slope · 2ax
- 1.35
- Signed area · ax³/3
- 0.182
This lab uses only y = ax². Playback traces the curve within the fixed integration interval from 0 to x; it does not estimate numerical error or change the chosen point. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forA differential equation and its boundary data jointly determine the candidate.
Pause & reason
Check your understanding
Your turn
Try it yourself
For with , verify the candidate and prove it is the unique minimizer.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Check u″ = u and the endpoints, then expand the objective around the candidate. Use integration by parts to eliminate the cross term.
Compare with the solution
The candidate has the required traces and satisfies . For every zero-trace perturbation, . Hence , strictly positive for every nonzero . This proves unique global minimality; the equation alone would only establish stationarity.
Keep the idea
Take it with you
- Arbitrary interior test functions turn the first variation into an equation.
- Keep boundary terms until the admissible endpoint motions are known.
- A separate full comparison or convexity argument establishes minimality.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.