So, that's my first time attempting a problem of this kind. I followed the steps of the Euclidean algorithm and got the following:
By long division for polynomials we have:
$x^6+x^4+x^3+x^2+x+1$ = $x(x^5+2x^3+x^2+x+1)+(-x^4+1)$
then we repeat the steps to get:
$x^5+2x^3+x^2+x+1$ = $-x(-x^4+1) + (2x^3+x^2+2x+1)$
I'm fine up to that point. But then when I moved on, I saw that my solution is different than the correct answer. Basically I divided $-x^4+1$ by $2x^3+x^2+2x+1$
but I got that: $-x^4+1$ = $-x/2(2x^3+x^2+2x+1) + x^3/2 + x/2 + 1$
whereas the solution says
$-x^4+1$ = $-(x/2 + 1/4) (2x^3+x^2+2x+1) + (3/4 x^2 + 3/4)$
How do they obtain that result? and where am I going wrong?
As I was saying, we are allowed to multiply or divide by constants at any convenient point, therefore getting rid of fractions. $$ (x^2 + 1)(x^4 +x+1) = x^6 + x^4 + x^3 + x^2 + x + 1 $$ $$ (x^2 + 1)(x^3 +x+1) = x^5 + 2 x^3 + x^2 + x + 1 $$
If, as we think, the two extra factors are coprime, then the original gcd is $x^2 + 1.$ This is a worthwhile confirmation:
$$ (-2x^2+ x - 4)(x^4 + x + 1) + (2 x^3 - x^2 + 2x +1)(x^3 + x + 1) = -3 $$ Notice that the outcome is not $1,$ it is $-3.$ However, this is a nonzero constant in the field. Therefore this is a proof that $x^4 + x + 1, x^3 + x + 1$ are coprime.
Also $$ \scriptsize (-2x^2+ x - 4)(x^6 + x^4 + x^3 + x^2 + x + 1) + (2 x^3 - x^2 + 2x +1)(x^5 + 2 x^3 + x^2 + x + 1) = -3x^2 - 3 = -3(x^2 + 1)$$