The sign of the integral $\int_{0}^{2\pi}e^{\sin(x)}\cos(nx)\,dx$

complex-analysisdefinite integralsintegrationreal-analysisrecurrence-relations

Let $I_n = \int_{0}^{2\pi}e^{\sin(x)}\cos(nx)\,dx$ for a natural $n$.
I would like to prove that for $n$ odd this integral vanishes, while for $n = 4k$ for some natural $k$, the integral is always positive and for $n = 4k+2$ it is always negative.

I was able to do a few integrations by parts, and provided I didn't make mistakes, the result was the following rather ugly recurrence relation, valid for $n > 1$: $$I_{n+2} = -\frac1{n-1}\left[(4n^3-2n)I_n+(n+1)I_{n-2}\right].$$ Also we have $I_1 = I_3 = 0$ (the first is obvious from the integral, the second follows by integration by parts). And from here, clearly it is immediate to see that it vanishes for every $n$ odd, just by induction. However I'm not able to see why $I_{4k}$ is always positive or $I_{4k+2}$ is always negative from this relation. What I know is that $|I_n| \le I_0 \approxeq 7.95$.

I also tried to rewrite the integral using $e^x = 1 + x + \ldots$, moving the integral inside the summation, but still I couldn't come up with a solution. What do you suggest?

Note: this integral comes from the calculation of the Fourier coefficients of $e^{\sin(x)}$, and analogous properties hold for the coefficients of the sine terms. Also by a well-known theorem (Riemann-Lebesgue), $I_n$ goes to zero as $n\to\infty$, and hence it's not possible to find a fixed constant lower bound for $|I_n|$, making any estimation in the recurrence relation more difficult.

Best Answer

Using the results listed here we can show that $I_n=2\pi i^n{\cal I}_n(1)$ where ${\cal I}_n$ is the modified Bessel function of the first kind.


Here we will perform the derivation from scratch. Applying the unit circle transformation we have \begin{align}I_n&=\Re\int_0^{2\pi}e^{\sin x}e^{inx}\,dx=\Re\oint_{|z|=1}z^n\exp\left(\frac{z-1/z}{2i}\right)\,\frac{dz}{iz}\end{align} which we can expand as \begin{align}I_n&=\Re\oint_{|z|=1}\sum_{r=0}^\infty\left(\frac i2\right)^r\frac{z^{n-r-1}(1-z^2)^r}{i\cdot r!}\,dz=\Re\left[2\pi\operatorname{Res}(f,0)\right]\end{align} where $$f(z)=\sum_{r=0}^\infty\left(\frac i2\right)^r\frac{z^{n-r-1}(1-z^2)^r}{r!}.$$ To evaluate this residue we seek the term independent of $z$ in $zf(z)$. This occurs when the power of $1-z^2$ is $(r-n)/2$ which means that $r=2s$ is even. Hence \begin{align}\operatorname{Res}(f,0)&=\sum_{s=n/2}^\infty\left(\frac i2\right)^{2m}\frac{(-1)^{(2s-n)/2}}{(2s)!}\binom{2s}{(2s-n)/2}\\&=\sum_{s=n/2}^\infty\frac{(-1)^s}{2^{2s}}\frac{(-1)^{s-n/2}}{(s-n/2)!(s+n/2)!}.\end{align} Substituting back into the integral gives $$I_n=\sum_{s=n/2}^\infty\frac{(-1)^{n/2}\pi}{2^{2s-1}(s-n/2)!(s+n/2)!}=\sum_{t=0}^\infty\frac{(-1)^{n/2}\pi}{2^{2t+n-1}t!(t+n)!}=2\pi i^n{\cal I}_n(1)$$ and we can immediately conclude that $I_{4k}>0$ and $I_{4k+2}<0$.