\(x^3-5x^2+8x-4\)
\(=x^3-1-5x^2+5x+3x-3\)
\(=\left(x-1\right)\left(x^2+x+1\right)-5x\left(x-1\right)+3\left(x-1\right)\)
\(=\left(x-1\right)\left(x^2+x+1-5x+3\right)\)
\(=\left(x-1\right)\left(x^2-4x+4\right)\)
\(=\left(x-1\right)\left(x-2\right)^2\)