The question is as follows.
Let $ R $ Be a ring such that $ x^3 = x $ for every $ x \in R $. Prove that $ R $ is commutative
I proved it as follows.
$1.$ Since $ a^3 = a $ for every a $ \in R$, $ a^3 = a^2\cdot a = a \cdot a^2 = a $. So the square of any element in R is an identity of the ring.
$2.$ Let a , b $ \in R $. Then $ (ab)^3 = ab = ab \cdot (ba)^2 = abbaba = ab^2aba = a^2ba = ba.$ So $ab = ba $ for all $ a, b \in R $
Is my proof is correct? I'm not sure I can say that the square of any element in R is an identity of the ring if $ a^3 = a^2\cdot a = a \cdot a^2 = a $ for every a $ \in R$