\(x^4-6x^3+54x-81\)
\(=x^4+3x^3-9x^3+27x^2-27x^2 +81x-27x-81\)
\(=\left(x^4+3x^3\right)-\left(9x^3+27x^2\right)+\left(27x^2+81x\right)-\left(27+81\right)\)
\(=x^3\left(x+3\right)-9x^2\left(x+3\right)+27x\left(x+3\right)-27\left(x+3\right)\)
\(=\left(x+3\right)\left(x^3-9x^2+27x-27\right)\)
\(=\left(x+3\right)\left(x-3\right)^3\)