I have to prove that
$$\int_{0}^{\pi}e^{\cos(\theta)}\cos(\sin(\theta))\,d\theta = \pi$$
by considering $$\int_{\gamma} \frac{e^z}{z}$$ where $\gamma(t) = e^{2{\pi}it}, 0 \leq t \leq 1$.
I have calculated that $$\int_{\gamma} \frac{e^z}{z} = 2{\pi}i$$
but I am not quite sure how to use the latter equality to prove the desired equality. Any help would be appreciated.
Consider $$\int_{0}^{\pi}e^{\cos(\theta)}\cos(\sin(\theta))\,d\theta+i\int_{0}^{\pi}e^{\cos(\theta)}\sin(\sin(\theta))\,d\theta =\int_{0}^{\pi}e^{cos(\theta)+i\sin(\theta)}\,d\theta.$$ This last integral can be easily computed using $$\int_{\gamma} \frac{e^z}{z}dz,$$ (just use the definition). Then you take the real part to conclude.