TITLE: Find the value of $\int_{0}^{\pi}e^{\cos\theta}\cos(\sin\theta)d\theta$.
QUESTION [6 upvotes]: Find the value of $\int_{0}^{\pi}e^{\cos\theta}\cos(\sin\theta)d\theta$.

$e^{\cos\theta}\cos(\sin\theta)=Re(e^{e^{i\theta}})$,where $Re()$ represents real part of.
So our integral becomes $$
\int_{0}^{\pi}Re(e^{e^{i\theta}})d\theta
$$
Now by Cauchy integral formula,
$$
\int_{0}^{2\pi}e^zdz=2\pi i
$$
But in Cauchy formula, the limits of integration are from $0$ to $2\pi$ and in my question, limits of integration are from $0$ to $\pi$. So I think I cannot apply Cauchy formula as such. What should I do? Please help me, Thanks.

REPLY [2 votes]: $$I(b)=\int_0^\pi e^{b\cos x}\cos (b\sin x)dx\\
=\frac{1}{2}\int_{-\pi}^\pi e^{b\cos x}\cos (b\sin x)dx\\
=\frac{1}{2}\int_{0}^{2\pi} e^{b\cos x}\cos (b\sin x)dx\\
=Re\left(\frac{1}{2}\int_{0}^{2\pi} e^{be^{ix}}dx\right)\\
I'(b)=Re\left(\frac{1}{2}\int_{0}^{2\pi} \frac{\partial}{\partial b} e^{be^{ix}}dx\right)\\
=Re\left(\frac{1}{2}\int_{0}^{2\pi} ibe^{be^{ix}}e^{ix}dx\right)\\
=Re\left(\left.\frac{1}{2}e^{be^{ix}}\right]_0^{2\pi}\right)=0\\
\therefore I(b)=I(0)=\frac{1}{2}\int_0^{2\pi}dx=\pi\\
I(1)=\int_0^\pi e^{\cos x}\cos (\sin x)dx=\pi
$$