# How do you factor f(x)=x^3+3x^2-12x-18?

Dec 31, 2015

$f \left(x\right) = \left(x - 3\right) \left(x + 3 + \sqrt{3}\right) \left(x + 3 - \sqrt{3}\right)$

#### Explanation:

To factorize a n-degree-polynomial function, one must discover its roots that will allow to rearrange the function in this way
f(x)=(x-x_1)(x-x_2)[...]"(x-x_n)

For a polynomial of the third degree, when all coefficients are real numbers, there's at least one real root. The other two roots are either real numbers or complex conjugate numbers.

For a general solution of roots of the third degree, requiring some ability to work with complex numbers, I recommend this source:
Roots of a cubic function

But we can try to resolve the problem in the easy way.

The coefficient d may help us to find at least one real root.
$d = 18 = 2 \cdot {3}^{2}$
This is why we should try the numbers 1, 2, 3, 6, 9, 18 and 1/2, 1/3, 1/6, 1/9 and 1/18 to verify if at least one of them is a root of the function.

In the present case, we discover that 3 is a root (${x}_{1} = 3$) of the function:
$f \left(x = 3\right) = 27 + 3 \cdot 9 - 12 \cdot 3 - 18 = 27 + 27 - 36 - 18 = 0$

Then we should divide the polynomial by $\left(x - {x}_{1}\right) = \left(x - 3\right)$:
$\text{ "x^3+3x^2-12x-18" }$|$\text{ } x - 3$
$- {x}^{3} + 3 {x}^{2} \text{ }$|____
___" "x^2+6x+6
$\text{ } 6 {x}^{2} - 12 x$
$\text{ } - 6 {x}^{2} + 18 x$
$\text{ }$
__
$\text{ } 6 x - 18$
$\text{ } - 6 x + 18$
$\text{ }$
_____
$\text{ } 0$

The second degree factor can still be further factorized:
${x}^{2} + 6 x + 6 = 0$
$\Delta = 36 - 24 = 12$
$x = \frac{- 6 \pm 2 \cdot \sqrt{3}}{2}$ => ${x}_{2} = - 3 - \sqrt{3}$; ${x}_{3} = - 3 + \sqrt{3}$

Then the function factorized is
$f \left(x\right) = \left(x - {x}_{1}\right) \left(x - {x}_{2}\right) \left(x - {x}_{3}\right) = \left(x - 3\right) \left(x + 3 + \sqrt{3}\right) \left({x}_{3} + 3 - \sqrt{3}\right)$