Integral calculating using complex analysis There is an integral given:
$$\int \limits_0^{2 \pi}e^{\cos t} \cos(nt - \sin t) \mbox{d}t$$
Of course the integrand has no antiderivative.
Firstly I thought of calculating residues, but our function has no poles.
I wonder how that integral can be solved.
 A: Presumably $n$ is an integer. The integral is the real part of $$\int_0^{2\pi}e^{\cos(t)}e^{int-i\sin(t)}\,dt=\int_0^{2\pi}e^{int}e^{e^{-it}}\,dt=\int_0^{2\pi}e^{int}\sum_k\frac1{k!}e^{-ikt}\,dt=
\begin{cases}\frac{2\pi}{n!},&(n\ge0),
\\0,&(n<0).\end{cases}$$
A: $$
\begin{aligned}
I & =\int_0^{2 \pi} e^{\cos t} \cos (\sin t-n t) d t+i \int_0^{2 \pi} e^{\cos t} \sin (\sin t-n t) d t \\
& =\int_0^{2 \pi} e^{\cos t} e^{(\sin t-n t) i} d t \\
& =\int_0^{2 \pi} \frac{e^{e^{t i}}}{e^{n t i}} d t
\end{aligned}
$$
Integrating along the unit circle $\kappa(0,1)$ by putting $z=e^{ti}$ as $$
\begin{aligned}
I & =\frac{1}{i} \int_{\kappa(0,1)} \frac{e^z}{z^{n+1}} d z \\
& =\frac{1}{i}\cdot 2 \pi i \operatorname{Res}\left(\frac{e^z}{z^{n+1}} ,z=0\right) \\
& =\frac{2 \pi}{n !} \lim _{z \rightarrow 0}\left(z^{n+1} \cdot \frac{e^z}{z^{n+1}}\right)^{(n)} \\
& =\frac{2 \pi}{n !}
\end{aligned}
$$
Comparing the real and imaginary parts on both sides yields
$$
\begin{aligned}
& \int_0^{2 \pi} e^{\cos t} \cos (\sin t-n t) d t=\operatorname{Re}(I)=\frac{2 \pi}{n !} \\
& \therefore \quad \boxed{\int_0^{2 \pi} e^{\cos t} \cos (nt-\sin t) d t=\frac{2 \pi}{n !} }\\
\text { As a bonus, } \\
& \int_0^{2 \pi} e^{\cos t} \sin (n t-\sin t) d t=0 \\
&
\end{aligned}
$$
