Using residue theorem, find the value of $$~\int_0^{2\pi}\dfrac{d\theta}{1-2a\cos\theta + a^2}$$ for $~|a|<1~.$
I know that the value of the integral is $~\frac{2\pi}{1-a^2}~$(I found it by using the rule of normal definite integral), but don't know how to find the same by using residue theorem.
Any one please provide me a complete solution by using residue theorem.