General Variation of Integral Functional/Dependent on N Functions/Canonical Variables

Theorem
Let $\delta J$ be a general variation of integral functional dependent on n functions.

Suppose a following coordinate transformation is done:


 * $\{ {x, ...y_i..., ...y_i'..., F} \}\to \{ {x, ...y_i..., ...p'..., H} \},~i=\left({1, ..., n}\right)$

Then, in canonical variables


 * $\displaystyle \delta J=\int_{x_0}^{x_1}\sum_{i=1}^n\left( F_{y_i}-\frac{ \mathrm{d}{p_i} }{ \mathrm{d}{x} } \right)h_i(x)\mathrm{d}{x}+\left( \sum_{i=1}^n p_i\delta y_i - H\delta x \right)\Bigg\rvert_{x=x_0}^{x=x_1}$

where $\delta x\rvert_{x=x_j}=\delta x_j,~\delta y_i\rvert_{x=x_j}=\delta _i^j,~j=\left({0, 1}\right)$