1. ## Verify the following

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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