Complex analysis, residues and integrate Let $C$ denote the circle $|z|=1$ oriented counterclockwise. Show that
i)$\int_Cz^ne^{\frac{1}{z}}dz=\frac{2\pi i}{(n+1)!}$ for $n=0,1,2$
ii)$\int_C e^{z+\frac{1}{z}}dz=2\pi i\sum_{n=0}^\infty\frac{1}{n!(n+1)!}$
I'm stuck in this exercise, because
$$\int_Cz^ne^{\frac{1}{z}}dz=2\pi i *Res_{z=0}z^ne^{\frac{1}{z}}$$
$$z^ne^{\frac{1}{z}}=z^n\sum_{n=0}^\infty \frac{z^{-n}}{n!}=\sum_{n=0}^\infty \frac{1}{n!}$$
Anyone can help me?
 A: You made an error in the last line, where you wrote
$$z^n \sum_{n = 0}^\infty \frac{z^{-n}}{n!} = \sum_{n = 0}^\infty \frac{1}{n!}.$$
This equation does not even make sense since the summation index $n$ cannot appear outside the summation. What you should have is
$$z^n e^{1/z} = z^n \sum_{k = 0}^\infty \frac{z^{-k}}{k!} = \sum_{k = 0}^\infty \frac{z^{n-k}}{k!} = \sum_{k = -\infty}^n \frac{z^k}{(n-k)!}.$$
The residue of $z^n e^{1/z}$ at $z = 0$ is the coefficient of $z^{-1}$ in the above Laurent series expansion, which is $\frac{1}{(n+1)!}$. Therefore, $\int_C z^n e^{1/z}\, dz = 2\pi i \cdot\operatorname{Res}_{z = 0} z^n e^{1/z} = \frac{2\pi i}{(n+1)!}$.
A: For (i):
$z^n \mathbb e ^{1 \over z} = z^n \sum \limits _{k=0} ^\infty {1 \over z^k k!}$. The term containing $1 \over z$ is obtained when $k = n+1$, so its coefficient is $1 \over {(n+1)!}$. The residue is then $2 \pi \mathbb i \over {(n+1)!}$.
For (ii):
$\mathbb e ^{z + {1 \over z}} = \mathbb e ^z \space \mathbb e ^{1 \over z} = \sum \limits _{n=0} ^\infty {z^k \over k!} \space \sum \limits _{l=0} ^\infty {1 \over z^l l!}$. When you multiply these two series (by the same procedure as you do for polynomials, i.e. term by term), you will only be intereste in these pairs of powers $(k, l)$ such that $l-k = 1$ (because you are interested only in $1 \over z$). Since $l = k+1$, this will produce all the terms that look like ${z^k \over k!} \space {1 \over z^{k+1} (k+1)!} = {1 \over k! (k+1)!} {1 \over z}$. Adding them all, you get that the coefficient of $1 \over z$ is $\sum _{k=0} ^\infty {1 \over k! (k+1)!}$, so the residue is $2 \pi \mathbb i \sum _{k=0} ^\infty {1 \over k! (k+1)!}$.
