yes, this is true. you can't divide by zero. however, "proving" that the variable is not zero is unnecessary. firstly, multiplying and dividing by the same expression is a standard trick in math, it is assumed the expression is not zero when doing this. moreover, the substitution involves the derivative, which itself is not defined when x = 0, so again, you wouldn't really worry about it. if you wish to be pedantic about this, you can simply consider the possible cases. If x = 0, then the original integral becomes which is trivial. Otherwise, proceed as TPH did. But good looking out. Division by zero should always be a concern.

What you did is called change of variable, and is a valid alternative approach.