How do I calculate $$\int_{0}^{2\pi} (2+4\cos(t))/(5+4\sin(t)) dt$$
I've recently started calculating integral via the residue theorem. Somehow I'm stuck with this certain integral. I've substituted t with e^it and received two polynoms but somehow I only get funny solutions.. Could someone please help me finding the residues?
It looks like you are already familiar with the substitution $z=e^{it}$ which allows us to transform this real integral into a contour integral. Note that on the unit circle, $\bar{z} = 1/z$, so we get $\cos t = (z + 1/z)/2$, $\sin t = (z - 1/z)/2i$, and $dt = dz/iz$. Substituting in, we get $$\int_{0}^{2\pi}\frac{2+4\cos t}{5 + 4\sin t}\,dt = \oint_{|z|=1}\frac{2 + 4(\frac{z + 1/z}{2})}{5 + 4(\frac{z-1/z}{2i})}\,\frac{dz}{iz} = \oint_{|z| = 1}\frac{2(1 + z + z^2)}{2z(z+\frac{i}{2})(z+2i)}\,dz$$ The only singularities that lie within the contour are the simple poles at $z=0$ and $z=-i/2$. $$\textrm{Res}(0) = \frac{2}{-2} = -1$$ $$\textrm{Res}\left(-\frac{i}{2}\right) = \frac{\frac{3}{2}-i}{\frac{3}{2}} = 1 - \frac{2i}{3}$$ Taking $2\pi i \sum \textrm{Res}$, our answer is just $4\pi/3$.