Here is the integral I am trying to evaluate:
$$\int_0^{2\pi}\dfrac{\sin^2x}{5+4\cos x}\ dx$$
I am getting the final answer as $-{\pi}/8$ but the correct answer is ${\pi}/4$
Here are the steps I did: $$\begin{align} \dfrac{\sin^2x}{5+4\cos x} dx &= \\\\ &=\dfrac{\left(\dfrac{z-1/z}{2i}\right)^2}{5+4\dfrac{z+1/z}{2}} \dfrac{dz}{iz} \\\\ &=\dfrac{-1}{4i}\dfrac{{z^2+1/z^2-2}}{5z+2(z^2+1)} dz \\\\ &=\dfrac{-1}{4i}\dfrac{{z^4+1-2z^2}}{{z^2}(5z+2({z^2+1}))} dz \\\\ &=\dfrac{-1}{4i}\dfrac{{z^4+1-2z^2}}{{z^2}(2z+1)(z+2)} dz \end{align}$$
Clearly, singularities within $|z|=1$ are $0$, and $\frac{-1}{2}$. After applying Residue theorem, I am getting $\frac{-\pi}{8}$
Are my steps correct?