
GCD of Polynomials
I'm getting stuck on this problem.
Find the GCD d(x) of the following polynomials f(x), g(x) in F[x], and express d(x)=s(x)f(x)+t(x)g(x) for appropriate s(x), t(x) en F[x]
In this case, f(x)= x^2 + 2x + 2 and g(x)= x^2 + 1 for both F= the rationals and F= the complex number set.
I started the problem by performing long division to see that f(x) / g(x) =1 with a remainder of 2x+1. I then realized that GCD of f(x), g(x) = GCD of g(x), 2x+1. But after division, I only got this result before getting stuck:
x^2 + 1 = (2x+1)((1/2)x  (1/4)) + (3/4)
Is this right so far, and how to do I finish it up? And how do I work this problem differently for the complexes?
Thanks in advance!

Are you familiar with the Extended Euclidean Algorithm? If you are It can be easily generalized to polynomials

I'm not familiar with the term "Extended Euclidean Algorithm" but I was trying to apply the method we used for the Euclidean Algorithm when I got stuck and couldn't figure out what my next step would be.
I'm also confused as to what I do differently when F[x] is the rationals vs. the complex numbers.