TITLE: Solve $\int_0^{2\pi} \cos(a\cos(x) + b\sin(x) + cx + d)dx$
QUESTION [5 upvotes]: I'm trying to estimate the following integral:
\begin{align*}
\int_0^{2\pi} \cos(a\cos(x) + b\sin(x) + cx + d)dx,
\end{align*}
where a, b, c and d are non-zero constants. Is there any way to get a closed-form solution using Bessel functions for example?
During my search to solve it, I stumble accross this equation:
\begin{align*}
\int_0^{2\pi} \cos(a\cos(x) + b\sin(x) + d)dx = 2\pi J_0(\sqrt{a^2 + b^2})\cos(d),
\end{align*}
where $J_0$ is the Bessel function of the first kind of order 0.
Edit
I was able to find a solution whenever c=1 (useful page to understand all the steps)
\begin{align*}
&\int_0^{2\pi} \cos(a\cos(x) + b\sin(x) + x + d)dx \\
&= \int_0^{2\pi}\cos(a\cos(x) + b\sin(x) + d)\cos(x)dx - \int_0^{2\pi}\sin(a\cos(x) + b\sin(x) + d)\sin(x)dx \\
&= Re \int_0^{2\pi}e^{i(a\cos(x) + b\sin(x) + d)}\cos(x)dx - Im\int_0^{2\pi}e^{i(a\cos(x) + b\sin(x) + d)}\sin(x)dx \\
&= -Re \left[ie^{id} \frac{\partial}{\partial a} \int_0^{2\pi}e^{i(a\cos(x) + b\sin(x))}dx\right] + Im\left[ie^{id} \frac{\partial}{\partial b}\int_0^{2\pi}e^{i(a\cos(x) + b\sin(x))}dx\right]\\
&= -Re \left[ie^{id} \frac{\partial}{\partial a} 2\pi J_0\left(\sqrt{a^2 + b^2}\right)\right] + Im\left[ie^{id} \frac{\partial}{\partial b}2\pi J_0\left(\sqrt{a^2 + b^2}\right)\right]\\
&=-\frac{2\pi}{\sqrt{a^2 + b^2}}J_1\left(\sqrt{a^2 + b^2}\right)\left[a\sin(d) + b\cos(d)\right]
\end{align*}
My problem is really this factor $c$ in front of the $x$ term. How can I solve this difficulty?

