where <math display="inline">{\cal P}</math> is a closed path in <math display="inline">{\cal D}</math>. Here, the ''function'' <math display="inline">S(\mathbf{q},t)</math> is the action ''function'' that is computed by the integration of the Lagrangian over optimal trajectories or equivalently obtained through the [[Hamilton-Jacobi equation]]. As <math display="inline">\partial S/\partial\mathbf{q}=\mathbf{p}</math> (where <math display="inline">\mathbf{p}</math>is the momentum) and <math display="inline">\partial S/\partial t=-H</math> (where <math display="inline">H</math> is the Hamiltonian), the differential of this function is given by <math display="inline">dS=\mathbf{p}d\mathbf{q}-Hdt</math>.
ConsiderUsing the geometrical approach, the conserved quantity for a symmetry in Noether’s sense can be derived. The symmetry is expressed as an infinitesimal transformation:<math display="block">\begin{aligned}
\end{aligned}</math> that we suppose to be a symmetry in Noether’s sense. Let <math display="inline">{\cal C}</math> be an optimal trajectory and <math display="inline">{\cal C}'</math> its image under the above transformation <math display="inline">(\phi_{\mathbf{q}},\phi_{t})^{T}</math> (which is also an optimal trajectory). The closed path <math display="inline">{\cal P}</math> of integration is chosen as <math display="inline">ABB'A'</math>, where the branches <math display="inline">AB</math> and <math display="inline">A'B'</math> are given <math display="inline">{\cal C}</math> and <math display="inline">{\cal C}'</math> . By the hypothesis of Noether theorem, we have, to the first order in <math display="inline">\epsilon</math> :, <math display="block">\int_{{\cal C}}dS=\int_{{\cal C}'}dS</math> therefore, we must have <math display="block">\int_{A}^{A'}dS=\int_{B}^{B'}dS</math> By definition, on the <math display="inline">AA'</math> branch we have <math display="inline">d\mathbf{q}=\epsilon\phi_{\mathbf{q}}(\mathbf{q},t)</math> and <math display="inline">dt=\epsilon\phi_{t}(\mathbf{q},t)</math>. Therefore, to the first order in <math display="inline">\epsilon</math>, the quantity <math display="block">I=\mathbf{p}\phi_{\mathbf{q}}-H\phi_{t}</math> is conserved along the trajectory.