1. ## Verify the following

Verify $\int_{-\pi}^{\pi}\frac{d\theta}{1+sin^2\theta} = \pi\sqrt2$

Now, $sin^2\theta = \frac{1-cos2\theta}{2}$

so $\int_{-\pi}^{\pi}\frac{d\theta}{1+sin^2\theta} = \int_{-\pi}^{\pi}\frac{d\theta}{1+\frac{1-cos2\theta}{2}}$

$= \int_{-\pi}^{\pi}\frac{2d\theta}{3-cos2\theta}$

Now let $u= 2\theta$ , $d\theta =du/2$

$= \int_{-\pi}^{\pi}\frac{2\frac{du}{2}}{3-cos(u)}$

$cos(u) = \frac{1}{2}(z+\frac{1}{z})$ ; $du=\frac{dz}{iz}$

$= \int_{|z|=1}\frac{\frac{dz}{iz}}{3-\frac{1}{2}(z+\frac{1}{z})}$

$= \int_{|z|=1}\frac{\frac{dz}{iz}}{3-\frac{1}{2}(\frac{z^2+1}{z})}$

$= \int_{|z|=1}\frac{\frac{dz}{iz}}{3-\frac{z^2-1}{2z}}$

$= \int_{|z|=1}\frac{\frac{dz}{iz}}{\frac{6z-z^2-1}{2z}}$

$= \int_{|z|=1}(\frac{dz}{iz}}) \frac{2z}{6z-z^2-1}}$

$= \int_{|z|=1}(\frac{dz}{i}}) \frac{2}{6z-z^2-1}}$

$= \int_{|z|=1} \frac{2i}{z^2-6z+1} dz$

$= \int_{|z|=1} \frac{2i}{(z-3-2\sqrt2)(z-3+2\sqrt2)} dz$

but only $z= 3-2\sqrt2$ is in the contour but Res(f, $3-2\sqrt2$) $= -\frac{i}{2\sqrt2}$

and $-\frac{i}{2\sqrt2} * 2i\pi = \frac{\pi}{\sqrt2} \neq \pi\sqrt2$, so i'm missing a factor of 2 somewhere.