Evaluate $\int_0^{2\pi} \frac{\sin^2\theta}{1+\cos^2\theta}\,d\theta$ using residues

complex integrationcomplex-analysisresidue-calculus

I have the following integral and I want to evaluate it using residues

$$I=\int_0^{2\pi} \frac{\sin^2\theta}{1+\cos^2\theta}d\theta$$

By using the transformation $\frac{1}{z}=e^{-i\theta}$, I got to show that

$$I=i\int_C\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}dz$$
where $C$ is the centered unit circle.

I'm trying to use Cauchy's Residue Theorem, as we have 3 poles inside C: $z=0$, $z=i\sqrt{3-2\sqrt{2}}$ and $z=-i\sqrt{3-2\sqrt{2}}$. However, I'm really struggling to compute the residues of $z=i\sqrt{3-2\sqrt{2}}$ and $z=-i\sqrt{3-2\sqrt{2}}$ by hand.

Any tips or help to compute them?

Best Answer

Note that $\sqrt{3-2\sqrt2}=\sqrt2-1$. So, since $\pm i\left(\sqrt2-1\right)$ is a simple root of $z(z^4+6z^2+1)$, you have\begin{align}\operatorname{res}_{z=\pm i\left(\sqrt2-1\right)}\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}&=\operatorname{res}_{z=\pm i\left(\sqrt2-1\right)}\frac{z^4-2z^2+1}{z^5+6z^3+z}\\&=\left.\frac{z^4-2z^2+1}{5z^4+18z^2+1}\right|_{z=\pm i\left(\sqrt 2-1\right)}\\&=\frac{3-2\sqrt2}{4-3\sqrt2}.\end{align}Besides,$$\operatorname{res}_{z=0}\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}=\left.\frac{z^4-2z^2+1}{5z^4+18z^2+1}\right|_{z=0}=1.$$

So, you want to compute $\int_0^{2\pi}R(\cos\theta,\sin\theta)\,\mathrm d\theta$, with $R(x,y)=\frac{y^2}{1+x^2}$. But then you define$$f(z)=\frac1zR\left(\frac{z-1/z}2,\frac{z-1/z}{2i}\right)=-\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}$$and then\begin{align}\int_0^{2\pi}\frac{\sin^2\theta}{1+\cos^2\theta}\,\mathrm d\theta&=\int_0^{2\pi}R(\cos\theta,\sin\theta)\,\mathrm d\theta\\&=\frac1i\int_0^{2\pi}e^{-i\theta}R\left(\frac{e^{i\theta}+e^{-i\theta}}2,\frac{e^{i\theta}-e^{-i\theta}}{2i}\right)ie^{i\theta}\,\mathrm d\theta\\&=\frac1i\int_C-\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}\,\mathrm dz\\&=-2\pi\sum_{z_0\in\left\{0,\pm i\left(\sqrt2-1\right)\right\}}\operatorname{res}_{z=z_0}\frac{z^4-2z^2+1}{z(z^4+6z^2+1)}\\&=-2\pi\left(1+2\frac{3-2\sqrt2}{4-3\sqrt2}\right)\\&=2\pi\left(\sqrt2-1\right).\end{align}