Show that $f$ is a ring isomorphism. 
Consider the ring of Gaussian integers $D=\lbrace a+bi\mid a,b \in \mathbb{Z \rbrace}$, where $i \in \mathbb{C}$ such that $i^2=-1$. Consider the map $f$ from $D$ to $\mathbb{Z}[x]/(x^2+1)$ sending $i$ to the class of $x$ modulo $x^2+1$. Show that $f$ is a ring isomorphism.

I got a confusion in this question. I don't understand the map sending $i$ to the class of $x$ modulo $x^2+1$. Can anyone help me to clear my confusion?
EDIT: I am having trouble to show the map is injective and surjective. Can anyone guide me?
 A: The ring $\mathbb Z[x]/(x^2+1)$ is a quotient ring. Its elements are equivalence classes modulo the ideal $(x^2+1)$. Thus, a typical element in $\mathbb Z[x]/(x^2+1)$ is of the form $f(x)+(x^2+1)$ where $f(x)\in \mathbb Z[x]$ and $(x^2+1)$ is the ideal in $\mathbb Z[x]$ generated by $x^2+1$. So, the map $D\to \mathbb Z[x]/(x^2+1)$ sends $i$ to $x+(x^2+1)$. 
The question as stated does not actually make any sense. The reason is that the given information does not describe a function from all of $D$. What the question is really trying to say is that there is a (in effect unique) ring homomorphism $f:\mathbb Z[x]/(x^2+1)$ with the properties that $f(a)=a+(x^2+1)$ for all $a\in \mathbb Z$ and $f(i)=x+(x^2+1)$. 
A: As the others have said, you have also to specify what happens to the integers.
And then, it's the inverse map that occurs more naturally in the context of the structure of simple extensions. 
Consider the ring homomorphism
$$
\begin{align}
\varphi : & \Bbb{Z}[x] \to \Bbb{Z}[i]\\
&a \mapsto a, \quad \text{for $a \in \Bbb{Z}$}\\
&x \mapsto i,\end{align}$$
which is uniquely determined by the universal property of polynomial rings.
This is clearly surjective, and its kernel is $(x^{2} + 1)$, since $x^{2} + 1$ is the minimal polynomial of $i$ over $\Bbb{Z}$. Now apply the first isomorphism theorem.
A: Im not sure if I'm quite correctly interpreting your question, but I'll answer to the best of my ability. Start out with $\mathbb{Z}[x]$; the image of $x$ under the map $\pi: \mathbb{Z}[x] \to \mathbb{Z}[x]/(x^2 + 1)$, which let's denote $\overline{x}$, is such that $\overline{x}^2 + 1 = 0$, or that $\overline{x}^2 = -1$. So you can see why it is reasonable to identify $i$ with $\overline{x}$ (abstractly $i$ is a symbol, that follows the "grammar rule" that $i^2 = -1$). 
To show that if is a ring homomorphism, just show that the map is well defined, and that it is a ring homomorphism. 
A: The map in general format will be $f(a+ib)=a+bx + \langle x^2 +1 \rangle$
it is a ring homomorphism since $f(a+ib +c +id )= (a+bx +c+dx) + \langle x^2 +1 \rangle = a+bx +\langle x^2 +1 \rangle c+dx +\langle x^2 +1 \rangle =f(a+ib)+f(c+id)$
