a) Ta có: \(x^2-2\left|x\right|-3=0\)(1)
*Trường hợp 1: \(x\ge0\)
(1)\(\Leftrightarrow x^2-2x-3=0\)
\(\Leftrightarrow x^2-3x+x-3=0\)
\(\Leftrightarrow x\left(x-3\right)+\left(x-3\right)=0\)
\(\Leftrightarrow\left(x-3\right)\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-3=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=3\left(tm\right)\\x=-1\left(ktm\right)\end{matrix}\right.\)
*Trường hợp 2: x<0
(1)\(\Leftrightarrow x^2+2x-3=0\)
\(\Leftrightarrow x^2+3x-x-3=0\)
\(\Leftrightarrow x\left(x+3\right)-\left(x+3\right)=0\)
\(\Leftrightarrow\left(x+3\right)\left(x-1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x+3=0\\x-1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=-3\left(tm\right)\\x=1\left(ktm\right)\end{matrix}\right.\)
Vậy: S={3;-3}
b) Ta có: \(x^2-2x+3-3\left|x-1\right|=0\)(2)
*Trường hợp 1: \(x\ge1\)
(2)\(\Leftrightarrow x^2-2x+3-3\left(x-1\right)=0\)
\(\Leftrightarrow x^2-2x+3-3x+3=0\)
\(\Leftrightarrow x^2-5x+6=0\)
\(\Leftrightarrow x^2-2x-3x+6=0\)
\(\Leftrightarrow x\left(x-2\right)-3\left(x-2\right)=0\)
\(\Leftrightarrow\left(x-2\right)\left(x-3\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-2=0\\x-3=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=2\left(tm\right)\\x=3\left(tm\right)\end{matrix}\right.\)
*Trường hợp 2: x<1
(2)\(\Leftrightarrow x^2-2x+3-3\left(1-x\right)=0\)
\(\Leftrightarrow x^2-2x+3-3+3x=0\)
\(\Leftrightarrow x^2+x=0\)
\(\Leftrightarrow x\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\left(tm\right)\\x=-1\left(tm\right)\end{matrix}\right.\)
Vậy: S={2;3;0;-1}