###### Example7.2.2

Suppose we must factor $$x^3-3x^2+5x-15\text{.}$$ Note that there are four terms, and they are written in descending order of the powers of $$x\text{.}$$ “Grouping” means to group the first two terms and the last two terms together:

\begin{align*} x^3-3x^2+5x-15\amp=\left(x^3-3x^2\right)+(5x-15)\\ \end{align*}

Now, each of these two groups has its own greatest common factor we can factor out:

\begin{align*} \amp=\highlight{x^2}(x-3)\highlight{{}+5}(x-3)\\ \end{align*}

In a sense, we are “lucky” because we now see matching binomials that can themselves be factored out:

\begin{align*} \amp=\highlight{x^2}\attention{\overbrace{(x-3)}}\highlight{{}+5}\attention{\overbrace{(x-3)}}\\ \amp=(x-3)\highlight{\left(x^2+5\right)} \end{align*}

And so we have factored $$x^3-3x^2+5x-15$$ as $$(x-3)\left(x^2+5\right)\text{.}$$ But to be sure, if we multiply this back out, it should recover the original $$x^3-3x^2+5x-15\text{.}$$ To confirm your answers are correct, you should always make checks like this.

in-context