For a variation preserving both endpoint values and slopes, at the endpoints. The first variation is
Integrate the last term twice and the middle term once. All boundary terms vanish, giving
The fundamental lemma of the calculus of variations yields the higher-order Euler-Lagrange equation
For the present functional this becomes . Its general solution is . The left endpoint gives and . The right endpoint then gives
The coefficient determinant is , so , . The stationary function is .
For any admissible perturbation , exact quadratic expansion, followed by the stationarity equation and integration by parts, gives
Apply the supplied Poincare inequality first to , then to , whose endpoint values also vanish:
Thus for every admissible perturbation, proving a global maximum through the clamped second-variation inequality.
Let be the configuration smooth manifold, and let be a smooth Lagrangian on its tangent bundle. For a path with fixed endpoints, its action is
The principle of stationary action requires the first variation to vanish for every fixed-endpoint variation. In a coordinate chart take , with . Differentiation under the integral and integration by parts give
Repeated coordinate indices are summed. The endpoint term vanishes. Since compactly supported variations can be chosen independently in each coordinate, the fundamental lemma of the calculus of variations yields the Euler-Lagrange equations
Conversely these equations make the displayed first variation zero for every fixed-endpoint variation. Variations localized in coordinate charts establish the same assertion for paths on . Thus the Euler-Lagrange equations are exactly the stationary-path condition, not necessarily a condition for an action minimum.
Take a smooth variation with on the boundary. Assume enough differentiability for the following operations, for example a smooth bounded open set, , and a twice continuously differentiable integrand. Differentiation under the integral gives
By integration by parts, the boundary term vanishes and the first variation is
Stationarity for every such variation, including every compactly supported smooth one, and the fundamental lemma of the calculus of variations give the Euler-Lagrange equation
For the quadratic integrand, , , and . Thus
with the prescribed Dirichlet boundary condition. For real , a stationary function is also the unique minimizer, if it exists: for any nonzero admissible , the linear term vanishes and . This last positivity uses the zero boundary values; it also holds at .
The length of a curve is . Its arc length parameter is . Regularity gives , so the inverse function theorem gives a smooth inverse and has .
Reparametrize a length minimizer to constant speed on and use the energy functional . By Cauchy-Schwarz inequality, every competitor has , with equality for constant speed, so this parametrization also minimizes . For a fixed-endpoint variation with tangential vector field , differentiation and integration by parts give
The boundary term is zero. Arbitrary smooth tangential of compact interior support are realizable by the stated variation fact. Taking to be a nonnegative cutoff times proves . Hence a length minimizer is a geodesic after constant-speed reparametrization. The original parameter need not be affine: arbitrary varying-speed parametrizations preserve length but have nonzero covariant acceleration. This qualification is necessary for the literal wording.
For distinct nonantipodal on the punctured unit sphere, there is a unique shorter great circle arc, of length . A minimizing curve exists exactly when that shorter arc avoids the removed north pole. If it avoids the pole it attains the spherical lower bound. If it passes through the pole, arbitrarily small smooth detours have lengths tending to , but equality would force the unique shorter arc, which is unavailable. Thus the infimum is not attained; the longer great circle arc is not a substitute minimizer.
For antipodal in the punctured sphere, one can choose a great circle semicircle avoiding the north pole; it attains length . Thus every admissible antipodal pair has a minimizer. If identical endpoints are included despite the earlier distinctness stipulation, the infimum is zero, but no smooth regular curve attains it; only a nonregular constant curve does.
Write the admissible variation as , where at both ends. Differentiating the functional under the integral sign gives the first variation
After integration by parts, with the boundary term vanishing,
Thus the Euler-Lagrange equation is
A second differentiation gives the second variation
Take a variation with . Expanding the action gives
An integration by parts and the fixed endpoint conditions give the first variation
The fundamental lemma of the calculus of variations therefore yields the Euler-Lagrange equation
and the second variation is
Linearizing the equation of motion about gives
so the Jacobi equation is
When has no zero on ,
The total derivative integrates to zero because , hence
For the simple harmonic oscillator, the Jacobi equation is . Put and choose
If , then throughout , so is positive there. The preceding square identity proves that the classical path is a local minimum of the action whenever the elapsed time is less than half an oscillation period.
Let , where the variation satisfies . Differentiating the functional at gives its first variation
Using integration by parts and the fixed endpoint conditions,
If this vanishes for every admissible , the fundamental lemma of the calculus of variations gives the Euler-Lagrange equation
Write the action density as
Under a compactly supported variation ,
Integrating the first term by parts in time and the second in space, and discarding the boundary terms, gives
The principle of stationary action requires this to vanish for every . Since
division by yields the field Euler-Lagrange equation
This is the equation generated by the inflaton action in an expanding universe.
Take a variation , where the differentiable function obeys
because both and its first derivative have fixed endpoint values. The first variation of the functional is
Applying integration by parts once to the second term and twice to the third gives
The endpoint conditions on and make every boundary term zero. Since the remaining integral vanishes for every admissible variation, the fundamental lemma of the calculus of variations yields the higher-order Euler-Lagrange equation