TITLE: Integral related to the modified Bessel function
QUESTION [6 upvotes]: I would like to solve the integral
$$F_n(\kappa,\theta,\phi)=\int_{-\pi}^{\pi}{\rm e}^{\kappa\cos(x-\theta)}\cos(n\, x-\phi)\,{\rm d}x$$
that appears related to the identity
$$I_n(\kappa)=\frac{1}{\pi}\int_{0}^{\pi}{\rm e}^{\kappa\cos(x)}\cos(n\, x)\,{\rm d}x,$$
where $I_n(\kappa)$ is the Modified Bessel Function of the first kind. Any ideas?

REPLY [6 votes]: Reduce to known integral 
Assume $n$ is a non-negative integer. Then the integrand is periodic with period $2\pi$. Then:
$$
  F_n=  \int_{-\pi}^\pi \exp\left( \kappa \cos(x-\theta) \right) \cos(n x - \phi) \mathrm{d}x = 
   \int_{-\theta-\pi}^{-\theta+\pi} \exp\left( \kappa \cos(x) \right) \cos(n x + n \theta- \phi) \mathrm{d}x
$$
The latter integral, using periodicity can be reduced to pieces of $(-\pi, \pi)$ interval, which can be rearranged, so that
$$
   \int_{-\pi}^\pi \exp\left( \kappa \cos(x-\theta) \right) \cos(n x - \phi) \mathrm{d}x = \int_{-\pi}^{+\pi} \exp\left( \kappa \cos(x) \right) \cos(n x + n \theta- \phi) \mathrm{d}x
$$
Denote $\varphi = n\theta - \phi$, and use $\cos(n x + \varphi) = \cos(n x) \cos(\varphi) - \sin(n x) \sin(\varphi)$ to write:
$$ \begin{eqnarray}
  F_n &=& \cos(\varphi) \int_{-\pi}^{\pi}  \exp\left( \kappa \cos(x) \right) \cos(n x) \mathcal{d} x - \sin(\varphi) \int_{-\pi}^{\pi}  \exp\left( \kappa \cos(x) \right) \sin(n x) \mathcal{d} x \\
   &=& 2 \pi \cos(\varphi) I_n(\kappa) - \sin(\varphi) \cdot 0 
\end{eqnarray}
$$
The last integral is zero as integral of an odd function $\sin(n x) \exp(\kappa \cos(x))$ over a symmetric domain. Thus:
$$
    F_n(\kappa, \theta, \theta) = 2 \pi \cos(n \theta - \phi) I_n(\kappa)
$$
Differentiate under integral sign 
Alternatively, we could establish that $F_n$ satisfies ODE in $\kappa$.
$$ \begin{eqnarray}
   \kappa^2 \partial_\kappa^2 F_n + \kappa \partial_\kappa F_n &=& \int_{-\pi}^\pi \exp(\kappa \cos(x-\theta)) \left(\kappa^2 \underbrace{\cos^2(x-\theta)}_{1-\sin^2(x-\theta)}+ \kappa \cos(x-\theta) \right) \cos(n x - \phi) \mathrm{d} x \\
  &=& \kappa^2 F_n - \int_{-\pi}^\pi \left(\frac{\mathrm{d}^2}{\mathrm{d}x^2} \exp(\kappa \cos(x-\theta)) \right) \cos(n x-\phi) \mathrm{d} x \\
  &\stackrel{\text{by parts}}{=}&
   (\kappa^2 + n^2) F_n + \text{boundary terms}
\end{eqnarray}
$$
where the boundary term vanishes, if $n$ is an integer:
$$\begin{eqnarray}
  \text{boundary terms} &=& - \left(\left. \left(\frac{\mathrm{d}}{\mathrm{d}x} \exp(\kappa \cos(x-\theta)) \right) \cos(n x-\phi) \right|_{x=-\pi}^{x=\pi} \right) \\
  &\phantom{=}& - \left(\left. n \exp(\kappa \cos(x-\theta) ) \sin(n x-\phi)  \right|_{x=-\pi}^{x=\pi} \right)  \\
   &=& 2 \sin(\pi n) \exp( -\kappa \cos(\theta) ) \left( n \cos(\phi) - \kappa \sin(\theta) \sin(\phi) \right) = 0
\end{eqnarray}
$$
Thus $F_n$ satisfies the differential equation of $I_n(\kappa)$:
$$
    \kappa^2 \frac{\mathrm{d}^2}{\mathrm{d} \kappa^2} F_n + \kappa \frac{\mathrm{d}}{\mathrm{d} \kappa} F_n - (\kappa^2 + n^2) F_n = 0
$$
Because for $\kappa = 0$, $F_n$ is finite:
$$
   \left.F_n \right|_{\kappa = 0} = \int_{-\pi}^\pi \cos(n x -\phi) \mathrm{d} x = 2 \cos(\phi) \frac{\sin(\pi n)}{n} = 2 \pi \cos(\phi) \delta_{n,0}
$$
we conclude that
$$
     F_n = g_n(\theta, \phi) I_n(\kappa)
$$
Thus $g_{0}(\theta, \phi) = \cos(\phi)$. One can similarly establish an ordinary differential equation for $F_n$ as a function of $\theta$:
$$
     \frac{\mathrm{d}^2}{\mathrm{d} \theta^2} F_n = \int_{-\pi}^\pi \left(\frac{\mathrm{d}^2}{\mathrm{d}x^2} \exp(\kappa \cos(x-\theta)) \right) \cos(n x-\phi) \mathrm{d} x = -n^2 F_n
$$
and trivially 
$$
  \frac{\mathrm{d}^2}{\mathrm{d} \phi^2} F_n = - F_n
$$
Combining these, with initial conditions, we arrive at the same result:
$$
    F_n(\kappa, \theta, \phi) = 2\pi \cos\left(n \theta - \phi\right) I_n\left( \kappa \right)
$$