(1) Numerator degree is not smaller! Long division first:

x2x+1x2+x1+2x+1x2+x

(2) Factor denominator:

x2+xx(x+1)

(3) Write the partial fractions general form equation (for the second term):

2x+1x2+x=Ax+Bx+1

(4) Solve for constants:

Cross multiply:

2x+1=A(x+1)+Bx

Plug in x=0, obtain 1=A1 so A=1.

Plug in x=1, obtain 3=B(1) so B=3.


(5) Integrate by terms:

1+2x+1x2+xdxdx+1xdx+3x+1dxx+ln|x|3ln|x+1|+C