Calculating the area of an ellipse I need to calculate the area of an ellipse described in polar coordinates by the following equation 
$$r=\frac{p}{1+\epsilon \cos{\theta}},\qquad |\epsilon| < 1$$
I need to so it by solving the following formula
$$A=\int_{\theta_0}^{\theta_f} \frac{1}{2}r^2\textrm{d}\theta = \int_0^{2\pi}\frac{1}{2}\frac{p^2}{(1+\epsilon \cos{\theta})^2}\textrm{d}\theta$$
The problem is that I don't even know where to start with this integral. The problem seems a lot easier if I could transport it to the form
$$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$
without losing the parameters $\epsilon$ and $p$. Never the less, I would still love if somebody could show me a direct integration of this formula! Thanks. 
 A: Okay, the $p^2/2$ obviously comes out of the integral, so you are left with doing
$$ \int_0^{2\pi} \frac{d\theta}{(1+\epsilon \cos{\theta})^2} = 2\int_0^{\pi} \frac{d\theta}{(1+\epsilon \cos{\theta})^2} $$
since $\cos{(2\pi-\theta)}=\cos{\theta}$.
You could use the $t$-formulae directly, but I'd recommend looking at
$$ I(a)-\int_0^{\pi} \frac{d\theta}{(a+\cos{\theta})} $$
and then differentiating with respect to $a$: this integral is a lot easier to do. The integral you want is $-I'(1/\epsilon)/\epsilon^2$.
Setting $t = \tan{\tfrac{1}{2}\theta}$, $d\theta = \frac{2 \, dt}{1+t^2}$, and
$$ \cos{\theta} = \frac{1-t^2}{1+t^2}, $$
which then gives you
$$ I(a) = 2\int_0^{\infty} \frac{2 \, dt}{1+t^2} \frac{1+t^2}{(1-t^2)+a(1+t^2)} = 4\int_0^{\infty} \frac{dt}{ (a-1)t^2+(a+1) }, $$
which can be done in the usual way: substitute $t= \sqrt{\frac{a+1}{a-1}} \tan{x}$, which gives the answer
$$ I(a) = \frac{2\pi}{\sqrt{a^2-1}}. $$
Then
$$ -\frac{I'(1/\epsilon)}{\epsilon^2} = \frac{2\pi}{(1-\epsilon^2)^{3/2}} $$
A: One may use contour integration to evaluate the integral.  We will start by using the approach that Chappers introduced.  To that end, we write
$$I(\epsilon)=\int_{0}^{2\pi}\frac12 \frac{p^2}{(1+\epsilon \cos \theta)^2}d\theta=\frac{p^2}2 \frac{d}{d\epsilon}\int_{0}^{2\pi} \frac{1}{(1/\epsilon +\cos \theta)}d\theta$$
Then, we let $z=e^{i\theta}$.  Thus, $\cos \theta =\frac12(z+z^{-1})$ and $d\theta = dz/(iz)$.  This transforms the last integral to a unit-circle contour  integration in the complex z-plane.  Thus
$$\int_{0}^{2\pi} \frac{1}{(1/\epsilon +\cos \theta)}d\theta=-2i\oint_{|z|=1} \frac{dz}{z^2+(2/\epsilon)z+1}$$
The integrand has singularities at $z=z_{\pm}=-\frac1{\epsilon}(1 \pm \sqrt{1-\epsilon^2})$.  
Inasmuch as $|\epsilon|<1$, the only singularity contained within the unit circle is at $z=z_{-}=-\frac1{\epsilon}(1 - \sqrt{1-\epsilon^2})$.  
Thus, the Residue is 
$$\frac{1}{(z_{-}-\,z_{+})}=\frac{1}{(-\frac1{\epsilon}(1 - \sqrt{1-\epsilon^2}))-(-\frac1{\epsilon}(1 + \sqrt{1-\epsilon^2}))}=\frac{\epsilon}{2\sqrt{1-\epsilon^2}}$$ 
and the integral $I(\epsilon)$ is 
$$I(\epsilon)=\frac{p^2}2 \frac{d}{d\epsilon}\left((-2i)(2\pi i) \frac{\epsilon}{2\sqrt{1-\epsilon^2}}\right)=\frac{p^2 \pi }{(1-\epsilon)^{3/2}}$$
