This question already has an answer here:
Excuse me for the confusing title. I was asked to find $gcd(x^2+3x+2,x^2+x)$
What i did is i factorized both polynomials $x^2+x=(x+1)x$
So i expected the gcd to be $x+1$
But using the euclidean algorithm i found out the gcd to be $2x+2$. Why is factorizing wrong? Is it because $K[X]$ is not factorial ? Would the euclidean algorithm also work if the polynomials are in $\Bbb Z[X]$ ???