Complex integral over a circle In an exercise, I'm supposed to assume that $|a| < r < |b|$ and prove that $\displaystyle\int_{\gamma} \frac{1}{(z - a)(z - b)} dz = \frac{2 \pi i}{a - b}$, where $\gamma$ is a circle of radius $r$ centered at the origin with positive orientation. So I had the idea to express this integral as $\frac{1}{a - b} \displaystyle\int_{\gamma} \frac{1}{z - a} - \frac{1}{z - b} dz$. Then I tried to evaluate each of these separately, but I don't really know what to do. I get $\displaystyle\int_{0}^{2 \pi} \frac{i r e^{it}}{r e^{it} - a} dt$ for the first term. How am I supposed to integrate this? I can't substitute $u = re^{it}$, can I?

Use the Cauchy integral formula. Also, note that although this function has 2 poles, $a$ and $b$, only $a$ is inside the contour.
If you don't yet know the Cauchy integral formula, I think that $\frac{1}{a-b}\int_\gamma \frac{1}{z-a}-\frac{1}{z-b}\ dz$ is a good start.
$\frac{1}{a-b}\int_\gamma \frac{1}{z-a}\ dz$ is $\frac{2\pi i}{a-b}$ (use the substitution $w=z-a$). The second integral is zero, since the function is holomorphic everywhere. In other words, if we use the definitions to write it out as a real integral plus $i$ times a real integral, we will have conservative vector fields and so the integral around a closed contour is $0$.
