<s>[INST] Complex integral $I=\int_{|z|=2} \frac{z^3 e^{\frac{1}{z}}}{z+1}dz$ I have this integral from someone who told me it has a nice answer.$$I=\int_{|z|=2} \frac{z^3 e^{\frac{1}{z}}}{z+1}dz$$ I tried to evaluate this using residues theorem, and expanded into series to find the residue at $\infty$$$f(z)=z^3[\sum_{n=0}^{\infty}(-1)^nz^n(\sum_{n=0}^{\infty} \frac{1}{(n!)z^n})]$$ And with Cauchy product:$$f(z)=z^3(\sum_{n=0}^{\infty}\sum_{k=0}^n \frac{(-1)^k z^{2k-n}}{(n-k)!})$$ Now I am lost, how can I find the coefficient of $z^{-1}$ in this double series? It seems that is not just a simple number... Or shall I use another method? 
 [/INST] Substitute $u = \frac 1z$, so the integral is over the circle $|u| = 1/2$, and is now clockwise.  $z = \frac 1u$, so $dz = -\frac{1}{u^2} du$, and so the minus signs cancel
$$\begin{align}I &= \int_{|u| = \frac{1}{2}} \frac{\left(\frac{1}{u}\right)^3 e^u}{\frac{1}{u} + 1} \frac{1}{u^2}\, du\\ 
&=\int_{|u| = \frac{1}{2}} \frac{e^u}{u^4(u+1)}\,du.\end{align}$$
Then we have to find the residue of $f(z) = \frac{e^u}{u^4 (u+1)}$ at $0$, which can be done using a Taylor series as standard.
$$\begin{align} \frac{e^u}{u^4 (u+1)} &= \frac{1}{u^4}\left(1+u+\frac{1}{2}u^2 + \frac{1}{6}u^3+O(u^4)\right)\left(1-u+u^2-u^3 + O(u^4)\right) \\
&=\frac{1}{u^4}\left(1+u(1-1)+u^2\left(1-1+\frac{1}{2}\right)+u^3\left(\frac{1}{6}-\frac{1}{2}+1-1\right)+O(u^4)\right) \\
&=\frac{1}{u^4}\left(1+\frac{1}{2}u^2 - \frac{1}{3}u^3 + O(u^4) \right) \\
&=\frac{1}{u^4}+\frac{1}{2u^2}-\frac{1}{3u}+O(1).\end{align}$$
So, the residue of $f(z)$ at $0$ is $-\frac{1}{3}$, and the integral is $-\frac{2\pi i}{3}$. 
</s>