The value of integral \( \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}}\displaystyle\frac{1}{1+e^{\sin x}}\,dx \) is
Answer & explanation
Correct answer: option 2
The correct answer is Option (2) → \( \displaystyle\frac{\pi}{2} \)
Let I be the integral. By the property \( \int_{-a}^{a}f(x)\,dx=\int_{-a}^{a}f(-x)\,dx \), and since \( \sin(-x)=-\sin x \):
\( \displaystyle I=\int_{-\pi/2}^{\pi/2}\frac{1}{1+e^{-\sin x}}\,dx \)
\( \displaystyle =\int_{-\pi/2}^{\pi/2}\frac{e^{\sin x}}{e^{\sin x}+1}\,dx \)
Adding the two forms of I:
\( \displaystyle 2I=\int_{-\pi/2}^{\pi/2}\frac{1+e^{\sin x}}{1+e^{\sin x}}\,dx \)
\( \displaystyle =\int_{-\pi/2}^{\pi/2}1\,dx \)
\( \displaystyle =\pi \)
\( \displaystyle I=\frac{\pi}{2} \)
Tip: For integrals of the form \( \frac{1}{1+e^{g(x)}} \) with g odd on [−a, a], the answer is always half the length of the interval, that is, a.