Solving a problem, I got to a situation of contradiction after a lot of algebra and, looking back, I divided both sides of the equation by a variable that could be zero. I then assumed that the variable was zero, and turns out it was, and that is the way I solved the problem. I don't know if there was a better way, but it got me to the answer.
Is this considered a valid way of solving a problem? Meaning, if you divide both sides of an equation by a variable and it leads to a contradiction, does it always mean the variable equals zero? Would this be acceptable in a proof, for example?