ĐK:x\(\ge\dfrac{1}{3}\)
\(x^2-x+1=2\sqrt{3x-1}\Leftrightarrow x^2+2x+1=3x-1+2\sqrt{3x-1}+1\Leftrightarrow\left(x-1\right)^2=\left(\sqrt{3x-1}-1\right)^2\Leftrightarrow\)\(\left[{}\begin{matrix}x-1=\sqrt{3x-1}-1\\x-1=1-\sqrt{3x-1}\end{matrix}\right.\)\(\Leftrightarrow\)\(\left[{}\begin{matrix}x=\sqrt{3x-1}\\\sqrt{3x-1}=2-x\end{matrix}\right.\)\(\Leftrightarrow\)\(\left[{}\begin{matrix}x^2=3x-1\\3x-1=4-4x+x^2\end{matrix}\right.\)\(\Leftrightarrow\)\(\left[{}\begin{matrix}x^2-3x+1=0\\x^2-7x+5=0\end{matrix}\right.\)\(\Leftrightarrow\)\(\left[{}\begin{matrix}\left[{}\begin{matrix}x=\dfrac{3+\sqrt{5}}{2}\left(tm\right)\\x=\dfrac{3-\sqrt{5}}{2}\left(tm\right)\end{matrix}\right.\\\left[{}\begin{matrix}x=\dfrac{7+\sqrt{29}}{2}\left(ktm\right)\\x=\dfrac{7-\sqrt{29}}{2}\left(ktm\right)\end{matrix}\right.\end{matrix}\right.\)
Vậy S={\(\dfrac{3\pm\sqrt{5}}{2}\)}