Transform complex exponential integral to real Question: Transform
$J_n (x)=\frac{1}{2 \pi} \int_{\theta=-\pi}^\pi e^{i(n\theta-x\sin\theta)}$
On answer sheet:
$J_n (x)=\frac{1}{\pi} \int_{\theta=0}^\pi \cos(n\theta-x\sin\theta)$
But how? I am not very good at complex analysis, thanks for any help!

The imaginary part is $$\dfrac{1}{2\pi} \int_{-\pi}^\pi \sin(n\theta - x \sin\theta)\; d\theta$$ but that is $0$ because the integrand is an odd function.
The real part is  $$\dfrac{1}{2\pi} \int_{-\pi}^\pi \cos(n\theta - x \sin\theta)\; d\theta$$
Here the integrand is even, so you can write this as $\dfrac{1}{\pi} \int_0^\pi \ldots$.
