Hill equations (source code)

= Hill equations
{c}
{title2=$\ddot x-2n\dot y-3n^2x=0,\quad\ddot y+2n\dot x=0$}

= Clohessy-Wiltshire equations
{c}
{synonym}

The <Hill equations> describe linear relative motion near a reference <circular Kepler orbit>. Let that <orbit> have radius $a$ and <mean motion> $n=\sqrt{GM/a^3}$. In a <rotating reference frame> centred on a reference <test particle>, let $x$ point radially outward, $y$ forward along the <orbit>, and $z$ normal to its <orbital plane>. Neglect mutual <gravity> and other perturbing <forces>, and require separations small compared with $a$.

Linearizing the central gravitational <acceleration> and including the <Coriolis force> gives
$$
\ddot x-2n\dot y-3n^2x=0,\qquad \ddot y+2n\dot x=0,\qquad \ddot z+n^2z=0.
$$
The planar pair was the starting form above; the third equation describes vertical <simple harmonic motion>. In spacecraft relative-motion applications these are also called the <Clohessy-Wiltshire equations>. Axis conventions vary, so the radial coordinate must be identified before comparing formulas.<The Clohessy-Wiltshire Equations of Relative Motion by MIT OpenCourseWare>[Lecture 26, pages 1–2, scalar equations in radial xi, along-track eta and normal zeta]{ref}

A directly checkable planar solution is
$$
x=A\cos nt+B\sin nt+C,\qquad y=-2A\sin nt+2B\cos nt-\tfrac32nCt+D.
$$
For $C=0$ the relative motion is a bounded <epicyclic oscillation>; for $C\ne0$ its mean radial offset causes a secular along-track drift, the local <Keplerian shear>. Mutual <gravity> adds encounter forcing, and large separations or long accumulated errors require the nonlinear orbital model.