Question:
Evaluate the following integral:
$\int \frac{x^{2}+1}{(x-2)^{2}(x+3)} d x$
Solution:
$I=\int \frac{x^{2}+2}{(x-2)^{2}(x+3)} d x$
$\frac{\mathrm{x}^{2}+2}{(\mathrm{x}-2)^{2}(\mathrm{x}+3)}=\frac{\mathrm{A}}{\mathrm{x}-2}+\frac{\mathrm{B}}{(\mathrm{x}-2)^{2}}+\frac{\mathrm{c}}{\mathrm{x}+3}$
$x^{2}+1=A(x-2)(x+3)+B(x+3)+C(x-2)^{2}$
Put $x=2$
$4+1=B \times 5$
$5=5 B$
$B=\frac{5}{5}=1$
Put $x=-3$
$10=C \times 25$
$C=\frac{10}{25}=\frac{2}{5}$
Equating coefficients of constants
$1=-6 A+3 B+4 C$
$1=-6 A+3+\frac{8}{5}$
$A=\frac{3}{5}$
Thus,
$I=\frac{3}{5} \int \frac{d x}{x-2}-\int \frac{d x}{(x-2)^{2}}-\frac{2}{5} \int \frac{d x}{x+3}$
$I=\frac{3}{5} \log |x-2|-\frac{1}{(x-2)}+\frac{2}{5} \log |x+3|+C$