The Lagrangian of a system in two dimensions is $L = \frac{1}{2}m\dot{x}^2 + m\dot{x}\dot{y}$. Determine the Hamiltonian
Aakash Om Trivedi, AIR 73, 2025
Given
Also,
$H = p_x\dot{x} + p_y\dot{y} - L$ because $H = \sum p\dot{q} - L$
Replace $\dot{x} \to \frac{p_y}{m}$, $\dot{y} \to \frac{p_x - p_y}{m}$
$H$ as function of $(y, p_x, p_y)$