<s>[INST] 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?
 [/INST] 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||$:

</s>