TITLE: Proving ring $R$ with unity is commutative if $(xy)^2 = x^2y^2$
QUESTION [7 upvotes]: Let $R$ be a ring with unity. Assume that $\left(xy\right)^2 = x^2 y^2$ for all $x, y \in R$. Prove that $R$ is commutative.

I tried several methods to solve this but couldn't get through. Now the solution in almost all the textbooks goes like this.
First take $x$ and $y+1$ so that $ (x(y+1))^2 = x^2(y+1)^2 => xyx = x^2y \\$ 
Then substitute $x+1$ in place of $x$ to get $yx = xy$
I have always believed that solutions to questions can't be abrupt, there has to be a logic behind approaching in a particular way. Therefore, I couldn't grasp the intuition behind this method.
Can somebody please suggest some other intuitive way or explain the reasoning behind above solution?

REPLY [5 votes]: The idea is the following: It suffices to consider the subring generated by two arbitrary elements $x,y$ (since if this is commutative, then in particular $xy=yx$ and we are done). Now, it is not true that $(xy)^2=x^2 y^2$ implies $xy=yx$. But actually we have a stronger condition, namely that $(pq)^2=p^2 q^2$ holds for all (non-commutative) polynomials in $x$,$y$. The simplest non-constant polynomials are linear factors $x+ z$ and $y + z$ (with $z \in \mathbb{Z}$). That's why one chooses them first and tries to combine the calculations for various $z$.
PS: It is really unfortunate that many people (are forced to) write down proofs without mentioning any ideas of the proof. From the ideas one can really benefit. The proof alone is just a bunch of sentences even a computer can check for validity.