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.
Please help.
 A: $$ \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$$
A: 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}.$$
A: Generalization:
Use $\displaystyle I=\int_p^qf(x)\ dx=\int_p^qf(p+q-x)\ dx$
so that $\displaystyle I+I=\int_p^q[f(x)+f(p+q-x)]dx$
For $\displaystyle I=\int_{-a}^a\dfrac1{1+c^{g(x)}}$ where $g(x)$ is any odd function i.e., $g(-x)=-g(x)$ like $\sin x$
$f(p+q-x)=\dfrac1{1+c^{g(-x)}}=\dfrac{c^{g(x)}}{1+c^{g(x)}}$
$f(x)+f(p+q-x)=1$
The rest should be easy.
A: 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$$
