$\begin{array}{l}\text{* Phân tích đa thức thành nhân tử:}\\(x^2+x-1)^2+4x^2+4x\\=x^4+x^2+x+2x^3-2x^2-2x+4x^2+4x\\=x^4+3x^2+1+2x^3+2x\\=x^4+x^2+x^2+x^2+1+x^3+x^3+x+x\\=x^2(x^2+x+1)+x^2+x(x^2+x+1)+1+x\\=(x^2+x+1)(x^2+x+1)\\=(x^2+x+1)^2\\\text{* Giải phương trình:}\\(x^2+x+1)^2=0\\\leftrightarrow x^2+x+1=0\\\leftrightarrow x^2+x=-1\\\leftrightarrow x^2+x+\dfrac{1}{4}=-1+\dfrac{1}{4}\\\leftrightarrow \left({x+\dfrac{1}{2}}\right)^2=-\dfrac{3}{4} \ (\text{vô nghiệm, vì} \ \left({x+\dfrac{1}{2}}\right)^2\geqslant0\forall x)\\\leftrightarrow x\in\varnothing \\\text{Vậy} \ S=\varnothing \end{array}$