# Defining equality validity when an equation with two variables exists

What are the correct steps when defining for which values of $y$ and $x$ an equality is correct?

For instance, $(xy)^3 = xy^3$

-
For that particular equality, write $(xy)^3$ as $x^3y^3$, then subtract the right-hand side and factor as $x(x-1)(x+1)y^3=0$, which happens only when one of $x=-1,0,1$ are true, or $y=3$. –  anon Feb 17 '12 at 0:49
quite simple indeed, but $y=3$? –  Schiavini Feb 17 '12 at 0:51
@anon I believe you can only conclude that if you are working in an integral domain . –  user38268 Feb 17 '12 at 0:53
Sorry, $y=0$, I mixed my comment up with something else I was doing. The general protocol would be to move everything to one side and find a way to factor it, then use the fact that $ab=0$ implies either $a=0$ or $b=0$ in $\mathbb{R}$ (this doesn't always work when you're talking about things that aren't real or complex numbers, as Ben notes). –  anon Feb 17 '12 at 0:57
Thank you, I would accept it as an answer if it wasn't a comment –  Schiavini Feb 17 '12 at 0:58

By commutativity we have $(xy)^3=xyxyxy=x^3y^3$ so rewrite this as $x^3y^3=xy^3$. Subtract the right hand side to get $x^3y-xy=0$ and factor as $x(x+1)(x-1)y=0$, implying $x\in\{0,\pm1\}$ or that $y=0$. The general protocol in these situations is to move everything to one side so that the equation is of the form $\text{blah}=0$, then factor and use the fact that $ab=0$ if and only if $a$ or $b=0$.