Perturbed Kepler-orbit conservation laws (source code)

= Perturbed Kepler-orbit conservation laws

If the relative acceleration is $\ddot{\mathbf r}=-GM\mathbf r/r^3+\mathbf f$, with constant masses, then the <specific orbital energy> $\varepsilon$, <specific angular momentum> $\mathbf h$ and <eccentricity vector> obey
$$
\dot\varepsilon=\mathbf v\mathbin\cdot\mathbf f,\qquad
\dot{\mathbf h}=\mathbf r\times\mathbf f,\qquad
GM\dot{\mathbf e}=\mathbf f\times\mathbf h+\mathbf v\times(\mathbf r\times\mathbf f).
$$
The inverse-square-force terms cancel in each derivative. These identities express perturbing work and torque, and track the instantaneous change of the ellipse's shape and orientation.