Perhaps it will be easier to see if you use a substitution.
Let . Then we can say
Let . Then we can say
Now, we know that:
So just do the substitutions:
Why didn't I worry about the negative square root when I was defining and ? Think about it -- if we had defined , for example, as , then the above would just have come out: