Computing an integral by making it into a complex integral. I am computing an integral
$$\int_0^{2\pi} \frac{\sin^2(\theta)}{5-3\cos(\theta)}$$
I introduced the substitution $z=e^{i \theta}$ which implies $\frac{dz}{zi}=d\theta$. Using the complex analysis for $\sin$ and $\cos$ and this substitution we can write them as
\begin{align}
\sin(\theta)= \frac{z-z^{-1}}{2i} && \cos(\theta)= \frac{z+z^{-1}}{2}
\end{align}
Thus we can see that $\sin^2(\theta)= \frac{z^2-z^{-2}-2}{-4}$. from there we have where $C$ is the unit circle,
$$\int _C \frac{\frac{z^2-z^{-2}-2}{-4}}{5-3/2(z+z^{-1})} \frac{dz}{iz}$$
Where we may simplify by multiplying the top and bottom by 4 and distributing the $z$ from the $dz$ term
$$\frac{1}{i}\int_C \frac{z^2-z^{-2}-2}{20z-6z^2+6}dz$$
Then we separate this into two integrals
$$\int_C \frac{z^2-z^{-2}-2}{20z-6z^2+6}dz= \int_C \frac{z^2-2}{20z-6z^2+6}dz+ \int_C \frac{-z^{-2}}{20z-6z^2+6}dz$$
Now we have to evaluate the two integrals but because our $C$ is the unit circle and the polynomial in the denominator has its roots outside the unit circle, we know the first integral will be an integral of an analytic function, thus it is zero. Does this seem acceptable so far? I would really appreciate comments.
 A: Your approach is reasonable, but there were a few careless/typographical errors along the way.  For example, since $\sin(z)=\frac{z-z^{-1}}{2i}$, then $\sin^2(z)=\frac{z^2+z^{-2}-2}{-4}\ne \frac{z^2-z^{-2}}{-4}$.

METHODOLOGY $1$:  MODIFY THE FORM OF THE INTEGRAND

However, there is a much more efficient way forward. Proceeding, note that we can write
$$\frac{\sin^2(\theta)}{5-3\cos(\theta)}=\frac59+\frac13\cos(\theta)-\frac{16}{9}\left(\frac{1}{5-3\cos\theta)}\right)$$
Then, we have
$$\begin{align}
\int_0^{2\pi}\frac{\sin^2(\theta)}{5-3\cos(\theta)}\,d\theta&=\frac{10\pi}{9}-\frac{16}{9}\oint_{|z|=1}\frac{1}{5-3\left(\frac{z+z^{-1}}{2}\right)}\,\frac{1}{iz}\,dz\\\\
&=\frac{10\pi}{9}-\frac{16}{9}\oint_{|z|=1}\frac{1}{5-3\left(\frac{z+z^{-1}}{2}\right)}\,\frac{1}{iz}\,dz\\\\
&=\frac{10\pi}{9}-\frac{32i}{9}\oint_{|z|=1}\frac{1}{(3z-1)(z-3)}\,dz\\\\
&=\frac{10\pi}{9}-\frac{32i}{9}(2\pi i)\text{Res}\left(\frac{1}{(3z-1)(z-3)},z=1/3\right)\\\\
&=\frac{10\pi}{9}-\frac{8\pi}{9}\\\\
&=\frac{2\pi}{9}
\end{align}$$


METHODOLOGY $2$:  BRUTE FORCE

$$\begin{align}
\int_0^{2\pi}\frac{\sin^2(\theta)}{5-3\cos(\theta)}\,d\theta&=\oint_{|z|=1}\frac{\left(\frac{z-z^{-1}}{2i}\right)^2}{5-3\left(\frac{z+z^{-1}}{2}\right)}\,\frac{1}{iz}\,dz\\\\
&=\frac{-i}{2}\oint_{|z|=1}\frac{(z^2-1)^2}{z^2(3z-1)(z-3)}\,dz\\\\
&=\pi\text{Res}\left(\frac{(z^2-1)^2}{z^2(3z-1)(z-3)}, z=0,1/3\right)\\\\
&=\pi\left(\frac{10}{9}-\frac89\right)\\\\
&=\frac{2\pi}{9}
\end{align}$$
as expected.

Note that the residue at $0$ can be evaluated as 
$$\lim_{z\to 0}\frac{d}{dz}\left(\frac{(z^2-1)^2}{(3z-1)(z-3)}\right)=\lim_{z\to 0}\left(\frac{4z(z^2-1)}{(3z-1)(z-3)}-\frac{(z^2-1)^2(6z-10)}{(3z-1)^2(z-3)^2}\right)=\frac{10}{9}$$
