# How do I factor a polynomial (e.g. cubic)?

Jun 10, 2015

I will assume that you mean "How do I factor a cubic polynomial?" since the question is too general otherwise. The answer is still "It depends", but see the Explanation...

#### Explanation:

Suppose you are asked to factor $f \left(x\right) = a {x}^{3} + b {x}^{2} + c x + d$ for some integers $a$, $b$, $c$ and $d$.

If $a$, $b$, $c$ and $d$ are all divisible by some integer $k > 1$, then separate that out as a factor before getting into serious factoring:

Let $a ' = \frac{a}{k}$, $b ' = \frac{b}{k}$, $c ' = \frac{c}{k}$, $d ' = \frac{d}{k}$, then

$f \left(x\right) = k \cdot \left(a ' {x}^{3} + b ' {x}^{2} + c ' x + d '\right)$,

where $a ' , b ' , c ' , d '$ are integers.

So we can reduce the problem to factoring with no common scalar factor.

Case 1:

If $a + b + c + d = 0$ then $f \left(1\right) = 0$
and $\left(x - 1\right)$ is a factor of $f \left(x\right)$.

$a {x}^{3} + b {x}^{2} + c x + d$

$= \left(x - 1\right) \left(a {x}^{2} + \left(a + b\right) x + \left(a + b + c\right)\right)$

I'll leave any further factoring of the quadratic factor to you.

Case 2:

If $a - b + c - d = 0$ then $f \left(- 1\right) = 0$
and $\left(x + 1\right)$ is a factor of $f \left(x\right)$.

$a {x}^{3} + b {x}^{2} + c x + d$

$= \left(x + 1\right) \left(a {x}^{2} - \left(a - b\right) x + \left(a - b + c\right)\right)$

Case 3:

If $a : b$ is the same ratio as $c : d$ then $f \left(x\right)$ factors by grouping:

$a {x}^{3} + b {x}^{2} + c x + d$

$= \left(a {x}^{3} + b {x}^{2}\right) + \left(c x + d\right)$

$= {x}^{2} \left(a x + b\right) + \frac{c}{a} \left(a x + b\right)$

$= \left({x}^{2} + \frac{c}{a}\right) \left(a x + b\right)$

If $\frac{c}{a} \le 0$ then this factors further as

$= \left(x - \sqrt{- \frac{c}{a}}\right) \left(x + \sqrt{- \frac{c}{a}}\right) \left(a x + b\right)$

Case 4:

If $f \left(x\right) = 0$ has rational roots then (by the rational roots theorem) they are all of the form $\frac{p}{q}$ in lowest terms such that $p$ is a divisor of $d$ and $q$ is a divisor of $a$. this gives a finite number of possible values to try.

For example, if $f \left(x\right) = 2 {x}^{3} - 11 {x}^{2} + 17 x - 6$, then the possible roots of $f \left(x\right) = 0$ to try are $\pm \frac{1}{2}$, $\pm 1$, $\pm \frac{3}{2}$, $\pm 2$, $\pm 3$, $\pm 6$

If you find one root, then it yields a linear factor, which you can divide $f \left(x\right)$ by to leave a simpler polynomial to factor.

Case 5:

If $f \left(x\right) = 0$ has no rational roots, first, divide $f \left(x\right)$ through by $a$ to yield a cubic of the form ${x}^{3} + a ' {x}^{2} + b ' x + c '$, then substitute $x ' = x + \frac{a '}{3}$ to get a cubic of the form $x {'}^{3} + A x ' + B$. Then apply Cardano's Method. This will yield an expression for a real root of $f \left(x\right) = 0$ involving cube and square roots. It's all a bit messy, but it will give you a linear factor of $f \left(x\right)$ with real coefficients.