I have an issue with residues at infinity. I am computing the integral $\displaystyle{\int_{C_3^+(0)} \dfrac{e^{3z}}{z^2(z^2+2z+2)} dz} $
Since all three poles ($0$ of order 2, $1\pm i$ of order 1) are inside the circle, I could calculate the integral by using the residue theorem three times. I did this, and the answer is $2\pi i \left(1 + \dfrac{\cos(3)}{2 \ e^3} \right)$ (I believe).
I want to calculate the residue at infinity of $f(z)=\dfrac{e^{3z}}{z^2(z^2+2z+2)}$. However, when I rewrite, I have: $\dfrac{1}{z^2} f\left(\dfrac{1}{z}\right) = \dfrac{z^2e^{3/z}}{1+2z+z^2}$. This has an essential singularity at $0$, so I want to use the Laurent series for the exponential to find this residue.
$\displaystyle{e^{3/z} = \sum_{k=0}^{\infty} \dfrac{1}{k!} \left(\dfrac{3}{z}\right)^{k} = \sum_{k=0}^\infty \dfrac{3^k}{k!} z^{-k} \ \Rightarrow z^2e^{3/z} = \sum_{k=0}^\infty \dfrac{3^k}{k!} z^{2-k} = z^2+3z+\frac{9}{2} + \frac{9}{2z} + O(z^{-2}) }$
So I try to divide this by $2z^2+2z+1$, and I get $\dfrac{z^2e^{3/z}}{1+2z+z^2} = \dfrac{1}{2} + \dfrac{1}{z} + \dfrac{1}{z^2} + \ldots$
That makes the residue at zero equal to 1... But the sum of all of the residues should be zero, shouldn't it?