Quadratic equation with absolute values Solve $|x^{2}+x-2|+|x^{2}-x-2|=2$ 
My attempt: 
$|x^{2}+x-2|=
x^{2}+x-2, x\in (-\infty,-2]\cup[1,\infty)$
$|x^2+x-2|=-x^{2}-x+2, x\in(-2,1)\\$ 
$|x^{2}-x-2|=x^{2}-x-2, x\in (-\infty,-1]\cup[2,\infty)$
$|x^{2}-x-2|=-x^{2}+x+2, x\in (-1,2)\\$
$1)$ $x\in(-\infty,-2]\cup[1,\infty)$ and $x\in(-\infty,-1]\cup[2,\infty)$
$x^{2}+x-2+x^{2}-x-2=2$
$\Rightarrow 2x^{2}-6=0$
$\Rightarrow x^{2}=3$ 
$\Rightarrow x_1=\sqrt{3}, x_2=-\sqrt{3}$
$2)$ $x\in(-\infty,-2]\cup[1,\infty)$ and $x\in(-1,2) \Rightarrow x\in[1,2)$
$x^{2}+x-2-x^{2}+x+2=2$  
$\Rightarrow 2x=2$ 
$\Rightarrow x=1$ 
$3)$ $x\in(-2,1)$ and $x\in(-\infty,-1]\cup[2,\infty)$ $\Rightarrow x\in(-2,-1]$ 
$-x^{2}-x+2+x^{2}-x-2=2$ 
$\Rightarrow x=-1$ 
$4)$ $x\in(-2,1)$ and $x\in(-1,2)$ $\Rightarrow x\in(-1,1)$
$-x^{2}-x+2-x^{2}+x+2=2$ 
$\Rightarrow -2x^{2}+2=0$
$\Rightarrow -2x^{2}=-2$ 
$\Rightarrow x^{2}=1$ 
$\Rightarrow x=\pm{1}$ but that's not in the interval $(-1,1)$ so I can throw away that solution.  
My question is how do I find the intersection in $1)$ $x\in(-\infty,-2]\cup[1,\infty)$ and $x\in(-\infty,-1]\cup[2,\infty)$ since $-\sqrt{3}$ and $\sqrt{3}$ should not be the solutions. 
 A: It is a bit hard to follow. Perhaps we could write
$$
\begin{align}
f(x)&=x^2+x-2\\
g(x)&=x^2-x-2
\end{align}
$$
and solve $|f(x)|+|g(x)|=2$ as you did, case by case:
$$
\begin{align}
+f(x)+g(x)&=2\implies x\in\{-\sqrt3,\sqrt3\}\\
+f(x)-g(x)&=2\implies x=1\\
-f(x)+g(x)&=2\implies x=-1\\
-f(x)-g(x)&=2\implies x\in\{-1,1\}
\end{align}
$$
And then since
$$
\begin{align}
f(x)&=0\implies x\in\{-2,1\}\\
g(x)&=0\implies x\in\{-1,2\}
\end{align}
$$
where $f,g$ are quadratic functions pointing in the positive $y$-direction, we get the following sign table
$$
\begin{array}{|c|c|}
\hline
x&&-2&&-1&&1&&2&\\
\hline
f(x)&+&0&-&-&-&0&+&+&+\\
\hline
g(x)&+&+&+&0&-&-&-&0&+\\
\hline
\end{array}
$$
and then we can simply check the solutions up against this table directly. Since $\pm\sqrt3$ fall in between $-2,-1$ or $1,2$ where $f$ and $g$ have opposite signs, they cannot be valid solutions, since they are solutions to the first equation, where $f,g$ both have positive sign.
Note: Zero can be taken as having any sign you want since $+0=-0$, so all the other solutions are valid, which makes the solution set $x\in\{-1,1\}$.
A: The derivative of the function is
$$(2x+1)\text{sign}|x^2+x-2|+(2x-1)\text{sign}|x^2-x-2|.$$
Depending on the signs, this reduces to $\pm4x$ or $\pm2$ so that the only possible root occurs at $x=0$. The changes of sign can occur at $-2,-1,1,2$ so that the function is certainly monotonous in the intervals
$$]-\infty,-2,-1,0,1,2,\infty[.$$
The endpoints correspond to the function values
$$\infty,4,\color{green}2,4,\color{green}2,4,\infty$$ and you clearly see the two solutions.
A: Your work is essentially correct but, as you noted, the case 1) is not well solved. In this case the range is 
$x\in(-\infty,-2]\cup[1,\infty)$ and $x\in(-\infty,-1]\cup[2,\infty)$, that is :
$$
\{(-\infty,-2]\cup[1,\infty)\}\cap\{(-\infty,-1]\cup[2,\infty)\}=(-\infty,-2]\cup [2,\infty)=D_1
$$
that is: $x\le -2 \mbox{ or } x\ge 2$
since $-2<-\sqrt{3}<2$ and $-2<\sqrt{3}<2$ , these two values are not in $D_1$ and are not  roots of the equation.
