# Legendre's Condition/Lemma 2

## Lemma 2

Let $h$ be a real function such that:

$h\in C^1\openint a b,\quad \map h a=0,\quad \map h b=0$

Let

$\displaystyle\delta^2 J\sqbrk{y;h}=\int_a^b\paren {\map P {x,\map y x}h'^2+\map Q {x,\map y x} h^2}\rd x$

where $P\in C^0\closedint a b$.

Then a necessary condition for

$\delta^2 J\sqbrk{y;h}\ge 0$

is

$\map P {x,\map y x}\ge 0\quad\forall x\in\closedint a b$

## Proof

Assume that above is not true.

Then

$\paren{\exists x_0 \in \closedint a b}\land\paren{\exists\beta\in\R_{<0} }:\map P {x_0}=-2\beta$

$P$ is continuous.

Thus

$\exists\alpha\in\R_{>0}:\paren{a\ge x_0-\alpha}\land\paren{x_0+\alpha\ge b}$

and

$\map P x<-\beta\quad\forall x\in\openint{x_0-\alpha} {x_0+\alpha}$

In other words:

$\map P x\begin{cases} =0\quad\forall x\in\closedint a {x_0-\alpha}\lor\closedint {x_0+\alpha} b\\ <0\quad\forall x\in\closedint {x_0-\alpha} {x_0+\alpha} \end{cases}$

Let

$h=\begin{cases} \sin^2\sqbrk {\frac{\map \pi {x-x_0} }{\alpha} }&x_0-\alpha\ge x\ge x_0+\alpha\\ 0& otherwise \end{cases}$

It belongs to $C^1\openint a b$ because:

$\displaystyle\lim_{x_0-\alpha+0^-}h^{\paren k}=0\quad\forall k\in\N_{\ge 0}$
 $\displaystyle \lim_{x_0-\alpha+0^+}h$ $=$ $\displaystyle \lim_{x_0-\alpha+0^+}\sin^2\sqbrk{\frac{ \map \pi {x-x_0} }{\alpha} }$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \sin^2\sqbrk {\map \pi {\frac{0^+}{\alpha}-1} }$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle 0$ $\quad$ $\quad$

 $\displaystyle \lim_{x_0-\alpha+0^+}h'$ $=$ $\displaystyle \lim_{x_0-\alpha+0^+}\sin\sqbrk{\frac{2\map\pi {x-x_0} }{\alpha} }\frac{\pi}{\alpha}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \sin\sqbrk {2\map \pi {\frac{0^-}{\alpha}+1} }\frac{\pi}{\alpha}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle 0$ $\quad$ $\quad$

 $\displaystyle \lim_{x_0-\alpha+0^+}h''$ $=$ $\displaystyle \lim_{x_0-\alpha+0^+}\cos\sqbrk {\frac{2\map\pi {x-x_0} }{\alpha} }\frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \cos\sqbrk{2\map\pi {\frac{0^-}{\alpha}+1} }\frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$

$\displaystyle\lim_{x_0+\alpha+0^+} h^{\paren k}=0\quad\forall k\in\N_{\ge 0}$

 $\displaystyle \lim_{x_0+\alpha+0^-}h$ $=$ $\displaystyle \lim_{x_0+\alpha+0^-}\sin^2\sqbrk{\frac{\map \pi {x-x_0} }{\alpha} }$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \sin^2\sqbrk{\map \pi {\frac{0^+}{\alpha}-1} }$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle 0$ $\quad$ $\quad$

 $\displaystyle \lim_{x_0+\alpha+0^-}h'$ $=$ $\displaystyle \lim_{x_0-\alpha+0^-}\sin\sqbrk{ \frac{2\map \pi {x-x_0} }{\alpha} }\frac{\pi}{\alpha}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \sin\sqbrk{2\map \pi {\frac{0^-}{\alpha}+1} }\frac{\pi}{\alpha}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle 0$ $\quad$ $\quad$

 $\displaystyle \lim_{x_0+\alpha+0^-}h''$ $=$ $\displaystyle \lim_{x_0-\alpha+0^-}\cos\sqbrk{ \frac{2\map \pi {x-x_0} }{\alpha} }\frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \cos\sqbrk{2\map \pi {\frac{0^-}{\alpha}+1} }\frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle \frac{2\pi^2}{\alpha^2}$ $\quad$ $\quad$

In other words, only $h$ and $h'$ are continuous in $\closedint a b$

Then

 $\displaystyle \int_a^b\paren {Ph'^2+Qh^2}\rd x$ $=$ $\displaystyle \int_{x_0-\alpha}^{x_0+\alpha} P\frac{\pi^2}{\alpha^2}\sin^2\sqbrk{\frac{2\map \pi {x-x_0} }{\alpha} }\rd x+\int_{x_0-\alpha}^{x_0+\alpha} Q\sin^4\sqbrk{\frac{\map \pi {x-x_0} }{\alpha} }\rd x$ $\quad$ $\quad$ $\displaystyle$ $<$ $\displaystyle -\beta\frac{\pi^2}{\alpha^2}\int_{x_0-\alpha}^{x_0+\alpha}\sin^2\sqbrk{\frac{2\map \pi {x-x_0} }{\alpha} }\rd x+\max_{a\le x\le b}\size {\map Q x}\int_{x_0-\alpha}^{x_0+\alpha}\sin^4\sqbrk{\frac{\map \pi {x-x_0} }{\alpha} }\rd x$ $\quad$ $\displaystyle\map P x<-\beta,\quad\map Q x<\max_{a\le x\le b}\size {\map Q x}$ $\quad$ $\displaystyle$ $=$ $\displaystyle -\beta\frac{\pi^2}{\alpha}+\max_{a\le x\le b}\size {\map Q x}\int_{x_0-\alpha}^{x_0+\alpha}\sin^4\sqbrk{\frac{\map \pi {x-x_0} }{\alpha} }\rd x$ $\quad$ $\quad$ $\displaystyle$ $=$ $\displaystyle -\beta\frac{\pi^2}{\alpha}+\frac 3 4 \alpha M$ $\quad$ $\quad$

where

$\displaystyle M=\max_{a\le x\le b}\size {\map Q x}$

For sufficiently small $\alpha$ the right hand side is negative.

Hence, $\delta^2 J$ is negative for the corresponding $h$.

To conclude, it has been shown that

$P\ge 0\quad\neg\forall x\in\closedint a b\implies\delta^2 J<0$

Then, by contrapositive statement this is equivalent to

$\delta^2 J\ge 0\implies P\ge 0\quad\forall x\in\closedint a b$

$\Box$

## Sources

1963: I.M. Gelfand and S.V. Fomin: Calculus of Variations ... (previous) ... (next): $\S 5.25$: The Formula for the Second Variation. Legendre's Condition