advanced29 min studyLesson 342 in Mathematics

Euler–Lagrange equations and boundary terms

Derive an interior differential equation without losing the endpoint information carried by integration by parts.

On this page

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.

δJ[u](h)=∫ab(Fu−ddxFv)h dx+[Fvh]ab,Fu−ddxFv=0\delta J[u](h)=\int_a^b\left(F_u-\frac{d}{dx}F_v\right)h\,dx+[F_vh]_a^b,\qquad F_u-\frac{d}{dx}F_v=0
The differential equation follows from stationarity against all interior test functions. The boundary term remains until the endpoint restrictions are applied.↔ Scroll wide equations horizontally.

Partial derivatives and total derivatives do different jobs

When computing FuF_u and FvF_v, 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 F=12v2−f(x)uF=\tfrac12v^2-f(x)u, the equation is −u′′=f-u''=f. 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 H1H^1, retain the weak form ∫u′h′=∫fh\int u'h'=\int fh for all homogeneous test functions. This requires no classical second derivative and is the natural starting point for finite-element approximations and existence arguments.

J[u]=∫01(12(u′)2−fu)dx,∫01u′h′ dx=∫01fh dx(h∈H01(0,1))J[u]=\int_0^1\left(\frac12(u')^2-fu\right)dx,\qquad \int_0^1u'h'\,dx=\int_0^1fh\,dx\quad(h\in H_0^1(0,1))
For square-integrable forcing and fixed endpoint traces, this is the weak stationarity equation. A sufficiently smooth solution satisfies the classical differential equation.↔ Scroll wide equations horizontally.

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.

A uniformly loaded one-dimensional membrane

Minimize J[u]=∫01[12(u′)2−2u]dxJ[u]=\int_0^1[\tfrac12(u')^2-2u]dx over H01(0,1)H_0^1(0,1). Find the candidate, its energy, and a global comparison proof.

  1. The Euler–Lagrange equation is u′′=−2u''=-2. Integrating and imposing the two zero traces gives u∗(x)=x(1−x)u_*(x)=x(1-x).

  2. Its derivative-square integral is 1/31/3, and its displacement integral is 1/61/6. Therefore J[u∗]=1/6−2/6=−1/6J[u_*]=1/6-2/6=-1/6.

  3. For every h∈H01h\in H_0^1, stationarity gives ∫(u∗′h′−2h)=0\int(u_*'h'-2h)=0. Expanding the objective yields J[u∗+h]−J[u∗]=12∫(h′)2≥0J[u_*+h]-J[u_*]=\tfrac12\int(h')^2\ge0, with equality only for h=0h=0.

The result

The parabola x(1 − x) is the unique global minimizer in the stated Sobolev class, with energy −1/6.

Explore the model

Interactive lab

Interactive lab · function

Inspect the candidate through its quadratic part

Reset and set both a=−1,x=0.5a=-1,x=0.5. Predict the quadratic component −x2=−0.25-x^2=-0.25 and slope −1-1. Add the linear component xx on paper: the loaded solution becomes x−x2=0.25x-x^2=0.25 with slope zero there. Reset and set both a=−1,x=1a=-1,x=1; adding xx makes the endpoint zero. The instrument plots only ax2ax^2, so the added linear term and boundary-value solution must be reconstructed explicitly.

Inspect the candidate through its quadratic partThis 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. Current readings: y at chosen x: 0.608; Tangent slope · 2ax: 1.35; Signed area · ax³/3: 0.182. All parameters are adjustable with the labeled controls below.−2.4−1.201.22.4−9−4.504.59xy(x, ax²)
y = ax²TangentSigned integral
y at chosen x
0.608
Tangent slope · 2ax
1.35
Signed area · ax³/3
0.182
t = 0 s

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.

Check your understanding

Why does the boundary term vanish for fixed-endpoint variations?

Try it yourself

For J[u]=12∫01[(u′)2+u2]dxJ[u]=\tfrac12\int_0^1[(u')^2+u^2]dx with u(0)=0,u(1)=1u(0)=0,u(1)=1, verify the candidate u∗(x)=sinh⁡(x)/sinh⁡(1)u_*(x)=\sinh(x)/\sinh(1) 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 u∗′′=u∗u_*''=u_*. For every zero-trace perturbation, ∫(u∗′h′+u∗h)=0\int(u_*'h'+u_*h)=0. Hence J[u∗+h]−J[u∗]=12∫[(h′)2+h2]dxJ[u_*+h]-J[u_*]=\tfrac12\int[(h')^2+h^2]dx, strictly positive for every nonzero h∈H01h\in H_0^1. This proves unique global minimality; the equation alone would only establish stationarity.

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.