Since (x−1) is a repeated linear factor, write (x−1)2(x+2)x+3=x−1A+(x−1)2B+x+2C. Multiplying both sides by (x−1)2(x+2):
x+3=A(x−1)(x+2)+B(x+2)+C(x−1)2
Put x=1: 4=B(3)⇒B=34.
Put x=−2: 1=C(9)⇒C=91.
A cannot be isolated by a root substitution alone (both roots used are exhausted), so compare the coefficient of x2 on both sides. Expanding the right side, the x2 terms come only from A(x−1)(x+2) and C(x−1)2, giving coefficient A+C. The left side has no x2 term, so 0=A+C⇒A=−C=−91.
So (x−1)2(x+2)x+3=−9(x−1)1+3(x−1)24+9(x+2)1.
Check (independent verification): substitute x=0. Original: (1)(2)3=23. Decomposed: −9(−1)1+3(1)4+9(2)1=91+34+181=182+1824+181=1827=23. Both sides agree.
✓Final answer
(x−1)2(x+2)x+3=−9(x−1)1+3(x−1)24+9(x+2)1