\(x^4-30x^2+31x-30=0\)
\(\Leftrightarrow x^4+x-30\left(x^2-x+1\right)=0\)
\(\Leftrightarrow x\left(x^3+1\right)-30\left(x^2-x+1\right)=0\)
\(\Leftrightarrow x\left(x+1\right)\left(x^2-x+1\right)-30\left(x^2-x+1\right)=0\)
\(\Leftrightarrow\left(x^2-x+1\right)\left(x^2+x-30\right)=0\)
\(\Leftrightarrow\left(x+6\right)\left(x-5\right)\left(x^2-x+1\right)=0\)
\(\Leftrightarrow\left[\begin{array}{nghiempt}x+6=0\\x-5=0\\x^2-x+1=0\end{array}\right.\)\(\Leftrightarrow\left[\begin{array}{nghiempt}x=-6\\x=5\\\left(x-\frac{1}{2}\right)^2+\frac{3}{4}>0\left(loai\right)\end{array}\right.\)
Vậy \(S=\left\{-6;5\right\}\)