Find the Bezout coefficients for $a(x)$ and $b(x)$:
$a(x)=3x^4-4x^3-11x^2+4x+9, b(x)=3x^3+5x^2+x-1$
I find the greatest common divisor:
1) $\frac{(3x^4-4x^3-11x^2+4x+9)}{(3x^3+5x^2+x-1)} = x-3$. Remainder of the division: 3x^2+8x+6
2) $\frac{(3x^3+5x^2+x-1)}{(3x^2+8x+6)} = x-1$. Remainder of the division: 3x+5
3) $\frac{(x^2+8x+6)}{(3x+5)} = x+1$. Remainder of the division: $1$
The greatest common divisor: $1$
I find the Bezout coefficients with the help of the extended Euclidean algorithm:
$1\mid 0$
$0\mid 1$
$1\mid -x+3$
$-x+1\mid -x^2+4x-2$
$x^2\mid x^3-4x^2+2x$
I'm doing a check. It should work like this: $(x^2)*a(x) + (x^3-4x^2+2x)*b(x) = 1$
But here an error, the last line $(x^2\mid x^3-4x^2+2x)$ was not calculated correctly. Help me please.