Circumference of an Ellipse

I saw this meme recently floating around the web.

Mr Incredible shocked about the circumference of an ellipse

Surely it can’t be that hard to find the circumference of an ellipse? For axes of $a$ and $b$ wouldn’t it simply be something like $P=2\pi (a+b)/2$ in a similar way to a circle being $P=2\pi r$?

We can derive the formula ourselves to check this.

First we calculate the length of a small arc around the ellipse $dl$ and then sum them all together as we vary the angle and integrate $\theta$ from 0 to $2\pi$. For a very small length we can use Pythagoras and express the displacement in terms of $dx$ and $dy$.

$$ dl = \sqrt{dx^2 + dy^2} $$

To determine $dx$ and $dy$ we can use our knowledge of the coordinates of the points of an ellipse, $$ x = a \cos(\theta), \qquad y = b \sin(\theta), $$ and a quick derivative yields $$ dx = -a \sin(\theta) d\theta, \qquad dy = b \cos(\theta) d\theta. $$

Substituting this into our previous equation for $dl$, we can then express the length in terms of $\theta$ and $d\theta$ as $$ dl = \sqrt{a^2 \sin^2(\theta) + b^2 \cos^2(\theta)} d\theta $$ Having our length in this form is excellent as it is parameterised only by one variable. If we sum up all the angles from $\theta =0$ to $\theta=2\pi$ we can then derive $P$! Let’s do that.

$$ P = \int dl = \int_0^{2\pi} \frac{dl}{d\theta} d\theta = \int_0^{2\pi} \sqrt{a^2 \sin^2(\theta) + b^2 \cos^2(\theta)} d\theta $$

And a quick integration yields our closed form solution… oh I see. This integral is not integrable and is known as an Elliptic Integral.

For a circle both radii are equal $r=a=b$ and so since $\sin^2(\theta) + \cos^2(\theta)=1$ the integral simplifies rapidly by $$ P = \int_0^{2\pi} r d\theta = 2\pi r$$ which is our standard equation for the circumference.

Maybe now it makes some sense for why Mr Incredible looks so stressed.