\(\left(2x+1\right)^2-\left(x-1\right)^2=0\)
\(\Leftrightarrow4x^2+4x+1-x^2+2x-1=0\)
\(\Leftrightarrow3x^2+6x=0\)
\(\Leftrightarrow\left[{}\begin{matrix}3x=0\\x+2=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\\x=-2\end{matrix}\right.\)
Vậy \(S=\left\{0;-2\right\}\).