I’d like help with computing the following integral:

$$\int_{0}^{\pi} e^{\cos t}\,dt$$

(This is a problem in complex analysis [supposedly].)


2 Answers 2


(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)$$


$$\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.

  • $\begingroup$ This was an exam question. The answer is presumably not supposed to be in terms of special functions (other than maybe sinusoidal functions). $\endgroup$ May 25, 2016 at 1:21
  • $\begingroup$ can you check if the result agrees with mine ? $\endgroup$
    – reuns
    May 25, 2016 at 2:18
  • $\begingroup$ Yes, it does. $$\pi\sum_{k=0}^\infty \dfrac{1}{2^{2k} (k!)^2} = \pi I_0(1)$$ $\endgroup$ May 25, 2016 at 7:28
  • $\begingroup$ Presumably, if you have not studied modified Bessel functions, the intended answer on the exam was the series representation. You won't get a "closed form" answer that doesn't involve special functions. $\endgroup$ May 25, 2016 at 7:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.