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.
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.