For $$f(z)= z^3+\frac{1}{(z-1)^2}$$ how many times does $f(z)$ wind around the origin, as $z$ moves along the circle $|z|=2$ counterclockwise?
I see that the answer should be $$ \frac{1}{2\pi i} \int_{|z|=2} \frac{f'(z)}{f(z)}dz = \frac{1}{2\pi i} \int_{|z|=2} \frac{3z^2(z-1)^3-2}{z^3(z-1)^3+(z-1)}dz $$ but I'm not sure how to evaluate the integral since I could not find where exactly the poles of the function integrated are. Here is what I thought:
(a) Since $f(z)$ has a pole of order 2 at $z=1$, $\dfrac{f'(z)}{f(z)}$ has a simple pole at 1 with residue $-2$.
(b) It can be shown that $f(z)$ has 3 zeros of order one inside the disk $|z|<2$, so at each of the zeros, $\dfrac{f'(z)}{f(z)}$ has a simple pole with residue 1.
Does this mean that the integral evaluated is $-2+3=1$? Any help or hint is appreciated!
Thanks to the comments above, the problem can be solved easily using the Argument Principle, i.e., the solution is the number of zeros of $$f(z)=\frac{z^3(z-1)^2+1}{(z-1)^2}$$ minus number of poles of $f(z)$ inside the disk $|z|<2$, which is clearly $5-2=3$.
Alternatively, observe that $f(z)$ has no zero or poles outside the disk $|z|<2$, so we can choose a large enough disk $|z|<R$ to compute the winding number. More specifically, when $R$ is large enough such that $ \dfrac{f'(z)}{f(z)} \sim \dfrac{3}{z}$, one easily observes that the winding number is 3.