Let $\gamma$ be the unit circle $\{e^{i\theta}:-\pi\leq\theta\leq\pi\}$. Using the Cauchy integral formula to find, $$I_n=\int_{\gamma} e^zz^n \ dz, \ n\in\mathbb{Z}.$$ Hence evaluate the corresponding real integrals.
My attempt:
Consider if $n\in\mathbb{Z^+}$. If $n\in\mathbb{Z^+}$, then $e^zz^n$ is entire$\implies$ $I_n=0$ by the Cauchy-Goursat theorem.
Now consider if $n\in\mathbb{Z^-}$. If $n\in\mathbb{Z^-}$, then: \begin{align} I_n&=\int_{\gamma} \frac{e^z}{z^{|n|}} \ dz \\ &=\int_{\gamma} \frac{e^z}{(z-0)^{(|n|-1)+1}} \ dz \end{align} Now, regardless if $n$ is odd or even, $$I_n=\frac{2\pi i}{(|n|-1)!} \ \ \ \ \ \ \text{(Cauchy Integral formula)}.$$ Hence, $$I_n= \begin{cases} 0 & n\in\mathbb{Z^+} \\ \frac{2\pi i}{(|n|-1)!} & n\in\mathbb{Z^-} \\ \end{cases} $$ Is this correct? I am unsure about the $n\in\mathbb{Z^-}$ case.