Exercise: Evaluating integration $\int_{|z|=r} \frac{1}{(z-a)(z-b)}dz$, $|a|This is an exercise from Stein-Shakarchi's Complex Analysis: evaluate integration $$\int_{|z|=r} \frac{1}{(z-a)(z-b)}dz, \,\,\,\, |a|<r<|b|. $$
The problem I am facing is the following. It is sufficient to find $\int_{|z|=r} \frac{1}{z-a}dz$ and $\int_{|z|=r} \frac{1}{z-b}dz$ (and use partial fraction methd). 
This exercise is in first chapter, where the author introduces the integration of $f$ over a parametrized smooth curve $\gamma$. However, I didn't find any theorem in first chapter applicble to evaluate this integration. I tried to evaluate it through parametrization $\gamma(t)=re^{it}$ for $0\leq t\leq 2\pi$. Then $$\int_{|z|=r} \frac{1}{z-a}dz=\int_0^{2\pi} \frac{rie^{it}}{re^{it}-a}dt$$. But I couldn't solve this last integration. Can you help me?

I have seen that this can be solved using some Cauchy's integration formua; BUT, this is taken in second chapter of the book, whereas this exercise is in first chapter. 
 A: why don't you expand $$\frac{1}{z - a} = \frac{1}{z} \frac{1}{1 - a/z} = \frac{1}{z}\{1 + a/z + a^2/z^2 + \cdots  \}$$ 
and $$\frac{1}{z - b} = -\frac{1}{b} \frac{1}{1 - z/b} = -\frac{1}{b}\{1 + z/b + z^2/b^2 + \cdots  \}$$ and use the fact $\int_{|z| = r} z^n dz = 0$ for $n \neq - 1$ and $\int_{|z| = r} z^{-1} dz = 2\pi i.$ 
A: $I=\int_\gamma \frac{1}{z-a}dz=\int_0^{2\pi}\frac{rie^{it}}{re^{it}-a}dt=\int_0^{2\pi}\frac{ri}{r-ae^{-it}}dt$
Now,$r>|a|\implies |a/r|<1$
So,$I=i\int_0^{2\pi}(1+\frac{a}{r}e^{-it}+(\frac{a}{r})^2 e^{-2it}+...)dt=i(2\pi+0+0+...)=2\pi i$ (Integrating term by term as the convergence is uniform)
Similarly,$\int_\gamma \frac{1}{z-b}dz=0$
So,we are done.
A: Assigned
$$f(z) ≔ \frac{1}{(z-a)(z-b)},\space\space\space\space\space\space\space z\in\mathbb{C}\setminus\{ a,b\}$$
and given the parametrization
$$γ(t) ≔ re^{it},\space\space\space\space\space\space\space0≤t≤2π,$$
observe that $a$ and $b$ are single poles of $f$, holomorphic over its domain, with $a$ lying within the circle of boundary $γ$, oriented in counterclockwise direction.
Hence
$$∮_γ f = 2πi \space \mathrm{res}_a ⁡f = 2πi \space \lim_{z→a}⁡(z-a)f(z) = \frac {2π}{a-b}i.$$
A: If you are just interested in evaluating the last integral then note that

$$ \int \frac{f'(t)}{f(t)}dt = \ln(f(t))+C $$

