Hi

I've been trying out some exam questions but have become stuck on one and was hoping someone out there might be able to help me.

The question is:

Evaluate using the method of residues

$\displaystyle \int_{0}^{2\pi}\frac{\cos2\theta \: d\theta}{1-2acos\theta + a^2}$

So far I have that

$\displaystyle \int_{0}^{2\pi}\frac{\cos2\theta\:d\theta}{1-2acos\theta+a^2}$ = $\displaystyle \frac{1}{2i}\int\frac{z^4+1}{z^3(a^2-az-az^-1+1)}$

as $\displaystyle cos2\theta= \frac{(z^2+z^-2)}{2} $and $\displaystyle d\theta=\frac{dz}{iz}$

I've tried to multiply all of this out and tidy up but the algebra is causing me problems from this point on and I was hoping you might be able to tell me where I'm going wrong.

Any suggestions would be gratefully appreciated

Thanks