# Conditions for Functional to be Extremum of Two-variable Functional over Canonical Variable p

## Theorem

Let $y = \map y x$ and $\map F {x, y, y'}$ be real functions.

Let $\displaystyle \frac{\partial^2 F}{\partial {y'}^2} \ne 0$.

Let $\displaystyle J\sqbrk y = \int_a^b \map F {x, y, y'} \rd x$

Let $\displaystyle J \sqbrk{y, p} = \int_a^b \paren{- \map H {x, y, p} + p y'} \rd x$, where $H$ is the Hamiltonian of $J \sqbrk y$.

Then $\displaystyle J \sqbrk y = J \sqbrk{y, p} \big \vert_{\frac{\delta J \sqbrk{y, p} }{\delta p} \mathop = 0}$

## Proof

Euler's equation for $J \sqbrk{y, p}$:

 $\displaystyle \frac{\delta J \sqbrk{y, p} }{\delta p}$ $=$ $\displaystyle \frac{\partial}{\partial p} \paren{- \map H {x, y, p} + p y'}$ Depends only on $p$ and not its derivatives $\displaystyle$ $=$ $\displaystyle - \frac{\partial H}{\partial p} + y'$ $\displaystyle$ $=$ $\displaystyle 0$ $\displaystyle$ $\implies$ $\displaystyle y' = \frac{\partial H}{\partial p}$

Substitute this result back into the functional $J \sqbrk {y, p}$:

 $\displaystyle J \sqbrk{y, p} \big \vert_{\frac{\delta J \sqbrk{y, p} }{\delta p} \mathop = 0}$ $=$ $\displaystyle \int_a^b \paren{- H + p \frac{\partial H}{\partial p} } \rd x$ $\displaystyle$ $=$ $\displaystyle \int_a^b \paren{\map F {x, y, y'} - p y' + p \frac{\partial \paren{- \map F {x, y, y'} + p y'} }{\partial p} } \rd x$ Definition of Hamiltonian $\displaystyle$ $=$ $\displaystyle \int_a^b \paren{\map F {x, y, y'} - p y' + p y'} \rd x$ $\displaystyle$ $=$ $\displaystyle \int_a^b \map F {x, y, y'} \rd x$

$\blacksquare$