Is it possible to have the gcd of 2 polynomials be the same in all fields?

So I have the polynomials $$f(x) = x^3+x^2+x$$ and $$g(x)=x^2+x+1$$

We are told to find the $$gcd$$ of both these polynomials in $$Q[x], Z/3Z[x], Z/5Z[x], Z/11Z[x]$$

After applying the Euclidean algorithm, I see that:

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

Thus the gcd is $$x^2+x+1$$

However, when I attempt to do the same in all the other fields, I end up with the same answer. I am doing this incorrectly or is it actually possible to have the same gcd in all fields?

• Are you certain that you have the correct polynomials? Also, note that the $\gcd$ of $f$ and $f$ is $f$ over any field, for any $f$, so something like that is definitely possible. – Arthur Oct 17 at 5:25
• Yes, the polynomials are correct. – flutterbug98 Oct 17 at 5:27
• If those are really the right polynomials, then it's a silly question. No need to use the Euclidean algorithm: $g$ divides $f$, so obviously their GCD is just $g$. – J Swanson Oct 17 at 5:48
• Okay, thanks for the help. To be honest, it did seem a bit weird to me as well! – flutterbug98 Oct 17 at 5:55