# I can't find out where did I go wrong in solving: $\int_{|z|=1}\frac{4+z}{(2-z)z}dz$

I can't find out where did I go wrong in solving:

$\displaystyle\int_{|z|=1}\frac{4+z}{(2-z)z}\\=\displaystyle\int_{|z|=1}\frac{3z+2(2-z)}{(2-z)z}\\=-3\displaystyle\int_{|z|=1}\frac{dz}{z-2}+2\displaystyle\int_{|z|=1}\frac{dz}{z}\\=0+2\text{Res$_{z=0}\dfrac{1}{z}$}\text{ (by Cauchy's Integral Formula)}\\=4\pi i$

-
You've missed off several $\operatorname{d}\!z$s. –  Fly by Night Aug 6 '13 at 15:08
$$\int_{|z|=1}\frac{3z+2(2-z)}{(2-z)z}\,dz=-3\int_{|z|=1}\frac{dz}{z-2}+2\int_{|‌​z|=1}\frac{dz}{z}.$$ –  Adrian Keister Aug 6 '13 at 15:09
You mutated a $z-2$ into a $z-1$, and $\int_{\lvert z\rvert = 1} \frac{dz}{z-1}$ doesn't converge. –  Daniel Fischer Aug 6 '13 at 15:09
After the edit, the first integral is wrong. (The integrand is analytic on the unit disc.) –  mrf Aug 6 '13 at 15:12
Note that $2$ is not inside the unit circle, so that $\int \frac{dz}{z-2} = 0$. –  Thomas Andrews Aug 6 '13 at 15:18

After you break it down to two integrals, take another look at your first integral. The pole for that first inegral is at $z=2$, but your path is the circle defined by $|z|=1$. The residue theorem gives a non-zero result only if the pole is inside the closed contour of the integral. The pole at $z=2$ is not inside your path, so it will give zero to your integral, and not $-3\times 2\pi i$.
$$\int_{|z|=1} \frac{\frac{4+z}{2-z}}{z}\,dz = 2\pi i \cdot \left. \frac{4+z}{2-z} \right|_{z=0} = 4\pi i$$ by Cauchy's integral formula. Note that $$f(z) = \frac{4+z}{2-z}$$ is holomorphic on (a neighboorhood) of the unit disc.