Integrate the rational functions.
∫x3+x+1x2−1dx.
∫x3+x+1x2−1dx=∫xdx+∫2x+1x2−1dx[∵x3+x+1x2−1=x+2x+1x2−1]=∫xdx+∫2x+1(x+1)(x−1)dx
Let 2x+1(x+1)(x−1)=A(x+1)+B(x−1)
⇒2x+1(x+1)(x−1)=A(x−1)+B(x+1)(x+1)(x−1)⇒2x+1=x(A+B)−A+B
On comparing the coefficients of x and constant of x and constant term on both sides we get
A+B=2 and −A+B=1
On Adding above equations, we get 2B=3⇒B=32 and then A=12
∴∫x2+x+1x2−1dx=∫xdx+∫A(x+1)dx+∫B(x−1)dx=∫xdx+12∫1(x+1)dx+32∫1(x−1)dx=x22+12log|x+1|+32log|x−1|+C