A Formula for the Perimeter of an Ellipse

Unlike for circles, there isn’t a simple exact closed formula for the perimeter of an ellipse. We compare several well-known approximations, and conclude that a formula discovered by Ramanujan is our favourite, due to its simplicity and extreme accuracy.

An ellipse satisfies that equation:

$$ \frac{x^2}{a^2}+\frac{y^2}{b^2} =1 $$

For $a=b$, we have a circle, but if $a \neq b$ the result is like a circle that has been elongated in either the horizontal or vertical direction.

Now we know that the area of a circle is $A =\pi r^2$, and some of you might also know that the area of an ellipse with semi-minor and semi-major axes $a,b$ is simply given by $A = \pi a b$.

The fact that these two formulae are very similar is probably not surprising.

Therefore, one might reasonably expect that if the formula for the perimeter of a circle is $P = 2\pi r$, then there would be a similar, and relatively simple formula for the for ellipse.

Surprisingly, and very unfortunately, this is not the case. There is no simple exact closed formula for the perimeter of an ellipse.

Now it turns out that there are some expressions that give the result exactly, but they are typically in terms of advanced functions that are not studied until the later years of undergraduate mathematics. Specifically, the exact expression for the perimeter of an ellipse is can be written as :

$$ P_{\textrm{exact}}(a,b) \; =\quad   4 a \; E(1-\frac{b^2}{a^2}) \;=\quad  2\pi a \;\;  _2F_1 \left( \frac{1}{2}, -\frac{1}{2}; 1;1-\frac{b^2}{a^2} \right)  \;=\quad  2\pi \sqrt{ab} \; P_{1/2} \left( \frac{a^2+b^2}{2ab} \right)$$

where $E(\cdot)$ is the complete elliptic integral of the second kind; $_2F_1(\cdot)$ is the Gaussian hypergeometric function; and $P_{\nu}(z)$ is a Legendre Function.

Therefore through the use of specialist mathematical software, we can calculate the perimeter of an ellipse to arbitrary precision, and the compare this value to various simpler approximations.

The following expressions have been proposed over the centuries, with the last one discovered by Ramanujan.

\begin{array}{rl}
P_1(a,b) &= \pi (a+b)  \nonumber \\
P_2(a,b) & = \pi \sqrt{2 (a^2+b^2)}  \nonumber  \\
P_3(a,b) &= \pi \sqrt{2(a^2+b^2)- (a-b)^2/2} \nonumber \\
P_4(a,b) &= \pi \left( 3(a+b) – \sqrt{(3a+b)(a+3b)} \right) \nonumber \end{array}

 

Firstly, we note that for $a=b$, these all turn out to be exactly equivalent to $P=2 \pi a$, which is a good start. Therefore, these approximations only differ from the exact value as they become more elongated.

Then for the really elongated ones, such as when it is 8x wider than it is high, the errors for $P_1, P_2, P_3,P_4$ is around 20%, 10%, 3%, 0.3%, respectively. That is, the final expression $P_4$ is by far the most accurate and yet is still relatively simple.

 

***

My name is Martin Roberts. I have a PhD  in theoretical physics. I love maths and computing. I’m open to new opportunities – consulting, contract or full-time – so let’s have a chat on how we can work together!

Come follow me on Twitter: @Techsparx!
My other contact details can be found here. 

Other Posts you may like

Leave a Reply

Your email address will not be published. Required fields are marked *