How do I compute this integral?
$$\oint_{|z|=1}\frac{z^2\sin(1/z)}{z-2} \, dz$$
I tried substituting $1/z$ with $z$ and ended up with
$$\oint_{|z|=1}\frac{\sin(z)}{z^3(1-2z)} \, dz$$
At this point I thought of using the residue theorem and got $2i\pi(2-4\sin(\frac{1}{2}))$ but the correct answer should be $\frac{i\pi}{6}$. Can someone help me?
Where are you getting $\pi i/6$? I am also getting a residue of
$$2-4\sin\left(\frac{1}{2}\right)$$
We can see this directly using power series centered at zero:
$$\frac{z^2\sin(1/z)}{z-2}=$$
$$z^2\cdot\left(\frac{1}{1!z}-\frac{1}{3!z^3}+\cdots\right) \cdot\left(\frac{-1/2}{1-z/2}\right)=$$
$$z^2\cdot\left(\frac{1}{1!z}-\frac{1}{3!z^3}+\cdots\right)\cdot \frac{-1}{2}\left(1+\frac{z}{2}+\frac{z^2}{2^2}+\cdots\right)$$
We can now see term by term that the coefficient of $1/z$ will be:
$$\frac{-1}{2}\left(\frac{-1}{3!2^0z}+\frac{1}{5!2^2z}-\frac{1}{7!2^4z}+\cdots\right)$$
Which is clearly:
$$2-4\cdot\sin\left(\frac{1}{2}\right)$$