What is √x2? Most of us will intuitive say "x": after all, √9=√32=√3, for example. However, what is √(−3)2?
It is not −3 and is in fact √(−3)2=√9=3. Hence √x2=x is only valid if x is non-negative. If x is negative, it turns out that √x2=−x.
The reason for this stems from definition: the symbol √⋅ is defined to be the "positive square root" when there are actually two possible square roots to every positive real number (this is the reason the equation x2=k has two solutions, ±√k, for positive k).
A compact way to summarize: √x2=|x|