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.$$
 A: \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$$
A: $$  \left(   x^{3}  + 2 x^{2}  +  x  + 4 \right)  $$ 
$$  \left(   x^{2}  + 1 \right)  $$ 
$$  \left(   x^{3}  + 2 x^{2}  +  x  + 4 \right)  =  \left(   x^{2}  + 1 \right)  \cdot \color{magenta}{  \left(   x  + 2 \right) } +  \left( 2  \right)  $$ 
 $$  \left(   x^{2}  + 1 \right)  =  \left( 2  \right)  \cdot \color{magenta}{  \left(   \frac{  x^{2}  + 1 }{ 2 }  \right) } +  \left( 0 \right)  $$ 
 $$ \frac{ 0}{1} $$ 
 $$ \frac{ 1}{0} $$ 
 $$ \color{magenta}{  \left(   x  + 2 \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   x  + 2 \right) }{ \left( 1  \right) } $$ 
 $$ \color{magenta}{  \left(   \frac{  x^{2}  + 1 }{ 2 }  \right) }  \Longrightarrow  \Longrightarrow  \frac{  \left(   \frac{  x^{3}  + 2 x^{2}  +  x  + 4 }{ 2 }  \right) }{ \left(   \frac{  x^{2}  + 1 }{ 2 }  \right) } $$ 
 $$  \left(   x^{3}  + 2 x^{2}  +  x  + 4 \right)  \left( \frac{ 1}{2 } \right)  -  \left(   x^{2}  + 1 \right)  \left(   \frac{  x  + 2 }{ 2 }  \right)  =  \left( 1  \right)  $$ 
.......
