I'm trying to find the $\gcd$ of $A:= x^4 - x^3 + x^2 - x + 1$ and $B:= x^2 + 2$.
Using the Euclidean algorithm, I've found
$$(x^4 - x^3 + x^2 - x + 1)=(x^2 - x - 1)(x^2 + 2) + (x + 3)$$
and
$$(x^2 + 2)=(x - 3)(x + 3) + 11$$
Do I then need to continue using the algorithm to get
\begin{align} (x + 3)&=(x/11)(11) + 3\\ 11 &= (3)(3) + 2\\ 3 &= (1)(2) + 1 \\ 2 &= (2)(1) \\ &\rightarrow \gcd(A,B)=1 \end{align}
or is $\gcd(A,B) = (x + 3)$? As it is the last polynomial that is a common divisor of $A$ and $B$.
If the first case is true and the $\gcd(A,B) = 1$, what happens if the remainder is a fraction and not an integer?
you given this polynomials $A=X^4-X^3+X^2-X+1$ and $B=X^2+2$. Here $degree of B$ is smaller.And it cannot factorize in $Q[X]$. Hence try to divide $polynomial A$ by $polynomial B$.It is not completely divisible. Hence $ gcd(A,B)=1$. $x+3$ cannot be the answer.since it cannot completely divisible by $B$.