How do you evaluate  {jatex options:inline}\int \frac{1}{1+e^x}dx{/jatex}?
Sometimes it is possible to multiple by a factor equal to 1 so that the integration becomes simpler. In this case we can multiply the integrand by  {jatex options:inline}\frac{e^{-x}}{e^{-x}}{/jatex}  to obtain  {jatex options:inline}\int \frac{e^{-x}}{e^{-x}+1} dx{/jatex}.
The numerator is almost the derivative of the denominator. We can write the integral; as  {jatex options:inline}- \int \frac{-e^{-x}}{e^{-x}+1} dx{/jatex}, then the numerator is the derivative of the denominator, and we can integrate by substituting  {jatex options:inline}u={e^{-x}+1}{/jatex}  then  {jatex options:inline}du=-e^{-x}dx \rightarrow dx=-e^xdu{/jatex}.
. {jatex options:inline}\begin{aligned} - \int \frac{-e^{-x}}{e^{-x}+1} dx &=- \int \frac{e^{-x}}{u} e^x dx \\ &= - \int \frac{1}{u}du \\ &= -ln u +c \\ &= -ln(1+e^{-x})+c \end{aligned} {/jatex}
Integrating in this way can be tricky as the factor to be used is often not easy to find.