complex integration, how to evaluate it?

I have this exercise:

Show that if $|a| < r <|b|$, then $\int_\gamma \! \frac{1}{(z-a)(z-b)} \, \mathrm{d}z=\frac{2\pi i}{a-b}$, where $\gamma$ denotes the circle centered at the origin, of radius $r$, with positive orientation.

I will use the parameterisation $re^{it}$ and integrate from $0$ to $2\pi$. But I get stuck. One way I tried was partial fractions, I know that :

$$\frac{1}{(z-a)(z-b)}=\frac{-1/(b-a)}{z-a}+\frac{1/(b-a)}{z-b},$$ but when I try to integrate the first part I get:

$$\int_0^{2\pi} \! \frac{-1/(b-a)}{re^{it}-a}rie^{it} \, \mathrm{d}t,$$ but how do I evaluate this? My first instinct is to use substitution, but it is not clear if I can when we are dealing with complex numbers. Any tips?


Your partial fraction decomposition is the key: Note that $\frac{1}{z-b}$ does not have a pole inside $\gamma$, and hence its integral around $\gamma$ is $0$.

Now, for the integral of $\frac{1}{z-a}$ try the Cauchy integral formula.