1. ## integral

$\int^{\pi}_{0} e^{\cos x} \cos (\sin x) \ dx$

2. Originally Posted by Random Variable
$\int^{\pi}_{0} e^{\cos x} \cos (\sin x) \ dx$
If $f(x) = e^{\cos x} \cos (\sin x)$ then $f(2\pi-x) = f(x)$. So the integral from 0 to $\pi$ is half the integral from 0 to $2\pi$.

Next, f(x) is the real part of $e^{\cos x} (\cos (\sin x) + i\sin(\sin x)) = e^{\cos x + i sin x} = e^{e^{ix}}$. Put $z = e^{ix}$. Then the integral $\int^{\pi}_{0}\!\!\! f(x)\, dx$ becomes $\text{Re}\frac12\oint e^z\,\frac{dz}{iz}$ (integral round the unit circle), which you can evaluate by the residue theorem. (I make the answer $\pi$.)

3. It's not as nice as Opalg's solution, but how about the following:

Let $I(a) = \int_{0}^{\pi} e^{a \cos x} \cos(a \sin x) \ dx = Re \Big(\int_{0}^{\pi} e^{ae^{ix}} \ dx \Big)$

now assuming it's OK to differentiate inside of the integral with respect to $a$

$I'(a) = Re \Big(\int_{0}^{\pi} e^{ix} e^{ae^{ix}} \ dx \Big) = Re \Big( \frac{1}{ai} \int_{a}^{-a}e^{u} \ du \Big) = Re \Big( \frac{i}{a} (e^{a}-e^{-a}) \Big) =0$

so $I(a) = C$

which means that $I$ is independent of the value of $a$

to find $C$ let $a=0$

then $I(0)= C = \int^{\pi}_{0} dx = \pi$

and $\int_{0}^{\pi} e^{\cos x} \cos(\sin x) \ dx = I(1) = \pi$

4. Originally Posted by Random Variable
It's not as nice as Opalg's solution, but how about the following:

Let $I(a) = \int_{0}^{\pi} e^{a \cos x} \cos(a \sin x) \ dx = Re \Big(\int_{0}^{\pi} e^{ae^{ix}} \ dx \Big)$

now assuming it's OK to differentiate inside of the integral with respect to $a$

$I'(a) = Re \Big(\int_{0}^{\pi} e^{ix} e^{ae^{ix}} \ dx \Big) = Re \Big( \frac{1}{ai} \int_{a}^{-a}e^{u} \ du \Big) = Re \Big( \frac{i}{a} (e^{a}-e^{-a}) \Big) =0$

so $I(a) = C$

which means that $I$ is independent of the value of $a$

to find $C$ let $a=0$

then $I(0)= C = \int^{\pi}_{0} dx = \pi$

and $\int_{0}^{\pi} e^{\cos x} \cos(\sin x) \ dx = I(1) = \pi$
That is cool.