\(\left(2x+1\right)^2-\left(x-1\right)^2=0\)
\(\Leftrightarrow\left(2x+1-x+1\right)\left(2x+1+x-1\right)=0\)
\(\Leftrightarrow\left(x+2\right)3x=0\)
\(\Leftrightarrow\left\{{}\begin{matrix}x+2=0\\3x=0\end{matrix}\right.\Leftrightarrow\left\{{}\begin{matrix}x=-2\\x=0\end{matrix}\right.\)
\(\left(2x+1\right)^2-\left(x-1\right)^2=0\)
\(\Leftrightarrow\left[\left(2x+1\right)+\left(x-1\right)\right]\left[\left(2x+1\right)-\left(x-1\right)\right]=0\)
\(\Leftrightarrow\left(2x+1+x-1\right)\left(2x+1-x+1\right)=0\)
\(\Leftrightarrow3x\left(x+2\right)=0\)
\(\Leftrightarrow3x=0\) hoặc \(x+2=0\)
\(\odot3x=0\Leftrightarrow x=0\)
\(\odot x+2=0\Leftrightarrow x=-2\)
Vậy \(S=\left\{0;-2\right\}\)