REPLY [7 votes]: So after some computations, I was able to obtain a satisfactory answer in the case where c is an integer. For simplicity, let us define:
\begin{align*}
\forall n\in\mathbb N, \qquad I_n = \int_{0}^{2\pi} \cos(x\cos(\theta) + y\sin(\theta) + n\theta + d)d\theta.
\end{align*}
I already established that:
\begin{align*}
I_0 &= 2\pi J_0(\sqrt{x^2 + y^2})\cos(d),\\
I_1 &= -\frac{2\pi}{\sqrt{x^2 + y^2}}J_1\left(\sqrt{x^2 + y^2}\right)\left[x\sin(d) + y\cos(d)\right].
\end{align*}
Let us rewrite $I_n$ as:
\begin{align*}
I_n &= \int_{0}^{2\pi} \cos(x\cos(\theta) + y\sin(\theta) + d)\cos(n\theta)d\theta - \int_{0}^{2\pi} \sin(x\cos(\theta) + y\sin(\theta) + d)\sin(n\theta)d\theta\\
&= Re\left[\int_{0}^{2\pi} e^{i(x\cos(\theta) + y\sin(\theta) + d)}\cos(n\theta)d\theta\right] - Im\left[\int_{0}^{2\pi} e^{i(x\cos(\theta) + y\sin(\theta) + d)}\sin(n\theta)d\theta\right]\\
&= Re\left[C_n\right] - Im\left[S_n\right],
\end{align*}
where I have defined the two sequences $C_n$ and $S_n$ that I am going to compute. We already know that:
\begin{align*}
C_0 &= 2\pi e^{id} J_0(\sqrt{x^2 + y^2})\\
C_1 &= 2\pi \frac{e^{id}}{i} \frac{\partial}{\partial x}[J_0(\sqrt{x^2 + y^2})].
\end{align*}
Moreover, in the same manner, it can be shown that:
\begin{align*}
S_0 &= 0\\
S_1 &= 2\pi \frac{e^{id}}{i} \frac{\partial}{\partial y}[J_0(\sqrt{x^2 + y^2})].
\end{align*}
Using the fact that $\cos(2x) = 2\cos^2(x) - 1$ and $\sin(2x) = 2\sin(x)\cos(x)$, it can be demonstrated that:
\begin{align*}
C_2 &= \frac{2}{i}\frac{\partial C_1}{\partial x} - C_0\\
S_2 &= \frac{2}{i}\frac{\partial S_1}{\partial x} - S_0.
\end{align*}
Using Chebyshev polynomials, we can demonstrate that:
\begin{align*}
\cos[(n+1)x] = 2\cos(x)\cos(nx) - \cos[(n-1)x]\\
\sin[(n+1)x] = 2\cos(x)\sin(nx) - \sin[(n-1)x].
\end{align*}
Using induction reasoning alongside with these two relations, it is straightforwards to prove that:
\begin{align*}
C_{n+1} &= \frac{2}{i}\frac{\partial C_n}{\partial x} - C_{n-1}\\
S_{n+1} &= \frac{2}{i}\frac{\partial S_n}{\partial x} - S_{n-1}.
\end{align*}
To finish and in order to find an inductive relation for $I_n$, let us define:
\begin{align*}
\forall n\in\mathbb N, \qquad J_n = \int_{0}^{2\pi} \sin(x\cos(\theta) + y\sin(\theta) + n\theta + d)d\theta = Im\left[C_n\right] + Re\left[S_n\right],
\end{align*}
we can write:
\begin{align*}
I_{n+1} &= Re\left[C_{n+1}\right] - Im\left[S_{n+1}\right]\\
&= Re\left[\frac{2}{i}\frac{\partial C_n}{\partial x} - C_{n-1}\right] - Im\left[\frac{2}{i}\frac{\partial S_n}{\partial x} - S_{n-1}\right]\\
&= 2\frac{\partial}{\partial x}\left[Re\left[\frac{C_n}{i}\right] - Im\left[\frac{S_n}{i}\right]\right] - I_{n-1}\\
&= 2\frac{\partial}{\partial x}\left[Im\left[C_n\right] + Re\left[S_n\right]\right] - I_{n-1}\\
&= 2\frac{\partial J_n}{\partial x} - I_{n-1}.
\end{align*}
Similarly, we have:
\begin{align*}
J_{n+1} = -2\frac{\partial I_n}{\partial x} - J_{n-1}.
\end{align*}
By defining $Z_n = I_n + iJ_n$ we can use the last two recurrence relations to obtain:
\begin{align*}
Z_{n+1} = -2i \frac{\partial Z_n}{\partial x} - Z_{n-1},
\end{align*}
where $Z_n$ can also be defined using integral equation as:
\begin{align*}
\forall n\in\mathbb N, \qquad Z_n = \int_{0}^{2\pi} e^{i(x\cos(\theta) + y\sin(\theta) + n\theta + d)}d\theta.
\end{align*}
Using brute force computation (see this post for the full answer), the solution is:
\begin{align*}
\quad Z_{\pm n} = 2\pi e^{id} \left(\frac{x\pm iy}{x^2+y^2}\right)^{n}\left[r^2 J_0(r) \sum_{k=1}^{u_n}a_k^{n} \left(x^2 + y^2\right)^{k-1} + i r J_1(r) \sum_{k=1}^{u_{n+1}}b_k^{n} \left(x^2 + y^2\right)^{k-1}\right]
\end{align*}
where $n\geq 1$ and $u_n$ is defined as $u_n = \left(2n+(-1)^n -1\right)/4$. The two coefficients can be computed using:
\begin{equation*}
\forall k\geq 1, n\geq 2k,\quad a_k^{n} = (2i)^{n-2k}\frac{(n-k)!(n-(k+1))!}{(k-1)!k!(n-2k)!}
\end{equation*}
\begin{equation*}
\forall k\geq 1, n\geq 2k-1,\quad b_k^{n} = (2i)^{n-(2k-1)}\frac{(n-k)!(n-k)!}{(k-1)!(k-1)!(n-(2k-1))!)}
\end{equation*}
Remarks
(1) For negative integers, it is just a matter of sign:
\begin{align*}
\forall n\in\mathbb N, \qquad I_{-n} &= Re\left[C_n\right] + Im\left[S_n\right] \\
\forall n\in\mathbb N, \qquad J_{-n} &= Im\left[C_n\right] - Re\left[S_n\right].
\end{align*}
(2) For non integers number, considering the developments and all the computations that I have done, I suspect that factorial derivatives are involved but I have no idea how to do it.