[Math] How to integrate $e^{-\cos(\theta)}\cos(\theta + \sin(\theta))$

complex integrationcomplex numberscomplex-analysiscontour-integrationintegration

I am struggling to find a way to evaluate the following real integral: $$\int_{0}^{2\pi}e^{-\cos(\theta)}\cos(\theta + \sin(\theta))\:\mathrm{d}\theta$$

The exercise started by asking me to calculate:

$$\oint_{C}e^{-\frac{1}{z}}\:\mathrm{d}z$$

Where $C$ is the unit circle centered on the origin. Using Cauchy's Residue theorem, we have:

$$\oint_{C}e^{-\frac{1}{z}}\:\mathrm{d}z = 2\pi i\operatorname{Res}(f(z),0)=-2\pi i$$

Now, I would like to use this to evaluate the real integral I am asked to. So I began by noting that if we set $z = e^{i\theta}$ on the unit circle, then:

$$e^{-\frac{1}{z}}=e^{-e^{-i\theta}}=e^{-\cos(\theta)+i\sin(\theta)}=e^{-\cos(\theta)}e^{i\sin(\theta)}=e^{-\cos(\theta)}(\cos(\sin(\theta))+i\sin(\sin(\theta)))$$

The real part of this function looks promisingly like the integrand, but not quite, so I'm unsure how I can proceed? I am also asked as an extension to calculate:

$$\int_{0}^{2\pi}e^{-\cos(\theta)}\sin(\theta + \sin(\theta))\:\mathrm{d}\theta$$

But I assume the method to calculate this will become clear when I have found how to get the extra additive $\theta$ in the trigonometric function in the integrand.

Best Answer

Let $z=e^{i\theta}$, then $dz=ie^{i\theta}d\theta=(-\sin \theta+i\cos \theta)d\theta$.

Next, we note that

$$e^{-1/z}=e^{-\cos \theta}\left(\cos (\sin \theta)-i\sin(\sin \theta)\right)$$

and thus

$$\begin{align} e^{-1/z}dz&=e^{-\cos \theta}\left(\cos (\sin \theta)-i\sin(\sin \theta)\right)(-\sin \theta+i\cos \theta)d\theta\\\\ &=e^{-\cos \theta}\left(-\sin \theta \cos (\sin \theta)+\cos \theta \sin(\sin \theta)+i(\cos \theta \cos (\sin \theta)+\sin \theta \sin(\sin \theta))\right)\\\\ &=e^{-\cos \theta}\left(-\sin (\theta-\sin \theta)+i\cos(\theta +\sin \theta) \right) \end{align}$$

Note that the first term $e^{-\cos \theta}(-\sin (\theta-\sin \theta))$ is an odd function of $\theta$ and inasmuch as it is also periodic with period $2\pi$, its integral $\int_0^{2\pi}e^{-\cos \theta}(-\sin (\theta-\sin \theta))d\theta=0$. We are left with

$$\oint_C e^{-1/z}dz=\int_0^{2\pi}e^{-\cos \theta}(i\cos(\theta +\sin \theta))d\theta$$