\(|x^2-5x+4|=4x-4\)
\(\Rightarrow|\left(x-1\right)\left(x-4\right)|=4\left(x-1\right)\)
\(\Rightarrow\orbr{\begin{cases}\left(x-1\right)\left(x-4\right)=4\left(x-1\right)\\\left(x-1\right)\left(x-4\right)=-4\left(x-1\right)\end{cases}}\)
TH1 :
\(\left(x-1\right)\left(x-4\right)=4\left(x-1\right)\)
\(\Rightarrow\left(x-1\right)\left(x-4\right)-4\left(x-1\right)=0\)
\(\Rightarrow\left(x-1\right)\left(x-8\right)=0\)
\(\Rightarrow\orbr{\begin{cases}x=1\\x=8\end{cases}}\)
Th2:
\(\left(x-1\right)\left(x-4\right)=-4\left(x-1\right)\)
\(\Rightarrow\left(x-1\right)\left(x-4\right)+4\left(x-1\right)=0\)
\(\Rightarrow\left(x-1\right)x=0\)
\(\Rightarrow\orbr{\begin{cases}x=1\\x=0\end{cases}}\)
\(\Rightarrow S=\left\{0;1;8\right\}\)