Exponentiation in Non-Commutative Rings I'm fairly new to abstract algebra and in an exercise I was asked under which conditions it is true that $(ab)^n = a^nb^n$, for $a,b \in R$ and $n$ a positive integer, where $R$ is a ring. It can be easily shown that the statement holds if $R$ is commutative but I am stuck on the reverse implication. I have shown that if $R$ contains no zero divisors then the statement implies commutativity. Indeed, taking $n = 2$
$$(ab)^2 = abab = a^2b^2 \Leftrightarrow a(ba-ab)b = 0 \Leftrightarrow ba = ab$$
Does there exist non-commutative rings with zero divisors such that $(ab)^n =a^nb^n$ or is this property equivalent to commutativity?

Hagen von Eitzen gave a noncommutative nonunital ring with this property in the comments. However if your ring has a unit, this is impossible.
The proof below is a mess of algebra, so let me briefly explain the idea.
The problem is that the equalities we are given are homogeneous equations of degree at least $4$, like $abab=a^2b^2$, and we want a homogeneous equation of degree 2, $ab=ba$. Thus we need to somehow dehomogenify these equations, which we can do by substituting $a=1+a$ or $b=1+b$ and seeing what we get. This is the idea of the proof below.
Edit:
I will leave my original proof below, but darij grinberg suggested an excellent way to simplify the calculations by phrasing things in terms of commutators in the comments below.
Observe that the condition $abab=a^2b^2$ for all $a$ and $b$ is the same as saying $$a[a,b]b=0$$ for all $a$ and $b$. Now note that substituting $1+a$ in for $a$ gives $$(a+1)[a+1,b]b=(a+1)[a,b]b=0,$$ since $[1,b]=0$. Similarly, we also get $$a[a,b](b+1)=0\text{, and }(a+1)[a,b](b+1)=0.$$ Now add the first and fourth equations and subtract the middle two to get:
$$a[a,b]b - (a[a,b]b + [a,b]b) - (a[a,b]b+a[a,b]) + (a[a,b]b + a[a,b] + [a,b]b + [a,b]) =0,$$
or, on simplifying, $$[a,b]=0,$$
as desired.
Orignal proof
Consider 
$$a^2+2a^2b+a^2b^2=a^2(1+b)^2$$
$$=(a(1+b))^2=(a+ab)^2 = a^2+a^2b + aba + abab.$$
Now use that $a^2b^2 = abab$, and cancel $a^2+a^2b+abab$ from both sides to get
$$ a^2b = aba.$$
By symmetry, we must also have $ba^2=aba$, by considering $(1+b)^2a^2$.
Now consider $(1+a)^2(1+b)^2$.
Expanding this directly, we get
$$(1+2a+a^2)(1+2b+b^2)$$
$$ = 1+2b+b^2 + 2a+4ab + 2ab^2 + a^2 + 2a^2b + a^2 b^2$$
On the other hand, we also have
$$(1+a)^2(1+b)^2=((1+a)(1+b))^2 = (1+a+b+ab)^2,$$
which expands to
$$ 1 + a + b + ab + a + a^2 + ab + a^2b + b + ba + b^2 + bab + ab + aba + ab^2 + abab
$$
$$ = 1 + 2a + 2b + 3ab + a^2 + a^2b + ba + b^2 + bab + aba + ab^2 + abab.
$$
Now use that $bab=ab^2$, $aba=a^2b$, and $abab=a^2b^2$ to rewrite this as 
$$ 1 + 2a + 2b + 3ab + a^2 + 2a^2b + ba + b^2 + 2ab^2 + a^2b^2.
$$
Thus we end up with the equality,
$$ 1 + 2a + 2b +4ab + a^2 + b^2 + 2ab^2 + 2a^2b + a^2 b^2$$
$$=1 + 2a + 2b + 3ab + ba + a^2 + b^2 + 2a^2b + 2ab^2 + a^2b^2.
$$
Cancelling $1+2a+2b+3ab+a^2+b^2+2a^2b+2ab^2+a^2b^2$, we end up with
$$ab=ba,$$
as desired.
