Phương trình hoành độ giao điểm:
\(x^2+mx+2=-2\Leftrightarrow x^2+mx+4=0\) (1)
\(\Delta=m^2-16>0\Rightarrow\left[{}\begin{matrix}m>4\\m< -4\end{matrix}\right.\)
Theo định lý Viet: \(\left\{{}\begin{matrix}x_1+x_2=-m\\x_1x_2=4\end{matrix}\right.\)
\(\left|x_1-x_2\right|=2\)
\(\Leftrightarrow\left(x_1-x_2\right)^2=4\)
\(\Leftrightarrow\left(x_1+x_2\right)^2-4x_1x_2=4\)
\(\Leftrightarrow m^2-16=4\Rightarrow m=\pm2\sqrt{5}\)