Evaluate $ \int_{0}^{2\pi} \frac{1}{12+5 \cos(t)}dt$ without residues So I have to evaluate the next integral, without using the residue theorem, but writing the next integral as an integral of a complex function over the unit circle (see substitution below):
$ \int_{0}^{2\pi} \frac{1}{12+5 \cos(t)}dt$
I know what the answer is going to be: $\frac{2\pi}{\sqrt{119}}$, but I get the following:
substituting $z=e^{it}$, $dt = \frac{dz}{iz}$ and working out the denominator:
$$-2i \oint_{|z|=1} \frac{1}{5z^2+24z+5} \,dz$$
Partial fractions:
$$\frac{-10i}{2\sqrt{119}} \oint_{|z|=1} \frac{-1}{5z+\sqrt{119}+12} -\frac{1}{-5z+\sqrt{119}-12}\,dz$$
Now by the Cauchy Riemann Theorem, I get:
$\frac{-10i}{2\sqrt{119}} (\frac{-2\pi i}{5} -  \frac{-2\pi i}{5}) = 0$ 
since here (https://en.wikipedia.org/wiki/Cauchy%27s_integral_formula) $f(z)=1$ so the integral equals $\frac{1}{5}*f(a)*2\pi i = \frac{2\pi i}{5}$.
I thought maybe I confused some - signs, but I ran over my solutions multiple times. Perhaps someone could help me out :)

We first replace the integral operator with $2\int_0^\pi dt$, based on the $t\mapsto 2\pi-t$ symmetry. On this integration range, $x:=\tan\frac{t}{2}$ is strictly increasing. Since $dt=\frac{2dx}{1+x^2}$ and $\cos t=\frac{1-x^2}{1+x^2}$, the integral is $4\int_0^\infty\frac{dx}{17+7x^2}=\frac{4}{7}\frac{\pi}{2}\sqrt{\frac{7}{17}}=\frac{2\pi}{\sqrt{119}}$.
