\(x^2+\left(m-2\right)x-2m=0\)
\(\Delta=\left(m-2\right)^2-4\cdot1\cdot\left(-2m\right)=m^2-4m+4+8m=m^2+4m+4\)
\(=\left(m+2\right)^2\)
Để pt có nghiệm thì \(\Delta\ge0\) mà nếu \(\Delta=0\Rightarrow x_1=x_2\Rightarrow\left|x_1\right|-\left|x_2\right|=0\ne2\)
\(\Rightarrow\Delta>0\Leftrightarrow m+2\ne0\Leftrightarrow m\ne-2\)
Theo vi-ét: \(\left\{{}\begin{matrix}x_1+x_2=-\left(m-2\right)=2-m\\x_1x_2=-2m\end{matrix}\right.\)
Ta có: \(\left|x_1\right|-\left|x_2\right|=2\)
\(\Leftrightarrow\left(\left|x_1\right|-\left|x_2\right|\right)^2=2^2\left(\left|x_1\right|>\left|x_2\right|\right)\)
\(\Leftrightarrow\left(\left|x_1\right|\right)^2+\left(\left|x_2\right|\right)^2-2\left|x_1x_2\right|=4\)
\(\Leftrightarrow x_1^2+x_2^2-2\left|x_1x_2\right|=4\)
\(\Leftrightarrow\left(x_1+x_2\right)^2-2x_1x_2-2\left|x_1x_2\right|=4\)
\(\Leftrightarrow\left(2-m\right)^2-2\cdot\left(-2m\right)-2\left|-2m\right|=4\)
\(\Leftrightarrow4-4m+m^2+4m-4\left|m\right|=4\)
\(\Leftrightarrow m^2-4\left|m\right|=0\)
TH1: \(m\ge0\)
\(\Rightarrow m^2-4m=0\Leftrightarrow\left[{}\begin{matrix}m=0\\m=4\end{matrix}\right.\left(tm\right)\)
TH2: \(m< 0\)
\(\Rightarrow m^2+4m=0\Leftrightarrow\left[{}\begin{matrix}m=0\left(ktm\right)\\m=-4\left(tm\right)\end{matrix}\right.\)
\(m\in\left\{0;4;-4\right\}\)
Thử lại ta thấy \(m=4\left(ktm\right)\)
\(\Rightarrow m\in\left\{0;-4\right\}\)