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.