say we have two polynomials, (x^5 + 1) and (x^2 + 1). We can find the GCD using Euclid's algorithm. Here is my work...

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

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

x + 1 = (0.5x + 0.5) (2) + 0

Does this mean that the GCD is 2?!? That would mean that 2 divides x^5 + 1 and x^2 + 1 for all values of x, which is not true. Can anyone clear this up?