Can anyone help me calculating this integral using contour integration?
$\int_0^{2\pi} e^{\cos(\phi)}\cos(\phi - \sin(\phi)) d\phi$
I've used the subctraction formula of the cosine:
$$\cos(\phi - \sin(\phi)) = \cos(\phi)\cos(\sin(\phi)) + \sin(\phi)\sin(\sin(\phi))$$
then substituting $z = e^{i\phi}$:
$\displaystyle \int_0^{2\pi} e^{\cos(\phi)}\cos\left(\phi - \sin(\phi)\right) d\phi$ $\displaystyle =\int_0^{2\pi} e^{\frac{1}{2} \left(z + \frac{1}{z}\right)}(\frac{1}{2} \left(z + \frac{1}{z}\right)\cos\left(\frac{1}{2} \left(z - \frac{1}{z}\right)\right) + \frac{1}{2i} \left(z - \frac{1}{z}\right)\sin\left(\frac{1}{2i} \left(z - \frac{1}{z}\right)\right)) d\phi$
I've used again trigonometric formulas to break the cos and sin and then I've substitute the exponential, the sine and the cosine with their Taylor and Laurent series in $z = 0$ (which seems to me the only singularity), and tried to find the residue isolating the $1/z$ coefficient. Is that a correct way? No matter how hard I try I can't get the result $2 \pi$.
Your integral is the real part of
$$\int_0^{2\pi} e^{\cos \phi}e^{i(\phi - \sin \phi)}\, d\phi = \int_0^{2\pi} e^{\cos \phi - i\sin \phi}e^{i\phi}\, d\phi = \int_0^{2\pi} e^{e^{-i\phi}}e^{i\phi}\, d\phi$$
The rightmost integral can be represented as
$$\oint_{|z| = 1} e^{z^{-1}} z\frac{dz}{iz} = \frac{1}{i}\oint_{|z| = 1} e^{z^{-1}}\, dz.$$
By the residue theorem,
$$\oint_{|z| = 1} e^{z^{-1}}\, dz = 2\pi i \underset{z = 0}{\operatorname{Res}} e^{z^{-1}} = 2\pi i.$$
Hence
$$\frac{1}{i}\oint_{|z| = 1} e^{z^{-1}}\, dz = 2\pi,$$
and consequently your integral evaluates to $2\pi$.