# Factoring the expression $(\sqrt{x^2} -a)^2 + M = 0$

Where, M stands for all other terms in the equation. This is a typical format that you'll see when taking affine sections of an n-torus. I think I figured out how to do it correctly, without violating any rules. I knew through other means that it should be equal to $((x-a)^2 +M)\cdot((x+a)^2 +M) = 0$ , but I didn't know how to prove it.

1. Taking the expression

$$(\sqrt{x^2} -a)^2 + M = 0$$

1. Collect all of the M terms outside the binomial x,a to RH side

$$(\sqrt{x^2} -a)^2 = -M$$

1. Square root both sides, to undo the square of x,a terms

$$\sqrt{(\sqrt{x^2} -a)^2} = \sqrt{-M}$$

has two solutions and becomes,

$$\sqrt{x^2} -a = -\sqrt{-M}$$ $$\sqrt{x^2} -a = \sqrt{-M}$$

Which are factors in a product of two,

$$(\sqrt{x^2} - a-\sqrt{-M})\cdot(\sqrt{x^2} - a+\sqrt{-M}) = 0$$

1. Not sure if working with and simplifying the factors individually is a correct way to do it, but I found an interesting relation with square roots in factors. It was the generic expression $(\sqrt{x^2} -a-b)(\sqrt{x^2} -a+b)$ being exactly equal to $(x^2 -(a-b)^2)(x^2 -(a+b)^2)$ that made me think it is a legit algebraic method. I've been testing it, and it works in many, many solutions of hypertoric polynomials. I'm just assuming that I can do it this way. If I had a product of two factors that were capable of being factored/reduced even more, it seems that doing that for each one separately would be correct, so long as the result is equal to the original. I'm looking to avoid any of the freshman's dreams, while developing a strategy for multivariate root finding.

Now, undo the square root around $x^2$, to simplify the factors. Working with each factor as a separate equation, move 'a' over to RH side, and square both sides.

$$(\sqrt{x^2})^2 = (a-\sqrt{-M})^2$$ $$(\sqrt{x^2})^2 = (a+\sqrt{-M})^2$$

which becomes,

$$x^2 = (a-\sqrt{-M})^2$$ $$x^2 = (a+\sqrt{-M})^2$$

1. We can factor the difference of two squared terms, $a^2-b^2 = (a-b)(a+b)$

$$x^2 - (a-\sqrt{-M})^2$$ $$x^2 - (a+\sqrt{-M})^2$$

becomes,

