Contour integral for cos(sin) resulting in infinite sum I'm trying to show that
$$\int_{0}^{2\pi}\cos(n\theta-2\sin\theta)d\theta = 2\pi\sum_{r=0}^{\infty}\frac{(-1)^n}{r!(n+r)!}$$
The question hints that I should consider
$$e^{z-z^{-1}}$$
but I don't see how to get to the answer. Considering the nature of the integral, the unit circle seems like a sensible contour. The integrand has only one pole in the unit circle (at zero), which has residue $-1$. So:
$$\int e^{z-z^{-1}}dz=-2\pi i$$
Switching to $\theta$:
$$\int_0^{2\pi}ie^{i\theta}e^{e^{i\theta}-e^{-i\theta}}d\theta=-2\pi i$$
$$\int_0^{2\pi}e^{2\sin\theta+i\theta}d\theta=-2\pi$$
That integrand looks similar, but doesn't match up with the required integral, and I don't see how to get them to match. More troublesome, the required infinite sum on the right hand side is missing.
I've considered switching to a contour of radius $n$, but that just gives me $(2n+1)\pi$ on the right-hand side, and I still can't get it to match on the left. How do I solve this?
EDIT: Infinite sum corrected.
 A: The integral is the real part of 
$$\int_0^{2 \pi} d\theta \, e^{i n \theta} \, e^{-i 2 \sin{\theta}} $$
To convert this into a complex integral over the unit circle, sub $z=e^{i \theta}$ and the integral is
$$-i \oint_{|z|=1} dz \, z^{n-1} \, e^{-\left ( z-z^{-1} \right )} $$
This integrand has an essential singlarity at $z=0$.  To evaluate the integral using the residue theorem, we replace the exponential by its series representation and reverse order of sum and integral.  The integral is then equal to
$$-i \sum_{k=0}^{\infty} \frac{(-1)^k}{k!} \oint_{|z|=1} dz \, z^{n-1} \, \left ( z-z^{-1} \right )^k$$
We can then expand the binomial inside the integral:
$$-i \sum_{k=0}^{\infty} \frac{(-1)^k}{k!} \oint_{|z|=1} dz \, z^{n-1} \, \sum_{j=0}^k (-1)^{k-j} \binom{k}{j} z^{2 j-k}$$
Note that the integral is going to be zero unless $k \ge n$.  To help us see this a bit better, let's shift the sum to begin there:
$$-i \sum_{k=0}^{\infty} \frac{(-1)^{n+k}}{(n+k)!} \oint_{|z|=1} dz \, z^{-1} \sum_{j=0}^{n+k} (-1)^{k-j} \binom{n+k}{j} z^{2 j-k}$$
The residue is then the coefficient of $z^0$ inside the sum.  The exponent of $z$ is zero when $j=k/2$, so only even values of $k$.  Let's clean this up a bit by only summing over even value of $k$:
$$-i \sum_{k=0}^{\infty} \frac{(-1)^{n+2 k}}{(n+2 k)!} \oint_{|z|=1} dz \, z^{-1} \sum_{j=0}^{n+2 k} (-1)^{2 k-j} \binom{n+2 k}{j} z^{2 j-2 k}$$
Now we see that the exponent of $z$ is zero when $j=k$.  Thus, we may now apply the residue theorem and the integral is equal to
$$2 \pi \sum_{k=0}^{\infty} \frac{(-1)^{n}}{(n+2 k)!} (-1)^k \binom{n+2 k}{k}$$
Simplifying, and noting the the integral is entirely real, we get that

$$\int_0^{2 \pi} d\theta \, \cos{\left ( n \theta - 2 \sin{\theta} \right )} = 2 \pi \sum_{k=0}^{\infty} \frac{(-1)^{n+k}}{k! (n+k)!}= 2 \pi (-1)^n J_n(2)$$

I believe my answer differs from that of the OP by a factor of $(-1)^k$ in the sum.
