Prove that for all $a > 0$: $\int_0^{\pi/2}e^{-a\cos x}\cos(a\sin x)dx = \frac{\pi}{2} - \int_0^a\frac{\sin x}{x}dx$ Prove that for all $a > 0$:
$$\int\limits_0^{\pi/2}e^{-a\cos x}\cos(a\sin x)dx = \cfrac{\pi}{2} - \int\limits_0^a\cfrac{\sin x}{x}dx$$
I have no idea how to solve it. But the task looks very interesting. I understand some basics of complex analysis. But I know that it's not needed.
 A: Hint. One may write, for $a>0$,
$$
\begin{align}
\int_0^{\pi/2}e^{-a\cos x}\cos(a\sin x)\,dx&=\Re \int_0^{\pi/2}e^{\large -ae^{ix}}\,dx
\\\\&= \frac{\pi}2+\sum_{n=1}^\infty (-1)^n\frac{a^n}{n!}\int_0^{\pi/2}\cos(nx)\,dx
\\\\&= \frac{\pi}2+\sum_{n=0}^\infty (-1)^n\frac{a^n}{n!}\frac{\sin(n\pi/2)}{n}
\\\\&=\frac{\pi}2 -\sum_{p=0}^\infty \frac{(-1)^p}{(2p+1)!}\frac{a^{2p+1}}{(2p+1)}
\\\\&= \cfrac{\pi}{2} - \int_0^a\cfrac{\sin x}{x}\:dx
\end{align}
$$ as announced.
A: The LHS is the real part of:
$$ J=\int_{0}^{\pi/2}\exp\left(-a\cos x+ia\sin x\right)\,dx =\int_{0}^{\pi/2}\exp\left(-a e^{-ix}\right)\,dx \tag{1}$$
that can be computed through a Taylor series expansion:
$$ \text{Re}(J) = \sum_{n\geq 0}\frac{(-a)^n}{n!}\int_{0}^{\pi/2}\cos(nx)\,dx =\sum_{m\geq 0}\frac{(-a)^{2m+1}(-1)^m}{(2m+1)(2m+1)!}.\tag{2}$$
Now it is straightforward to check that:
$$\frac{d}{da}\text{Re}(J) = \sum_{m\geq 0}\frac{(-1)^m a^{2m}}{(2m+1)!}=\frac{\sin(a)}{a}\tag{3}$$
hence the derivatives with respect to $a$ of the RHS and the LHS agree. Since their value at $a=0$ is the same, RHS$\equiv$LHS.
A: One may work this via complex analysis.  Consider the contour integral
$$\oint_C dz \frac{e^{-a z}}{z} $$
where $C$ is a half-unit-circle in the right-half plane, plus the imaginary axis in between with a semicircular detour about the origin.  Thus, the contour integral is equal to zero by Cauchy's theorem, and is also equal to
$$i \int_{-\pi/2}^{\pi/2} d\theta \, e^{-a e^{i \theta}} + PV \int_1^{-1} dy \frac{e^{-i a y}}{y} + i \epsilon \int_{\pi/2}^{-\pi/2} d\phi \, e^{i \phi} \frac{e^{-a \epsilon e^{i \phi}}}{\epsilon e^{i \phi}} $$
Thus, taking the imaginary part of the above equation and setting it equal to zero, we get
$$\int_{-\pi/2}^{\pi/2} d\theta \, e^{-a \cos{\theta}} \cos{(a \sin{\theta})} + \int_{-1}^1 dy \frac{\sin{a y}}{y} - \pi = 0$$
(Note that we do not need the $PV$ because the singularity at the origin is removable.)  Halving and solving for the first integral (and substituting in the second integral), we get
$$\int_0^{\pi/2} d\theta \, e^{-a \cos{\theta}} \cos{(a \sin{\theta})} = \frac{\pi}{2} - \int_0^a dx \frac{\sin{x}}{x} $$
as asserted.
A: $\newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \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{\half}{{1 \over 2}}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\iff}{\Leftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\ol}[1]{\overline{#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}
\totald{}{a}\int_{0}^{\pi/2}\exp\pars{-a\expo{-\ic x}}\,\dd x & =
-\int_{0}^{\pi/2}\exp\pars{-a\expo{-\ic x}}\expo{-ix}\,\dd x
\\[3mm] & =
-\ic\int_{x\ =\ 0}^{x\ =\ \pi/2}\exp\pars{-a\expo{-\ic x}}\,\dd\pars{\expo{-ix}}
=
-\ic\int_{1}^{-\ic}\expo{-at}\,\dd t
\\[3mm] & =
{i\over a}\pars{\expo{\ic a} - \expo{-a}}
\end{align}

Then,
\begin{align}
&\int_{0}^{\pi/2}\exp\pars{-a\expo{-\ic x}}\,\dd x
\\[3mm] = &\
{\pi \over 2} + \ic\int_{0}^{a}{\expo{\ic t} - \expo{-t} \over t}\,\dd t =
{\pi \over 2} + \ic\int_{0}^{a}{\cos\pars{t} - \expo{-t} \over t}\,\dd t
- \int_{0}^{a}{\sin\pars{t} \over t}\,\dd t
\end{align}

$$
\color{#f00}{\Re\int_{0}^{\pi/2}\exp\pars{-a\expo{-\ic x}}\,\dd x}
=
\color{#f00}{{\pi \over 2} - 
\int_{0}^{a}{\sin\pars{t} \over t}\,\dd t}
$$
