Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I find the value of this following definite integral?


Mathematica says it's value is $\pi$, but I don't know how obtain it?

share|cite|improve this question
Let $x\mapsto -x$ – L. F. Nov 23 '13 at 13:21
@L.F. What do you mean, please ? I am really mpade curious by this post. I always thought that teachers imagination has no limit. – Claude Leibovici Nov 23 '13 at 13:28
up vote 7 down vote accepted

$$x\mapsto -x:$$ $$\int_{-\pi}^{\pi} \frac{e^{\sin x+\cos x}\cos \sin x}{e^{\sin x}+e^{x}}\,dx=\int_{-\pi}^{\pi} \frac{e^{ x+\cos x}\cos \sin x}{e^{\sin x}+e^{x}}\,dx$$

Adding both, our integral is:

$$\frac{1}{2}\int_{-\pi}^{\pi}e^{\cos x}\cos \sin x\,dx=\frac{1}{2}\int_0^{2\pi}e^{-\cos x}\cos \sin x\,dx=\pi$$

The last line can be done as follows:

$$\int_0^{2\pi} e^{-\cos x}\cos(- \sin x)\,dx=\Re\left(\int_0^{\pi} e^{-e^{ix}dx}\right)$$

$$f(\lambda)=\int_0^{2\pi} e^{\lambda e^{ix}}dx$$

$$f'(\lambda)=\frac{1}{i\lambda}\int_0^{2\pi} i\lambda e^{i x}e^{\lambda e^{ix}}dx =\frac{1}{i\lambda}\bigg[e^{\lambda e^{ix}}\bigg]_0^{2\pi}=0$$



Taking $\lambda =0$ we have $\mathcal{C}=2\pi$ and the result follows.

share|cite|improve this answer

Let $u=-x$. Denote your integral as $I$. Then

$$I=\int_{-\pi}^{\pi}\frac{\exp{(-\sin u+\cos u)}\cos(\sin u)}{\exp{(-u)}+\exp{(-\sin u)}}du=\int_{-\pi}^{\pi}\frac{\exp{(u+\cos u)}\cos(\sin u)}{\exp{(u)}+\exp{(\sin u)}}du$$

Then $$2I=\int_{-\pi}^{\pi}\frac{(\exp{(\sin u)+\exp(u))\exp(\cos u)}\cos(\sin u)}{\exp{(u)}+\exp{(\sin u)}}du=\int_{-\pi}^{\pi}\exp{(\cos u)}\cos(\sin(u))du$$

The following argument is an application of complex residue:

$$\int_{C}\frac{\exp z}{z}dz=2\pi i,$$

where C is the circle $\vert z\vert=1$.

Let $z=\exp{i\theta} (-\pi<\theta<\pi),$ then the integral is transformed into


Recall that $$\exp{(\exp(i\theta))}=\exp{(\cos\theta)}(\cos(\sin\theta)+i\sin(\sin\theta))$$

then the result follows.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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