Nonconstant polynomials do not generate maximal ideals in $\mathbb Z[x]$
Let $p\in\mathbb Z$ be a prime such that $p\nmid\text{LC}(f)$, where $\text{LC}(f)$ stands for the leading coefficient of $f$. Moreover $p$ is non-zero in $\mathbb Z[x]/(f)$, hence invertible in $\mathbb Z[x]/(f)$, so there are $g,h\in\mathbb Z[x]$ such that $pg(x)+f(x)h(x)=1$. It follows that $\bar f\bar h=1$ in $(\mathbb Z/p\mathbb Z)[x]$, and this is impossible since $\deg\bar f=\deg f\ge1$.
Main result:
If $R$ is an integral domain with infinitely many elements and only finitely many units, then no maximal ideal of $R[x]$ is principal.
A pedestrian proof:
Assume $R$ is an integral domain with infinitely many elements and only finitely many units.
First, a few basic facts . . .
Since $R$ is an integral domain,
- If $g,h \in R[x]$ and $g,h \ne 0$, then $\text{deg}(gh) = \text{deg}(g) + \text{deg}(h)\\[4pt]$.
- If $r \in R$, then $r$ is a unit in $R[x]$ if and only if $r$ is a unit in $R$.
Also, since $R$ is an integral domain with infinitely many elements, it follows that
- for any $r \in R$, and any $f \in R[x]$ with $\text{deg}(f) \ge 1$, the equation $f(x) = r$ has only finitely many roots in $R$.
Next, some lemmas . . .
Lemma $\mathbf{1}$:
If $a,b \in R$ and $a$ is not a unit in $R$, then $(a,x-b)$ is a proper ideal of $R[x]$.
proof:
Suppose instead that $(a,x-b) = (1)$.
\begin{align*} \text{Then}\;\,&(a,x-b) = (1)\\[4pt] \implies\; &ag(x) + (x-b)h(x) = 1,\;\text{for some}\;g,h \in R[x]\\[4pt] \implies\; &ag(b) + (b-b)h(b) = 1,\;\text{for some}\;g,h \in R[x]\\[4pt] \implies\; &ag(b) = 1,\;\text{for some}\;g \in R[x]\\[4pt] \implies\; &a\;\text{is a unit in $R$}\\[4pt] \end{align*}
contradiction.
This completes the proof of lemma $1$.
Lemma $\mathbf{2}$:
If $a \in R$, the ideal $(a)$ of $R[x]$ is not a maximal ideal.
proof:
Suppose instead that for some $a \in R$, the ideal $(a)$ of $R[x]$ is a maximal ideal of $R[x]$.
Since $(a)$ is maximal in $R[x]$, $(a) \ne (1)$, hence $a$ is not a unit of $R$.
Since $a$ is not a unit of $R$, it follows that $x \notin (a)$.
Since $(a)$ is maximal, and $x \notin (a)$, it follows that $(a,x) = (1)$, which contradicts lemma $1$, since $a$ is not a unit of $R$.
This completes the proof of lemma $2$.
proof of the main result:
Suppose the principal ideal $(f) \in R[x]$ is maximal, for some $(f) \in R[x]$.
Our goal is to derive a contradiction.
By lemma $2$, $f$ has degree at least $1$, hence $(f)$ has no nonzero constants elements.
Since $R$ has infinitely many elements but only finitely many units, there exists an element $b \in R$, such that $f(b)$ is a nonzero nonunit. Actually, there are infinitely many such elements $b$, but we only need one.
Thus, suppose $b \in R$ is such that $f(b) = a$, where $a \in R$ is a nonzero nonunit.
\begin{align*} \text{Then}\;\, &\text{deg}(f) \ge 1\\[4pt] \implies\; &f(x) = f(b) + (x-b)g(x),\;\text{for some nonzero }g \in R[x]\\[4pt] \implies\; &(f,a) \subseteq (a,x-b)\\[4pt] \implies\; &(f,a) \ne (1)\qquad\text{[since by lemma $1$, $(a,x-b) \ne (1)$]}\\[4pt] \implies\; &(f,a) = (f)\qquad\text{[since $(f)$ is maximal]}\\[4pt] \implies\; &a \in (f)\\[4pt] \end{align*}
contradiction, since $(f)$ has no nonzero constants elements.
This completes the proof of the main result.
Corollary:
No maximal ideal of $\mathbb{Z}[x]$ is principal.
proof:
This follows from the main result since $\mathbb{Z}$ is an infinite integral domain with only two units, namely $\pm 1$.
Let $f(x)\in\Bbb Z[x]$ have degree greater than zero. Choose a prime $p$ that does not divide the leading coefficient of $f$. Then $p\not=f(x)g(x)$ for any $g(x)\in\Bbb Z[x]$ (because $\deg(fg)=\deg(f)+\deg(g)$) and $f(x)g(x)+ph(x)\not=1$ for all $g(x),h(x)\in\Bbb Z[x]$ (consider the coefficients of $g$ in descending order starting with the leading coefficient to see that $p$ would have to divide every coefficient of $g$ and therefore would have to divide one). Thus $\langle f(x)\rangle\subsetneq\langle f(x),p\rangle\subsetneq\Bbb Z[x]$.