A Commutative Ring Having a Unique Prime Ideal (Dummit and Foote, Prob 7.4.40(i)) I am trying to solve Problem 7.4.40 from Dummit and Foote, a part of which states:


Let $R$ be a commutative ring with $1\neq 0$ such that $R$ has exactly one prime ideal.
    Then every element of $R$ is either nilpotent or a unit.


ATTEMPT: Let $P$ be the unique prime ideal of $R$.
We will show that every element of $R\setminus P$ is a unit.
Let $r\in R\setminus P$.
Then the ideal $(r)$ is either equal to $R$ or is a proper ideal of $R$.
If $(r)=R$ then $r$ is a unit.
So assume $(r)\subsetneq R$.
But then $(r)$ is contained in a maximal ideal $M$ of $R$.
Clearly $M\neq P$.
But $M$ is also a prime ideal of $R$ since it is a maximal ideal of $R$, giving a contradiction.
So we have shown that $x\in R\setminus P\Rightarrow r$ is a unit.
Also, since $P$ is prime, we have $\mathfrak N(R)\subseteq P$.
What I am struggling with is showing that $\mathfrak N(R)=P$.

NOTE: The result that $\mathfrak N(R)$ is the intersection of all the prime ideal of $R$, where $R$ is a commutative ring with $1\neq 0$, is not yet discussed in the textbook (See the comment in Problem 7.4.26 in D&F). So I think there must be an elementary argument which shows $\mathfrak N(R)=P$ in the question at hand.
Thanks.
 A: Let $\mathfrak{p}$ be the unique prime ideal of $R$, and $f \in \mathfrak{p}$ any element. To show that $f$ is nilpotent is equivalent to show that $R_f$ is the zero ring. What do you know about the prime ideals of $R_f$? Note that a ring is the zero ring if and only if it has no prime ideals.

Added later:
Since the OP is not aware of localizations, let us just define $R_f := R[X]/(fX-1)$ and show that $R_f$ is the zero ring for all $f \in \mathfrak{p}$.
If there is any prime ideal in $R_f$ we also have a prime ideal $\mathfrak{q}$ in $R[X]$ containing $(fX-1)$. Since $\mathfrak{p}$ is the unique prime of $R$ we have $\mathfrak{q} \cap R = \mathfrak{p}$, so $\mathfrak{q}$ contains $f$. But this is a contradiction since the invertible element $\overline{f} \in R_f$ cannot lie in any prime ideal. So $R_f = 0$.
From this it follows easily that $f$ is nilpotent: Since $R_f = 0$ we have $1 \in (fX-1)$, so $fX-1$ is invertible in $R[X]$. Now we know (I hope you know) that a polynomial is invertible if and only if the lowest coefficient is invertible and all other coefficients are nilpotent.
