Exercise: Evaluating integration $\int_{|z|=r} \frac{1}{(z-a)(z-b)}dz$, $|a|<r<|b|$ This is an exercise from Stein-Shakarchi's Complex Analysis: evaluate integration $$\int_{|z|=r} \frac{1}{(z-a)(z-b)}dz, \,\,\,\, |a|&lt;r&lt;|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.
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.$
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.$$