<s>[INST] Evaluate $\int\limits_{|z|=1}\frac{\sin{1/z}}{(z-2)^2}dz.$ This is a question from an old exam. The two integrals are seemingly similar, but the first one seems quite tedious compared to the other one. It seems, according to the prof solution, that the hard part in the first integral is computing the residue at $z=0.$

Evaluate the intergals
a) $$\int\limits_{|z|=1}\frac{\sin{(1/z)}}{(z-2)^2} \ dz$$
b) $$\int\limits_{|z|=3}\frac{\sin{(1/z)}}{(z-2)^2} \ dz$$

In the first, we have $2$ poles, first one is $z_1=0$ and the second one is a pole of order $2$, which is $z_2=2.$ However, only $z_1$ is inside our unitcircle so we only need to compute $\text{Res}_{z_1}(f(z))$ and apply the residue theorem.
Since our function is of the form $f(z)=\frac{g(z)}{(z-z_1)^k}$ the residue is given by
$$\text{Res}_{z_1}(f(z))=\frac{g^{k-1}(z_1)}{(k-1)!},$$
and here $k=2$ and $(\sin(1/z))'=-\cos(1/z)/z^2$, so
$$\text{Res}_{z_1}(f(z))=-\frac{\cos\frac{1}{z_1}}{z_1^2}=...\text{this is the moment I realised I'm screwed.}$$
Howver, computing the residue at $z_2=2$ for the other integral I can use conventional methods, but not here.
Can someone break down the main difference between these integrals and show how to find the residue at $z_1=0?$
EDIT:
I need to solve $a)$ using Laurent series.
 [/INST] Re $(a)$ and series, given
$$\sin{z}=z-\frac{z^3}{3!}+\frac{z^5}{5!}-\frac{z^7}{7!}+\frac{z^9}{9!}+...=
\sum\limits_{k=0}\frac{(-1)^k}{(2k+1)!}z^{2k+1} \tag{1}$$
we have
$$\sin{\frac{1}{z}}=\sum\limits_{k=0}\frac{(-1)^k}{(2k+1)!}\frac{1}{z^{2k+1}}$$
then
$$\int\limits_{|z|=1}\frac{\sin{(1/z)}}{(z-2)^2} dz=\sum\limits_{k=0}\frac{(-1)^k}{(2k+1)!}\int\limits_{|z|=1}\frac{1}{z^{2k+1}(z-2)^2}dz \tag{2}$$
Using Cauchy's integral formula:
$$f^{(n)}(a)=\frac{n!}{2\pi i} \int\limits_{\gamma}\frac{f(z)}{(z-a)^{n+1}}dz \tag{3}$$
where $f(z)=\frac{1}{(z-2)^2}$, because $2$ is outside $|z|=1$, we have
$$f^{2k}(0)=\frac{(2k)!}{2\pi i}\int\limits_{|z|=1}\frac{1}{z^{2k+1}(z-2)^2}dz$$
then $(2)$ becomes
$$\int\limits_{|z|=1}\frac{\sin{(1/z)}}{(z-2)^2} dz=2\pi i\left(\sum\limits_{k=0}\frac{(-1)^k}{(2k+1)!}\frac{f^{2k}(0)}{(2k)!}\right) \tag{4}$$
But
$$f^{'}(z)=-\frac{2}{(z-2)^3}$$
$$f^{''}(z)=\frac{2\cdot3}{(z-2)^4}$$
$$f^{'''}(z)=-\frac{2\cdot3\cdot4}{(z-2)^5}$$
$$f^{(4)}(z)=\frac{2\cdot3\cdot4\cdot5}{(z-2)^6}$$
$$...$$
$$f^{(2k)}(z)=\frac{(2k+1)!}{(z-2)^{2k+2}} \tag{5}$$
and $(4)$ becomes
$$\int\limits_{|z|=1}\frac{\sin{(1/z)}}{(z-2)^2} dz=
2\pi i\left(\sum\limits_{k=0}\frac{(-1)^k}{(2k)!}\frac{1}{(-2)^{2k+2}}\right)=
2\pi i \frac{1}{4}\left(\sum\limits_{k=0}\frac{(-1)^k}{(2k)!}\frac{1}{2^{2k}}\right) \tag{6}$$
but
$$\sum\limits_{k=0}\frac{(-1)^k}{(2k)!}\frac{1}{2^{2k}}=\cos{\frac{1}{2}}$$
from cosine series expansion, thus
$$\int\limits_{|z|=1}\frac{\sin{(1/z)}}{(z-2)^2} dz=
 \frac{\pi i}{2} \cos{\frac{1}{2}} \tag{7}$$
</s>