A solution for $\int^{2\pi}_0e^{\cos \theta}\cos(a\theta -\sin \theta)\,d \theta $

It can be proved using complex analysis that

$$\tag{1}\int^{2\pi}_0e^{\cos \theta}\cos(n\theta -\sin \theta)=\frac{2\pi}{n!}$$

My initial thought that, we use the Gamma function for non-integer values. But it seems that we cannot since

$$\int^{2\pi}_0e^{\cos \theta}\cos\left(\left(\frac{1}{2} +n\right)\theta -\sin \theta \right)=0$$

My Question : Can we solve

$$\int^{2\pi}_0e^{\cos \theta}\cos(a\theta -\sin \theta)\,d \theta $$

for specific values of $a$ that are not of the above cases ?

EDIT

As requested in the comments here is a proof of (1) using contour integeration

Consider the following function

$$f(z)=e^{z^{-1}}z^{n-1}$$

Now we integrate the function along a circle of radius 1

$$\oint_{|z|=1}e^{z^{-1}}z^{n-1} dz=\oint_{|z|=1}\sum_{k\geq 0}\frac{z^{n-k-1}}{\, k!} dz $$

Now we need to find the residue which is the coefficient of $1/z$

$$\text{Assume that } n-k-1=-1 \to n=k$$

Hence we have

$$\oint_{|z|=1}e^{z^{-1}}z^{n-1} dz= 2\pi i \frac{1}{n!} $$

Using a parametirzation of the circle

$$i\int_{0}^{2\pi i}e^{e^{-i\theta }}e^{i n\theta } d\theta = 2\pi i \frac{1}{n!} $$

$$\int_{0}^{2\pi i}e^{e^{-i\theta }}e^{i n\theta } d\theta = 2\pi\frac{1}{n!} $$

Hence we have

$$\Re\int_{0}^{2\pi i}e^{e^{-i\theta }}e^{i n\theta } d\theta =\int^{2\pi i}_0 e^{\cos \theta} \cos(n\theta-\sin \theta)\, d\theta= \frac{2\pi}{n!} $$


Solution 1:

You can obtain the solution for $a\in\mathbb{R}$ in terms of the incomplete Gamma function: $$ \begin{aligned} \int _{0}^{2\,\pi }\!{{\rm e}^{\cos \left( \theta \right) }}\cos \left( n\theta-\sin \left( \theta \right) \right) {d\theta}&={\it Re} \left( \int _{0}^{2\,\pi }\!{{\rm e}^{{{\rm e}^{-i\theta}}}}{{\rm e}^ {in\theta}}{d\theta} \right) \\ &={\it Re} \left( \sum _{k=0}^{\infty } \left( {\frac {\int _{0}^{2\,\pi }\!{ {\rm e}^{-i\theta\,k}}{{\rm e}^{ia\theta}}{d\theta}}{k!}} \right) \right) \\ &=-\sum _{k=0}^{\infty }\,{\frac {\sin \left( 2\,\pi \,a \right) }{ \left( k-a \right) k!}} \\ &= \left( -1 \right) ^{a}\sin \left( 2\,\pi \,a \right) \left[\Gamma \left( -a,-1 \right)- \Gamma \left( -a\right) \right] \end{aligned} $$ where $\Gamma(-a, -1)$ is the incomplete Gamma function