How to solve integral $\int_0^{2\pi} e^{i(a\cos\phi + b\sin\phi)} \cos\phi\ d\phi$

Solution 1:

\begin{align*} \int_0^{2\pi} e^{i(a\cos\phi+b\sin\phi)}\cos\phi \, d\phi &= \int_0^{2\pi} \left(-i \frac{\partial}{\partial a}\right) e^{i(a\cos\phi+b\sin\phi)}\,d\phi \\ &= -i \frac{\partial}{\partial a} \int_0^{2\pi} e^{i(a\cos\phi+b\sin\phi)}\,d\phi & \textrm{Leibniz rule} \\ &= -i \frac{\partial}{\partial a} \int_0^{2\pi} e^{i\sqrt{a^2+b^2}\cos(\phi-\phi_0)}\,d\phi & \textrm{see comment of H. H. Rugh} \\ &= -i \frac{\partial}{\partial a} \int_0^{2\pi} e^{i\sqrt{a^2+b^2}\cos t}\,d t & \textrm{periodicity of cosine} \\ &= -i \frac{\partial}{\partial a} 2\pi J_0\left(\sqrt{a^2+b^2}\right) & \textrm{standard integral} \\ &= \frac{2\pi i a J_1\left(\sqrt{a^2+b^2}\right)}{\sqrt{a^2+b^2}} & J_0'(x)=-J_1(x) \end{align*}