EDIT: In this proof I suppose that $R$ is not a prime ideal of $R$.
Let $R$ be a commutative ring with unity. For every $x\in R$ there exists a natural number $n_i>1$ such that $x^{n_i}=x$. Prove that every prime ideal of $R$ is maximal.
My Attempt:
Suppose by contradiction that there exists a prime ideal $P\subseteq R$ such that $P$ is not a maximal ideal. this means that there exists an ideal $M\subseteq R$ such that $P\subseteq M$.
We'll notice that for every $x\in P: x=x^{n_i}\in P$, which means that for every $1\le j\le n_i: x^j \in P$, this follows from the definition of a prime ideal and the fact that $R$ is commutative.
Now, by the assumption $P$ is not maximal therefore there exists $t\in M: t\notin P$. and again, we conclude that for every $1 \le j\le (n_i): t^j \in M \land t^j \notin P$.
But this doesn't really bring me into any contradiction.
I'm not sure what am I missing.