Use residues to evaluate the definite integrals in $$\int \limits_0^{2\pi}\dfrac{\cos^23\theta\,\mathrm d\theta}{5-4\cos2\theta}=\dfrac {3\pi}8$$
Use residues to evaluate the definite integrals.
Thanks for help.
 A: I can give you a few hints, unless this is not homework and then I will fill in some details.  First of all, you can use the fact that, for any $y$:
$$\cos{y} = \frac12 \left (e^{i y}+e^{-i y}\right )$$
So let $z=e^{i x}$, and $dx=-i dz/z$.  This turns the real integral into a contour integral that may be evaluated using the residue theorem.  Now, I will just show the result, you will need to do some algebra.
$$\frac{i}{4} \oint_{|z|=1} \frac{dz}{z^5} \frac{\left (z^6+1\right)^2}{2 z^4-5 z^2+2}$$
The integral, according to the residue theorem, is $i 2 \pi$ times the sum of the residues of the poles inside $|z|=1$.  You will have to show that the poles are at $z=0$, $z=\pm \sqrt{2}$, and $z=\pm 1/\sqrt{2}$.  Off these poles, only the ones at $z=0$ and $z=\pm 1/\sqrt{2}$ have residues that count toward the value of the integral.
How do you compute the value of the residues?  For the simple poles (those at $\pm 1/\sqrt{2}$), I will give you an easy way to compute them if you do not know it yet.  

Let $f(z) = p(z)/q(z)$ and $z_0$ be a simple zero of $q$.  Then the
  residue of $f$ at $z=z_0$ is $p(z_0)/q'(z_0)$.

So in this case, plugging in $z=1/\sqrt{2}$, the residue is $-i 27/64$.  For $z=-1/\sqrt{2}$, I get the same value.
For the pole at $z=0$, however, we have a difficulty because the pole is fifth order.  In this case, the easiest thing to do is to simply find the coefficient of $z^4$ in the rational function piece of the integrand.  The Taylor expansion is actually not terrible:
$$\frac{\left (z^6+1\right)^2}{2 z^4-5 z^2+2} = \frac12 \left (1+2 z^6 + z^{12}\right) \left [1+\left (\frac{5}{2} z^2-z^4 \right )+\left (\frac{5}{2} z^2-z^4 \right )^2+\cdots \right ] $$
You should be able to see that the coefficient of $z^4$ in this expansion is $21/8$.  Thus the integral is
$$i 2 \pi \left (i \frac{21}{32} - 2 i \frac{27}{64} \right ) = \frac{3 \pi}{8}$$
as asserted.
