Physics Library
 An open source physics library
Encyclopedia | Forums | Docs | Random  

[parent] Calculus of Variations: The Second Variation and the Legendre Condition

(Example)

Calculus of Variations: The Second Variation and the Legendre Condition

The Euler–Lagrange equation answers the first question in a variational problem:

Which admissible functions are stationary?

It does not by itself answer the second question:

Is a stationary function a minimum, a maximum, or neither?

The next layer of information is the second variation. It is the infinite-dimensional analogue of the Hessian quadratic form in multivariable calculus. For a fixed perturbation direction η, the functional is reduced to the ordinary scalar function

Φ η(𝜖) = J[y∗ + 𝜖η ].
(1)

At a stationary function y∗,

 ′
Φη(0) = 0.
(2)

The sign of

  ′′
Φ η(0)
(3)

then gives the first classification information in the direction η.

The most immediate pointwise consequence is the Legendre necessary condition. For a weak local minimum of a first-order functional, the integrand must satisfy

F--′′ ≥-0|
--yy------
(4)

along the minimizing extremal. This condition is necessary but, crucially, it is not sufficient. The distinction leads directly to the Jacobi equation and conjugate points in CV12. Standard treatments include [1, 2, 3, 4, 5, 6].

1 From the first variation to the second variation

Consider the fixed-endpoint functional

       ∫
         b        ′
J[y] =    F (x,y,y )dx,
        a
(5)

with admissible perturbations

y𝜖(x) = y∗(x) + 𝜖η (x),
(6)

where

η(a) = η(b) = 0.
(7)

Define

Φ η(𝜖) = J[y∗ + 𝜖η ].
(8)

The first variation is

             ′
δJ [y∗;η] = Φ η(0).
(9)

We now define the second variation by

|------------------|
|δ2J[y∗;η] = Φ′′(0) .
--------------η----
(10)

With this convention, the Taylor expansion is

                                𝜖2  2            2
J[y∗ + 𝜖η] = J [y ∗] + 𝜖δJ [y∗;η] + 2 δ J [y∗;η] + o(𝜖 ).
(11)

Some books define the “second variation” as the coefficient of 𝜖2 rather than the second derivative itself. That convention differs by a factor of 2. Throughout this series, δ2J means the actual second derivative with respect to 𝜖.

PIC

Figure. The second variation is the ordinary second derivative of the scalar slice Φη(𝜖) = J[y∗ + 𝜖η]. At a stationary function the linear term vanishes, so the quadratic term gives the first local classification information.

2 Deriving the second-variation formula

Assume F is C2 in (y,y′) near the candidate. Along the perturbed curve,

F =  F (x,y∗ + 𝜖η,y′∗ + 𝜖η′) .
(12)

Differentiate once with respect to 𝜖:

dF- = F η + F  ′η′.
d𝜖     y      y
(13)

Differentiate again. Since η and η′ do not depend on 𝜖,

d2F-
 d𝜖2 =              ′
(Fyyη + Fyy′η) η +               ′
(Fy′yη + Fy′y′η ) η′ (14)
= Fyyη2 + 2F yy′ηη′ + Fy′y′(η′)2, (15)

where equality of the mixed partial derivatives was used.

Evaluating at 𝜖 = 0 gives

|------------------------------------------------|
|           ∫  b(                           )    |
|δ2J[y∗;η] =     Fyyη2 + 2Fyy′ηη′ + Fy′y′(η′)2  dx .
--------------a----------------------------------
(16)

Every derivative of F in this expression is evaluated along the candidate extremal

(x,y∗(x),y′∗(x)).
(17)

The second variation is therefore a quadratic functional in the perturbation η.

3 The bilinear Hessian form

In finite dimensions, the Hessian is naturally bilinear. The same structure exists here. For two admissible directions η and ξ, define

                                   |
 2              ∂2                 |
δ J[y∗;η,ξ] = ------J[y∗ + 𝜖η + σ ξ]||    .
              ∂ 𝜖∂σ                𝜖=σ=0
(18)

A direct calculation gives

δ2J[y ∗; η,ξ] = ∫ ab[ Fyyηξ + Fyy′(ηξ′ + η′ξ) + Fy′y′η′ξ′]dx. (19)

The ordinary second variation is the diagonal case

δ2J[y∗;η] = δ2J[y∗;η,η].
(20)

This is the variational analogue of

vTHv
(21)

for a finite-dimensional Hessian matrix H.

