# What is $\mathbb{Z}[x]/(x,x^2+1)$ isomorphic to?

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?

Your reasoning is correct until the last line. $\mathbb{Z}[i]/(i) \cong \{0\}$, not $\mathbb{Z}$. Indeed, $(i)$ is the unit ideal in $\mathbb{Z}[i]$, since for any $a\in \mathbb{Z}[i]$, $a = (-ai)i$.

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.