Using Extended Euclidean algorithm question

27 Views Asked by At

Suppose we have $f=x^5-1$ and $g=x^2-1$ and I have found the gcd using the Euclidean algorithm but I’m trying to find a way of expressing this in the way $$af+bg=1$$ where $f, g \in Q[x] $. I know this is actually quite easy and I could do this before, but somehow I can’t seem to find how to do it.

I have the following $x^5-1=(x^2-1)(x^3*x)+(x-1) $

$x^3+x=(x-1)(x^2+x+2)+2 $

So gcd is 1 but how can I work backwards to find how to do the question.

1

There are 1 best solutions below

0
On

$$ \left( x^{5} - 1 \right) $$

$$ \left( x^{2} - 1 \right) $$

$$ \left( x^{5} - 1 \right) = \left( x^{2} - 1 \right) \cdot \color{magenta}{ \left( x^{3} + x \right) } + \left( x - 1 \right) $$ $$ \left( x^{2} - 1 \right) = \left( x - 1 \right) \cdot \color{magenta}{ \left( x + 1 \right) } + \left( 0 \right) $$ $$ \frac{ 0}{1} $$ $$ \frac{ 1}{0} $$ $$ \color{magenta}{ \left( x^{3} + x \right) } \Longrightarrow \Longrightarrow \frac{ \left( x^{3} + x \right) }{ \left( 1 \right) } $$ $$ \color{magenta}{ \left( x + 1 \right) } \Longrightarrow \Longrightarrow \frac{ \left( x^{4} + x^{3} + x^{2} + x + 1 \right) }{ \left( x + 1 \right) } $$ $$ \left( x^{4} + x^{3} + x^{2} + x + 1 \right) \left( 1 \right) - \left( x + 1 \right) \left( x^{3} + x \right) = \left( 1 \right) $$ $$ \mbox{to confirm GCD} = \color{blue}{ \left( x - 1 \right) } $$ $$ \left( x^{5} - 1 \right) = \left( x^{4} + x^{3} + x^{2} + x + 1 \right) \cdot \color{blue}{ \left( x - 1 \right) } + \left( 0 \right) $$ $$ \left( x^{2} - 1 \right) = \left( x + 1 \right) \cdot \color{blue}{ \left( x - 1 \right) } + \left( 0 \right) $$
$$ \left( x^{5} - 1 \right) \left( 1 \right) - \left( x^{2} - 1 \right) \left( x^{3} + x \right) = \color{blue}{ \left( x - 1 \right) }$$ $$ \mbox{GCD} = \color{blue}{ \left( x - 1 \right) } $$