x^4+2x^3-x^2-2x+1=x^4+2x^3+x^2-2X^2-2X+1=(x^2+x)^2-2(x^2+X)+1=(x^2+x-1)^2
x^4+2x^3-x^2-2x+1=x^4+2x^3+x^2-2x^2-2x+1 =(x(x+1))^2-2x(x+1)+1={x(x+1)-1}^2=(x^2+x-1)^2
1+X(X+1)(X-1)(X+2)