Nonconstant polynomials do not generate maximal ideals in $\mathbb Z[x]$ 
Let $f$ be a nonconstant element of ring $\mathbb Z[x]$. Prove that $\langle f \rangle$ is not maximal in $\mathbb Z[x]$.

Let us assume $\langle f \rangle$ is maximal. Then $\mathbb Z[x] / \langle f \rangle$ would be a field. Let $a \in \mathbb{Z}$. Then $a + \langle f \rangle$ is a nonzero element of this field, hence a unit. Let $g + \langle f \rangle$ be its inverse. Then $a g - 1 \in \langle f \rangle$, hence $ag(x)-1 = f(x)h(x)$ for some $h \in Z[x]$, hence $ag(0) + f(0)h(0) = 1$, thus $(a,f(0))=1$ for all $a \in \Bbb Z$, contradiction, hence the proof.
Is my argument correct? Is there any other method?
 A: 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, 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$.
A: 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]$.
A: Claim:  $ \frac{{\bf Z}[x]}{(f(x))}$ is not a field. 
Proof: Let  $a \in \bf Z$ be such that $f(a)$ is not equal to  $0, ±1$ and choose a prime $p$ dividing $f(a)$. Consider $ \pi : {\bf Z}[x] \to\frac {\bf Z}{(p)}$ be the unique homomorphism with $\pi (x) = a \bmod p$. Then $\pi$ factors through  $ \frac {{\bf Z}[x]}{(f(x))}$ since
$ \pi (f(x)) = 0.$ Now, $ \frac {{\bf Z}[x]}{(f(x))}$ is infinite, so $\pi:  \frac {{\bf Z}[x]}{(f(x))} \to \frac {{\bf Z}}{(p)}$  is not injective. If
we show that $\pi$  is not the zero map, then $\ker\pi$ will be a non-trivial ideal of $ \frac {{\bf Z}[x]}{(f(x))}$
and it won’t be a field. If $\pi$ is the zero map, then $\pi(1) = 0$, i.e., there exists polynomials $u, v ∈ {\bf Z}[x] $ with $1 = u(x)f(x) + pv(x)$. Putting $x = a$ we get a contradiction since $u(a)f(a) + pv(a)$ is divisible by $p$ as well as being equal to $1$.
Moreover, it can be proved that maximal ideals of ${\bf Z}[x]$ are precisely of the form $(p,f(x))$ where $p$ is a prime number and $f(x)$ is a polynomial in ${\bf Z}[x]$ which is irreducible modulo $p$.
A: 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=\bar 1$ in $(\mathbb Z/p\mathbb Z)[x]$, and this is impossible since $\deg\bar f=\deg f\ge1$.
