Need help with an integral. I am asked to show that
$\displaystyle \frac{1}{2\pi} \int_{0}^{2\pi} e^{2 \cos \theta} \cos \theta \, d\theta = 1 + \frac{1}{2!} + \frac{1}{2!3!} + \frac{1}{3!4!} + \cdots$
by considering $\displaystyle \int e^{z + \frac{1}{z}} \, dz$. I don't really know how to incorporate the hint, and any advice would be appreciated. Thanks!

let $z = e^{i \theta}$ in $\oint e^{z + \frac{1}{z}} \, dz$, you most likely get $\int_{0}^{2\pi} e^{2 \cos \theta} \cos \theta \, d\theta$ as imaginary part of it.
Now consider $ \displaystyle \oint_{|z|=1} e^{z + \frac 1 z}dz $ look for it's residue by expanding it.
\begin{align*}
e^{\left( z + \frac 1 z \right)} &= \sum_{n=0}^\infty \frac{\left( z + \frac 1 z \right)^n}{n!}  \\ 
 &= \sum_{n=0}^\infty \frac{1}{n!} \sum_{k=0}^n \binom{n}{k}z^k z^{-n+k}\\ 
 &= \sum_{n=0}^\infty \frac{1}{n!} \sum_{k=0}^n \binom{n}{k}z^{2k - n}\\
\end{align*}
Set $2k - n=-1 $, since $k$ is integer, let $n = 2m + 1$, you get $k = m$ and and you get
$ \left( \sum_{m=0}^\infty  \frac{1}{m! (m+1)!}\right)z^{-1}$. Use residue theorem after that.
