# Factorising polynomials resulting in surds

I am trying to factorise $x^2-18x+60$. Wolfram Alpha tells me this factorises to $(x-\sqrt21-9)(x+\sqrt21-9)$, but what technique should I be using to find this myself?

-
Completing the square – Hagen von Eitzen Aug 17 '13 at 15:27
Alternatively, use the quadratic formula and then recall that $(x-a)$ divides $p(x)$ where $a$ is a root of the polynomial $p$. – Dan Rust Aug 17 '13 at 15:41

$$x^2-18x+60=x^2-2\cdot x\cdot9+9^2+60-9^2=(x-9)^2-(\sqrt{21})^2$$
Now use $a^2-b^2=(a+b)(a-b)$
If you have a quadratic of the shape $x^2+px+q$, and $\alpha$ and $\beta$ are the roots of the equation $x^2+pq=0$, then $$x^2+px+q=(x-\alpha)(x-\beta).$$ How you find the roots is up to you. The most mechanical way to do it is to use the Quadratic Formula.