I saw somewhere the following exercise:
Give example of prime ideal in a ring which is not maximal
the answer was this:
Let $R$ be our Ring and $I$ ideal such $$ R = {Z}[{X}] $$ $$ I = (x) $$ which means $I$ generated by $x$ which is all the polynomials in $R$ with zero free coefficient.
It was shown then, by First isomorphism theorem that : $$Z[X] / I \cong Z$$
Now, because $Z$ is not a field, but rather only Integral domain, then according to the theorem $I$ is indeed Prime ideal which is not maximal ideal.
But ....
As we know $Z[X]$ is Principal ideal domain thus according to other theorem:
every nonzero prime ideal is maximal
So if $I=(x)$ is ideal in $R$ it means I is maximal.
Why I came to this contradiction, what am I missing ?
Whereas $\mathbb{Z}$ is a principal ideal domain, $\mathbb{Z}[X]$ is not: for instance, the ideal $(2,X)$ is not generated by a single element.