a) ĐKXĐ: \(-\frac{1}{2}\le x\le3\)
Ta có: \(\sqrt{2x+1}+\sqrt{x+4}+x=3\)
\(\Leftrightarrow\sqrt{2x+1}+\sqrt{x+4}=3-x\)
\(\Leftrightarrow3x+5+2\sqrt{\left(2x+1\right)\left(x+4\right)}=x^2-6x+9\)
\(\Leftrightarrow2\sqrt{\left(2x+1\right)\left(x+4\right)}=x^2-9x+4\)
\(\Leftrightarrow4\left(2x^2+8x+x+4\right)=x^4+81x^2+16-18x^3-72x+8x^2\)
\(\Leftrightarrow4\left(2x^2+9x+4\right)=x^4-18x^3+89x^2-72x+16\)
\(\Leftrightarrow x^4-18x^3+89x^2-72x+16-8x^2-36x-16=0\)
\(\Leftrightarrow x^4-18x^3+81x^2-108x=0\)
\(\Leftrightarrow x\left(x^3-18x^2+81x-108\right)=0\)
\(\Leftrightarrow x\left(x^3-3x^2-15x^2+45x+36x-108\right)=0\)
\(\Leftrightarrow x\left[x^2\left(x-3\right)-15x\left(x-3\right)+36\left(x-3\right)\right]=0\)
\(\Leftrightarrow x\left(x-3\right)\left(x^2-15x+36\right)=0\)
\(\Leftrightarrow x\left(x-3\right)^2\cdot\left(x-12\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x=0\\x-3=0\\x-12=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\left(nhận\right)\\x=3\left(nhận\right)\\x=12\left(loại\right)\end{matrix}\right.\)
Vậy: S={0;3}