There are 3 masses with mass
Assume that the mass of is very large ( like the Sun comparing to the Earth and Mars ) the position of it remains in the origin
My question is what is the path of and ? Is the path also an ellipse ?
Perturbed ellipse.
Look at several possibilities:
1. Planet m2 has a circular orbit near m1; planet m3 has a circular orbit far from m1. As m3 orbits [m1;m2] the center of gravity changes, which will modify the orbit of m3.
2. m2 & m3 are of equal mass and have common center of mass orbit and far from m1.
2a. same as 2 but both are close to m1.
3. m2 & m3 are of equal mass and at equal distance but on opposite sides of m1.
You'll need to determine the orbital velocity that will maintain the longest stable orbit.