wrog: (wmthumb)
wrog ([personal profile] wrog) wrote2023-12-18 03:26 am
Entry tags:

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 M at a small distance r away from the center, moving at small velocity v and
  • a small mass m at a big distance R away moving at big velocity V;
Mr=mR; Mv=mV; and they're always opposite each other, mirroring each other's motions. Thank you, conservation of momentum.

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

mV2 + Mv2 = (m(MM+m)2 + M(mM+m)2) (V+v)2 = MmM+m(V+v)2

while the potential energy, which will be all due to gravity here, is

(GMm=G(M+m)(MmM+m) R+r)

What's interesting/weird here is how we have managed to recast everything in terms of just the relative distance R+r and relative velocity V+v 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 μ=Mm/(M+m) bouncing around a gravity well generated by something at the origin with mass M+m (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, mM, or even m<M. 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 kG(M+m) 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 k/r gravity well generated by (SHUT UP), what happens?

If the body's position in polar coordinates is r,θ, then we have radial and angular velocities being r and rθ, respectively, where the • is time derivative, i.e., r=dr/dt, and so on. (Yes, we're doing the Dot Thing.)

All forces come out of the center, so angular momentum per unit mass

Lr2θ

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 r and height r (and therefore area =½r2), we see that L is is twice the area being swept out per unit time, and therefore if we eventually get an orbit that's periodic with period T (spoilers!), then the total area enclosed will be ½LT (save for future reference).

For any L, there will be a corresponding circular orbit radius r0=L2/k, 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, E, expressed thusly (again multiplying by 2, just because I can):

2E=r2+ (r2θ2=(L2=kr0)r2)2kr

Now if what we want is to get the shape of the orbit/trajectory, then we don't care quite so much about r or θ as we do about their ratio dr/, which inspires the following truly awesome and sneaky maneuver:

r = drdt = ( dt = θ=Lr2)dr = Ld(−1r)

which we can square and substitute into the previous equation. Then, dividing both sides by L2=kr0 we get

2Ekr0 = (d(−1r))2 + 1r2 2rr0

where we now see two terms on the right as a square crying out to be completed, so we add 1/r02 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

1r02 (ε21+ 2Er0k) = (d(1r01r))2 + (1r01r)2

where on the left we have also consolidated yet more constant crap into a new constant, the eccentricity (but introducing it as ε2 because the stuff on the right can't be negative).

And now we stop to ask the class, "So, does anyone know of some f(θ) that does f2+(df/)2=f02 (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 ±df/f02f2= and then of course you want f=f0sin-or-cos(something) which both the df and the square root expression change to cos-or-sin()s which cancel leaving you with d(something)=± 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):

1r01r=εr0cos(θθ0)

where the particular choice to have it be −cos() rather than +sin() makes no difference — because of that extra θ0 which covers all of the bases — but happens to be easy to rearrange to get the version more people are familiar with:

r0=r(1+εcosθ)

And yes, I quietly rotated the coordinate system to make the θ0 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 ε=0 then this is a circular orbit and now, hopefully, the mysterious name I gave for r0 should start making sense.

The second thing to notice is that if ε>1 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 cosθ=−1/ε 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 ε<1, 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 r0/(1+ε), at θ=, to a maximum distance r0/(1ε), at θ=180°. Adding these and dividing by 2 gives us the semi-major axis

ar0/(1ε2)=k/2E

the distance to the actual geometric center of this thing, which usually will be some distance away (aε) from where all of the gravity is coming from. (Also, don't freak about the minus sign; ε<1 means E 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 rcosθ,rsinθ=xaε,y, at which point the orbit becomes

(r0=a(1ε2))=r+ε(xaε)

or, canceling the aε2s, getting r by itself on one side, and squaring everything:

(aεx)2=r2=(xaε)2+y2

or, eventually

1= x2 a2 + y2 (a2(1ε2)=ar0)

which, as long as ε<1, is taking a unit circle and stretching it, — in the x direction by a and in the y direction by ba1ε2=ar0 — which is what an ellipse is.

Since the unit circle has area π, our ellipse has to have area πab=½LT, per that thing we saved for future reference earlier, which, after we square it and cancel an r0 from both sides, rearranges into

(2πT)2a3=k

which is that square-cube law that's awfully useful for getting orbital periods from orbit sizes and vice versa.

If ε>1, then a is negative, which is weird but not a showstopper, and we end up with the y2 term being negative, which means we have a hyperbola instead of an ellipse (surprise!). And then the stuff after that (defining b 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 ε=1 case — where the energy E is zero and the object is always travelling at exactly the escape velocity, no more, no less — as an exercise.


Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting