Find the greatest common divisor of the following pair of polynomials: $p(x)=x^4+2x^3-2x-1$ and $q(x)=x^3-1$, in $\Bbb Q[x]$.
Similar questions have been asked many times but I am still struggling quite a bit.
Using long division, I get that $x^4+2x^3-2x-1=(x^3-1)(x+2)+(-x+1)$.
Then using the Euclidean algorithm,
Wolfram alpha says that the gcd should be 1, but I keep getting 0. I have checked everything multiple times.
Any help is greatly appreciated.