Calculating complex integral for different values of $n$.
Solution 1:
$$\newcommand{\Re}{\operatorname{Re}}\newcommand{\Res}{\operatorname*{Res}}
\begin{align}
\int_0^{2\pi}e^{{}-\cos(\theta)}\cos(n\theta+\sin(\theta))\,\mathrm{d}\theta
&=\Re\left(\int_0^{2\pi}e^{{}-\cos(\theta)-in\theta-i\sin(\theta)}\,\mathrm{d}\theta\right)\tag1\\
&=\Re\left(\int_0^{2\pi}e^{-e^{i\theta}}\,e^{-in\theta}\,\mathrm{d}\theta\right)\tag2\\
&=\Re\left(\frac1i\int_0^{2\pi}e^{-e^{i\theta}}\,e^{-i(n+1)\theta}\,\mathrm{d}e^{i\theta}\right)\tag3\\
&=\Re\left(\frac1i\oint_{|z|=1}e^{-z}z^{-n-1}\,\mathrm{d}z\right)\tag4\\[3pt]
&=2\pi\Re\left(\Res_{z=0}\left(e^{-z}z^{-n-1}\right)\right)\tag5\\[3pt]
&=2\pi\frac{(-1)^n}{n!}[n\ge0]\tag6
\end{align}
$$
Explanation:
$(1)$: $\cos(z)=\Re\left(e^{-iz}\right)$
$(2)$: $\cos(\theta)+i\sin(\theta)=e^{i\theta}$
$(3)$: $\mathrm{d}e^{i\theta}=ie^{i\theta}\,\mathrm{d}\theta$
$(4)$: substitute $z=e^{i\theta}$
$(5)$: Residue Theorem
$(6)$: use the power series for $e^z$ to get $\left[z^n\right]e^{-z}$