# Calculate $\int_0^{2\pi} \frac{\sin(t) + 4}{\cos(t) + \frac{5}{3}}dt$

I have to calculate $$\int_0^{2\pi} \frac{\sin t + 4}{\cos t + \frac{5}{3}}dt$$ using complex analysis.

I was thinking of setting $$z(t) = re^{it}$$ but I'm not sure what $$r$$ to pick or can I just pick any and is this even useful? Do I have to worry about the numerator of the integral? Before this I only had to calculate integral around some curve and then look at the singular values and use the residue theorem. Now it seems I have to do it the other way around?

HINT: split the integral into two summands: $$\int_0^{2\pi} \frac{\sin t + 4}{\cos t + \frac{5}{3}} dt = \int_0^{2\pi} \frac{\sin t}{\cos t + \frac{5}{3}} dt + \int_0^{2\pi} \frac{dt}{\cos t + \frac{5}{3}} =$$ $$=\left. -\log \left( \cos t + \frac{5}{3} \right) \right|_0^{2\pi} + 4\int_{|z|=1} \frac{1}{\frac{z+z^{-1}}{2} + \frac{5}{3}} \frac{dz}{iz}$$
Where you substitute $z=e^{it}$, so that $dz=ie^{it} dt= iz dt$ and $\cos t = \frac{e^{it}+e^{-it}}{2}=\frac{z+z^{-1}}{2}$.
Continuing, you get $$0+ \frac{24}{i} \int_{|z|=1} \frac{dz}{(z+3)(3z+1)} = \frac{24}{i} \left(2\pi i \operatorname{Res} \left( \frac{1}{(z+3)(3z+1)} , -\frac{1}{3} \right)\right) = 48 \pi \frac{1}{8} = 6 \pi$$