# How do you factor x^4-2x^3-12x^2+18x+27?

Answer $\left(x + 1\right) {\left(x - 3\right)}^{2} \left(x + 3\right)$
Try $x = - 1$ gives $1 + 2 - 12 - 18 + 27 = 0$ so $x + 1$ is a factor.
Dividing by $\left(x + 1\right)$ gives ${x}^{3} - 3 {x}^{2} - 9 x + 27$
Try $x = 3$ in cubic gives $27 - 27 - 27 + 27 = 0$ so $x - 3$ is a factor
Dividing by $\left(x - 3\right)$ gives ${x}^{2} - 9$ which factors to $\left(x - 3\right) \left(x + 3\right)$