# Factoring $x^3-8$ by grouping

I'm trying to factor by grouping. It worked for me with polynomial division, but I can't get it to work by grouping.

$$x^3-8$$

The answer should be $(x−2)(x^2+2x+4)$.

So first, the groups are:

$$(x^3 + 0x^2) + (0x - 8)$$

Take the factors out:

$$x^2(x + 0) + 1(0x - 8)$$

Then:

$$(x^2 + 1) + (x + 0) + (0x - 8)$$ So:

$$x^2+x-7$$

It is clearly wrong by now. But what did I miss?

• You went from $x^2(x + 0) + 1(0x - 8)$ to $(x^2 + 1) + (x + 0) + (0x - 8)$. This is where your mistake occurs, but I can't see what it was you were trying to do. – Michael Albanese Aug 21 '14 at 22:44
• Try $x^3-8 = (x^3 - 2x^2) + (2x^2 - 8)$ – Winther Aug 21 '14 at 22:47
• @Winther that works - but how did you figure that? Just made up? – Zol Tun Kul Aug 21 '14 at 22:52
• Here is how I think (with one more step than given in my comment above): I see that $x=2$ is a solution of $x^3-8=0$, thus I want to factor $x-2$ out. I therefore write $x^3-8 = (x^3 - 2x^2) + (2x^2 - 4x) + (4x - 8) = x^2(x-2) + 2x(x-2) + 4(x-2) = (x-2)(x^2+2x+4)$ (I choose $2x^2$ and $4x$ because I want every $(\cdot)$-term to give an $x-2$ as a factor) – Winther Aug 21 '14 at 23:23

The problem is with the third step. Generally, when we talk about factoring by grouping, we want the stuff in brackets to match exactly, so that we can factor them out. For example: $$7x(Ax + B) - 3(Ax + B) = (7x - 3)(Ax + B)$$

If we really want to factor the given binomial by grouping (not recommended!), then notice that: \begin{align*} x^3 - 8 &= (x^3 + 2x^2 + 4x) + (-2x^2 - 4x - 8) \\ &= x(x^2 + 2x + 4) - 2(x^2 + 2x + 4) \\ &= (x - 2)(x^2 + 2x + 4) \\ \end{align*} I admit that the first step is not very intuitive.

• Sorry, how did you realize that $x^3 - 8 = (x^3 + 2x^2 + 4x) + (-2x^2 - 4x - 8)$? – Zol Tun Kul Aug 21 '14 at 22:49
• Well it's easy to see that the equation is true, since the extra terms just cancel out. But as I noted, figuring out how to add zero in a clever way is certainly nontrivial. Instead, you should probably be using something like the Factor Theorem, observing that $2$ is an $x$-intercept of $y = x^3 - 8$, and then performing long division to divide the binomial by $x - 2$. – Adriano Aug 21 '14 at 22:52
• You should never use grouping for this problem, just as you should never use grouping for factoring a difference of squares. You should simply memorize the (very easy) formulas $$a^2-b^2 =(a-b)(a+b)$$ and $$a^3\pm b^3 =(a\pm b)(a^2\mp ab -b^2)$$ – MPW Aug 21 '14 at 22:59
• Whoops, my comment should have been with the original question, not your answer. Sorry! – MPW Aug 21 '14 at 23:29

If you know that you will have an $(x - 2)$ factor (which you can see by setting $(x^3 - 8)$ equal to $0$ and solving $x^3 = 8$ for the simple real solution $x = 2$), then let's work toward isolating the $(x - 2)$:

$$x^3 - 8$$

Here I know that I will want to end up with $(x^2)(x - 2) + ...$, so I know I will have a $-2x^2$ component. Then, since I will need a $+2x^2$ component to cancel that, I know that I will want to have a $(2x)(x - 2) + ...$, so I will need a $+4x$ component to cancel the $-4x$:

$$x^3 + (-2x^2 + 2x^2) + (-4x + 4x) - 8$$

Associating:

$$(x^3 + -2x^2) + (2x^2 + -4x) + (4x - 8)$$

Rewriting to clarify $(foo + -bar)$:

$$(x^3 - 2x^2) + (2x^2 - 4x) + (4x - 8)$$

Factoring:

$$(x^2)(x - 2) + (2x)(x - 2) + 4(x - 2)$$

Un-distributing:

$$(x^2 + 2x + 4)(x - 2)$$

Commuting:

$$(x - 2)(x^2 + 2x + 4)$$