The question gave a hint to let $e^{i\theta}$ be equal to $e^{z}$. I tried to bring it to the form $$f(a) = \frac{1}{2\pi i }\oint \frac{f(z)}{z-a}dz$$ but am having trouble doing so, and thus am having problems solving it. Does anyone have any suggestions?
Evaluate the integral $\int_{0}^{2\pi} e^{e^{i\theta}}d\theta$ using contour integration
3 Answers
Since $\theta \in [0,2\pi]\mapsto e^{i\theta}$ is a parametrization of the circle, one has $$\int_{0}^{2\pi} e^{e^{i\theta}}d\theta = \int_{C(0,1)} \frac{e^z}{iz} dz = 2\pi$$ by Cauchy's theorem.
The residue theorem is an overkill here. We have: $$ e^{e^{i\theta}} = 1+\sum_{n\geq 1}\frac{e^{in\theta}}{n!} $$ hence the integral is clearly $\color{red}{2\pi}$ since $$\forall n\in\mathbb{N}^*,\qquad \int_{0}^{2\pi}e^{ni\theta}\,d\theta = 0.$$
Try evaluating $$ \int_{\gamma}\frac{e^z}{z}dz $$ around the unit circle. This will be easy to tackle using the integral formula you mentioned.
Let's just make sure it's the right integral. Parametrize the path as $z=e^{it}\implies dz=ie^{it}dt$ and $$ \int_{\gamma}\frac{e^z}{z}dz= -i\int_{0}^{2\pi} e^{e^{it}}dz $$