# Complex integral using residue theorem

I have

$$\int_{|z|=1} z^m \sin\left(\frac{1}{z}\right)~dz,$$

for $m = 0,1,2,\dots$

I know that there is a singularity at $z=0$, and this singularity is within the curve, thus the residue theorem is valid.

The expansion of $\sin\frac{1}{z}$ is $\frac{1}{z} - \frac{1}{3! z^3} + ...$

So $z^m \sin\frac{1}{z} = z^{m-1} - \frac{z^{m-3}}{3!} + ...$

The problem is, I don't know how to formulate my answer to say that if $m = 0$, then $\operatorname{Res} = 1$, if $m = 1$ then $\operatorname{Res} = 0$, etc.

Can anyone give verification that I'm on the right track here? Thank you.

EDIT: The best I could do was:

if $m = 2n+1$, where $n$ is a natural number, then $\operatorname{Res}(f(z),0) = 0$.

if $m = 2n$, where $n$ is a natural number, then $\operatorname{Res}(f(z),0) = \frac{1}{(m+1)!}$

The correct formulation is: if $m$ is even, then the residue is $-(-1)^{\frac{m}{2}}\frac{1}{(m+1)!}$, if $m$ is odd, then the residue is $0$.