1) Ta có: \(\left|x^2-4x-5\right|=x-1\)
\(\Leftrightarrow\left[{}\begin{matrix}x^2-4x-5=x-1\left(\left[{}\begin{matrix}x>5\\x< -1\end{matrix}\right.\right)\\-x^2+4x+5=x-1\left(-1< x< 5\right)\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x^2-4x-5-x+1=0\\-x^2+4x+5-x+1=0\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x^2-5x-4=0\\-x^2+3x+6=0\end{matrix}\right.\Leftrightarrow x^2-2\cdot x\cdot\dfrac{5}{2}+\dfrac{25}{4}-\dfrac{41}{4}=0\)
\(\Leftrightarrow\left(x-\dfrac{5}{2}\right)^2=\dfrac{41}{4}\)
\(\Leftrightarrow\left[{}\begin{matrix}x-\dfrac{5}{2}=\dfrac{\sqrt{41}}{2}\\x-\dfrac{5}{2}=-\dfrac{\sqrt{41}}{2}\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=\dfrac{\sqrt{41}+5}{2}\left(nhận\right)\\x=\dfrac{-\sqrt{41}+5}{2}\left(loại\right)\end{matrix}\right.\)
Vậy: \(S=\left\{\dfrac{\sqrt{41}+5}{2}\right\}\)