In a principal ideal domain, prove that every non trivial prime ideal is a maximal ideal. What could be wrong in this approach?

To prove this we use that $PID$ are UFDs. Then Let $\mathfrak{p}=(p)$ be a prime ideal of $R$. Assume there is an ideal $\mathfrak{p}\subseteq\mathfrak{m}=(m)\subseteq R$. Then we would have that $m|p$, but then by the defintion of a prime element of a UFD this means that $m=p$ or $m=u$, a unit. Hence $\mathfrak{m}=(p)$ or $R$, proving maximality.

Edit: Since the op hasn't seen UFDs yet, here's a quick way around that:

Becaues $(p)\subseteq (m)$ we have that there is a $b\in R$ so that $ap=bm$ for every $ap\in (p)$. In particular $p=b_0m$. But then as $p$ is prime, either $m$ or $b_0$ must be a unit. the first case implies $\mathfrak{m}=R$ the second implies $\mathfrak{m}=\mathfrak{p}$, hence $\mathfrak{p}$ is maximal.


Hint $ $ Notice that for principal ideals: $\ \rm\color{#0a0}{contains} = \color{#c00}{divides}$, $ $ i.e. $(a)\supset (b)\iff a\mid b.\,$ Therefore

$\qquad\begin{eqnarray} (p)\,\text{ is maximal} &\iff&\!\! (p)\, \text{ has no proper } \,{\rm\color{#0a0}{container}}\,\ (a)\\ &\iff& p\ \ \text{ has no proper}\,\ {\rm\color{#c00}{divisor}}\,\ a\\ &\iff& p\ \ \text{ is irreducible}\\ &\iff& \!\!(p)\ \text{ is prime, } \ \text{by PID} \Rightarrow\text{UFD,}\ \text{ so ireducible = prime } \end{eqnarray}$

Remark $\ $ PIDs are the UFDs of dimension $\le 1,\,$ i.e. where all prime ideals $\ne 0\,$ are maximal.


Your approach can't work. The ring $\mathbb{Q}[x]$, where $\mathbb{Q}$ is the field of rational numbers, is a PID. However, for the prime ideal $P=\langle x\rangle$ the quotient is $\mathbb{Q}[x]/P\cong\mathbb{Q}$, which is infinite.


Suppose $P$ is a nonzero prime ideal and $P=\langle p\rangle$. Now, let $I=\langle a\rangle$ be an ideal such that $\langle p\rangle\subseteq\langle a\rangle$. In particular $$ p=ab $$ so $ab\in P$. Therefore, by definition of prime ideal, either $a\in P$ or $b\in P$.

If $a\in P$, then $\langle a\rangle\subseteq\langle p\rangle$, whence $I=P$.

If $b\in P$, then $b=pc$, so $p=ab=apc$ from which $1=ac$ and $a$ is invertible, whence $I=R$.