I’d like help with computing the following integral:
$$\int_{0}^{\pi} e^{\cos t}\,dt$$
(This is a problem in complex analysis [supposedly].)
I’d like help with computing the following integral:
$$\int_{0}^{\pi} e^{\cos t}\,dt$$
(This is a problem in complex analysis [supposedly].)
(the complex analysis way)
$\cos t$ is even hence $$\int_{-\pi}^\pi e^{\cos t} dt = 2 \int_0^{\pi} e^{\cos t} dt$$
then apply the (complex) change of variable $z = e^{it}, dz = i e^{it} dt$, $$\int_{-\pi}^{\pi} e^{\cos t} dt = \int_{-\pi}^{\pi} e^{\frac{e^{it}+e^{-it}}{2}} (-i e^{-it}) i e^{it} dt = -i\int_{\gamma} e^{\frac{z+z^{-1}}{2}} z^{-1} dz$$
with $\gamma$ the unit circle traversed counter-clockwise.
the only one singularity inside the contour is at $z=0$, where $$e^{\frac{z+z^{-1}}{2}} z^{-1} = z^{-1}\left(\sum_{k=0}^\infty \frac{z^k}{2^k k!}\right)\left(\sum_{k=0}^\infty \frac{z^{-k}}{2^k k!}\right) = z^{-1}\sum_{n=-\infty}^\infty z^n \sum_{k=\max(0,n)}^\infty \frac{1}{2^k k!}\frac{1}{2^{k-n} (k-n)!} = \sum_{n=-\infty}^\infty c_n z^n$$
with $$c_{-1} = \sum_{k=0}^\infty \frac{1}{2^{2k} (k!)^2}= Res\left(e^{\frac{z+z^{-1}}{2}} z^{-1},0\right)$$
hence
$$\int_{\gamma} e^{\frac{z+z^{-1}}{2}} z^{-1} dz = 2 i \pi c_{-1}$$
$$\int_0^{\pi} e^{\cos t} dt = \frac{-i}{2} \int_{\gamma} e^{\frac{z+z^{-1}}{2}} z^{-1} dz = \pi \sum_{k=0}^\infty \frac{1}{2^{2k} (k!)^2}$$
Hint: expand the exponential in a power series, and express the cosine in terms of exponential functions. The answer turns out to involve a modified Bessel function. In fact, one of the formulas on that page contains the answer.