Model the cart as a particle on a fixed plane curve, remaining constrained to the track. Its vertical velocity is , so its kinetic energy, gravitational potential energy and Lagrangian areConsequently the canonical momentum conjugate to the horizontal coordinate isIt is not simply the horizontal component of the mechanical momentum, because a change in also moves the cart vertically. Differentiate carefully in the Euler-Lagrange equation:Subtracting yieldsThe term involving accounts for the changing track geometry. An independent check is conservation of energy: