# Factor by Grouping, Part Two

Reference > Mathematics > Algebra > Factoring Higher Degree PolynomialsIn the previous section you learned about factoring higher degree polynomials by grouping the terms into binomials or trinomials, depending on the patterns you noticed in the structure of the polynomial. Sometimes you need to get more aggressive, looking to group terms in ways that are not so obvious. And sometimes you might even have to rearrange terms to perform the groupings you want.

The goal in this section is to look for groups of terms that look like they could be factored as a whole, and then try to combine them with other terms or groups of terms that might lead to an overall factoring. Sounds complicated? Well, let's try a few examples.

**Example One**

Factor x^{2} + 4x - a^{2} + 4

**Solution**

It seems fairly evident that grouping this by pairs is not going to work, and we certainly can't group into trinomials, because the number of terms isn't a multiple of 3!

However, as I look at this, it occurs to me that three of those terms, when taken together, form a very nice quadratic in x:

x^{2} + 4x + 4

So let's rearrange the terms and group:

(x^{2} + 4x + 4) - a^{2}

(x + 2)^{2} - a^{2}

Now we have a difference of squares. The first term is the square of (x + 2), and the second term is the square of a. This leads to:

(x + 2 + a)(x + 2 - a)

**Example Two**

Factor x^{6} - 2x^{5} + 2x^{4} - 4x^{3} + x^{2} + 2

**Solution**

At first glance, it looks like this will work nicely to divide into binomials:

(x^{6} - 2x^{5}) + (2x^{4} - 4x^{3}) + (x^{2} + 2)

x^{5}(x - 2) + 2x^{3}(x - 2) + 1(x^{2} + 2)

Uh oh...that last (x^{2} + 2) doesn't match the (x - 2) in the other groups, so we can't factor anything out. We're stuck.

However, as I look at this, I notice that the last group skips an exponent, and that makes me wonder if I can rearrange the polynomial so all the groups skip an exponent:

(x^{6} + 2x^{4}) - (2x^{5} + 4x^{3}) + (x^{2} + 2)

x^{4}(x^{2} + 2) - 2x^{3}(x + 2) + (x^{2} + 2)

(x^{2} + 2)(x^{4} -2x^{3} + 1)

**Example Three**

x^{4} - 2x^{2}y^{2} + y^{4} - y^{2}

**Solution**

I can see right away that the first three terms form a perfect square trinomial:

(x^{4} - 2x^{2}y^{2} + y^{4}) - y^{2}

(x^{2} - y^{2})^{2} - y^{2} <= difference of squares!

(x^{2} - y^{2} + y)(x^{2} - y^{2} - y)

**Example Four**

x^{4} - 6x^{2}y^{2} + y^{4}

**Solution**

This one looks a bit baffling to start out, and there's an intuitive leap that has to be taken here to factor this. I think to myself, "If only that -6x^{2}y^{2} was -2x^{2}y^{2}, then I could factor it." So then I think, "Well, why not? Let's break that 6x^{2}y^{2} up into two pieces!"

x^{4} - 2x^{2}y^{2} + y^{4} - 4x^{2}y^{2}

Now factor the first three terms:

(x^{2} - y^{2})^{2} - (2xy)^{2} <= and look at that - a difference of squares!

(x^{2} + 2xy - y^{2})(x^{2} - 2xy - y^{2})

**Example Five**

Factor x^{3} + 3x^{2} + 3x + 1

**Solution**

If you've been around higher degree polynomials very long, you probably know that this is (x + 1)^{3}, but can we use our grouping methods to figure this out?

Unfortunately, grouping in pairs, as it is written, isn't going to help us, but maybe if we get really creative with our groupings...

(x^{3} + 1) + (3x^{2} + 3x)

Why did I group this way? Because I noticed that I now have a sum of cubes, and I thought something interesting might happen with that...

(x + 1)(x^{2} - x + 1) + 3x(x + 1)

Nice! I have a common factor (x + 1) which I can factor out:

(x + 1)(x^{2} - x + 1 + 3x)

(x + 1)(x^{2} +2x + 1)

(x + 1)(x + 1)^{2}

(x + 1)^{3}

The tricky thing about these grouping and factoring methods is: some polynomials are not factorable, which means no matter what you try, you won't be able to find a grouping that helps. And even if it is factorable, there may not be an obvious (or even unobvious) grouping method to help you factor it. In the problems below, we've only given you problems which can be solved using creative regrouping.

## Questions

^{2}- (a - x)

^{2}

^{2}- y

^{2}+ 2x - 4y - 3 (Hint: split the -3 up to create two perfect-square quadratics)

^{6}+2x

^{5}- 4x

^{4}- 8x

^{3}+ x

^{2}- 4

^{3}- 3a

^{2}b + 3ab

^{2}- b

^{3}- 1

^{4}+ 4x

^{3}- 16x - 16