# 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.
{"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 1, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}