Conditions for Function to be First Integral of Euler's Equations for Vanishing Variation

Theorem
Let $ \Phi= \Phi \left({x, \langle y_i \rangle_{1 \le i \le n}, \langle p_i \rangle_{1 \le i \le n} } \right)$ be a real function.

Let $H$ be Hamiltonian.

Then a necessary and sufficient condition for $\Phi$ to be the first integral of Euler's Equations is


 * $ \displaystyle \frac{ \partial \Phi }{ \partial x }+ \left[{ \Phi, H } \right]=0$

Proof
For $\Phi$ to be the first integral, $ \displaystyle \frac{ \mathrm d \Phi }{ \mathrm dx }=0$.

Hence the result.