I'm doing some practice for a complex variables exam and was working on the following integral $$\int_{0}^{2\pi} \frac{1}{5-3sin(\theta)} d\theta$$ I was feeling fairly comfortable solving it, but I think I am making an algebraic error somewhere along the line, because my answer disagrees with what I find when I check the integral online.
My work:$$\int_{0}^{2\pi} \frac{1}{5-3sin(\theta)} d\theta$$ Let $z= e^{i\theta}$; then $\frac{dz}{zi} = d\theta$. Substituting we get
$$\int_{\left\lvert{z}\right\rvert =1} \frac{1}{(5-3[\frac{1}{2i}(z- \frac{1}{z})])iz} dz=$$ $$\int_{\left\lvert{z}\right\rvert =1} \frac{1}{5iz-3iz[\frac{1}{2i}(z- \frac{1}{z})]} dz=$$ $$\int_{\left\lvert{z}\right\rvert =1} \frac{1}{5iz-(\frac{3}{2}z^2 - (\frac{3}{2}))} dz=$$ $$\frac{-1}{2}\int_{\left\lvert{z}\right\rvert =1} \frac{1}{(3z-i)(z-i3)} dz=$$
Here, we may apply the residue theorem. $z = i/3$ is a simple pole of the function inside the region, while $z = 3i$ lies outside of the region.
$$Res(f(z); i/3) = \lim \limits_{z \to i/3} (z-(i/3))\frac{1}{(3z-i)(z-i3)} = \lim \limits_{z \to i/3} \frac{1}{z-i3} = \frac{-8}{3}i$$
So then
$$\int_{0}^{2\pi} \frac{1}{5-3sin(\theta)} d\theta = \frac{-1}{2}\int_{\left\lvert{z}\right\rvert =1} \frac{1}{(3z-i)(z-i3)} dz= (-1/2)(2\pi i) Res(f(z); i/3) = (-1/2)(2\pi i) (\frac{-8}{3}i) = -\frac{8\pi}{3}$$
whereas the correct answer should apparently be $\frac{\pi}{2}$. Sorry if my error is totally obvious, but I've done this problem three separate times and have not been able to get the correct answer, and I want to verify my error is not coming from misunderstanding how to solve this variety of problem.
Thank you in advance!
And furthermore $$ \frac{1}{z-3i}\underset{z \rightarrow i/3}{\rightarrow}\frac{1}{i\left(\frac{1}{3}-3\right)}=\frac{3i}{8} $$