Finding out the perimeter of the ellipse? I was just messing around with the maths when I realised a way of finding the perimeter of the ellipse.
First you start by representing any given point in the ellipse in this way:
$$ \vec{r} = \begin{pmatrix} 
a \cos{\theta} \\
b \sin{\theta}
\end{pmatrix}
$$
Taking in account that a represents the semi-major axes of the ellipse and b the semi-minor axes.
Then, you find the distance between two points
$$
\Delta s^2 = \Delta x^2 + \Delta y^2 \\
$$
Take the sum of all of this distances:
$$
\lim_{n \to \infty} \sum_{i=1}^{n} \sqrt{\Delta x_i^2 + \Delta y_i^2} \equiv \int_{a}^{b} \sqrt{dx^2 + dy^2}
$$
Parametrize the curve with respect to $\theta$:
$$
\int_{a}^{b} \sqrt{\left ( \frac{dx}{d\theta} \right ) ^2 + \left (\frac{dy}{d\theta} \right ) ^2 } \;d\theta
$$
$$
\frac{dx}{d\theta} = a \frac{d \cos{\theta}}{d \theta} = -a \sin{\theta}
$$
$$
\frac{dy}{d\theta} = b \frac{d \sin{\theta}}{d \theta} = b \cos{\theta}
$$
And finally you get this formula:
$$
\int_{0}^{\varphi} \sqrt{ a^2 \sin^2({\theta}) + b^2 \cos^2({\theta})} 
  \;d\theta  
$$
Taking in account that $\varphi$ represents until what "angle" you want to find the perimeter (if you could talk about angles in an ellipse)
I used an online numerical integrator to try to find a solution. This is my formula compared to Ramanujan's one: https://www.desmos.com/calculator/f3qcjauuq3. Both values are pretty close to each other.
Also I've tried to solve this, when $a = b$. In other words, when the ellipse is no more an ellipse and it is a circunference. Giving me a good and coherent result:
$$a = b = r$$
$$
\int_{0}^{2 \pi} \sqrt{ r^2 \sin^2({\theta}) + r^2 \cos^2({\theta}) }  \;d\theta = \int_{0}^{2 \pi} r\sqrt{\sin^2({\theta}) + \cos^2({\theta}) }  \;d\theta =
\int_{0}^{2 \pi} r d\theta = \theta r \Big|_0^{2 \pi} = 2 \pi r - 0 r = 2 \pi r
$$
$$
\therefore \int_{0}^{2 \pi} \sqrt{ r^2 \sin^2({\theta}) + r^2 \cos^2({\theta}) }  \;d\theta = 2 \pi r
$$
The thing is, I have trouble in finding the antiderivative of the ellipse formula. What are the methods that I could use to find it? Could you give me any exact solutions?
I could give further explanation if needed, with pictures and animations, etc.
Note: Correct me if I made any mistake or if I forgot something in the process.
Thanks for the help :)
 A: Good work so far. The perimeter of an ellipse with semi major and semi minor axes $a,b$ should be
$$P(a,b)=\int_0^{2\pi}\sqrt{a^2\cos^2\theta+b^2\sin^2\theta}~\mathrm d\theta$$
Which we'll rewrite a bit, by adding and subtracting  $a^2\sin^2$
$$P(a,b)=\int_0^{2\pi}\sqrt{a^2\cos^2\theta+a^2\sin^2\theta+b^2\sin^2\theta-a^2\sin^2\theta}~\mathrm{d}\theta$$
Now using $\cos^2+\sin^2=1$, we have removed the cosine term:
$$P(a,b)=\int_0^{2\pi}\sqrt{a^2+(b^2-a^2)\sin^2\theta}$$
We'll rewrite this again as
$$P(a,b)=a\int_0^{2\pi}\sqrt{1-\left(1-\frac{b^2}{a^2}\right)\sin^2\theta}$$
However due to symmetry of the ellipse, we know this is just four times the integral taken from $0$ to $\pi/2$, so
$$P(a,b)=4a\cdot \int_0^{\pi/2}\sqrt{1-\left(1-\frac{b^2}{a^2}\right)\sin^2\theta}~\mathrm d\theta$$
But this is just the complete elliptic integral of the second kind
Which I'll denote as
$$P(a,b)=4a\cdot \operatorname{Eli}_2\left(\sqrt{1-\frac{b^2}{a^2}}\right)$$
Approximations
The complete elliptic integral of the second kind has a series expansion:
$$\operatorname{Eli}_2(z)=\frac{\pi}{2}\left[1-\sum_{n=1}^\infty\left(\frac{(2n-1)!_2}{(2n)!_2}\right)^2\frac{1}{2n-1}z^{2n}\right]$$
Where $!_2$ is a double factorial. (I dislike the "$!!$" notation as I find it misleading.) Take $z=\sqrt{1-b^2/a^2}$ and use as many terms as you wish for as good an approximation as you wish.
