Question:
Evaluate the following integral:
$\int \frac{3 x+5}{x^{3}-x^{2}-x+1} d x$
Solution:
$I=\int \frac{3 x+5}{x^{3}-x^{2}-x+1} d x=\int \frac{3 x+5}{(x-1)^{2}(x+1)}$
$\frac{3 x+5}{(x-1)^{2}(x+1)}=\frac{A}{x-1}+\frac{B}{(x-1)^{2}}+\frac{C}{x+1}$
$3 x+5=A(x-1)(x+1)+B(x+1)+C(x-1)^{2}$
Put $x=1$
$-3+5=4 C$
$2=4 \mathrm{C}$
$C=\frac{1}{2}$
Put $x=0$
$5=-A+B+C$
$A=\frac{1}{2}$
$\int \frac{3 x+5}{(x-1)^{2}(x+1)} d x=\frac{1}{2} \int \frac{d x}{x-1}+4 \int \frac{d x}{(x-1)^{2}}+\frac{1}{2} \int \frac{d x}{x+1}$
$=-\frac{1}{2} \ln |x-1|-\frac{4}{(x-1)}+\frac{1}{2} \ln |x+1|+C$
$=\frac{1}{2} \ln \left|\frac{x+1}{x-1}\right|-\frac{4}{(x-1)}+C$