4 Necessary sign condition at a local extremum

Suppose y∗ is a weak local minimum. Fix any admissible direction η. For sufficiently small 𝜖,

J[y∗ + 𝜖η ] ≥ J [y∗].
(22)

Equivalently,

Φ η(𝜖) ≥ Φη(0).
(23)

Thus the ordinary one-variable function Φη has a local minimum at 𝜖 = 0. Therefore

Φ′η(0) = 0
(24)

and

Φ ′η′(0) ≥ 0.
(25)

Hence every weak local minimum must satisfy

|---------------------------------------|
|δ2J[y∗;η] ≥ 0    for every admissible η.
-----------------------------------------
(26)

Likewise, a weak local maximum must satisfy

δ2J [y∗;η] ≤ 0
(27)

for every admissible direction.

This is necessary, not automatically sufficient.

5 Three possible scalar slices

Once δJ = 0, the second variation plays the same role as the second derivative in ordinary calculus. But a zero second variation can be inconclusive.

PIC

Figure. A positive quadratic term suggests minimum behavior along a direction, a negative term suggests maximum behavior, and a vanishing second variation can leave the decision to higher-order terms. The quartic slice +𝜖4 has a strict minimum even though its second derivative at the origin is zero.

6 Removing the mixed term

For fixed endpoint variations, the mixed term can be rewritten by integration by parts. Introduce

P =  Fyy,     Q = Fyy′,     R = Fy ′y′.
(28)

Then

       ∫ b(                     )
δ2J =      P η2 + 2Q ηη′ + R (η′)2 dx.
        a
(29)

Since

2ηη′ = (η2)′,
(30)

we have

∫ ab2Qηη′dx = ∫ abQ(η2)′dx (31)
= [   2]
 Qη ab −∫ abQ′η2 dx. (32)

Because η(a) = η(b) = 0, the boundary term vanishes. Thus, when the coefficients are smooth enough,

|---------------------------------------|
|           ∫ b(                   )    |
δ2J [y∗;η] =      A(x)η2 + R (x)(η′)2  dx |
-------------a---------------------------
(33)

with

|------------------|
|A = F   −  d-F  ′ ,    |R-=--F-′′|.
-------yy---dx--yy-|    -------yy--
(34)

This reduced quadratic functional is often called the accessory functional. It is the starting point for Jacobi’s theory in CV12.

7 The Legendre necessary condition

We can now derive a pointwise condition from the requirement that the second variation be nonnegative in every localized direction.

7.1 The theorem

Legendre necessary condition. Let

       ∫
         b         ′
J [y] =     F(x,y, y) dx
        a
(35)

with F ∈ C2 in a neighborhood of a weak local minimizing extremal y ∗. Then

|--------------′---------|
-Fy′y′(x,y∗(x),y∗(x))-≥-0-|
(36)

for every x ∈ [a,b].

For a weak local maximum, the inequality is reversed.

7.2 Proof by a localized perturbation

Suppose, for contradiction, that at some interior point x0,

R (x0 ) = Fy ′y′(x0,y∗,y′) < 0.
                     ∗
(37)

By continuity, there exist ρ > 0 and a small neighborhood of x0 in which

R (x) ≤ − ρ.
(38)

Choose a nonzero smooth bump ϕ ∈ Cc∞(−1, 1) and define the localized variation

|-----------(-------)-|
|             x − x0  |
|ηh(x) = h ϕ  ------- |.
----------------h------
(39)

Its support has width O(h), its amplitude is O(h), and

          (       )
η′(x) = ϕ ′ x-−-x0-  .
 h            h
(40)

This derivative does not shrink in amplitude as h → 0.

PIC

Figure. Legendre localization. The perturbation amplitude shrinks with h, but its derivative remains order one. Consequently the Fy′y′(η′)2 contribution is order h and dominates the lower-order amplitude and mixed terms as the support collapses.

Use the unreduced second-variation formula

      ∫
δ2J =    (P η2+  2Q η η′+  Rη ′2)dx.
             h       h h     h
(41)

Set

    x-−-x0-
s =   h   ,     dx = h ds.
(42)

The three contributions scale as

∫
      2          3
   P ηhdx =  O(h ),
(43)

∫
  2Q ηhη′h dx = O (h2),
(44)

while

∫                ∫
     ′2            1  ′  2
  R ηh dx ≤ − ρh     ϕ (s) ds.
                  − 1
(45)

The last term is strictly negative and of order h. Therefore, for sufficiently small h,

 2
