Solution (source code)

= Solution

<Liouville integrability> on a $2n$-dimensional <symplectic manifold> means that there are $n$ functionally independent <first integrals>, including $H$, whose pairwise <Poisson brackets> vanish. Near a <compact> connected regular common level <set>, the <Arnold-Liouville theorem> gives <action-angle variables> $(J_i,\theta_i)$ with $J_i=(2\pi)^{-1}\oint p\,dq$, $\theta_i$ periodic modulo $2\pi$, $H=H(J)$, $\dot J_i=0$ and $\dot\theta_i=\partial H/\partial J_i$.

For a frozen <mass>, the turning point is $q_*=(2E)^{1/(2k)}$. The <action variable> is
$$
 J=\frac{2}{\pi}\int_0^{q_*}\sqrt{2m(E-q^{2k}/2)}\,dq
 =C_k m^{1/2}E^{(k+1)/(2k)},\quad
 C_k=\frac{2\sqrt2\,2^{1/(2k)}}{\pi}\int_0^1\sqrt{1-s^{2k}}\,ds.
$$
<Adiabatic invariance of the action> holds to leading order when the <mass> varies slowly compared with an orbital period, away from degenerating <orbits>. Keeping $J$ fixed gives
$$
\boxed{E(t)\propto m(t)^{-k/(k+1)},\qquad c=-\frac{k}{k+1}.}
$$
For $k=1$ this agrees with $E=\omega J$ and $\omega\propto m^{-1/2}$.