= Solution
The general <action> identity is
$$
dG=\sum_i p_i\,dq_i-\sum_iP_i\,dQ_i+(\mathcal H-H)dt.
$$
Treating $q,Q,t$ as independent and comparing coefficients gives
$$
\boxed{p_i=G_{q_i},\qquad P_i=-G_{Q_i},\qquad
\mathcal H=H+G_t.}
$$
Choose a <complete integral of the Hamilton-Jacobi equation>,
$$
\boxed{G_t+H(q,G_q,t)=0.}
$$
Then $\mathcal H=0$, and <Hamilton's equations> become $\dot Q_i=\dot P_i=0$. Completeness and local invertibility are needed: a solution with too few independent parameters cannot generate an arbitrary trajectory.
Back to article page