I need to compute the integral $\int_{0}^{2\pi}\frac{1}{1 + \sin^2(x)}dx = 4.4429$ utilizing the Cauchy theorem. However, I'm encountering a discrepancy where my result is consistently half of the expected value. Could someone kindly help me identify the error in my calculations?
$$\int_{0}^{2\pi}\frac{1}{1 + (sinx)^{2}}dx = \int_{0}^{2\pi}\frac{1}{1 + (\frac{e^{ix} - e^{-ix}}{2i})^{2}} = \int_{0}^{2\pi} \frac{-4}{-4 + (e^{ix} - e^{-ix})^{2}} = \int_{0}^{2\pi} \frac{-4}{-6 + e^{2ix} + e^{-2ix}} = \int_{0}^{2\pi} \frac{-4\cdot e^{2ix}}{-6\cdot e^{2ix} + e^{4ix} + 1} \cdot \frac{d(e^{2ix})}{2i\cdot e^{2ix}} = \int_{0}^{2\pi}\frac{-4z}{-6z + z^{2} + 1} \cdot \frac{dz}{2i\cdot z} = \frac{-2}{i} \int_{0}^{2\pi}\frac{1}{z^2 - 6z + 1} \cdot dz$$ $\gamma$ is a line (line integral): $\gamma(t) = e^{2ix}$ ,$x \in [0, 2\pi]$
I have calculated the roots of the polynomial: $z^{2} - 6z + 1 = 0$
The roots are: $z_{1} = 3 + 2 \sqrt{2}$, $z_{2} = 3 - 2 \sqrt{2}$
Here I calculated the line integral:
$$\frac{-2}{i} \oint_{\gamma}^{} \frac{\frac{1}{(z - (3 + 2 \sqrt(2))}}{(z - (3 - 2 \sqrt(2))} = \frac{-2}{i} \cdot 2\pi i \cdot f(3 - 2 \sqrt2) = \frac{\pi}{\sqrt2} = 0.22144 $$