Kepler Orbits 

Math

First we have the equation for the distance of the planet

                                                                       

r= p 1+εcosθ MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadkhacqGH9a qpdaWcaaqaaiaadchaaeaacaaIXaGaey4kaSIaeqyTduMaci4yaiaa c+gacaGGZbGaeqiUdehaaaaa@40BA@  

(1.1)

where r is the distance between sun and planet where the sun is implicitly assumed to stay at the focus of planet's ellipse.  The sun cannot remain at the focus of the ellipse in inertial space unless the mass ratio sun/planet is infinite which is never the case.    So r is the distance from the ellipse focus to the planet while another variable rS is the distance between that same point in space and the position of the sun.

                                                                                                                                               

The definition of p is:

                                                                       

p=a(1 ε 2 ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadchacqGH9a qpcaWGHbGaaiikaiaaigdacqGHsislcqaH1oqzdaahaaWcbeqaaiaa ikdaaaGccaGGPaaaaa@3E67@  

(1.2)

where ε= 1 b 2 / a 2 MathType@MTEF@5@5@+= feaagKart1ev2aqatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiabew7aLjabg2 da9maakaaabaGaaGymaiabgkHiTiaadkgadaahaaWcbeqaaiaaikda aaGccaGGVaGaamyyamaaCaaaleqabaGaaGOmaaaaaeqaaaaa@3EAD@ .  Using the reference Kepler Math we find the equation for the rate of change of the azimuthal angle   is:

 

θ ˙ = 2π P b a(1 ε 2 ) (1+εcosθ) 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiqbeI7aXzaaca Gaeyypa0ZaaSaaaeaacaaIYaGaeqiWdahabaGaamiuaaaadaWcaaqa aiaadkgaaeaacaWGHbGaaiikaiaaigdacqGHsislcqaH1oqzdaahaa WcbeqaaiaaikdaaaGccaGGPaaaaiaacIcacaaIXaGaey4kaSIaeqyT duMaci4yaiaac+gacaGGZbGaeqiUdeNaaiykamaaCaaaleqabaGaaG Omaaaaaaa@4D95@  

(1.3)

                                                                       

Here r is the distance from the sun to the planet, a and b are the ellipse parameters, and P is the period of the planet's and sun's rotation.

The foci of an ellipse with major axis along y=0 are at

                                                                       

c= x center ± a 2 b 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadogacqGH9a qpcaWG4bWaaSbaaSqaaiaadogacaWGLbGaamOBaiaadshacaWGLbGa amOCaaqabaGccqGHXcqSdaGcaaqaaiaadggadaahaaWcbeqaaiaaik daaaGccqGHsislcaWGIbWaaWbaaSqabeaacaaIYaaaaaqabaaaaa@453F@  

(1.4)

where  is the symmetric center of the ellipse.

To plot the location of the planet on the ellipse, we just need to iterate  using the   expression and then use  to convert r to x and y of the ellipse. 

                                                                       

x(θ)= x center +rcosθ±c y(θ)= y center +rsinθ MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGaamiEai aacIcacqaH4oqCcaGGPaGaeyypa0JaamiEamaaBaaaleaacaWGJbGa amyzaiaad6gacaWG0bGaamyzaiaadkhaaeqaaOGaey4kaSIaamOCai GacogacaGGVbGaai4CaiabeI7aXjabgglaXkaadogaaeaacaWG5bGa aiikaiabeI7aXjaacMcacqGH9aqpcaWG5bWaaSbaaSqaaiaadogaca WGLbGaamOBaiaadshacaWGLbGaamOCaaqabaGccqGHRaWkcaWGYbGa ci4CaiaacMgacaGGUbGaeqiUdehaaaa@5D5B@  

(1.5)

So we just iterate  and plot the results.  Obviously, r as used in the above expressions is not the distance between the sun an the planet unless the sun/planet mass ratio is infinite so that the sun does not have to move in inertial space.

 

Derivation of Kepler Orbits

It's very important to understand that the shape and size of the orbits depend strictly on the initial total angular momentum and energies of the two bodies. 

To get started we will assume a circular orbit.  Then the planet distance from the barycenter (which is the center of the orbit) will be given by

                                                                                                          (1.7)

where  is the rotation rate and T is the period of rotation.  Then

                                                                                                    (1.8)

The rotation rate of the sun has to be the same as that of the planet but 180 degrees out of synchronization with the planet, and, to keep the center of mass fixed, the radius of the sun's orbit has to be

                                                                                                                (1.9)

 

Motion Around the Center of Mass When Masses are Comparable

The acceleration equations are:

m 1 r ¨ 1 = G m 1 m 2 | r 1 r 2 | 3 ( r 1 r 2 ) m 2 r ¨ 2 = G m 1 m 2 | r 1 r 2 | 3 ( r 1 r 2 ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGaamyBam aaBaaaleaacaaIXaaabeaakiqahkhagaWaamaaBaaaleaacaaIXaaa beaakiabg2da9iabgkHiTmaalaaabaGaam4raiaad2gadaWgaaWcba GaaGymaaqabaGccaWGTbWaaSbaaSqaaiaaikdaaeqaaaGcbaGaaiiF aiaahkhadaWgaaWcbaGaaGymaaqabaGccqGHsislcaWHYbWaaSbaaS qaaiaaikdaaeqaaOGaaiiFamaaCaaaleqabaGaaG4maaaaaaGccaGG OaGaaCOCamaaBaaaleaacaaIXaaabeaakiabgkHiTiaahkhadaWgaa WcbaGaaGOmaaqabaGccaGGPaaabaGaamyBamaaBaaaleaacaaIYaaa beaakiqahkhagaWaamaaBaaaleaacaaIYaaabeaakiabg2da9maala aabaGaam4raiaad2gadaWgaaWcbaGaaGymaaqabaGccaWGTbWaaSba aSqaaiaaikdaaeqaaaGcbaGaaiiFaiaahkhadaWgaaWcbaGaaGymaa qabaGccqGHsislcaWHYbWaaSbaaSqaaiaaikdaaeqaaOGaaiiFamaa CaaaleqabaGaaG4maaaaaaGccaGGOaGaaCOCamaaBaaaleaacaaIXa aabeaakiabgkHiTiaahkhadaWgaaWcbaGaaGOmaaqabaGccaGGPaaa aaa@6597@  

(1.10)

r ¨ 1 r ¨ 2 = G( m 1 + m 2 ) | r 1 r 2 | 3 ( r 1 r 2 ) MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiqahkhagaWaam aaBaaaleaacaaIXaaabeaakiabgkHiTiqahkhagaWaamaaBaaaleaa caaIYaaabeaakiabg2da9iabgkHiTmaalaaabaGaam4raiaacIcaca WGTbWaaSbaaSqaaiaaigdaaeqaaOGaey4kaSIaamyBamaaBaaaleaa caaIYaaabeaakiaacMcaaeaacaGG8bGaaCOCamaaBaaaleaacaaIXa aabeaakiabgkHiTiaahkhadaWgaaWcbaGaaGOmaaqabaGccaGG8bWa aWbaaSqabeaacaaIZaaaaaaakiaacIcacaWHYbWaaSbaaSqaaiaaig daaeqaaOGaeyOeI0IaaCOCamaaBaaaleaacaaIYaaabeaakiaacMca aaa@516F@  

(1.11)

r ¨ = G( m 1 + m 2 ) r 3 r MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiqahkhagaWaai abg2da9iabgkHiTmaalaaabaGaam4raiaacIcacaWGTbWaaSbaaSqa aiaaigdaaeqaaOGaey4kaSIaamyBamaaBaaaleaacaaIYaaabeaaki aacMcaaeaacaWGYbWaaWbaaSqabeaacaaIZaaaaaaakiaahkhaaaa@42A7@  

(1.12)

This is the Kepler equation and it has the law for the motion of the masses about their center of mass:

P 2 = 4 π 2 G( m 1 + m 2 ) a 3 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadcfadaahaa WcbeqaaiaaikdaaaGccqGH9aqpdaWcaaqaaiaaisdacqaHapaCdaah aaWcbeqaaiaaikdaaaaakeaacaWGhbGaaiikaiaad2gadaWgaaWcba GaaGymaaqabaGccqGHRaWkcaWGTbWaaSbaaSqaaiaaikdaaeqaaOGa aiykaaaacaWGHbWaaWbaaSqabeaacaaIZaaaaaaa@44D5@  

(1.13)

Since we want to know the motion of both masses individually we need to use the fact that  the center of mass remains stationary:

m 1 r 1 + m 2 r 2 =0 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaad2gadaWgaa WcbaGaaGymaaqabaGccaWHYbWaaSbaaSqaaiaaigdaaeqaaOGaey4k aSIaamyBamaaBaaaleaacaaIYaaabeaakiaahkhadaWgaaWcbaGaaG OmaaqabaGccqGH9aqpcaaIWaaaaa@402D@  

 

and then

r 1 - r 2 = m 1 + m 2 m 2 r 1 = m 1 + m 2 m 1 r 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaahkhadaWgaa WcbaGaaCymaaqabaGccaWHTaGaaCOCamaaBaaaleaacaWHYaaabeaa kiabg2da9maalaaabaGaamyBamaaBaaaleaacaaIXaaabeaakiabgU caRiaad2gadaWgaaWcbaGaaGOmaaqabaaakeaacaWGTbWaaSbaaSqa aiaaikdaaeqaaaaakiaahkhadaWgaaWcbaGaaCymaaqabaGccqGH9a qpcqGHsisldaWcaaqaaiaad2gadaWgaaWcbaGaaGymaaqabaGccqGH RaWkcaWGTbWaaSbaaSqaaiaaikdaaeqaaaGcbaGaamyBamaaBaaale aacaaIXaaabeaaaaGccaWHYbWaaSbaaSqaaiaaikdaaeqaaaaa@4E78@  

(1.14)

Then using the expression (1.12) for r we have the modified equations for the accelerations:

m 1 r ¨ 1 =G m 1 m 2 ( m 2 3 ( m 1 + m 2 ) 3 r 1 3 ) m 1 + m 2 m 2 r 1 m 2 r ¨ 2 =G m 1 m 2 ( m 1 3 ( m 1 + m 2 ) 3 r 1 3 ) m 1 + m 2 m 1 r 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGaamyBam aaBaaaleaacaaIXaaabeaakiqahkhagaWaamaaBaaaleaacaaIXaaa beaakiabg2da9iabgkHiTiaadEeacaWGTbWaaSbaaSqaaiaaigdaae qaaOGaamyBamaaBaaaleaacaaIYaaabeaakmaabmaabaWaaSaaaeaa caWGTbWaa0baaSqaaiaaikdaaeaacaaIZaaaaaGcbaGaaiikaiaad2 gadaWgaaWcbaGaaGymaaqabaGccqGHRaWkcaWGTbWaaSbaaSqaaiaa ikdaaeqaaOGaaiykamaaCaaaleqabaGaaG4maaaakiaadkhadaqhaa WcbaGaaGymaaqaaiaaiodaaaaaaaGccaGLOaGaayzkaaWaaSaaaeaa caWGTbWaaSbaaSqaaiaaigdaaeqaaOGaey4kaSIaamyBamaaBaaale aacaaIYaaabeaaaOqaaiaad2gadaWgaaWcbaGaaGOmaaqabaaaaOGa aCOCamaaBaaaleaacaaIXaaabeaaaOqaaiaad2gadaWgaaWcbaGaaG OmaaqabaGcceWHYbGbamaadaWgaaWcbaGaaGOmaaqabaGccqGH9aqp caWGhbGaamyBamaaBaaaleaacaaIXaaabeaakiaad2gadaWgaaWcba GaaGOmaaqabaGcdaqadaqaamaalaaabaGaamyBamaaDaaaleaacaaI XaaabaGaaG4maaaaaOqaaiaacIcacaWGTbWaaSbaaSqaaiaaigdaae qaaOGaey4kaSIaamyBamaaBaaaleaacaaIYaaabeaakiaacMcadaah aaWcbeqaaiaaiodaaaGccaWGYbWaa0baaSqaaiaaigdaaeaacaaIZa aaaaaaaOGaayjkaiaawMcaamaalaaabaGaamyBamaaBaaaleaacaaI XaaabeaakiabgUcaRiaad2gadaWgaaWcbaGaaGOmaaqabaaakeaaca WGTbWaaSbaaSqaaiaaigdaaeqaaaaakiaahkhadaWgaaWcbaGaaGOm aaqabaaaaaa@767A@  

(1.15)

These are two Kepler equations and the equations for the periods are:

P 2 = 4 π 2 ( G m 2 3 ( m 1 + m 2 ) 2 ) a 1 3 P 2 = 4 π 2 ( G m 1 3 ( m 1 + m 2 ) 2 ) a 2 3 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOabaeqabaGaamiuam aaDaaaleaaaeaacaaIYaaaaOGaeyypa0ZaaSaaaeaacaaI0aGaeqiW da3aaWbaaSqabeaacaaIYaaaaaGcbaWaaeWaaeaadaWcaaqaaiaadE eacaWGTbWaa0baaSqaaiaaikdaaeaacaaIZaaaaaGcbaGaaiikaiaa c2gadaWgaaWcbaGaaGymaaqabaGccqGHRaWkcaWGTbWaaSbaaSqaai aaikdaaeqaaOGaaiykamaaCaaaleqabaGaaGOmaaaaaaaakiaawIca caGLPaaaaaGaamyyamaaDaaaleaacaaIXaaabaGaaG4maaaaaOqaai aadcfadaqhaaWcbaaabaGaaGOmaaaakiabg2da9maalaaabaGaaGin aiabec8aWnaaCaaaleqabaGaaGOmaaaaaOqaamaabmaabaWaaSaaae aacaWGhbGaamyBamaaDaaaleaacaaIXaaabaGaaG4maaaaaOqaaiaa cIcacaGGTbWaaSbaaSqaaiaaigdaaeqaaOGaey4kaSIaamyBamaaBa aaleaacaaIYaaabeaakiaacMcadaahaaWcbeqaaiaaikdaaaaaaaGc caGLOaGaayzkaaaaaiaadggadaqhaaWcbaGaaGOmaaqaaiaaiodaaa aaaaa@5FA0@  

(1.16)

Since these periods are the same we must have

a 1 = m 2 m 1 a 2 MathType@MTEF@5@5@+= feaagKart1ev2aaatCvAUfeBSjuyZL2yd9gzLbvyNv2CaerbuLwBLn hiov2DGi1BTfMBaeXatLxBI9gBaerbd9wDYLwzYbItLDharqqtubsr 4rNCHbGeaGqiVCI8FfYJH8YrFfeuY=Hhbbf9v8qqaqFr0xc9pk0xbb a9q8WqFfeaY=biLkVcLq=JHqpepeea0=as0Fb9pgeaYRXxe9vr0=vr 0=vqpWqaaeaabiGaciaacaqabeaadaqaaqaaaOqaaiaadggadaWgaa WcbaGaaGymaaqabaGccqGH9aqpdaWcaaqaaiaad2gadaWgaaWcbaGa aGOmaaqabaaakeaacaWGTbWaaSbaaSqaaiaaigdaaeqaaaaakiaadg gadaWgaaWcbaGaaGOmaaqabaaaaa@3E6D@  

(1.17)

as expected to keep the center of mass stationary.  These expressions for the periods are taken from the following link:

https://physics.stackexchange.com/questions/382847/keplers-3rd-law-applied-to-binary-systems-how-can-the-two-orbits-have-differen