I want to evaluate $\displaystyle \frac{1}{2\pi}\int_{0}^{2\pi} \frac{1}{1-2rcos\theta + r^2} d\theta$ for $0 < r< 1$.
I was thinking or replacing $2cos\theta = (e^{i\theta} + e^{-i\theta}) $ and trying to reduce this to an integral over the unit circle but I get stuck early on.
I would very much appreciate it if anyone would either use my proposed methodology to solve it or maybe come up with a better one if mine does not seem to work.