Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Kepler's Second Law - reaching an unsolvable equation?

  1. Jul 30, 2015 #1
    I have been working on modeling the orbit of a satellite using Kepler's second law of planetary motion, and I have gotten to a point that is really quite bothersome to me. Essentially, my problem boils down to solving this equation for θ (angular position of the planet from the focus of the orbit in radians) in terms of t (time elapsed since perigee in seconds):

    (b²sin θ)/(a²cos θ - ca) = tan (2πt/P)

    Everything else is a constant; P is the orbital period in seconds, a is the semi-major axis, b is the semi-minor axis, c is the focal distance of the orbit, and π is, well, pi. I can produce my work leading up to this point, although I'm fairly certain it is correct and not terribly relevant to the problem at hand. Is anyone able to solve this?
  2. jcsd
  3. Jul 30, 2015 #2


    User Avatar
    Science Advisor
    Gold Member

    Putting this into another form, the equation is:

    [itex]\frac{W \sin(\theta)}{X \cos(\theta) - Y}=Z[/itex]
    for some [itex]W,X,Y,[/itex] and [itex]Z[/itex].

    Since [itex]\sin(\theta)=\sqrt{1-cos^{2}(\theta)}[/itex]

    you can use this substitution, square both sides of the equation, and then solve for [itex]Cos(\theta)[/itex] with the quadratic formula.
  4. Jul 30, 2015 #3
    Wow, thanks, I can't believe I missed that. I have tried something similar before, but I didn't use any substitutions and got all the constants mixed in with each other, eventually leading me to a nasty quartic. At that point I just dropped it.

    Anyway, this is the work I went through:

    [itex](\frac{W\sqrt{1-\cos^2\theta}}{X\cos\theta - Y})^2 = Z^2[/itex]

    [itex]\frac{W^2(1 - \cos^2\theta)}{X^2\cos^2\theta - 2XY\cos\theta + Y^2} = Z^2[/itex]

    [itex]W^2 - W^2\cos^2\theta = Z^2X^2\cos^2\theta - 2XYZ^2\cos\theta + Z^2Y^2[/itex]

    [itex]0 = (Z^2X^2 + W^2)\cos^2\theta - 2XYZ^2\cos\theta + Z^2Y^2 - W^2[/itex]

    [itex]\cos\theta = \frac{2XYZ^2 \pm \sqrt{4X^2Y^2Z^4 - 16X^2Y^2 + 8X^2W^2 - 8Y^2W^2 + 4W^4}}{4X^2 + 2W^2}[/itex]

    [itex]\theta = \arccos(\frac{2XYZ^2 \pm \sqrt{4X^2Y^2Z^4 - 16X^2Y^2 + 8X^2W^2 - 8Y^2W^2 + 4W^4}}{4X^2 + 2W^2})[/itex]

    This will give me 2 answers for theta, no?
  5. Jul 30, 2015 #4


    User Avatar
    Science Advisor
    Gold Member

    perhaps, but will only one make physical sense? What happens if [itex]t[/itex] is near zero?
  6. Jul 30, 2015 #5
    Ok, so I spent some time trying to simulate this, and it simply wasn't working correctly. I went back to my other work leading up to the equation above and realized I had made a critical mistake. So let me start from the beginning:

    Kepler's Second Law: [itex]\frac{A}{t} = \frac{2\pi t}{P}[/itex] where P is the orbital period of the object, t is time elapsed, and A is total area swept out after t has elapsed.

    Area of an ellipse: [itex]\pi a b[/itex]

    Area of a segment of an ellipse: [itex]A = \frac{1}{2} ab\theta[/itex] where θ is measured from the center of the ellipse counter-clockwise from the positive x-axis, and A is the area of the segment encompassed within θ.

    Polar equation of an ellipse with a focus at the origin: [itex]r = \frac{b^2}{a - c\cos\theta}[/itex]

    I derived my initial equation from these. It required that I manipulate the area of a segment equation to where θ was measured from the focus instead of the center of the ellipse. Let's say θ1 is the angle measured from the center of ellipse, and θ2 is the angle measured from the focus, and r is the length of the segment from the focus to the border of the ellipse measured at θ2. I developed this relation, unknowing at the time that it only works situationally:

    [itex]\theta_1= \arctan(\frac{r \sin\theta_2}{r \cos\theta_2 - c})[/itex]

    It is correct in the 1st quadrant but nowhere else. How can I develop a correct equation modeling the relationship between angle from the center of the ellipse and the angle from its focus? Or do I need to use a different situational equation for each quadrant?
  7. Jul 31, 2015 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    This problem ( position as a function of time) has to be done by iteration.

    For how to do this, check here:

    http://www.slideshare.net/IngesAerospace/orbital-mechanic-4-position-and-velocity-as-a-function-of-time [Broken]
    Last edited by a moderator: May 7, 2017
  8. Jul 31, 2015 #7
    Yes, I'm starting to see that now. It is because of the inability to solve for the definite area of an ellipsoidal segment where θ is measured from the focus of the ellipse, no? In this illustration, that means finding the total area right of r and above the x-axis. That would mean finding the area of the segment θ1 and adding the area of triangle rck to it. The relationship between θ1 and θ2 is:

    [itex]θ_1 = \pi - \arccos(\frac{c - r\cos θ_2}{\sqrt{r^2 + c^2 - 2rc\cos θ_2}})[/itex]

    Regardless of that equation, the area that I want would be:

    [itex]A = \frac{abθ_1 + cr\sin θ_2}{2}[/itex]

    Which I believe is unsolvable for θ2 even with the correct relation between θ1 and θ2, right?
  9. Aug 1, 2015 #8
    Ok, so in a last-ditch effort to find a closed-form solution to the problem (I'm stubborn like that) I tried to integrate the polar equation of the ellipse to get the area swept out at θ. I have gotten to a point where I must integrate this:

    [itex]A = \int {\frac{1}{2} (\frac{b^2}{a - c\cos\theta})^2 d\theta}[/itex]

    And I honestly have no idea how to do so, and to my knowledge has not been done before. And even if I do, I'm not sure I will be able to derive a closed-form solution for θ in terms of A.
  10. Aug 1, 2015 #9
    Alright, I've done some work and I've found the integral I needed and thus a closed-form solution for A as a function of θ. I then plug this in for A in Kepler's law:

    [itex]\frac{A}{t} = \frac{\pi ab}{P_o}[/itex]

    And attempt to solve for θ. The integral is really quite nasty, so I made some substitutions to make the equation as a whole to begin with. In this image, line 1 is the raw form of Kepler's equation where I substituted the integral in for A. After that I made simple substitutions and simplifications and got to the last line; at this point I am pretty sure there is no closed-form solution for θ:


    If nobody has any secret methods or anything that would help solve this, then I guess I'm moving on to Newton's method.
  11. Aug 2, 2015 #10
    You are in good company in trying to solve this... google "Kepler's problem".
    There are some series expansions that are nice, but they don't converge for all eccentricities.
  12. Aug 2, 2015 #11
    Yeah, I would have done that had I wanted to. Unfortunately like I said I'm stubborn and I was trying my best to solve this non-iteratively. However after much frustration I have given up that notion. Unfortunately again, I'm still stubborn and want to solve it myself given Kepler's equations. It seems quite simple and straightforward to me, so I feel like I'm doing something wrong. I'm going to start with my destination; the angular position of the planet θ. Wikipedia gives the following solution for θ as a function of the eccentric anomaly E (e is the eccentricity of the orbit):
    [itex]\theta = \arccos (\frac{\cos E - e}{1 - e \cos E})[/itex]

    That means I must find E. Ok, Kepler has his nifty little equation relating E to the mean anomaly M:
    [itex]M = E - e\sin E[/itex]

    which unfortunately is not solvable for E. Before I can get into iterative solving, I must find M. Again, another nifty equation:
    [itex]M = \sqrt{\frac{G(M_1 + M_2)}{a^3}}t[/itex]

    where G is the gravitational constant, M1 and M2 are the masses of the two bodies in the system in kilograms, a is the semi-major axis of the orbit in meters, and t is time elapsed since perihelion in seconds. So I find M, then I plug it back into Kepler's equation, set the equation equal to 0, and begin iterative solving. After I'm done and I have an approximate solution for E, I then simply plug this solution into the first equation I referenced and suddenly I have the planet's angular position relative to the sun as a function of time. Is it really that easy?
  13. Aug 3, 2015 #12
    Pretty much. There are literally hundreds of ways of solving it, from most of the great mathematicians from Kepler until now. Most celestial mechanics books have a chapter devoted to its solution. What you wrote just above is how most people do it these days.
  14. Aug 3, 2015 #13
    One last question, what do you call the angle between the semi-major axis and the x-axis of an arbitrary coordinate system? I already know that this is the orbital inclination when viewing the system from the side, but I'm talking about when viewing the system top-down. In other words, the angle that defines how the orbit's ellipse is rotated around the sun (since not all planets have their perihelion perfectly lined up with the x-axis).
  15. Aug 4, 2015 #14

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    As far as I know, there is no name for that angle. There is a somewhat related concept, the longitude of periapsis. This is the sum of the longitude of ascending node and the argument of periapsis. These two angles are measured on two planes, so the longitude of periapsis is not an "angle"; it's instead a dogleg or compound angle.
  16. Aug 4, 2015 #15
    I was looking at this image on Wikipedia, and its definition for the argument of periapsis is the angle on the orbital plane between the periapsis and where the orbital plane intersects the reference plane. Is this not what I want? If you rotate the orbital plane counter-clockwise (in a relative way, I'm talking about looking at the orbital plane face-on and "spinning" it around its center), that increases the argument of periapsis, which sounds like what I'm looking for. Am I missing something?
  17. Aug 4, 2015 #16

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    No, it's not what you want (at least it's not what you asked about). You asked for "the angle between the semi-major axis and the x-axis of an arbitrary coordinate system". That would be the angle through the origin from the reference direction to the periapsis in that wikipedia diagram you referenced. That angle has no name. The argument of periapsis is the angle on the orbital plane from the ascending node to periapsis.
  18. Aug 4, 2015 #17
    Alright, I'm going to try my best to explain what exactly I'm looking for. Modeling the orbit of a planet with the solution I posted above will give me the orbit flat against the plane of reference with the perihelion lined up with the reference direction (the positive x-axis). I use the orbital inclination given to then elevate the orbital plane some angle relative to the reference plane. The last step in modeling the orbit correctly is finding how the new orbital plane is rotated about its own focus, which is what I'm asking about.

    Like I said, it seems to me the argument of periapsis is what I want based on the image. I first elevate the orbital plane i degrees relative to the reference plane to get the true orbital plane. Afterwards, I rotate this true orbital plane ω degrees to find how this inclined orbital plane is rotated relative to the sun.

    EDIT: Just thought of a simpler way of explaining it; if the orbital plane and the reference plane happen to be the same, how much do I need to rotate the orbital plane counterclockwise about its focus to get the true orbit?
  19. Aug 6, 2015 #18

    D H

    User Avatar
    Staff Emeritus
    Science Advisor

    In that case, yes, you are asking about the argument of periapsis.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook