Let R be a commutative ring with identity 1 \neq 0. The principal ideal generated by x in the polynomial ring R[x] is a prime ideal iff R is an integral domain.
Proof.
“\Rightarrow“: Let (x) be a prime ideal of R[x]. Then we have seen here that R[x]/(x) \cong R is an integral domain.
“\Leftarrow“: Given R an integral domain. Now take the polynomial ring R[x] and the principal ideal (x) of R[x]. Then R[x]/(x) \cong R. As we have seen here, we see that (x) is a prime ideal of R[x].