Find the value of this real integral by complex contour integral $\int _0 ^{2\pi} e^{\sin\theta} \sin(\cos \theta)d\theta$ $Q)$ Find the value of this integral.
$\int _0 ^{2\pi} e^{\sin\theta} \sin(\cos \theta)d\theta$

In my note it said the answer was $-2 \pi$. But In my trial, my thing was $0$
Here is my attempt.  I considered the  $f(\theta)$ as below.
$ f(\theta) = e^{\sin\theta}(\cos(\cos\theta) + i \sin(\cos \theta)) = e^{i\cos\theta + \sin\theta} = e^{i(\cos\theta - i \sin \theta)}$
So Only we we need just finding the  $\operatorname{Im}(\int _0 ^{2\pi}f(\theta)\,d\theta)$
(I.e. $\operatorname{Im}(\int _0 ^{2\pi}f(\theta)\,d\theta) = \int _0 ^{2\pi} e^{\sin\theta} \sin(\cos \theta)d\theta$)
Say $z = e^{i\theta}$
Since $e^ {i \over z} = e^ {\bar z} = e^{i(\cos\theta - i \sin\theta)}$ on the $\vert z \vert =1$
Then, $f(\theta) = e^ {i \over z}$ and $d \theta = {dz \over iz}$
Hence, $\int _0 ^{2\pi}f(\theta)\,d\theta = \int _{\vert z\vert =1}  e^ {i \over z} {dz \over iz} =  2\pi i \bullet \operatorname{res}(f,0) = 2\pi$
Therefore the final answer is  $\operatorname{Im} (\int _0 ^{2\pi}f(\theta)\, d\theta) =0$
Well.... Still I can't find my mistake in my solution. My guess the answer was incorrect.
What do you think about that? Is my solution right? If my thing have any errors, Please let me know.
Thanks.
 A: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\on}[1]{\operatorname{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[5px,#ffd]{\int_{0}^{2\pi}\expo{\sin\pars{\theta}}
\sin\pars{\cos\pars{\theta}}\,\dd\theta}
\\[5mm] = &\
\Im\int_{0}^{2\pi}\expo{\sin\pars{\theta}}
\expo{\ic\cos\pars{\theta}}\,\,\dd\theta
\\[5mm] = &\
\Im\int_{0}^{2\pi}\expo{\ic\bracks{-\ic\sin\pars{\theta} + \cos\pars{\theta}}}\quad\dd\theta
\\[5mm] = &\
\Im\int_{0}^{2\pi}\expo{\ic\expo{-\ic\theta}}\,\dd\theta =
\Im\oint_{\verts{z}\ =\ 1}\expo{\ic/z}
\,{\dd z \over \ic z}
\\[5mm] = &\
-\,\Re\oint_{\verts{z}\ =\ 1}\expo{\ic/z}
\,{\dd z \over z} =
-\,\Re\oint_{\verts{z}\ =\ 1}
{\expo{\ic z} \over z}\,\dd z
\\[5mm] = &\
-\Re\pars{2\pi\ic \expo{\ic 0}} = \bbx{\large 0} \\ &
\end{align}
A: Taking the integrand in the original integral as $f(\theta)$, note that $f(2\pi-\theta)=f(\theta)$, so we have,
$$\int_0^{2\pi}f(\theta)~\text d\theta=2\int_0^\pi f(\theta)~\text d\theta$$
Now, note that $f(\pi-\theta)=-f(\theta)$, so the integral of $f$ from $0$ to $\pi$ is $0$ and the original integral from $0$ to $2\pi$ is $2\times 0=0$
So, yeah, your answer is correct. It's probably a misprint or maybe you have the wrong integral?