δ J [y∗;ηh ] < 0.
(46)

This contradicts the necessary condition δ2J ≥ 0 for a weak local minimum. Hence

R (x) = Fy′y′ ≥ 0.
(47)

The endpoint values follow by continuity from the interior result. □

8 Why the Legendre condition is local

The proof explains the physics of the theorem. A very narrow perturbation can have tiny displacement but a finite slope perturbation. Therefore, if the integrand is locally concave in y′, a sufficiently localized ripple immediately lowers the functional.

The Legendre condition tests only this highest-gradient curvature:

Fy′y′.
(48)

It does not test the full competition between the η2 and (η′)2 terms over a finite interval. That missing global-in-x information is exactly why the Legendre condition is not sufficient.

9 The strengthened Legendre condition

The strengthened Legendre condition for a minimum is

|--------|
Fy ′y′ > 0|
----------
(49)

along the extremal, often strengthened further to a uniform bound

Fy′y′ ≥ r0 > 0.
(50)

For a maximum, the corresponding strengthened condition is

Fy′y′ < 0.
(51)

The strengthened condition is not necessary for every minimum. A minimizing functional can be degenerate and have Fy′y′ = 0 at some or all points. Its importance is that it supplies coercivity in the derivative term and becomes a key ingredient in stronger sufficient-condition theorems.

10 Example: positive quadratic energy

Consider

       1∫  L(          )
J[y] = --    y ′2 + ω2y2  dx,
       2  0
(52)

with

y (0) = y(L) = 0.
(53)

The zero function is stationary. Here

Fyy =  ω2,    Fyy ′ = 0,    Fy′y′ = 1.
(54)

Thus

|-----------∫-L------------------|
| 2            (   ′2    2 2)    |
|δ J[0;η] =  0   (η ) +  ω η   dx .
---------------------------------
(55)

For every nonzero admissible η this is positive. In fact, because the original functional itself is already a nonnegative quadratic form,

J[y] ≥ 0 = J[0],
(56)

so y = 0 is the unique global minimizer.

This is an unusually clean case: stationarity, positive second variation, and direct global minimality all agree.

11 Example: arc length near a straight line

For

       ∫  b∘ -------
J [y ] =      1 + y′2 dx,
         a
(57)

consider the horizontal stationary line y∗ = 0. Since

            1
Fy′y′ = ------′2-3∕2-,
        (1 + y  )
(58)

we have along y∗ = 0

Fy′y′ = 1 > 0.
(59)

Also Fyy = Fyy′ = 0, so

|--------------------------|
|           ∫ b            |
|δ2J[0;η] =    (η′)2 dx > 0 |
-------------a-------------
(60)

for every nonzero fixed-endpoint perturbation. This agrees with the geometric fact that the straight segment is the shortest path between its endpoints.

12 Example: the Legendre condition is not sufficient

Consider the harmonic-oscillator action

       ∫ T(                 )
S[q] =      1-m (q′)2 − 1kq2   dt
        0   2          2
(61)

with fixed endpoint values

q(0 ) = q (T ) = 0.
(62)

The stationary solution

q∗(t) = 0
(63)

satisfies the strengthened Legendre condition. Writing v for the velocity argument dq∕dt of the Lagrangian,

Lvv = m  > 0.
(64)

Nevertheless,

|----------∫--T------------------|
δ2S [0; η] =    (m (η′)2 − kη2)dt .
|            0                   |
----------------------------------
(65)

Choose the admissible direction

          (    )
            πt-
η1(t) = sin   T   .
(66)

Then

∫ T        T
    η21 dt =--
 0          2
(67)

and

∫ T
      ′2      π2-
 0 (η1)  dt = 2T .
(68)

Therefore

|-------------(-----2-----)--|
|δ2S[0;η1] = 1- m-π--−  kT   .
|            2    T          |
-----------------------------
(69)

The sign changes at

|-----------|
|      ∘ ---|
|Tc = π   m-|.
----------k--
(70)

For T > Tc, this admissible direction has negative second variation even though Lvv = m > 0 everywhere.

PIC

Figure. For m = k = 1, the second variation in the first sine direction changes sign at T = π. The strengthened Legendre condition remains true for every T, so it cannot by itself guarantee a minimum.

The Wirtinger inequality sharpens the conclusion. For every fixed-endpoint perturbation,

∫ T            2∫  T
      ′2     π--      2
 0  (η) dt ≥ T 2  0 η dt.
