Given \(L(q, \dot{q})\) such that \(d L=j \cdot d q+\rho d \dot{q}\), find
\(H(\rho, q)\) so that \(d H=\dot{q} d p-\dot{p} d q\). Comments: \(I\) and \(H\) are
functions used in mechanics called the Lagrangian and the Hamil. tonian. The
quantities \(\dot{q}\) and \(\dot{p}\) are actually time derivatives of \(p\) and 4
, but you make no use of the fact in this problem. Treat \(\hat{p}\) and
\(\dot{q}\) as if they were two more variables having nothing to do with \(p\) and
\(q\). Hint: Use a Legendre transformation. On your first try you will probably
get \(-H\), Look at the text discussion of Legendre transformations and satisfy.
yourself that \(g=q y-f\) would have been just as satisfactory as \(g=f-q y\) in
\((11.23)\).