Kepler Orbit Cheat Sheet
(why I should not be allowed to write textbooks, part 342)
This is mainly because I wanted to have all of the formulas in one place. Also curious to see how much I can compress the derivation and still have it vaguely make sense. Also I wanted to learn more MathML.
The 2 body problem
We have two bodies with mass. Gravity attracts them to each other. How do they move?
The first order of business is to arrange our own seating so that their center of mass is stationary from our point of view. Once we do that, what we see is
- a big mass at a small distance away from the center, moving at small velocity and
- a small mass at a big distance away moving at big velocity ;
We also notice that, at any given moment, you can always draw a line through the origin and both bodies. The velocities will usually not be parallel to the line, but there's always a plane that contains the line and one of the velocities, and since the other velocity is always the exact opposite direction from the first, it, too will be in the plane. And then there's nothing that's ever trying to pull either of the bodies out of that plane, we realize that plane doesn't move, they stay in it forever and so we can just rotate our coordinates so that it's the x-y plane, forget about z, and pretend we're in a 2-dimensional universe from now on.
And now for The Trick.
Whether you're following Hamilton's or Langrange's way of doing things (skipping how that works for now), the energies, as functions of positions and velocities, give you everything you need to know to solve for how things are going to move. So let's just write them down. Total kinetic energy will (because I hate dividing by 2) be half of
while the potential energy, which will be all due to gravity here, is
What's interesting/weird here is how we have managed to recast everything in terms of just the relative distance and relative velocity and that these are the same formulas we'd get if we were trying to figure out what happens with a single object of "reduced" mass bouncing around a gravity well generated by something at the origin with mass (that has been magically nailed in place so that it doesn't move). Any solution we get for the latter problem will readily translate back.
One possibly-slight-surprise here is that, despite my talk of "small" and "big", we are, at no point ever actually depending on, say, , or even . m could even be bigger and this will all still work; you just have to be sure to remember to do that last step (i.e., translate back to a 2-body problem and not be surprised when it turns out the "big" object is moving around, too).
So, scratch one body. Yay.
Also, we will not actually be mentioning the reduced mass μ ever again because from now on, we can just do everything in terms of energy/whatever per unit mass (of the one object).
Alsoalso, we can introduce a new constant so as not to have to look at that ever again, either. As it happens, in real life, k tends to be way more accurately known than any of G, M, or m, individually, so good riddance.
One body inverse-square force problem
Now that we're down to one body, in a gravity well generated by (SHUT UP), what happens?
If the body's position in polar coordinates is , then we have radial and angular velocities being and , respectively, where the • is time derivative, i.e., , and so on. (Yes, we're doing the Dot Thing.)
All forces come out of the center, so angular momentum per unit mass
will be constant. Which, first of all, means will be always increasing or always decreasing as time goes on (good to know!).
Also, if you can imagine lots of really thin triangles with base and height (and therefore area ), we see that is is twice the area being swept out per unit time, and therefore if we eventually get an orbit that's periodic with period (spoilers!), then the total area enclosed will be (save for future reference).
For any , there will be a corresponding circular orbit radius , which I am introducing now solely for my own convenience and may or may not have anything to do with where the object is actually spending its time.
The second constant of motion will be the energy per unit mass, , expressed thusly (again multiplying by 2, just because I can):
Now if what we want is to get the shape of the orbit/trajectory, then we don't care quite so much about or as we do about their ratio , which inspires the following truly awesome and sneaky maneuver:
which we can square and substitute into the previous equation. Then, dividing both sides by we get
where we now see two terms on the right as a square crying out to be completed, so we add to both sides, while at the same time noticing that we can also add arbitrary constant crap to the thing we're differentiating in the middle, hence
where on the left we have also consolidated yet more constant crap into a new constant, the eccentricity (but introducing it as because the stuff on the right can't be negative).
And now we stop to ask the class, "So, does anyone know of some that does (a constant)?"
Inevitably, some nerd in the front who did the assigned reading or maybe they really are able to figure out on the fly that you can rearrange this into and then of course you want which both the df and the square root expression change to cos-or-sin()s which cancel leaving you with and then the something has to be ±θ plus a constant will be all, "Oo, pick me!" and then we get our answer (this is actually how all differential equations get solved, in case you didn't know):
where the particular choice to have it be −cos() rather than +sin() makes no difference — because of that extra which covers all of the bases — but happens to be easy to rearrange to get the version more people are familiar with:
And yes, I quietly rotated the coordinate system to make the go away again because I was pretty sure I would get tired of looking at it. Good catch.
The first thing to notice is that if then this is a circular orbit and now, hopefully, the mysterious name I gave for should start making sense.
The second thing to notice is that if there's a range of angles where the stuff in parentheses can go negative, i.e., everything around 180° between the two magic angles where is actually forbidden. Which would then mean we have something coming in from infinity at one of the magic angles, swooping around to do a close flyby at , and then fucking off back to infinity at the other magic angle … what you might call a hyperbolic trajectory.
If instead , then θ goes all of the way around without any problems, … must, in fact, do so and keep doing so (thank you, angular momentum), which then means we are indeed stuck in something periodic, with r varying between a closest approach , at , to a maximum distance , at . Adding these and dividing by 2 gives us the semi-major axis
the distance to the actual geometric center of this thing, which usually will be some distance away () from where all of the gravity is coming from. (Also, don't freak about the minus sign; means has to be negative.)
If you're having trouble figuring out what this shape is, it may be more recognizable in Cartesian coordinates. However, life will be easier if we also shift the origin, so we set , at which point the orbit becomes
or, canceling the s, getting by itself on one side, and squaring everything:
or, eventually
which, as long as , is taking a unit circle and stretching it, — in the direction by and in the direction by — which is what an ellipse is.
Since the unit circle has area , our ellipse has to have area , per that thing we saved for future reference earlier, which, after we square it and cancel an from both sides, rearranges into
which is that square-cube law that's awfully useful for getting orbital periods from orbit sizes and vice versa.
If , then is negative, which is weird but not a showstopper, and we end up with the term being negative, which means we have a hyperbola instead of an ellipse (surprise!). And then the stuff after that (defining as the square root of a negative number, etc) fails and you don't get a period out of this (again, surprise! it's not periodic anymore).
We will leave the case — where the energy is zero and the object is always travelling at exactly the escape velocity, no more, no less — as an exercise.