I need to integrate, $\int\limits_{|z| = R} \frac{|dz|}{|z-a|^2}$ where $a$ is a complex number such that $|a|\ne R$.
So first I tried polar coordinates, which gives something I cannot continue.
Then I tried to write $|dz| = rd\theta = dz/ie^{i\theta}$ and I have $$\int\limits_{|z| = R} \frac{dz}{ie^{i\theta}(z-a)(\overline{z}-\overline{a})}$$
which makes me want to use cauchy's integral formula, but I'm not sure if it has a pole at $z = a$ or not.
How to I calculate this integral?
First sub $z=R e^{i \phi}$, $dz = i R e^{i \phi} d\phi$, $|dz|=R d\phi$. Then realize that
$$|z-a|^2 = R^2 + |a|^2 - 2 R |a| \cos{\phi}$$
(I set an arbitrary phase to zero - it won't matter for the integration.)
The integral then becomes
$$R \int_0^{2 \pi} \frac{d\phi}{R^2 + |a|^2 - 2 |a| R \cos{\phi}}$$
Now - and this might seem weird - we go back to a complex representation so we may evaluate the integral using the residue theorem. That is, set $\zeta = e^{i \phi}$, $d\phi = -i d\zeta/\zeta$ and get that the integral is equal to
$$i R \oint_{|\zeta|=1} \frac{d\zeta}{|a| R \zeta^2 - (|a|^2+R^2) \zeta + |a| R} $$
To evaluate via the residue theorem, we find the poles of the integrand, which are at $\zeta=|a|/R$ and $\zeta=R/|a|$. Clearly, the analysis depends on whether $|a|$ is greater than or less than $R$. For example, when $|a| \lt R$, the integral is, by the residue theorem,
$$i 2 \pi (i R) \frac{1}{2 |a| R (|a|/R) - |a|^2-R^2} = \frac{2 \pi R}{R^2-|a|^2}$$
The analysis is similar for $R \lt |a|$. The end result is that
$$\oint_{|z|=R} \frac{|dz|}{|z-a|^2} = \frac{2 \pi R}{\left|R^2-|a|^2 \right|}$$