Conservation of the Hamiltonian I'm struggling with the following calculus of variation problem. For an autonomous problem, it is often said that the Hamiltonian is constant along an extremal trajectory. However, the proofs of that fact that I found in the literature rely on the optimal trajectory being twice continuously differentiable, and on a bruteforce differentiation of the Euler-Lagrange equation. Is there a simple argument for a once continuously differentiable extremal? I tried to apply DuBois-Reymond lemma but failed.  
 A: TL;DR: One essentially needs that the Euler-Lagrange (EL) equations are first-order ODEs.


*

*Let the autonomous Lagrangian 
$$L(x,\dot{x})~=~\sum_{J=1}^{2n}\theta_J(x)\dot{x}^J-H(x)\tag{1}$$ be an affine function of the generalized velocities $\dot{x}$; let the coefficient functions
$$H,\theta_1,\ldots , \theta_{2n}~\in~C^{1}(\mathbb{R}^{2n});\tag{2}$$
and let the 2-form 
$$\omega~:=~\mathrm{d}\theta, \qquad \theta~:=~\sum_{J=1}^{2n}\theta_J(x) \mathrm{d}x^J,\tag{3}$$
be non-degenerate (which in turn implies that the number $2n$ of variables must be even). 

*Then one may show that the energy function is given by the Hamiltonian
$$ H~=~\sum_{J=1}^{2n} \dot{x}^J \frac{\partial L }{\partial\dot{x}^J} - L. \tag{4}$$
Moreover the EL equations become first-order ODEs, and in fact equivalent to Hamilton's equations
$$ \dot{x}^J~=~\{x^J,H\}, \qquad J~\in~\{1,\ldots, 2n\}, \tag{5}$$
where the Poisson bracket $\{\cdot,\cdot\}$ is defined via the symplectic 2-form (3). Let $t\mapsto x(t)$ be a $C^1$-solution. 
It follows that the Hamiltonian is a constant of motion
$$\dot{H}~=~\{H,H\}~=~0\tag{6} $$ 
along such solution, cf. OP's question.