$$(x -(a-\sqrt{-M})\cdot(x +(a-\sqrt{-M}))$$ $$(x -(a+\sqrt{-M}))\cdot(x +(a+\sqrt{-M}))$$

completing the sign changes,

$$(x -a+\sqrt{-M})\cdot(x +a-\sqrt{-M})$$ $$(x -a-\sqrt{-M})\cdot(x +a+\sqrt{-M})$$

becomes a product of 4 factors

$$(x -a+\sqrt{-M})\cdot(x +a-\sqrt{-M})\cdot(x -a-\sqrt{-M})\cdot(x +a+\sqrt{-M}) = 0$$

1. Move the $\sqrt{-M}$ terms to RH side,

$$x -a = -\sqrt{-M}$$ $$x -a = \sqrt{-M}$$ $$x +a = -\sqrt{-M}$$ $$x +a = \sqrt{-M}$$

and square both sides to eliminate the square root on M

$$(x-a)^2 = (-\sqrt{-M})^2$$ $$(x-a)^2 = (\sqrt{-M})^2$$ $$(x+a)^2 = (-\sqrt{-M})^2$$ $$(x+a)^2 = (\sqrt{-M})^2$$

becomes,

$$(x-a)^2 = -M$$ $$(x-a)^2 = -M$$ $$(x+a)^2 = -M$$ $$(x+a)^2 = -M$$

Move terms to LH side, into their separate factors,

$$((x-a)^2 +M)\cdot((x-a)^2 +M)\cdot((x+a)^2 +M)\cdot((x+a)^2 +M) = 0$$

1. A product of two exact same equations $f(x)\cdot f(x)$ is a constant times a function, $2\cdot f(x)$ , which simplifies into $f(x)$

$$((x-a)^2 +M)\cdot((x+a)^2 +M) = 0$$

which is equal to

$$(\sqrt{x^2} -a)^2 +M = 0$$

What's neat is that it factors any general expression containing the specific binomial $(\sqrt{x^2}-a)^2$, while not doing much of anything to M, other than keeping it inside the square root on the RH side, until the very end. So, how does my arithmetic check out? Thanks in advance!

• "Square rooting" both sides breaks if either side is negative... Nov 23, 2015 at 0:49
• You are aware that $\sqrt{x^2} = |x|$ if x is a real number. So $\sqrt{x^2} -a = -\sqrt{-M}$ becomes $|x|=a-\sqrt{-M}$, whose solution is $x = \pm(a - \sqrt{-M})$. Nov 23, 2015 at 1:02
• @djechlin , the M term stands for any number of terms, which are usually in combinations of plus/minus signs. Should I have used $\sqrt{(-M)}$ , instead, if that makes a difference? The idea is to move everything around easily, to work with simplifying $(\sqrt{x^2}-a)^2$ . Nov 23, 2015 at 1:02
• If the "any number of terms" it's standing for is in turn standing for "a positive number" then sure take its square root. If those "any of number of terms" happens to add up to something negative then it does not have a real square root. You're forgetting that the "terms" are "standing for" numbers. Nov 23, 2015 at 1:05
• @PhilipPugeau : It doesn't matter how complicated an expression M represents. If $M \le 0$ then $\sqrt{-M}$ is a real number and if $M \gt 0$, then $\sqrt{-M}$ is a pure imaginary number. Nov 23, 2015 at 7:31

Taking $\sqrt{-M}$ is problematic. You need to establish that $M$ is >= 0 first. From the comments you seem to think that since $M$ represents "any number of terms" you can skip this step... this is my best attempt at explaining it.

### An example of a time you're "allowed" to take a square root

Let $x = -3$, $N = -4$ and $\alpha = 6/7$. Since for any number $a \neq 0$, we have $a^2 > 0$, it follows that $x^2, N^2$ and $\alpha^2$ are all $>0$. Since if $a$ and $b$ are numbers greater than $0$, we have $a+b > 0$, it follows that $x^2 + N^2 > 0$, and $x^2 + N^2 + \alpha^2 > 0$. Therefore there exists a positive number $s$ so that $s^2 = x^2 + N^2 + \alpha^2$, and we may call this number $\sqrt{x^2 + N^2 + \alpha^2}$.

### An example of a time you're not "allowed" to take a square root

Let $M = abcdfghi^{88} + uvw^2t/4$. Then $\sqrt{M}$...

However, if you did know that $abcd > 0$, $f = g = h = i = 3$, and $u = 0$, then you could quite easily prove $M > 0$ and do take its square root. Hope this helps...

• That does help, actually, thanks! I should have re-worded what M has in it. They will always be a squared number/variable. However, if $M = c^2 - d^2 +y^2 +z^2$ , can I still make the square root of -M ? Nov 23, 2015 at 1:28
• @PhilipPugeau depends, do you know that $-M \geq 0$? Sounds like that might not be true if $c^2 + y^2 + z^2$ happens to be very big and $d$ happens to be very small. Nov 23, 2015 at 1:30
• Well, that's a tough one, since it can have both numbers and variables. But, with the reasoning $\sqrt{x^2} = |x| = -x , +x$ , I can probably skip this whole process with the arbitrary square roots. I wasn't sure if I could just skip it, and wrote this process down, trying to find a way that made it work. The good news is that I learned a few things! Nov 23, 2015 at 2:09