As the degree of numerator is less than that of denominator, we can proceed to write partial fractions as
(x^2+x)/((x+2)(x-1)^2)hArrA/(x+2)+B/(x-1)+C/(x-1)^2x2+x(x+2)(x−1)2⇔Ax+2+Bx−1+C(x−1)2
or x^2+x=A(x-1)^2+B(x-1)(x+2)+C(x+2)x2+x=A(x−1)2+B(x−1)(x+2)+C(x+2)............(1)
or x^2+x=A(x^2-2x+1)+B(x^2+x-2)+C(x+2)x2+x=A(x2−2x+1)+B(x2+x−2)+C(x+2)
or x^2+x=x^2(A+B)+x(B-2A+C)+(A-2B+2C)x2+x=x2(A+B)+x(B−2A+C)+(A−2B+2C)............(2)
Putting x=1x=1 and x=-2x=−2 in (1), we get 3C=23C=2 and 9A=29A=2 i.e. C=2/3C=23 and A=2/9A=29.
Comparing terms of x^2x2 in (2), A+B=1A+B=1 i.e. B=7/9B=79
Hence (x^2+x)/((x+2)(x-1)^2)=2/(9(x+2))+7/(9(x-1))+2/(3(x-1)^2)x2+x(x+2)(x−1)2=29(x+2)+79(x−1)+23(x−1)2