TITLE: Finding $\gcd(x^2, x^3)$ inside $\mathbb{Z}[x^2,x^3]$
QUESTION [6 upvotes]: Let $R = \mathbb{Z}[x^2, x^3]$. Then $R$ contains all integer polynomials that lack the $x$ term.  That is, $R$ contains all polynomials of form $a_0 + a_2 x^2 + a_3x^3 + \ldots + a_n x^n$ for $a_i \in \mathbb{Z}$.
Question: What is $\gcd(x^2, x^3)$?

$\gcd(x^2, x^3) = d$ iff $d \mid x^2, x^3$ and if $s \mid x^2, x^3$ then $s \mid d$ with $s,d \in R$.
Then isn't $\gcd(x^2, x^3) = x^2$, or am I missing some tricky reason why this is not the case?

Similarly, isn't $\gcd(x^5, x^6) = x^5$?

REPLY [4 votes]: Note that $R\subset \mathbb{Z}[x]$, so if $d\mid x^2$ in $R$, then $d\mid x^2$ in $\mathbb{Z}[x]$. Hence (by unique factorization in $\mathbb{Z}[x]$ if you will) $$d \in \{\pm 1, \pm x, \pm x^2\}\cap R = \{\pm 1, \pm x^2\}$$
Now you can check that $x^2 \nmid x^3$ in $R$, and hence $d = \pm 1$, whence
$$
\gcd(x^2,x^3) = 1
$$