# Evaluate $\int^{ \pi/2}_{- \pi/2} \frac {1}{ 1+e^{\sin x} }dx$

Evaluate $\int^{\pi/2}_{-\pi/2} \frac {1}{ 1+e^{\sin x} }dx$

Solution:

I think odd, even functions are of no use here.

Also we get nothing by taking $e^{\sin x}$ common in denominator.

Also rationalizing the denominator is of no use.

Really I have no idea how to solve this question.

-
I must say that your comment about odd/even functions caused me to try what I did below in my comment. Good one. –  DonAntonio Jun 2 '13 at 11:28

Put

$$f(x)=\frac1{1+e^{\sin x}}\implies f(-x)=\frac1{1+e^{\sin(-x)}}=\frac1{1+e^{-\sin x}}=e^{\sin x}f(x)=1-f(x)$$

so that we have

$$\int\limits_{-\pi/2}^{\pi/2} f(x)\,dx=\int\limits_{-\pi/2}^0f(x)\,dx+\int\limits_0^{\pi/2}f(x)\,dx=$$

$$\int\limits_0^{\pi/2}f(x)e^{\sin x}dx+\int\limits_0^{\pi/2}f(x)\,dx=\frac{\pi}2$$

-
+1 Awesome. this solution is helpful for me too. –  iostream007 Jun 2 '13 at 11:36
Believe me, when I got this result I was pretty surprised, and I even did something I do very few occassions: I resourced to WA to verify the result! –  DonAntonio Jun 2 '13 at 11:39
Very neat! Not entirely sure how you solved the final integrals on the last line though. I might just be having a slow moment. –  john Jun 2 '13 at 11:42
Great job. Thanks a lot –  rst Jun 2 '13 at 11:44
@john, since $\,f(x)e^{\sin x}=1-f(x)\,$ , in the last line we're left only with the integral of $\,1\cdot dx\,$ ... –  DonAntonio Jun 2 '13 at 11:58

This answer is a slight generalization of @DonAntonio's.

Any function can be decomposed into even and odd functions, $$f(x) = f_{+}(x) + f_{-}(x),$$ where $$f_\pm(x) = \frac{1}{2}(f(x)\pm f(-x)).$$ Note that $f_\pm(-x) = \pm f_\pm(x)$, so $f_+$ is even and $f_-$ is odd.

Thus,
$$\begin{eqnarray*} \int_{-a}^a f(x)dx &=& \int_{-a}^a f_{+}(x)dx + \underbrace{\int_{-a}^a f_{-}(x)dx}_{0} \\ &=& 2\int_{0}^a f_{+}(x)dx \end{eqnarray*}$$ for any function.

For $f(x) = 1/(1+e^{\sin x})$ we have $f_+(x) = 1/2$. Therefore, $$\int^{ \pi/2}_{- \pi/2} \frac {1}{ 1+e^{\sin x} }dx = 2\int_{0}^{\pi/2} \frac{1}{2} dx = \frac{\pi}{2}.$$

-

$$\int^{\frac \pi2}_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx$$

$$=\int^0_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx+\int^{\frac \pi2}_0 \frac 1{ 1+e^{\sin x} }dx$$

$$\text{Now, putting } y=-x \text{ in } \int^0_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx,$$

$$\text{ we get } \int^0_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx=\int^0_{\frac \pi2}\frac1{1+e^{\sin(-y)}}(-dy)$$ $$=\int^0_{\frac \pi2}\frac{e^{\sin y}}{1+e^{\sin y}}(-dy)\text{ as }\sin(-y)=-\sin y$$

$$=\int^{\frac \pi2}_0\frac{e^{\sin y}}{1+e^{\sin y}}dy \text{ as } \int^a_bf(x)dx=-\int^b_af(x)dx$$

$$=\int^{\frac \pi2}_0\frac{e^{\sin x}}{1+e^{\sin x}}dx \text{ as } \int^a_bf(x)dx=\int^a_bf(y)dy$$

$$\implies \int^{\frac \pi2}_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx=\int^0_{-\frac \pi2} \frac 1{ 1+e^{\sin x} }dx+\int^{\frac \pi2}_0 \frac 1{ 1+e^{\sin x} }dx$$

$$=\int^{\frac \pi2}_0\frac{e^{\sin x}}{1+e^{\sin x}}dx+\int^{\frac \pi2}_0 \frac 1{ 1+e^{\sin x} }dx$$

$$=\int^{\frac \pi2}_0\frac{1+e^{\sin x}}{1+e^{\sin x}}dx=\int^{\frac \pi2}_0dx$$

-
it is somewhat like above answer. But you explained in detail . good work. –  rst Jun 2 '13 at 15:08
@rst, if you observe carefully, my answer has evolves around the manipulation triggered by the limits, whereas the other answer evolved around the property of the function $f$ –  lab bhattacharjee Jun 2 '13 at 15:13
Yeah,you can say that –  rst Jun 2 '13 at 15:21