- Ta có: \(\left(x^2-1\right).\left(x+2\right).\left(x-3\right)=\left(x-1\right).\left(x^2-4\right).\left(x+5\right)\)
\(\Leftrightarrow\left(x-1\right).\left(x+1\right).\left(x+2\right).\left(x-3\right)=\left(x-1\right).\left(x-2\right).\left(x+2\right).\left(x+5\right)\)
\(\Leftrightarrow\left(x-1\right).\left(x+1\right).\left(x+2\right).\left(x-3\right)-\left(x-1\right).\left(x-2\right).\left(x+2\right).\left(x+5\right)=0\)
\(\Leftrightarrow\left(x-1\right).\left(x+2\right).\left[\left(x+1\right).\left(x-3\right)-\left(x-2\right).\left(x+5\right)\right]=0\)
\(\Leftrightarrow\left(x-1\right).\left(x+2\right).\left[\left(x^2-2x-3\right)-\left(x^2+3x-10\right)\right]=0\)
\(\Leftrightarrow\left(x-1\right).\left(x+2\right).\left(x^2-2x-3-x^2-3x+10\right)=0\)
\(\Leftrightarrow\left(x-1\right).\left(x+2\right).\left(-5x+7\right)=0\)
+ \(x-1=0\)\(\Leftrightarrow\)\(x=1\left(TM\right)\)
+ \(x+2=0\)\(\Leftrightarrow\)\(x=-2\left(TM\right)\)
+ \(-5x+7=0\)\(\Leftrightarrow\)\(-5x=-7\)\(\Leftrightarrow\)\(x=\frac{7}{5}\left(TM\right)\)
Vậy \(S=\left\{-2,1,\frac{7}{5}\right\}\)