(71)

Hence

      (          ) ∫
 2      m-π2-        T  2
δ S ≥    T 2 − k       η dt.
                    0
(72)

Thus the second variation is positive definite for

      ∘ ---
T <  π  m- ,
         k
(73)

degenerate at the critical interval, and indefinite beyond it. CV12 will interpret this threshold in terms of a conjugate point.

13 Example: violating Legendre gives a maximum direction

Consider

          ∫
        1-  1  ′2
J[y] = − 2    y  dx,
           0
(74)

with y(0) = y(1) = 0. The zero function is stationary, but

Fy′y′ = − 1 < 0.
(75)

Therefore the Legendre condition for a minimum fails immediately. Indeed,

             ∫
 2             1  ′ 2
δ J[0;η] = −    (η ) dx < 0
              0
(76)

for every nonzero admissible direction. The zero function is a strict maximum within this quadratic problem.

14 Example: a degenerate minimum with zero second variation

Consider

       ∫ 1
J[y] =    y′4dx
        0
(77)

with fixed zero endpoints. The zero function is a global minimizer because

J[y] ≥ 0 = J[0].
(78)

But

F  ′′ = 12y′2,
  yy
(79)

so along y∗ = 0,

Fy′y′ = 0.
(80)

Consequently

δ2J[0;η] = 0
(81)

for every direction. The first nonzero change is fourth order:

          ∫
         4   1  ′4
J [𝜖η] = 𝜖    (η ) dx.
            0
(82)

This example shows why the strengthened Legendre condition is not necessary and why a vanishing second variation is inconclusive rather than evidence against a minimum.

15 The accessory equation and the bridge to Jacobi

Return to the reduced second variation

      ∫ b
δ2J =    (A η2 + R (η′)2) dx.
       a
(83)

Treat this quadratic expression itself as a new variational functional in η. Its Euler–Lagrange equation is

2A η − -d-(2R η′) = 0,
       dx
(84)

or

|------------------|
|d     ′           |
|--(R η ) − A η = 0 .
-dx-----------------
(85)

This is the Jacobi accessory equation. Nontrivial solutions satisfying suitable endpoint conditions are called Jacobi fields in the one-dimensional setting.

The key new phenomenon is that even if

R = Fy ′y′ > 0,
(86)

the Aη2 term can still make the quadratic form lose positivity over a sufficiently long interval. The first location where a nontrivial Jacobi field vanishes again is a conjugate point. CV12 develops this criterion in detail.

16 Historical perspective

The second variation is historically important because it exposed the limits of merely solving Euler–Lagrange. Legendre developed an early second-order necessary sign condition involving the coefficient now written Fy′y′. Later work, especially by Jacobi, showed that this local sign test does not completely classify an extremal; interval-wide information encoded by the accessory equation and conjugate points is also required. Classical historical and technical discussions can be found in [5, 6, 4].

This progression mirrors ordinary calculus but with an important infinite-dimensional twist:

stationary   =⇒    second  variation   = ⇒    Legendre   = ⇒    Jacobi/conjugate points.
(87)

17 Common mistakes

  • Using the second variation before checking stationarity. The sign test classifies the quadratic correction at a stationary candidate; a nonzero first variation dominates for sufficiently small 𝜖.
  • Forgetting the factor convention. Here δ2J = Φ′′(0), so the Taylor series contains 𝜖2δ2J∕2.
  • Dropping the mixed term too early. The 2Fyy′ηη′ term disappears only after integration by parts and use of the fixed endpoint conditions.
  • Evaluating Fy′y′ at the wrong point. The Legendre condition is checked along (x,y∗(x),y∗′(x)).
  • Treating Fy′y′ > 0 as a proof of minimality. The harmonic-oscillator action provides an explicit counterexample on sufficiently long intervals.
  • Assuming δ2J = 0 means no minimum. Degenerate minima such as ∫ y′4dx can have identically zero second variation.
  • Confusing local and global conclusions. The second variation is local information near the stationary function; global minimality needs additional arguments.
  • Ignoring the admissible class. The directions η must satisfy the linearized endpoint or constraint conditions of the original problem.

18 A compact second-variation workflow

For a first-order fixed-endpoint problem, use the following sequence.

  1. Find a stationary candidate y∗ using Euler–Lagrange and the boundary conditions.
  2. Write y𝜖 = y∗ + 𝜖η with admissible η.
  3. Compute
          ∫
 2       (    2          ′         ′2)
