I was doing a physics problem that involved $\sqrt{x^2}$ where $x$ is known to be negative. The only way for my problem to be correct was to take $\sqrt{x^2}$ to be $-x$. However I am not sure of the validity of this.
The problem was a conservation problem.
"A horizontal spring with spring constant $85\space (\frac{N}{m})$ extends outward from a wall just above floor level. A $6.5\space kg$ box sliding across a frictionless floor hits the end of the spring and compresses it $6.5\space cm$ before the spring exannds and shoots back out. How fast was the box going when it hit the spring?"
I am not sure if I just set up my problem wrong and ended up with the wrong sign for the displacement. I took the displacement to be negative since the box was moving to the left in the negative direction. If the potential energy from the spring on the box is $U(x)=\frac{1}{2} kx^2$ then the work done by the spring is opposite of that, since that is the only work being done on the box.
I eventually end up with $-U(x)=-\frac{1}{2} kx^2=-\frac{1}{2}mv_1^2$. If I solve for $v_1$ I end up having $x^2$ underneath the radical. If I choose $x$ to be positive I end up getting the reverse of my answer. I understand that I can just leave the $x^2$ underneath the radical and just move on, but I wanted to see if I had to choose $-x$ and if it was valid to do so.
Typically, $\sqrt{z}$ denotes the positive root of $z$. For example, $\sqrt{4} = 2$, not $-2$. If we want the negative root, we have $-\sqrt{z}$; if we use either, then $\pm \sqrt z$ is used.
So, you have $\sqrt{x^2}$, and $x<0$. We want the root to be positive as well. We know $\sqrt{x^2} = |x|$, and if $x<0$, then $|x| = -x$.
Thus, $\sqrt{x^2} = -x$ for $x<0$.
Try a few examples to see this, such as $x=-3$: $\sqrt{(-3)^2} = |-3| = 3 = -(-3)$.