\(ĐK:x\in R\)
\(\sqrt{x^2+x+4}+\sqrt{x^2+x+1}=\sqrt{2x^2+2x+9}\) (*)
Đặt \(x^2+x+1=a;a\ge0\)
\(\rightarrow\left\{{}\begin{matrix}x^2+x+4=a+3\\2x^2+2x+9=2a+7\end{matrix}\right.\)
(*) \(\Rightarrow\sqrt{a+3}+\sqrt{a}=\sqrt{2a+7}\)
\(\Leftrightarrow\left(\sqrt{a+3}+\sqrt{a}\right)^2=\left(\sqrt{2a+7}\right)^2\)
\(\Leftrightarrow a+3+a+2\sqrt{a\left(a+3\right)}=2a+7\)
\(\Leftrightarrow2\sqrt{a\left(a+3\right)}=4\)
\(\Leftrightarrow\sqrt{a\left(a+3\right)}=2\)
\(\Leftrightarrow a\left(a+3\right)=4\)
\(\Leftrightarrow a^2+3a-4=0\)
\(\Leftrightarrow\left[{}\begin{matrix}a=1\left(tm\right)\\a=-4\left(ktm\right)\end{matrix}\right.\)
\(\Rightarrow x^2+x+1=1\)
\(\Leftrightarrow x\left(x+1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x=-1\end{matrix}\right.\) \((tm)\)
Vậy \(S=\left\{0;-1\right\}\)