# A Bessel-like integral

I encounter the following integral when trying to find the inverse Fourier transform of the characteristic function of a certain sum of random variables. Here, $$0\le\lambda\le1$$, $$p\ge0$$, $$q\ge0$$ are real, and $$n$$ is an integer. I want to compute the following integral:

$$\int_0^{2 \pi} e^{p \cos (\lambda \tau) + q \cos ((1 - \lambda) \tau)} \cos (n \tau) \frac{d \tau}{2 \pi}$$

This is a generalization of a Bessel integral, in that for $$q = 0$$ and $$\lambda=1$$, I know that:

$$\int_0^{2 \pi} e^{p \cos (\tau)}\cos (n \tau) \frac{d \tau}{2 \pi} =I_n(p)$$

where $$I_n(p)$$ is the modified Bessel function of the first kind.

This is not a complete answer, but it's a bit long to fit in a comment, so I'm posting it here in case it's useful to someone.

Let's denote:

$$I(p, q, \lambda; n) := \int_0^{2 \pi} e^{p \cos (\lambda \tau) + q \cos ((1 - \lambda) \tau)} \cos (n \tau) \frac{\mathrm d \tau}{2 \pi}$$

There's a symmetry in this integral of the form:

$$I(p, q, \lambda; n) = I(q, p, 1 - \lambda; n)$$

Also note that the integrand is even, i.e. $$f(-\tau) = f(\tau)$$.

Now, as mentioned in the OP, we have:

$$I(p, 0, 1; n) = I(0, p, 0; n) = I_n(p)$$

Actually, a slight generalization for $$q \neq 0$$ gives us:

$$I(p, q, 1; n) = I(q, p, 0; n) = e^q I_n (p)$$

Due to the symmetry property above, taking $$\lambda = 1/2$$ we actually obtain a rather simple result:

\begin{align*} I(p, q, \frac{1}{2}; n) =& I(q, p, \frac{1}{2}; n) = \frac{1}{2 \pi} \int_0^{2\pi} \mathrm d\tau\, e^{(p + q)\cos(\tau / 2)} \cos (n\, \tau)\\ =& \frac{1}{\pi} \int_0^{\pi} \mathrm dy\, e^{(p + q)\cos y} \cos (2\, n\, y) = I_{2n}(p + q) \end{align*}

A special case (probably of limited interest though) is $$q = 0$$, and $$\lambda = 1 / m$$, where $$m \in \mathbb N$$. Of course, if $$m = 1$$ or $$m = 2$$, we obtain the previous results, namely $$I_n(p)$$ and $$I_{2n}(p)$$, so we need to take $$m \geq 3$$ to obtain anything new. The integral can then be converted into the following form:

$$I(p, 0, 1/m; n) = \frac{m}{2 \pi} \int_0^{2 \pi / m} \mathrm dx\, e^{p \cos x} \cos (m\, n\, x)$$

Unfortunately, a general analytic solution doesn't seem likely. One value which seems to be solvable though is $$m = 4$$ (originally found by experimenting in Mathematica); in this case, we write the integral as:

$$I(p, 0, 1/4; n) = \frac{2}{\pi} \int_0^{\pi/2} \mathrm dx\, e^{p \cos x} \cos (4\, n\, x)$$

We can then use the $$n$$ angle expansion, so our integral turns into:

$$I(p, 0, 1/4; n) = \frac{2}{\pi} \sum\limits_{k\;\mathrm{even}} (-1)^\frac{k}{2} \begin{pmatrix}4 n\\ k\end{pmatrix} \int_0^{\pi/2} \mathrm dx\, e^{p \cos x}\, \cos^{4n - k} x\, \sin^k x$$

Let's focus on the integral in the above; using the fact that $$4 n - k := 2 \ell$$ is even, we can rewrite $$\cos^{2\ell} x = (1 - \sin^2 x)^\ell$$, expand this using the binomial theorem, and additionally expand $$e^u = \cosh u + \sinh u$$, so that our final result is a linear combination of integrals of the following form:

$$\mathcal{I}(\alpha, p) = \int_0^{\pi/2} \mathrm dx\, \sinh(p \cos x)\, \sin^\alpha x\\ \mathcal{J}(\alpha, p) = \int_0^\pi \mathrm dx\, \cosh(p \cos x)\, \sin^\alpha x$$

for some integer values of $$\alpha$$. Note that the second integral has shifted limits, $$[0,\pi]$$, instead of $$[0,\pi/2]$$; this is because the integrand is actually symmetric around $$\pi/2$$, so we can write $$\int_0^{\pi/2}(\cdots) = \frac{1}{2} \int_0^\pi (\cdots)$$ (the easiest way to see this is to shift the origin to $$\pi/2$$, i.e. use the substitution $$x \rightarrow x - \pi / 2$$; then it's simple to demonstrate that $$f(-x) = f(x)$$, where $$f$$ denotes the integrand).

These kinds of integrals are known in the literature, see for instance Gradshteyn and Ryzhik, 7th ed., formulas 3.997.1 and 3.997.2:

$$\mathcal{I}(\alpha, p) = \frac{\sqrt \pi}{2} \left(\frac{2}{p}\right)^\alpha \Gamma\left(\frac{\alpha + 1}{2}\right) \mathbf{L}_\frac{\alpha}{2}(p)\\ \mathcal{J}(\alpha, p) = \sqrt \pi \left(\frac{2}{p}\right)^\alpha \Gamma\left(\frac{\alpha + 1}{2}\right) I_\frac{\alpha}{2}(p)$$

where $$I_\frac{\alpha}{2}$$ is the modified Bessel function of the first kind, and $$\mathbf{L}_\frac{\alpha}{2}$$ is the modified Struve function, see for instance DLMF, chapter 11.

The final result can be shown to be:

\begin{align*} I(p, 0, 1/4; n) =& \frac{2}{\pi} \sum\limits_{k\;\mathrm{even}} \sum\limits_{\ell=0}^{2n - k/2} \begin{pmatrix} 4n \\ k \end{pmatrix} \begin{pmatrix} 2n - k / 2 \\ \ell \end{pmatrix} (-1)^{2 n - \ell} \left[ \mathcal{I}(4n - 2\ell, p) + \frac{1}{2} \mathcal{J}(4n - 2\ell, p) \right] \end{align*}

Evidently, using the symmetry property, this automatically gives us $$I(0,p,3/4;n)$$ as well.

However, I haven't found anything which works for general $$m$$; while the procedure itself can more or less be repeated for any even $$m$$, the integrals $$\mathcal{I}$$ and $$\mathcal{J}$$ have different integration limits, which do not have any obvious representations in terms of special functions like the above.