# Integrating around an ellipse

I want to integrate:

$$\int^{2\pi}_0 \frac 1 {a^2\cos(t)^2 + b^2\sin(t)^2} dt$$

I think that this is integrating $\int_\gamma \frac{1}{|z|^2}\frac{1}{iz}dz$ around an ellipse $\gamma$. But I don't think that helps me because that's not a holomorphic function. I don't see any way to bring what I know about complex analysis (which isn't much) to bear on this problem.

Hint: let $z=e^{it}$, use Euler's formulas, and rewrite the integral as an integral around the unit circle.
• I think this leads to a rational function in $z$ integrated around the unit circle. So now I can break this into partial fractions and integrate those seperately? – Jack M Jun 7 '14 at 10:49
Break into 2 part: $0$ to $\pi$ and $\pi$ to $2\pi$.
For $0$ to $\pi$ do the substitution $u=cot(t)$ then $t=acot(u)$ so $dt=-\frac{1}{u^{2}+1}$. Limit change to $\infty$ to $-\infty$. We have $a^{2}\cos(t)^{2}+b^{2}\sin(t)^{2}=\frac{a^{2}u^{2}+b^{2}}{u^{2}+1}$ so after everything we get $\int\limits_{-\infty}^{\infty}\frac{1}{a^{2}u^{2}+b^{2}}du$. After taking out the constant factor we reduce to find $\int\limits_{-\infty}^{\infty}\frac{1}{u^{2}+c}du$ for some constant $c$. Substitute once more $v=\frac{u}{\sqrt{c}}$ and after taking out the constant factor we reduce to compute $\int\limits_{-\infty}^{\infty}\frac{1}{v^{2}+1}dv$. Now we know the antiderivative of this: $atan(v)$ so this is done.
For $\pi$ to $2\pi$ you pretty much do the same thing. In fact, after the substitution you will get back the same integral as above.