Evaluate the following integrals:
$\int \frac{\log (x+2)}{(x+2)^{2}} d x$
Let I $=\int \frac{\log (x+2)}{(x+2)^{2}} \mathrm{dx}$
$\frac{1}{x+2}=t$
$\frac{-1}{(x+2)^{2}} d x=d t$
$I=-\int \log \left(\frac{1}{t}\right) d t$
Using integration by parts,
$=-\int \log \mathrm{t}^{-1} \mathrm{dt}$
$=-\int 1 \times \log \mathrm{t}^{-1} \mathrm{dt}$
We know that, $\frac{d}{d t} \log t=\frac{1}{t}$ and $\int d t=t$
$\mathrm{I}=\log \mathrm{t} \int \mathrm{dt}-\int\left(\frac{\mathrm{d}}{\mathrm{dt}} \log \mathrm{t} \int \mathrm{dt}\right) \mathrm{dt}$
$=\log \mathrm{t} \int \mathrm{dt}-\int\left(\frac{1}{\mathrm{t}} \int \mathrm{dt}\right) \mathrm{dt}$
$=\mathrm{t} \log \mathrm{t}-\int \frac{1}{\mathrm{t}} \times \mathrm{t} \mathrm{dt}$
$=\operatorname{tlog} \mathrm{t}-\mathrm{t}+\mathrm{c}$
Replace the value of $t$,
$=\frac{1}{x+2}\left(\log (x+2)^{-1}-1\right)+c$
$=-\frac{1}{x+2}-\frac{\log (x+2)}{x+2}+c$