Euler's Equation for Vanishing Variation in Canonical Variables

Theorem
Suppose we have the following system of equations:


 * $ \begin{cases}

\displaystyle F_{ y_i} - \frac{ \mathrm d }{ \mathrm d x } F_{ y_i'}=0 \\ \displaystyle \frac{ \mathrm d {y_i} }{ \mathrm d x }= y_i' \end{cases} $

where $i=\left({1, \ldots, n }\right)$.

Then the coordinate transformation from $ \left({ x, \langle y_i \rangle_{1 \le i \le n}, \langle y_i' \rangle_{1 \le i \le n}, F } \right)$ to canonical variables $\left({ x, \langle y_i \rangle_{1 \le i \le n}, \langle p_i \rangle_{1 \le i \le n}, H }\right)$ transforms the aforementioned system of equations into


 * $ \begin{cases}

\displaystyle \frac{ \mathrm d y_i }{ d x }=\frac{ \partial H }{ \partial p_i } \\ \displaystyle \frac{ \mathrm d {p_i} }{ \mathrm d x }= - \frac{ \partial H }{ \partial y_i } \end{cases} $

Proof
Find the full differential of Hailtonian:

The desired system of equations is obtained by matching coefficients in front of the same differentials.