Solution (source code)

= Solution

A Lagrange top is an axially symmetric rigid body with one point fixed, centre of mass a distance $l$ along its symmetry axis, principal moments $I_1=I_2,I_3$, mass $M$, and Euler angles $θ,φ,ψ$ in gravity $g$.

The cyclic coordinates give $p_ψ=I_3(\dot ψ+\dot φ\cosθ)$ and $p_φ=I_1\dot φ\sin^2θ+p_ψ\cosθ$; the energy $E$ is the third integral. Eliminating $\dot φ,\dot ψ$ from $E$ and setting $u=\cosθ$, with $\dot u=-\dot θ\sinθ$, yields $\dot u^2=f(u)$ after multiplication by $1-u^2$; all denominators cancel and $f$ is cubic.