Evaluate the following integrals:
$\int \frac{\log \left(1+\frac{1}{x}\right)}{x(1+x)} d x$
Assume $\log \left(1+\frac{1}{\mathrm{x}}\right)=\mathrm{t}$
$\Rightarrow \mathrm{d}\left(\log \left(1+\frac{1}{\mathrm{x}}\right)\right)=\mathrm{dt}$
$\Rightarrow \frac{1}{1+\frac{1}{\mathrm{x}}} \times \frac{-1}{\mathrm{x}^{2}} \mathrm{dx}=\mathrm{dt}$
$\Rightarrow \frac{\mathrm{x}}{\mathrm{x}+1} \times \frac{-1}{\mathrm{x}^{2}} \mathrm{~d} \mathrm{x}=\mathrm{dt}$
$\Rightarrow \frac{-1 . \mathrm{dx}}{\mathrm{x}(\mathrm{x}+1)}=\mathrm{dt}$
$\Rightarrow \frac{\mathrm{dx}}{\mathrm{x}(\mathrm{x}+1)}=-\mathrm{dt}$
$\therefore$ Substituting $t$ and $d t$ in the given equation we get
$\Rightarrow \int-t \cdot d t$
$\Rightarrow-\int t \cdot d t$
$\Rightarrow \frac{-t^{2}}{2}+c$
But $\log \left(1+\frac{1}{x}\right)=t$
$\Rightarrow-\frac{1}{2} \log ^{2}\left(1+\frac{1}{x}\right)+c$