Wednesday, September 28, 2011

Kepler Candy

German Mathematician/Astronomer Johannes Kepler
A student of mine presented a problem to me today.  His physics book was using Newton's 2nd law to derive Kepler's third law of planetary motion.  The authors substituted in 2πr for the distance a body would travel in one orbit.

"But wait!" said student, "my buddy Johannes says that all orbits are ellipses, not circles!  What are the authors trying to pull?"  Student concluded correctly that the authors were using circles to model the elliptical orbits, and so the question he asked me is, "How accurate is this model?  Why do we use it?"

To answer the second question, it's because the equation for the circumference of a circle is a lot easier than the equation for the circumference of an ellipse.  Don't believe me?  C_c=2πr.  On the other hand, C_e is:
Equation of an Ellipse...

But wait!  There's more!  What's this E(stuff)?  Well Doubting-Sceptic-Who-Still-Thinks-This-Is-Simple, this is called the "complete elliptical integral of the second kind."  Sounds complicated, huh?  It's because it is.  Take a look at it:
There's a reason why you didn't learn this in school.

So, now that we know what C_e and C_c are, we need to figure out how closely one approximates the other.  We also need to look at how big our approximating circle is.  First off, let's call the distance from the circumcenter of an ellipse to the edge the fake-radius (or "radius" for short).  We want our average "radius" to be somewhat close to the radius of our model circle.  Let's start by figuring out the average "radius" of an ellipse.

So....we're going to be adding a bunch of "radii" together.  We have an uncountable number of distances.  Oh noes!  What should we do?!

I'd call integral man, myself...
 Integral man to the rescue!  Hooray!  Let f(Θ) be the function which, given an angle Θ, gives the distance from the circumcenter to the edge of the ellipse at the point of intersection.  Then the average "radius" would be:


Let's take a quick look at what f looks like.  It's going to start at (0,a), head downwards to (π/2,b), then go back up to a, go down to b, and back up to a.  Oh, wait, that sounds familiar!
Bam!!!  cos(x)'d
 Now, keep in mind that cosine models a circle.  The exact shape doesn't matter...what does matter is the symmetry on a horizontal and vertical axis.  Now, the integral of cos(x) is 0 on this interval.  So the average value is also 0.  Our graph, displaying the same properties of symmetry, is exactly the same, but translated upwards by (a+b)/2.  So our average "radius" is (a+b)/2.

So now we're comparing C_c=2πr=π(a+b) to C_e, which was still a mess.  But things get a little bit better.  Check out this approximation for an ellipse:
Look at that π(a+b) that's just begging to be canceled out!
 So if we look at C_e/C_c, we simplify the mess to be just the mess equation in the parentheses.  Since we're looking at how accurate the circle is modeling our ellipse, let's graph this and see how different values for and b affect our model.
Thanks Conrad!  You're a pal!

 Since we're looking at differences, we're only looking at positive a and (top right corner).  Since we're looking at a ratio, we want this to be close to 1.  As we can see, it looks that no matter the size of the ellipse, we have a relatively close approximation, using the circle, to the circumference.

I hope this satisfied the math appetite you built up during my 2-month hiatus.  Special thanks for the folks at WolframAlpha/Mathematica for giving me free 3d graphing technology.  You guys are the best!  <3