= Solution
Set
$$
F_i=\frac12\left(p_i^2+W_i^2q_i^2+a_iq_i\right),
\qquad i=1,\ldots,n.
$$
Then $\sum_iF_i=H$. Each $F_i$ involves only $(p_i,q_i)$, so
$$
\{F_i,F_j\}=0
$$
for all $i,j$. Their differentials have disjoint coordinate supports and are independent wherever none of them vanishes, which is an open dense regular set.
Hamilton's equations are
$$
\dot q_i=p_i,
\qquad
\dot p_i=-W_i^2q_i-\frac{a_i}{2}.
$$
After the shift
$$
Q_i=q_i+\frac{a_i}{2W_i^2},
$$
they become $n$ independent harmonic oscillators,
$$
\ddot Q_i+W_i^2Q_i=0.
$$
\b[Thus the $n$ independent commuting integrals establish complete integrability.]
Back to article page