$x$ not nilpotent implies that there is a prime ideal not containing $x$. Let $\mathscr{N}(R)$ denote the set of all nilpotent elements in a ring $R$. 
I have actually done an exercise which states that if $x \in \mathscr{N}(R)$, then $x$ is contained in every prime ideal of $R$.

The converse of this statement is: if $x \notin \mathscr{N}(R)$, then there is a prime ideal which does not contain $x$. 

But I am not able to prove it. Can anyone provide me a proof of this result?

Let $f$ not be nilpotent. Consider the set $\Sigma$ of ideals $I$ such that if $n > 0$ then $f^n \notin I$. It is non-empty because $(0) \in \Sigma$. Order $\Sigma$ by inclusion and by Zorn's lemma choose a maximal element $P$. Show that $P$ is prime: let $x,y \notin P$. Then the ideals $P+(x)$ and $P+(y)$ strictly contain $P$, and so er not in $\Sigma$. Thus $f^m \in P+(x)$ and $f^n \in P+(y)$ for some $m,n$ (by def of $\Sigma$). It follows that $f^{m+n} \in P+(xy)$, hence $P+(xy) \notin \Sigma$, that is $xy \notin P$, so $P$ is prime. Hence we have a prime ideal $P$ not containing $f$.
(the proof is really just copy from the proof in Atiyah-MacDonalds' book)
