Evaluate $\int \frac{1}{\mathrm{e}^{\mathrm{x}}+1} \mathrm{dx}$
$\int \frac{1}{e^{x}+1} d x$
We can write above integral as
$\Rightarrow \int \frac{1+e^{x}-e^{x}}{e^{x}+1} d x$
Considering first integral:
$\int \frac{1+e^{x}}{1+e^{x}} d x$
Since the numerator and denominator are exactly same, our integrand simplifies to 1 and integrand becomes:
$\Rightarrow \int d x$
$\Rightarrow x$
$\therefore \int \frac{1+e^{x}}{1+e^{x}} d x=x \cdots$ (3)
Considering second integral:
$\int \frac{-e^{x}}{e^{x}+1} d x$
Let $u=1+e^{x}, d u=e^{x} d x$
Apply u - substitution:
$\int \frac{1}{\mathrm{u}}(-\mathrm{du})=-\ln |u|$
Replacing the value of $u$ we get,
$\int \frac{-e^{x}}{e^{x}+1} d x=-\ln \left|1+e^{x}\right|+C \cdots(4)$
From (3) and (4) we get,
$\Rightarrow \int \frac{1+e^{x}}{e^{x}+1} d x+\int \frac{-e^{x}}{e^{x}+1} d x=x-\ln \left|1+e^{x}\right|+C$
$\therefore \int \frac{1}{e^{x}+1} d x=x-\ln \left|1+e^{x}\right|+C$