δ J =     Fyyη  + 2Fyy′ηη + Fy ′y′(η)   dx.
    (88)

  4. Check the Legendre coefficient
    R =  Fy′y′.
    (89)

    If R < 0 anywhere, a weak local minimum is impossible.

  5. If useful, integrate the mixed term by parts and write
          ∫
 2          2      ′ 2
δ J =   (A η +  R(η ) )dx.
    (90)

  6. Test whether the entire quadratic functional has one sign for every admissible η.
  7. Do not infer sufficiency from Legendre alone.
  8. If positivity depends on the interval or remains unclear, proceed to the Jacobi equation and conjugate-point analysis.

19 What CV12 adds

CV11 has established the variational analogue of the Hessian and extracted the Legendre necessary condition. The harmonic-oscillator example showed the central limitation: even a strictly positive Fy′y′ does not prevent the second variation from becoming negative because of the lower-order term.

CV12 studies the accessory equation

d-(Ru ′) − Au =  0
dx
(91)

and introduces conjugate points. This produces a genuinely interval-dependent test for the loss of minimizing character and explains the critical-time behavior seen in mechanical action problems.

Summary

For a stationary extremal y∗ of

       ∫ b
J [y] =    F (x,y,y ′)dx,
        a
(92)

the second variation is

|------------------------------------------------|
|           ∫  b(                           )    |
|δ2J[y∗;η] =     Fyyη2 + 2Fyy′ηη′ + Fy′y′(η′)2  dx .
--------------a----------------------------------
(93)

At a weak local minimum,

|-------------------------------------|
|δ2J[y∗;η] ≥ 0  for every admissible η .
--------------------------------------
(94)

Localized variations then force the Legendre necessary condition

|---------|
|F ′ ′ ≥ 0 .
---yy-----
(95)

After integration by parts, the quadratic form can be written as

|---------------------------------------------|
|      ∫ b [(       d     )               ]   |
|δ2J =        Fyy − --Fyy ′ η2 + Fy′y′(η ′)2 dx .
--------a-----------dx-------------------------
(96)

The Legendre condition is necessary but not sufficient. The full sign of the second variation depends on the interval and on the interaction of both coefficients. That remaining problem leads directly to Jacobi’s equation and conjugate points.

References

[1]   I. M. Gelfand and S. V. Fomin, Calculus of Variations, Dover Publications, 2000.

[2]   Bruce van Brunt, The Calculus of Variations, Springer, 2004.

[3]   Hans Sagan, Introduction to the Calculus of Variations, Dover Publications, 1992.

[4]   Robert Weinstock, Calculus of Variations with Applications to Physics and Engineering, Dover Publications, 1974.

[5]   Gilbert Ames Bliss, Lectures on the Calculus of Variations, University of Chicago Press, 1946.

[6]   Oskar Bolza, Lectures on the Calculus of Variations, University of Chicago Press, 1904.

[7]   Cornelius Lanczos, The Variational Principles of Mechanics, Dover Publications, 1986.


"Calculus of Variations: The Second Variation and the Legendre Condition" is owned by bloftin.
(view preamble)
View style:
Other names:  CV11
Also defines:  second variation, quadratic variation, second-order necessary condition, Legendre condition, strengthened Legendre condition, variational quadratic form
Keywords:  calculus of variations, second variation, Legendre condition, strengthened Legendre condition, quadratic form, variational Hessian, accessory functional, Jacobi equation, weak minimum, stationary function, harmonic oscillator, conjugate point

This object's parent.

Attachments:
Calculus of Variations: Computing Second Variations - Exercises (Example) by bloftin

Cross-references: force, Taylor series, work, Jacobi fields, accessory equation, Lagrangian, velocity, displacement, theorem, formula, amplitude, boundary, matrix, dimensions, CV12, conjugate points, Jacobi equation, scalar, functions
There are 6 references to this object.

This is version 1 of Calculus of Variations: The Second Variation and the Legendre Condition, born on 2026-10-20.
Object id is 1512, canonical name is CalculusOfVariationsTheSecondVariationAndTheLegendreCondition.
Accessed 3 times total.

Classification:
Physics Classification: 02.30.Xx (Calculus of variations)
 02.30.Sa (Functional analysis)
 45.20.Jj (Lagrangian and Hamiltonian mechanics)
 42.15.-i (Geometrical optics)

Pending Errata and Addenda

None.

Discussion

No messages.

Interact