## Thomas' Calculus 13th Edition

$$x - \ln \left( {1 + {e^x}} \right) + C$$
\eqalign{ & \int {\frac{{dx}}{{1 + {e^x}}}} \cr & {\text{multiply the integrand by }}\frac{{{e^{ - x}}}}{{{e^{ - x}}}} \cr & = \int {\frac{{{e^{ - x}}dx}}{{{e^{ - x}}\left( {1 + {e^x}} \right)}}} \cr & = \int {\frac{{{e^{ - x}}dx}}{{{e^{ - x}} + 1}}} \cr & {\text{integrate by the substitution method}} \cr & {\text{set }}u = {e^{ - x}} + 1{\text{; then }}du = - {e^{ - x}}dx \cr & {\text{write the integrand in terms of }}u \cr & \int {\frac{{{e^{ - x}}dx}}{{{e^{ - x}} + 1}}} = \int {\frac{{ - du}}{u}} \cr & {\text{integrating}}{\text{,}} \cr & = - \ln \left| u \right| + C \cr & {\text{replace }}{e^{ - x}} + 1{\text{ for }}u \cr & = - \ln \left| {{e^{ - x}} + 1} \right| + C \cr & = - \ln \left( {{e^{ - x}} + 1} \right) + C \cr & {\text{simplifying, we get:}} \cr & = - \ln \left( {\frac{1}{{{e^x}}} + 1} \right) + C \cr & = - \ln \left( {\frac{{1 + {e^x}}}{{{e^x}}}} \right) + C \cr & = \ln \left( {\frac{{{e^x}}}{{1 + {e^x}}}} \right) + C \cr & = x - \ln \left( {1 + {e^x}} \right) + C \cr}