<s>[INST] Evaluating $\int_C\frac{z+1}{z^2-2z}dz$, where $C$ is the circle $|z|=3$ 
Evaluate the contour integral $\int_C\frac{z+1}{z^2-2z}dz$ using Cauchy's residue theorem, where $C$ is the circle $|z|=3$.

I see that the function has 2 singularities, at 0 and 2, so I need to find the residue of each. By examining the Laurent series, I have the following:
$$f(z)=\left(\frac{z+1}{z}\right)\left(\frac{1}{z-2}\right)=\left(\frac{z+1}{z^2}\right)\left(\frac{1}{1-2/z}\right)=\left(\frac{1}{z}+\frac{1}{z^2}\right)\left(\frac{1}{1-2/z}\right)$$ and therefore $$f(z)=\left(\frac{1}{z}+\frac{1}{z^2}\right)\left(1-\frac{2}{z}+\frac{4}{z^2}-\frac{8}{z^3}+\cdots\right)=\frac{1}{z}-\frac{1}{z^2}+\frac{2}{z^3}-\frac{4}{z^4}+\cdots$$
so the residue at 0 is 1.
Similarly, $$f(z)=\left(\frac{z+1}{2(z-2)}\right)\left(\frac{1}{1+(z-2)/2}\right)=\left(\frac{1}{2}+\frac{3}{2(z-2)}\right)\left(\frac{1}{1+(z-2)/2}\right)$$ and so $$f(z)=\left(\frac{1}{2}+\frac{3}{2(z-2)}\right)\left(1-\frac{z-2}{2}+\frac{(z-2)^2}{4}-\frac{(z-2)^3}{8}+\cdots\right)$$
Thus $$f(z)=\frac{3}{2(z-2)}-\frac{1}{4}+\frac{1}{8}(z-2)-\frac{1}{16}(z-2)^2+\cdots$$
and so the residue at 2 is $\frac{3}{2}$.
So I think $\int_Cf(z)dz=2\pi i(1+\frac{3}{2})= 5\pi i$, but that's not what the book is telling me - the book says the answer should be $2\pi i$. What am I doing wrong?
 [/INST] You can do this without calculating any residues. For any $R>2,$ Cauchy's theorem shows your integral equals
$$\int_{|z|=R} \frac{z+1}{z^2-2z}\, dz = \int_0^{2\pi} \frac{(Re^{it} + 1)iRe^{it}}{R^2e^{2it} - 2Re^{it}}\, dt.$$
Do a little work to see this equals
$$\tag 1  i\int_0^{2\pi} \frac{1 + e^{-it}/R}{1 - 2e^{-it}/R}\, dt.$$
Remember, this stays the same for any $R>2.$ The integrands in $(1)$ $\to 1$ uniformly on $[0,2\pi]$  as $R\to \infty.$ Hence $(1)\to i\cdot 2\pi = 2\pi i$ as $R\to \infty.$ It follows that $2\pi i$ is the value of your integral.
</s>