TITLE: What is $\mathbb{Z}[x]/(x,x^2+1)$ isomorphic to?
QUESTION [6 upvotes]: Consider the quotient ring $\mathbb{Z}[x]/(x,x^2+1)$. Taking the quotient by $(x)$ first, we get a ring that is isomorphic to $\mathbb{Z}$ by setting the relation $x=0$. Applying the relation, $(x^2+1)$ becomes $(1)$, so the quotient ring is isomorphic to $\mathbb{Z}/(1)=\{0\}$.
Taking the quotient by $(x^2+1)$ first, we get a ring that is isomorphic to $\mathbb{Z}[i]$ by setting the relation $x^2=1$ (or equivalently, $x=i$). Applying the relation, $(x)$ becomes $(i)$, so the quotient ring is isomorphic to $\mathbb{Z}[i]/(i)\approx\mathbb{Z}$.
Which approach, if either, is correct?

REPLY [5 votes]: You could also note that $1=(x^2+1)-x(x)\in (x,x^2+1)$, so $(x,x^2+1)=\mathbb{Z}[x]$. From this point of view, the quotient is evidently 0.