Maximal ideals in a polynomial ring I am having a lot of trouble figuring out which ideals are maximal in rings that aren't fields.  I read that maximal ideals of $\mathbb{Z}[x]$ are of the form $(p,f(x))$ where $p$ is a prime number and $f(x)$ is a polynomial in $\mathbb{Z}[x]$ which is irreducible modulo $p$.
$\\$I am trying to apply this to figuring out if the ideals generated by $x+1$ and $x^2+x+1$ are maximal in $\mathbb{Z}$.  I've been told to consider the ideals $(2,x+1)$ and $(2, x^2+x+1)$ respectively, but I don't get where the two comes from.  Can you pick any prime number to check this condition?  Any explanation of how to proceed would be appreciated.  Thanks

We show that $(x+1)$ is not a maximal ideal in $\mathbb{Z}[x]$. Since $(x+1)\subset (2,x+1)\subset \mathbb{Z}[x]$, we just need to show that $(x+1)\neq (2,x+1)$ and $(2,x+1)\neq \mathbb{Z}[x]$. The first statement holds because $2\notin (x+1)$. The second statement is true by the result you said in the first paragraph. 
