You've learned the difference-of-squares formula and the difference- and sum-of-cubes formulas. But how do you know which formula to use, and when to use it?
First off, to use any of these formulas, you have to have only two terms in your polynomial. If you've factored out everything you can and you're still left with two terms with a square or a cube in them, then you should look at using one of these formulas. For instance, 6x2 + 6x is two terms, but you can factor out a 6x, giving you 6x2 + 6x = 6x(x + 1). Since the bit inside the parentheses does not have a squared or a cubed variable in it, you can't apply any of these special factoring formulas. And you don't need to, since it's already fully factored — you can't go further than just plain old "x".
Content Continues Below
On the other hand, 2x2 – 162 = 2(x2 – 81), and x2 – 81 is a quadratic. When you see that you have a two-term non-linear polynomial, check to see if it fits any of the formulas. In this case, you've got a difference of squares, so apply that formula: 2x2 – 162 = 2(x2 – 81) = 2(x – 9)(x + 9).
Warning: Always remember that, in cases like 2x2 + 162, all you can do is factor out the 2; the sum of squares doesn't factor! 2x2 + 162 = 2(x2 + 81). (Your book may call x2 + 81 "prime", "unfactorable", or "irreducible". These terms all mean the same thing.)
There is one special case for applying these formulas. Take a look at x6 – 64. Is this expression a difference of squares, being ( (x3)2 – 82 ), or a difference of cubes, being ( (x2)3 – 43 )? Actually, it's both. You can factor this difference in either of two ways:
factoring a difference of squares, followed by factoring the difference and sum of cubes:
x6 – 64 = (x3)2 – 82
= (x3 – 8)(x3 + 8)
= (x3 – 23)(x3 + 23)
= (x – 2)(x2 + 2x + 4)(x + 2)(x2 – 2x + 4)
= (x – 2)(x + 2)(x2 + 2x + 4)(x2 – 2x + 4)
factoring a difference of cubes, followed by factoring the difference of squares:
x6 – 64 = (x2)3 – 43
= (x2 – 4)((x2)2 + 4x2 + 42)
= (x2 – 22)(x4 + 4x2 + 16)
= (x – 2)(x + 2)(x4 + 4x2 + 16)
= (x – 2)(x + 2)(x4 + 4x2 + 16)
You should get full credit for either answer, since you shouldn't be expected to know (or somehow to guess) that the quartic polynomial:
x4 + 4x2 + 16
(x2 + 2x + 4)(x2 – 2x + 4)
But if you happen to notice that a problem could be worked either way (as a difference of squares or as a difference of cubes), then you can see from the above example that it might be best to apply the difference-of-squares formula first. Doing the factoring of the difference of squares first means that you'll end up getting all four factors, not just three of them.
Since the hardest part of factoring usually comes in figuring out how to proceed with a given problem, below are some factoring examples, with an explanation of which way you need to go with it to arrive at the answer.
This polynomial has three terms, and the third term, 18, isn't a square of anything, so this isn't going to be a perfect-square trinomial. So I'll first try to factor the "usual" way.
For this quadratic, I'll need to find factors of 18 that add up to 11, and then fill in the parentheses. The factors will be 9 and 2 so, filling in my parentheses, I get:
x2 + 11x + 18
= (x + 2)(x + 9)
This quadratic has two terms, and nothing factors out of both terms, so I need to be thinking "difference of squares, or sum or difference of cubes", because these are the only patterns I have for two-term quadratics.
Since there are no cubes (and especially since the variable x is squared), I should look for a difference of squares. Sixteen is a square, and so is 49, so I'll apply the difference of squares formula to (4x)2 – 72:
16x2 – 49
= (4x)2 – 72
= (4x – 7)(4x + 7)
First, I'll see if anything factors out of both of these two terms. It turns out that I can factor out a 3x, giving me:
3x3 – 12x = 3x(x2 – 4)
This leaves me with two terms inside the parentheses, where the two terms have a subtraction in the middle, and the x is squared and the second term, the "4", can be expressed as a square; namely, 22:
x2 – 4 = x2 – 22
I can then apply the difference-of-squares formula to x2 – 22, to get:
x2 – 22 = (x – 2)(x + 2)
I need to be careful, after factoring the difference of sqaures, that I don't forget the factor of "3x" that I took out first, when I write my final answer.
3x(x – 2)(x + 2)
This is a quadratic with three terms. I'll factor it in the "usual" way:
x2 + 6x + 9
= (x + 3)(x + 3)
= (x + 3)2
You might also have noticed that this is a perfect square trinomial, from the fact that x2 is the square of x, 9 is the square of 3, and 2(x)(3) = 6x, which matches the middle term of the original quadratic. Notice that, had you noticed this right away, you might have shaved a few seconds off your time. Occasionally, this can prove helpful.
Content Continues Below
This has two terms, and there's nothing common to both terms, so I can't factor anything out.
However, this binomial is a difference. It's not a difference of squares, though; it's a difference of cubes. Twenty-seven is the cube of 3, and so is 8 is the cube of 2. Therefor, I can apply the difference-of-cubes formula to (3x)3 – 23.
27x3 – 8 = (3x)3 – 23
= (3x – 2) ((3x)2 + (3x)(2) + (2)2)
= (3x – 2)(9x2 + 6x + 4)
This has two terms, and a 7x comes out of both, giving me:
7x7 – 56x = 7x(x6 – 8)
Inside the parentheses, I still have two terms, and it's a difference. The first term, x6, could be a cube, (x2)3, or a square, (x3)2, but 8 can only be a cube, 23. So I'll apply the difference-of-cubes formula to (x2)3 – 23.
x6 – 8 = (x2)3 – 23
= (x2 – 2) ((x2)2 + (x2)(2) + (2)2)
= (x2 – 2)(x4 + 2x2 + 4)
Now I need to remember that 7x that I factored out at the beginning. Putting it all together, my answer is:
7x(x2 – 2)(x4 + 2x2 + 4)
This poly has two terms, and nothing factors out of both. The power on the variable is 9, which is a multiple of 3, so this could be a cube. (It certainly cannot be a square, and sums of squares don't factor anyway, so that's off the table).
I remember that I can put any power I feel like on 1, so I just have to figure out what to do with the x9.
Since the polynomial they gave me is a sum, not a difference, I have to hope that there is some way I can turn x9 into a cube. There is: I can apply the sum of cubes formula to:
x9 + 1 = (x3)3 + 13
(x3 + 1) ((x3)2 – (x3)(1) + (1)2)
= (x3 + 1)(x6 – x3 + 1)
Taking another look before I assume that I'm finished with this exercise, I notice that the first factor is itself a sum of cubes. So I can apply the sum of cubes formula again:
x3 + 1 = x3 + 13
= (x + 1) ((x)2 – (x)(1) + (1)2)
= (x + 1)(x2 – x + 1)
Putting it all together, I get a completely-factored answer of:
(x + 1)(x2 – x + 1)(x6 – x3 + 1)
Yes, this is needlessly complex, but you might see something like this in an extra-credit assignment.
This is just a big lumpy sum of cubes. I'll need to be very careful with my parentheses when applying the sum-of-cubes formula. As you can imagine, there are many opportunities for me to make mistakes.
(x + y)3 + (x – y)3
= [ (x + y) + (x – y) ] [ (x + y)2 – (x + y)(x – y) + (x – y)2 ]
= [ x + y + x – y ] [ (x + y)2 – (x2 – y2) + (x – y)2 ]
= [ 2x ] [ (x2 + 2xy + y2) – (x2 – y2) + (x2 – 2xy + y2) ]
= [ 2x ] [ x2 + 2xy + y2 – x2 + y2 + x2 – 2xy + y2 ]
= [ 2x ] [ x2 – x2 + x2 + 2xy – 2xy + y2 + y2 + y2 ]
= [ 2x ] [ x2 + 3y2 ]
This fits absolutely no patterns I've seen. What on earth am I supposed to do with this?
Well, for a start, I can notice that the first three terms are a quadratic in just one variable; namely, x. Also, I can notice that this quadratic is a perfect-square trinomial:
x4 + 8x2 + 16
= (x2)2 + 2(x2)(4) + (4)2
= (x2 + 4)2
In other words, they've given me a disguised difference of squares:
x4 + 8x2 + 16 – y2
= (x2 + 4)2 – y2
So I can apply the difference-of-squares formula to get:
(x2 + 4)2 – y2
[(x2 + 4) – y] [(x2 + 4) + y]
To successfully complete these problems, just take your time, and don't be afraid to try stuff, and to rely on your own instincts and common sense.