Perimeter of an Ellipse
On the Ellipse page we looked at the definition and some of the simple properties of the ellipse, but here we look at how to more accurately calculate its perimeter.

Perimeter
Rather strangely, the perimeter of an ellipse is very difficult to calculate!
There are many formulae, here are a few interesting ones: 
Approximation 1
This approximation will be within about 5% of the true value, so long as r is not more than 3 times longer than s (in other words, the ellipse it is not too "squashed"):
Approximation 2
The famous Indian mathematician Ramanujan came up with this better approximation:
Infinite Series 1
This in an exact formula, but it requires an "infinite series" of calculations to be exact, so in practice you still only get an approximation.
Firstly you must calculate "ε" (called the "eccentricity"):
Then use this "infinite sum" formula:
Which expands like this:
The terms continue on infinitely, and unfortunately you must calculate a lot of terms to get a reasonably close answer.
Infinite Series 2
But my favorite exact formula (because it gives a very close answer after only a few terms) is as follows:
Firstly you must calculate "h":
Then use this "infinite sum" formula:
(Note: the is the Binomial Coefficient
with halfinteger factorials ... wow!)
It may look a bit scary, but it expands to this series of calculations:
The more terms you calculate, the more accurate it becomes (the next term is h^{4}/16384, which is getting quite small)
Comparing
Just for fun, I used the two approximation formulas, and the two exact formulas (but only the first four terms, so it is still just an approximation) to calculate the perimeter for the following values of r and s:

r 
s 
Approx 1 
Approx 2 
ε 
Series 1 
h 
Series 2 
Circle 
10  10  62.832  62.832  0  62.832  0  62.832 

10  5  49.673  48.442  0.866  48.876  0.111  48.442 

10  3  46.385  43.857  0.954  45.174  0.29  43.859 

10  1  44.65  40.606  0.995  43.204  0.669  40.623 
Lines 
10  0  44.429  39.834  1  42.951  1  39.884 
 When s=r, the ellipse is a circle, and the perimeter is 2πr (62.832 in our example).
 When s=0 (the shape is really two lines back and forth) the perimeter is 4r (40 in our example).
They all get the perimeter of the circle correct, but only "Approximation 2" and "Series 2" get close to the value of 40 for the extreme case of s=0.
My guess is that Infinite Series 2 is the best of them.
