How to integrate $\int\limits_{|z| = R} \frac{|dz|}{|z-a|^2}$ 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?
 A: 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|}$$
A: You may assume $a=|a|>0$. On $\gamma:=\partial D_R$ one has $\bar z={R^2\over z}$; furthermore the parametrization
$$\gamma:\quad \phi\mapsto z=R e^{i\phi}\qquad(0\leq\phi\leq2\pi)$$
gives $dz=iR e^{i\phi}\ d\phi$ and therefore
$$|dz|=Rd\phi=-i{R\over z}\ dz\ .$$
(Complexifying the real $|dz|$ in this way is a trick that will enable us to use the residue theorem later on.)
Altogether it follows that your integral ($=: J$) can be written as
$$J=\int\nolimits_\gamma{-i R/z\over(z-a)\bigl({R^2\over z}-a\bigr)}\ dz={iR\over a}\int\nolimits_\gamma{dz\over(z-a)\bigl(z-{R^2\over a}\bigr)}\ .$$
The last integral can now be evaluated by means of the residue theorem. When $a<R$ we have a single pole in $D_R$ at $z=a$, and standard computation rules tell us that
$$J=2\pi i\cdot {iR\over a}{1\over a-{R^2\over a}}={2\pi R\over R^2-a^2}\ .$$
I leave the case $a>R$ to you.
