# Definite integral of nested trig functions giving bessel function

I put the following integral into wolfram alpha to solve as a part of a larger project I'm working and got this very curious result

$$\int_{0}^{2\pi} \cos{(A \cos{(y - x)}}) dx = 2\pi J_0(A)$$ for real A

Why is this true? Why does a Bessel function pop up here? The factor of $$2\pi$$ suggests some contour integration going on here but I'm having trouble seeing it

EDIT: missing a bracket should be cos(y-x) not cosy - x

• No. You must have done something wrong. If nothing else specified, $A,y$ constants, then the integral will be a normal integral over cos phaseshifted over one period which is $0$ no matter which phase. Jan 17, 2020 at 9:16
• wolframalpha.com/input/?i=integral+from+0+to+2pi+of+cos%28A*cos%28y%29-x%29dx Jan 17, 2020 at 9:17
• See the formula (149) in nbi.dk/~polesen/borel/node15.html.
– user
Jan 17, 2020 at 12:14

Let $$A \cos(y)-x=t\implies x=-t -A \cos(y)\implies dx=-dt$$ making $$\int \cos{(A \cos{y - x}})\, dx = -\int \cos(t) \,dt=\sin(t) +C$$ What is true is $$\int_{0}^{2\pi} \cos{(A \cos{y - x}})\, d\color{red}{y} = 2 \pi \cos (x) J_0(|A|)$$
• For real $A$, the absolute value is irrelevant because $J_0$ is an even function. For complex $A$, the use of absolute value seems incorrect. (Taking $a=i$ in WA gives an answer in terms of $I_0(1)$, not $J_0(1)$.) Jan 17, 2020 at 15:11
For real values of the parameters the integrated function $$f(x,y;A)=\cos{(A \cos{(x - y)}})$$ is $$\pi$$ periodic with respect to $$x$$. Therefore: $$\int_0^{2\pi}\cos(A \cos(x-y))dx=\int_{-y}^{-y+2\pi}\cos(A\cos t)dt =2\int_{0}^{\pi}\cos(A\sin t)dt=2\pi J_0(A),$$ the last equality following from the integral representation of the Bessel function.