Evaluate the integral $$\oint_C \frac{\sin ^2 z}{z^2(z-1)} \mathrm{d} z$$ taken counterclockwise around circles $C:|z|=2$.
This is a relatively simple problem that can be solved using residue calculus. The curve $C$ has two singularities inside it, namely $0$ and $1$. However, $0$ is a removable singularity, and we can determine that $$\operatorname{Res}_{z=1}\left(\frac{\sin ^2(z)}{z^2(z-1)}\right)=\sin ^2(1).$$ Therefore, the answer is $2 \pi i \sin ^2 1$.
However, I wonder if we can use the residue at infinity to compute the integral. In other words, can we directly calculate the residue at infinity for the function? Upon analysis, we find that the point at infinity is an essential singularity. We can use the formula:
$$ \operatorname{Res}[f(z), \infty]=-\operatorname{Res}\left[\frac{1}{z^2} f\left(\frac{1}{z}\right), 0\right] $$
This means we need to find the residue at the zero of the function:
$$ \frac{\sin ^2\left(\frac{1}{z}\right)}{\frac{1}{z}-1} = \sin ^2\left(\frac{1}{z}\right)\left(\sum_{k=1}^\infty z^k\right) $$
However, this expansion does not provide a clear way to determine the coefficient of $\frac{1}{z}$.
I can't think of a suitable method to expand and calculate. I'd really appreciate some help here.
Series expansion:$$\sin^2\left(\frac1z\right)=\frac12\left(1-\cos\left(\frac2z\right)\right)=\frac12-\frac12\sum_{n=0}^\infty\frac{(-1)^n}{(2n)!}\left(\frac{2}{z}\right)^{2n}$$
hence
$$\sin ^2\left(\frac{1}{z}\right)\left(\sum_{k=1}^\infty z^k\right)=\frac12\sum_{k=1}^\infty z^k-\frac12\sum_{n=0}^\infty\frac{(-1)^n4^n}{(2n)!}\frac{1}{z^{2n}}\left(\sum_{k=1}^\infty z^k\right)$$
Take the coefficient for $z^{-1}$, we get
$$Res=-\frac12\sum_{n=1}^\infty\frac{(-1)^n4^n}{(2n)!}=-\frac12(\cos2-1)=\sin^21$$