<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] $$  \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)  $$ 
.......
</s>