In my textbook(H.Silverman - Complex variables), the residue theorem required that there are finitely many isolated singularities inside the contour. Similarly, Residue theorem at infinity (viewing as a point in Riemann sphere), it stated only 'finitely many' sense.
However, in some solution about the following integral $$\int_{\vert{z}\vert=1}\frac{z}{\sin\bar{z}}\,dz,$$ using the substitution $z\mapsto\tfrac{1}{w}$, applied residue theorem (as mentioned first) to get the answer.
Is it possible?
Not only the integrand have infinitely many singularities inside the contour $\vert{z}\vert=1$ but also it has a limit point of the set of its singularities inside the contour $\vert{z}\vert=1$.
What is the difference between 'the substitution method' and 'Residue at infinity' for calculating the contour integrals?
Anyone give some comment or related reference, please. Thank you!