# How do you factor completely P(x)=x^3+2x^2-x-2?

##### 1 Answer
Dec 31, 2016

$\left(x - 1\right) \left(x + 2\right) \left(x + 1\right)$

#### Explanation:

Spotting that $1 + 2 - 1 - 2 = 0$ means that $x - 1$ is a factor.
Then write ${x}^{3} + 2 {x}^{2} - x - 2 \equiv \left(x - 1\right) \left(\ldots {x}^{2} \ldots x \ldots\right)$ and try to fill in the gaps to make the identity true by matching powers. Obviously the coefficient of ${x}^{2}$ has to be $1$, and similarly the constant at the end has to be $+ 2$:

$\left(x - 1\right) \left({x}^{2.} \ldots x + 2\right)$

Since we have got $+ 2 x$ and need $- x$ we need a $+ 3 x$ added in:
$\left(x - 1\right) \left({x}^{2} + 3 x + 2\right)$ which checks out upon multiplying out.
The second bracket then factorizes easily to $\left(x + 2\right) \left(x + 1\right)$.