Solution:
Let $1+\mathrm{e}^{\mathrm{x}}=\mathrm{t}$
$\Rightarrow d\left(1+e^{x}\right)=d t$
$\Rightarrow \mathrm{e}^{\mathrm{x}} \mathrm{dx}=\mathrm{dt}$
$\therefore$ By substituting $t$ and $dt$ in given equation we obtain
$\Rightarrow \int \frac{1}{t^{2}} d t$
$\Rightarrow \int \mathrm{t}^{-2} \cdot d t$
$\Rightarrow \frac{-1}{t}+c$
But $1+e^{x}=t$
$\Rightarrow \frac{-1}{1+\mathrm{e}^{\mathrm{x}}}+\mathrm{c}$