Solution
Let
(x2+1)(x−1)x=x2+1Ax+B+x−1C
Multiplying by (x2+1)(x−1),
x=(Ax+B)(x−1)+C(x2+1)
Expanding,
x=(A+C)x2+(−A+B)x+(−B+C)
Comparing coefficients,
A+C=0
−A+B=1
−B+C=0
Solving,
A=−21,B=21,C=21
Therefore,
(x2+1)(x−1)x=−2(x2+1)x+2(x2+1)1+2(x−1)1
Integrating,
∫(x2+1)(x−1)xdx=−21∫x2+1xdx+21∫x2+11dx+21∫x−11dx
Since
∫x2+1xdx=21log(x2+1),
we get
∫(x2+1)(x−1)xdx=−41log(x2+1)+21tan−1x+21log∣x−1∣+C