Suppose that $A$ is a commutative ring with $1$ and suppose that $\forall x \in A \exists n >1 \in \mathbb{N}$ dependent from x such that $x^n=x$. Prove that if $I$ is a prime ideal then $I$ is maximal.
Proof: Suppose that $I$ is prime. Then $A/I$ is an integral domain. Let $a \in A/I$. Then we have that exists $n$ such that $a^n=a \implies a(a^{n-1}-1)=0 \implies a=0 \vee a^{n-1}=1$ because $A/I$ is a domain. Now, if $a \neq 0$ then $a \times a^{n-2}=a^{n-1}=1$ so each $a \in A \setminus \{0\}$ is invertible and then $A/I$ is a field, so $I$ is maximal.
Does this proof seem legit? Thanks in advance. Can you suggest other ways to solve this?