Question:
Evaluate: $\int \frac{x^{2}+5 x+2}{x+2} d x$
Solution:
By doing long division of the given equation we get
Quotient $=x+3$
Remainder $=-4$
$\therefore$ We can write the above equation as
$\Rightarrow x+3-\frac{4}{x+2}$
$\therefore$ The above equation becomes
$\Rightarrow \int \mathrm{x}+3-\frac{4}{\mathrm{x}+2} \mathrm{dx}$
$\Rightarrow \int \mathrm{x} \mathrm{dx}+3 \int \mathrm{dx}-4 \int \frac{1}{\mathrm{x}+2} \mathrm{dx}$
We know $\int x d x=\frac{x^{n}}{n+1} ; \int \frac{1}{x} d x=\ln x$
$\Rightarrow \frac{x^{2}}{2}+3 x-4 \ln (x+2)+c .$ (Where $c$ is some arbitrary constant)