# Find all solutions to $|x^2-2|x||=1$

Firstly, we have that $$\left\{ \begin{array}{rcr} |x| & = & x, \ \text{if} \ x\geq 0 \\ |x| & = & -x, \ \text{if} \ x<0 \\ \end{array} \right.$$

So, this means that $$\left\{ \begin{array}{rcr} |x^2-2x| & = & 1, \ \text{if} \ x\geq 0 \\ |x^2+2x| & = & 1, \ \text{if} \ x<0 \\ \end{array} \right.$$

For the first equation, we have

$$|x^2-2x|\Rightarrow\left\{\begin{array}{rcr} x^2-2x & = & 1, \ \text{if} \ x^2\geq 2x \\ x^2-2x & = & -1, \ \text{if} \ x^2<2x \\ \end{array} \right.$$

and for the second equation, we have

$$|x^2+2x|\Rightarrow\left\{\begin{array}{rcr} x^2+2x & = & 1, \ \text{if} \ x^2+2x\geq 0 \\ x^2+2x & = & -1, \ \text{if} \ x^2+2x<0 \\ \end{array} \right.$$

Solving for all of these equations, we get

$$\left\{\begin{array}{rcr} x^2-2x & = 1 \Rightarrow& x_1=1+\sqrt{2} \ \ \text{and} \ \ x_2=1-\sqrt{2}\\ x^2-2x & =-1 \Rightarrow& x_3=1 \ \ \text{and} \ \ x_4=1\\ x^2+2x & = 1 \Rightarrow& x_5=-1-\sqrt{2} \ \ \text{and} \ \ x_6=-1+\sqrt{2}\\ x^2+2x & =-1 \Rightarrow& x_7=-1 \ \ \text{and} \ \ x_8=-1 \end{array} \right.$$

So we have the roots $$\begin{array}{lcl} x_1 = & 1+\sqrt{2} \\ x_2 = & 1-\sqrt{2} \\ x_3 = & -1+\sqrt{2} \\ x_4 = & -1-\sqrt{2} \\ x_5 = & 1 \\ x_6 = & -1 \end{array}$$

But according to the book, the answer is

\begin{array}{lcl} x_1 & = & 1+\sqrt{2} \\ x_4 & = & -1-\sqrt{2} \\ x_5 & = & 1 \\ x_6 & = & -1 \end{array}

What happened to $x_2$ and $x_3$? Any other way to solve this equation quicker?

• How did you get to here: $$|x|^2-2|x|-1=0 \quad \text{or} \quad |x|^2-2|x|+1=0$$ – Parseval May 14 '17 at 7:42
• $x^2=|x|^2$ for all real $x$ – CY Aries May 14 '17 at 7:44
• The first equation should equal $1$, no? – Jay Dunivin May 14 '17 at 19:54
• Yes, it's a typo. Thanks – CY Aries May 14 '17 at 23:41

$x^{2}-2x = 1$ ,if $x^{2}\geq 2x$ and $x\geq 0$ (because$\left |x^{2}-2x \right | = 1$ if $x\geq 0$)

but $1-\sqrt{2} \leq 0$

$x_{3} =-1+\sqrt{2}$ is not correct solution because of same reason in second equation

As G.H.lee already pointed out, you did casework $x\geq 0$ and $x<0$ to simplify the expression but you completely disregarded it later. A correct way would be something like this:

$$|x^2-2|x||=1\implies \begin{cases}|x^2-2x| = 1,& x\geq 0\\ |x^2+2x| = 1,& x < 0 \end{cases} \implies \begin{cases} x^2-2x = 1,& x\geq 0,\ x^2-2x\geq 0\\ x^2-2x = -1,& x\geq 0,\ x^2-2x<0\\ x^2+2x = 1,& x < 0,\ x^2+2x\geq 0\\ x^2+2x = -1,& x < 0,\ x^2+2x<0\end{cases}$$

after which you solve the way you did, but remove extra solutions.

One way to simplify this is to notice that function $f(x) = |x^2-2|x||-1$ is even, i.e. $f(-x) = f(x)$, meaning that $x_0$ is root of $f$ if and only if $-x_0$ is root of $f$. Thus, we can assume that $x\geq 0$ while solving the equation, and we can just add "$\pm$" later to get all solutions.

Our equation now simplifies to $|x^2 -2x| = 1$, i.e. $x^2-2x = \pm 1$ or $(x-1)^2 = 1\pm 1$. This gives us solutions $x = 1$ and $x = 1\pm \sqrt 2$ and after we remove the negative $1-\sqrt 2$, we get $x =1$ and $x = 1+\sqrt 2$. To get all solutions, just add "$\pm$".

Personally, I like to draw graphs. Again, you can notice that $|x^2-2|x||$ is even, so we can assume that $x\geq 0$ and reflect the graph with respect to $y$-axis later.

To graph $|x^2-2x|$ (for $x\geq 0$), you can graph parabola $x^2-2x$ first and then reflect anything below $x$-axis. Afterwards, reflect with respect to $y$-axis to get $|x^2-2|x||$: • Great explanation thank you. However drawing graphs and such in a problem that I'm only given 5 min to solve is not an option. – Parseval May 14 '17 at 12:22
• @Parseval, you are welcome. Graphing this doesn't take more than half a minute, once you know "the rules". Absolute value is all about reflecting: if you can graph $f$ quickly enough (in this case, a parabola), then you can immediately graph $|f|$ by reflecting anything below $x$-axis, as shown in in the above graph. While this won't solve your equation, you can be very confident in the solution you got algebraically without checking your calculations. – Ennar May 14 '17 at 12:55
• Thanks a lot buddy, you're right, now that you explain it with the mirroring about the x-axis it makes sense to draw it when it's so simple. You're great! – Parseval May 14 '17 at 16:53

The most general way is to grow a tree and then for each leaf of the tree a table. If more than a couple of layers of $|.|$ you will probably be starting to confuse yourself if you don't stick to a systematic approach.

Each branch in the tree reduce the set the variable is valid for. We need to store a pair $(expression,set)$ at each node and at the leafs of the tree, we will have an expression with no $|.|$ left, just a polynomial and a set. That is when we can make a table splitting the real number line.

1. First tree branch is due to $|x|$: $x\in[0,\infty]$ left $x\in[-\infty,0]$ right.
2. left does $|x|\to x$, right does $|x|\to -x$
3. Now store pairs sets and expressions $|x^2-2x|$ left , $|x^2+2x|$ right
4. In our new nodes we need to factor polynomials to find how to split the tree up in subsets > and <0. But hopefully the systemacy of the approach is clear enough by now.