If $a^3 =a$ for all $a$ in a ring $R$, then $R$ is commutative. Let $R$ be a ring, where $a^{3} = a$ for all $a\in R$. Prove that $R$ must be a commutative ring.

To begin with
$$ 2x=(2x)^3 =8 x^3=8x \ . $$
Therefore  $6x=0 \ \  \forall x$.
Also
$$ (x+y)=(x+y)^3=x^3+x^2 y + xyx +y x^2 + x y^2 +yxy+ y^2 x + y^3 $$
and
$$ (x-y)=(x-y)^3=x^3-x^2 y - xyx -y x^2 + x y^2 +yxy+ y^2 x -y^3
$$
Subtracting we get
$$ 2(x^2 y +xyx+yx^2)=0 $$
Multiply  the last relation by $x$ on the left and right to get
$$ 2(xy+x^2yx+xyx^2)=0 \qquad  2(x^2yx+xyx^2+yx)=0 \ . $$
Subtracting the last two relations we have
$$ 2(xy-yx)=0 \ . $$
We then show that  $3( x+x^2)=0 \ \ \forall x$.  You get this from
$$ x+x^2=(x+x^2)^3=x^3+3 x^4+3 x^5+x^6=4(x+x^2)  \ . $$
In particular
$$ 3 (x+y +(x+y)^2) =3( x+x^2+ y+ y^2+ xy+yx)=0 \,  $$
we end-up with  $3(xy+yx)=0$.  But since  $6xy=0$,  we have $3(xy-yx)=0$.
Then subtract  $2(xy-yx)=0$  to get  $xy-yx=0$.
