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?
The proof is correct and efficiently uses the characterization of prime and maximal ideals with quotient rings.
More generally, a ring $A$ is called von Neumann regular if, for every $x\in A$ there exists $y\in A$ with $xyx=x$.
Your ring is then von Neumann regular, where $y=x^{n-2}$.
If a commutative ring $A$ is von Neumann regular, then every quotient ring $A/I$ thereof is again von Neumann regular.
If $A$ is a von Neumann regular domain, then for each $x\in A$ there is $y$ with $xyx=x$ and therefore $(xy)^2=xyxy=xy$. Therefore $xy$ is idempotent and so $xy=1$ (so $x$ is invertible) or $xy=0$ (so $xyx=x=0$). Hence a von Neumann regular domain is a field.
As with your argument, this proves that a prime ideal in a commutative von Neumann regular ring is maximal.