There are a few posts about proving that $\mathbb{Z}[x]/(x^2+1)\simeq \mathbb{Z}[i]$. For example, in this post, the answer requires that we convice ourselves that kernel of the map is $(x^2+1)$. I use this notation for the ideal generated by $x^2+1$. So I am trying to make a complete proof that this.
As in the title, we define the homomorphism as follows. It is surjective since $bx+a \mapsto a+bi$ for any $a,b\in \mathbb{Z}$.
$$\phi: \mathbb{Z}[x] \to \mathbb{Z}[i],\ p(x) \mapsto p(i)$$
We can see that if $p(x) \in (x^2+1)$, then $p(x) = q(x)(x^2+1)$ for some $q(x) \in \mathbb{Z}[x]$. $$\phi(p(x))=\phi(q(x))\phi(x^2+1)=\phi(q(x))(i^2+1)=0$$
The harder part is to show that $\phi(p(x)) \ne 0$ when $p(x) \in \mathbb{Z}[x] \setminus (x^2+1)$, i.e., when $p(x)$ is not a multiple of $x^2+1$.
This is where I am having trouble. Since $\mathbb{Z}[x]$ is not a Euclidean domain, I don't have an explicit form for representing $p(x)=q(x)(x^2+1)+r(x)$, which I thought would be nice, but can't use here.
Updated Attempted Answer
After looking back through my notes, $\mathbb{Z}[x]$ is a unique factorization domain because $\mathbb{Z}$ is as well. This means that any polynomial, $p(x)$, in $\mathbb{Z}[x]$ can be factored into a product of irreducible elements, $q_i(x)$. $$p(x)=q_1(x)q_2(x)...q_n(x)$$
I can show by brute force that $x^2+1$ is irreducible in $\mathbb{Z}[x]$. This means that $$p(x)\in(x^2+1) \iff q_k(x)=x^2+1$$ for some $k \in {1,...,n}$.
I am still having trouble pulling the last bit together, that when $(x^2+1)$ is not a factor of $p(x)$, then this needs to imply that $\phi(p(x))\ne 0$.