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!

Hint: the usual way to attempt a real integral from $0$ to $2\pi$ by using complex methods is to substitute $z=e^{i\theta}$.  At some stage you may need to take the real part or imaginary part of a complex integral.
