a) Ta có: \(\left(x^2+3x+2\right)^2=\left(x^2-x-2\right)^2\)
\(\Leftrightarrow\left(x^2+3x+2\right)^2-\left(x^2-x-2\right)^2=0\)
\(\Leftrightarrow\left(x^2+3x+2-x^2+x+2\right)\left(x^2+3x+2+x^2-x-2\right)=0\)
\(\Leftrightarrow\left(4x+4\right)\left(2x^2+2x\right)=0\)
\(\Leftrightarrow4\left(x+1\right)\cdot2x\cdot\left(x+1\right)=0\)
\(\Leftrightarrow x\left(x+1\right)^2=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x+1=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\\x=-1\end{matrix}\right.\)
Vậy: S={0;-1}
b) Ta có: \(x^3+x^2-4x-4=0\)
\(\Leftrightarrow x^2\left(x+1\right)-4\left(x+1\right)=0\)
\(\Leftrightarrow\left(x+1\right)\left(x^2-4\right)=0\)
\(\Leftrightarrow\left(x+1\right)\left(x-2\right)\left(x+2\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x+1=0\\x-2=0\\x+2=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=-1\\x=2\\x=-2\end{matrix}\right.\)
Vậy: S={-1;2;-2}