Solution. We want to determine the integral of \frac{1}{e^x + 1}, i.e.:
\begin{align*} \int \frac{1}{e^x + 1} dx = \int \frac{1}{e^x(1 + e^{-x})} dx = \int \frac{e^{-x}}{1 + e^{-x}} dx. \end{align*}
\begin{align*} \int \frac{e^{-x}}{1 - e^{-x}} dx &= \int \frac{-du}{u} \\ &= -\ln \lvert u \rvert + C \\ &= -\ln \lvert 1 + e^{-x} \rvert + C, \end{align*}