Let $R$ be a ring such that for every $x\in R$ we have $x^2-x \in Z(G)$. Show that $R$ is a commutative ring.
My thoughts
What should I do? I could show that every $y \in R$ could be written in the shape $x^2-x$ but I don't know if that is true. We know that $y \cdot(x^2-x) \ = \ (x^2-x)\cdot y$ for any $x,y \in R$, but that doesn't mean that $xy = yx$. Please give me a hint
One possible hint: Working on $$(x+y)^2-(x+y).$$ to show that $xy+yx\in Z(R)$ could pave our way to solution. Indeed, when $xy+yx\in Z(R)$ then $$(xy+yx)y=y(xy+yx)\to xy^2=y^2x.$$ Now since $y^2-y\in Z(R)$ so $$y^2x-yx=xy^2-xy$$