\(\int\displaystyle\frac{dx}{1+e^x}=\)
Answer & explanation
Correct answer: option 4
The correct answer is Option (4) → \(-\log(1+e^{-x})+C\)
Multiplying the numerator and the denominator by \(e^{-x}\):
\( \displaystyle \int\frac{dx}{1+e^x} = \int\frac{e^{-x}}{e^{-x}+1}\,dx \)
Now the numerator is, apart from the sign, the derivative of the denominator. Substituting \(t = 1+e^{-x}\), \(dt = -e^{-x}\,dx\):
\( \displaystyle = -\int\frac{dt}{t} \)
\( = -\log|t|+C \)
\( = -\log(1+e^{-x})+C \)
(The modulus can be dropped since \(1+e^{-x} \gt 0\).)