I'm trying to find the residue of $$z \cos\left(\frac{1}{z}\right)$$ at $z=0$.
This is how I did it:
$\cos(z)=\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}z^{2n}$. $\\$ Then $\cos(\frac{1}{z})=\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}z^{2n-1}$. $\\$ Finally, $z\cos(z)=\sum_{n=0}^\infty \frac{(-1)^n}{(2n)!}z^{2n}$, which is where I started. I thought the residue would by $0$ because there are no negative powers, but it's supposed to be $-\frac{1}{2}$. Did I do something incorrectly?