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