# When do I use the 'plus-minus' sign when square rooting both sides of an equation? (example in main body).

Above is the image of an integration by substitution question that I was doing; the answer can only have a plus sign in front (if you were to differentiate the answer to check if it's correct). However, x needs to equal both positive and negative root -ln(u). Do I just forgo the plus minus sign and take the principal root (as I was told that you only need to take the principal root when rooting both sides; however, this is not true when solving quadratics, for example). Why do we only end up w/ on solution (at the very end)?

• Formatting tips here. – Em. May 23 '16 at 12:59
• If I'm following your work correctly, then you're substituting for both $x$ and $dx$. Both of these have $\pm$ (and it's the same sign), which should cancel out when they are multiplied. This problem, however, is somewhat easier if you use $u=-x^2$ as your substitution. – Michael Burr May 23 '16 at 13:00

As said in the comments, you may keep both branches of the $\pm$ when you substitute for both $x$ and $dx$. As both $dx$ and $x$ have the same sign (regardless of what branch you take), they result in the same sign on the answer.
However, an easier way of solving this problem is to write $u=-x^2$ and $du=-2x$. This gives:
$$4\int xe^{-x^2}dx=\frac{-4}{2}\int e^udu=\frac{-4}{2}e^u+C=-2e^{-x^2}+C$$