c0nrad's c0rner

Learning and learning

Dec 22, 2021 - 4 minute read - simulation classical mechanics

Sim 3: Kepler Problems

We solve for the different types of orbits of the Kepler Problem (two body central force problems).

Introduction

In the previous post we reduced our two body problem to a single effective potential problem:

Ueff(r)=U(r)+Ucf(r)=U(r)+l22μr2 U_{eff}(r) = U(r) + U_{cf}(r) = U(r) + \frac{l^2}{2 \mu r^2}

We can now determine the allowed types of orbits. To do this we are going to do some variable substitution, and determine r(ϕ) r(\phi) which will allow us to see the orbits more clearly. During this process we will define a new variable called eccentricity that determines the orbit.

Solving for r(ϕ) r(\phi)

We ended up last time with:

μr¨=F(r)+l2μr3\mu \ddot{r} = F(r) + \frac{l^2}{\mu r^3}

For reasons I don’t quite understand yet, the problem becomes simpler if we replace r r with 1/u 1/u (something about quasilinear).

We also need to figure out how to write r¨ \ddot{r} in terms of r(ϕ) r(\phi) .

r¨=ddtddtr=dϕdtddϕdϕdtddϕr=ϕ˙2d2dϕ21u=(lu2μ)ddϕ(lu2μ)(1u2)dudϕ=l2u2μ2d2udϕ2 \ddot{r} = \frac{d}{dt} \frac{d}{dt} r = \frac{d \phi}{dt} \frac{d}{d\phi} \frac{d \phi}{dt} \frac{d}{d\phi} r = \dot{\phi}^2 \frac{d^2}{d\phi^2} \frac{1}{u} = (\frac{l u^2}{\mu }) \frac{d}{d \phi} (\frac{l u^2}{\mu}) (- \frac{1}{u^2}) \frac{d u}{d \phi} = - \frac{l^2 u^2}{\mu^2} \frac{d^2 u}{d \phi^2}

In step four we used the chain rule to partially evaluate ddϕ1u=1u2dudϕ \frac{d}{d \phi} \frac{1}{u} = - \frac{1}{u^2} \frac{d u}{d \phi}

So now we can substitute our result back into the original equation of motion:

u"(ϕ)=u(ϕ)μl2u(ϕ)2F u"(\phi) = -u(\phi) - \frac{\mu}{l^2 u(\phi)^2}F

Next we plug in our force equation: F=Gm1m2/r2=γu2 F = -G m_1 m_2 / r^2 = -\gamma u^2:

u"(ϕ)=u(ϕ)μl2u(ϕ)2(γu2)=u(ϕ)γμl2 u"(\phi) = -u(\phi) - \frac{\mu}{l^2 u(\phi)^2} (- \gamma u^2) = -u(\phi) - \frac{\gamma \mu}{l^2}

This equation is surprisingly simple due to the fact that our force equation is an inverse squared force, the u(ϕ) u(\phi) terms cancel out. (Coincidentally I’m in the process of solving a related problem in a physics problem book, page 8 problem 8). I believe this implies that only inverse-square forces have stable orbits, but I haven’t proved it yet.

Since the last term is constant, the solution is just the constant plus a sinusoid:

u(ϕ)=1r=γμl2+Acosϕ=γμl2(1+ϵcosϕ)=1c(1+ϵcosϕ) u(\phi) = \frac{1}{r} = \frac{\gamma \mu}{l^2} + A \cos\phi = \frac{\gamma \mu}{l^2} (1 + \epsilon \cos\phi) = \frac{1}{c}(1 + \epsilon \cos \phi)

In the last stage we defined a new variable we will call the eccentricity (which will become obvious why soon), and c=l2γμ c = \frac{l^2}{\gamma \mu} for bookkeeping.

Solving for r:

r(ϕ)=c1+ϵcosϕ r(\phi) = \frac{c}{1 + \epsilon \cos \phi}

Types of orbits

Bounded

Looking at our previous equation, if we assume ϵ<1 \epsilon < 1 , then r will oscillate between rmin=c1ϵ r_{min} = \frac{c}{1-\epsilon} and rmax=c1+ϵ r_{max} = \frac{c}{1+\epsilon} ), which looks suspiciously like an ellipse (which is why we call ϵ \epsilon the eccentricity). (You can prove it by converting to cartesian coordinates and using the identity cos(tan1(y/x))==11+y2/x2 \cos(\tan^{-1}(y/x)) == \frac{1}{\sqrt{1 + y^2/x^2}} , you will get the equation for an ellipse x2/a2+y2/b2=1 x^2/a^2 + y^2/b^2 = 1 ).

If ϵ=0 \epsilon = 0 we will have a constant r, meaning a circle.

Unbounded

We have two possible unbounded states, ϵ=1 \epsilon = 1 and ϵ>1 \epsilon > 1 .

If ϵ=1 \epsilon = 1 , then r goes to infinity at π \pi and π -\pi . We can show it’s a parabola by converting to cartesian coordinates:

r(ϕ)=c1+cosϕ=x2+y2=c1+11+y2/x2 r(\phi) = \frac{c}{1 + \cos\phi} = \sqrt{x^2 + y^2} = \frac{c}{1 + \frac{1}{\sqrt{1 + y^2/x^2}}}

Plugging into mathematica we get:

y2=c22cx y^2 = c^2-2cx

Which is the equation of a (horizontal) parabola.

If ϵ>1 \epsilon > 1 we will have a maximum ϕmax \phi_{max} which defines the range for some sort of hyperbola.

Eccentricity Plot

There’s a fun plot here showing the trajectories of different eccentricities:

https://en.wikipedia.org/wiki/Orbital_eccentricity

Simulation

Not a huge update, but now the simulation shows the eccentricity of the orbit.

https://blog.c0nrad.io/sims/twobody/

Conclusion

This is the last post on two body central force problems. I’m not sure what I’ll do next, but hopefully something just as fun and insightful.