If $x^3+x^2-x+1=D(x) (x^2 + 2x+1)+2$ then find $D(x)$
My Attempt,
Comparing the given expression with division algorithm we get, Dividend $=x^3+x^2-x+1$
Divisior $=D(x)$
Quotient $=(x^2+2x+1)=(x+1)^2$
Remainder $=2$.
After this I tried to use synthetic division method but could not..