kausalflow / hamilflow

Dataset of simple physical systems.
http://kausalflow.com/hamilflow/
MIT License
4 stars 1 forks source link

Simplify the calculation of Kepler problem #99

Open cmp0xff opened 2 weeks ago

cmp0xff commented 2 weeks ago

Currently we solve $\tau$ of $u$ as the first step to solve the Kepler problem, where $$\tau = (t-t_0)\frac{\alpha^2 m}{|l|^3},\quad u = \frac{p}{r} - 1.$$

The final expressions are rather complicated, and the analytical way of integrating $$\tau'(u) = - \frac{1}{\sqrt{e^2-u^2}(1+u)^2}$$ is rather obscure.

If we start with $\tau$ of $\phi$, however, things can become easier. To begin with, we have $$\tau'(\phi) = \frac{1}{(1+e \cos \phi)^2}.$$ The right-hand side can be transformed to a rational function, inspired by the tangent half-angle formula $$\cos \phi = \frac{1-q^2}{1+q^2},\qquad\sin \phi = \frac{2q}{1+q^2},$$ yielding $$\tau'(q) = \frac{2(1+q^2)}{\left(1+e+(1-e)q^2\right)^2}.$$ This can readily be integrated by taking the fraction apart.

$e=1$ allows an exact solution and exact inverse. For $e \ne 1$, we can further simplify the equations.

For $0 \le e < 1$, let $$\lambda = (1-e^2)^{3/2} \tau,\quad q = \sqrt{\frac{1+e}{1-e}} w,\quad w = \tan\frac{\theta}{2},$$ we have $$e \cos \theta + \lambda'(\theta) = 1,\qquad \lambda - \lambda_0 = \theta - e \sin\theta.$$ This is the Kepler's equation.

For $e > 1$, let $$\lambda = (e^2-1)^{3/2} \tau,\quad q = \sqrt{\frac{e+1}{e-1}} w,\quad w = \tanh\frac{\theta}{2},$$ we have $$e \cosh \theta - \lambda'(\theta) = 1,\qquad \lambda - \lambda_0 = e \sinh\theta - \theta.$$ This is the Hyperbolic Kepler's equation.

It can be that the community is well-prepared for such a classic equation.