Find the value of the $\int_{\vert z\vert=1} {1 \over z^2} tan({\pi \over z}) dz$
When we substitute $\omega = {1 \over z}$, Then we would get the $\int_{\vert \omega \vert=1} tan({\omega \pi}) d\omega = 4i$.
I tried the different way by using the statement I've believed it always holds.
-statement-
$\int_{\vert z\vert=r} f(z) dz = 2\pi i \bullet res(z^2f({1 \over z}), 0)$
So the case given above, $f(z) = {1 \over z^2} tan({\pi \over z})$. Hence, $z^2f({1 \over z}) = tan(z\pi)$
The answer is $2\pi i \bullet res(tan(z\pi), 0) =0$
I can't understand why does the $0$ is not answer. Is the statement false?
Any help would be appreciated. Thanks.