<s>[INST] Using the Euclidean algorithm, deduce that $\gcd(x^3+2x^2+x +4;x^2+1)=1$ So, I've tried it but I keep getting to $$\frac{x^2+1} 2$$ and don't know how to proceed.
Question is Using the Euclidean algorithm, deduce that $$\gcd(x^3+2 x^2+x +4,\;x^2+1)=1.$$
 [/INST] \begin{array}{c|cccc}
             & x^3+2x^2+x+4 & 1 & 0 \\
        -x-2 &        x^2+1 & 0 & 1 \\
\hline
-\frac 12x^2 &            2 & 1             & -x-2 \\
             &            1 & -\frac 12x^2  &\frac 12x^3+x^2+1
\end{array}
$$-\frac 12x^2\color{red}{(x^3+2x^2+x+4)}+
   \left(\frac 12x^3+x^2+1\right)\color{red}{(x^2+1)} = 1$$
</s>