Learning Outcomes
- Factor a difference of squares
- Factor a sum and a difference of cubes
We now have several methods in our factoring arsenal. We should always look for a greatest common factor of all terms first, then how we proceed is primarily determined by the number of terms we have. If we have 4 terms, we should look at factoring by grouping. When we have a trinomial function of the form [latex]f(x)=ax^2+bx+c[/latex] trial and error or the ac-method are well suited for factoring. In this section, we are going to consider binomial functions of a special type; the difference of squares, and the sum or difference of cubes.
Factoring a Difference of Squares
When we multiply two binomials, we usually end up with a trinomial. For example, [latex](x+3)(x-4)=x^2-x-12[/latex]. That is why we try to factor trinomials back into the product of two binomials. However, there is an occasion when the coefficients of the [latex]x[/latex]-terms end up with opposite signs and cancel each other out. For example, [latex](2x-3)(2x+3)=4x^2\color{blue}{+6x-6x}-9=4x^2-9[/latex]. When this happens we end up with a difference of two squares. [latex]4x^2=(2x)^2[/latex] and [latex]9=3^2[/latex].
In general,
[latex](a-b)(a+b)=a^2+ab-ab-b^2=a^2-b^2[/latex]
We can use this equation to factor any difference of squares.
factoring a difference of squares into binomials
- Confirm that the two terms are perfect squares: [latex]f(x)=a^2-b^2[/latex]
- Write the factored form as [latex]f(x)=\left(a-b\right)\left(a+b\right)[/latex].
Example 1
Factor [latex]f(x)=9{x}^{2}-25[/latex].
Solution
We have two terms and a difference. We need to check that [latex]9x^2[/latex] and [latex]25[/latex] are perfect squares.
[latex]9{x}^{2}=3^2x^2=(3x)^2[/latex] and [latex]25=5^2[/latex] so they are both perfect squares.
Please note that [latex]3^2x^2=3\cdot3\cdot x\cdot x=3\cdot x\cdot 3\cdot x=(3x)(3x)=(3x)^2[/latex].
The binomial [latex]9{x}^{2}-25[/latex] represents a difference of squares and can be rewritten as [latex]\left(3x-5\right)\left(3x + 5\right)[/latex].
Consequently,
[latex]\begin{aligned}f(x)&=9{x}^{2}-25\\&=\left(3x-5\right)\left(3x + 5\right)\end{aligned}[/latex]
Try It 1
Factor:
1. [latex]f(x)=81{y}^{2}-100[/latex]
2. [latex]g(x)=100-9x^2[/latex]
3. [latex]h(x)=36x^2-49[/latex]
4. [latex]f(x)=4x^2+9[/latex]
Did you notice that the sum of squares [latex]a^2+b^2[/latex] is prime? Only the difference of squares factors.
sum of squares
For all values [latex]a, b[/latex],
[latex]a^2+b^2[/latex] is prime
Sometimes we have a greatest common factor to deal with before we have the difference of two squares.
Example 2
Factor [latex]f(x)=3x^2-48[/latex]
Solution
We have a difference of two terms but neither [latex]3x^2[/latex] nor [latex]48[/latex] are perfect squares. However, they do have a common factor of 3: [latex]3x^2=3\cdot x^2[/latex] and [latex]48=3\cdot 16[/latex]. After “pulling out” the GCF 3, we are left with the difference of two squares.
[latex]\begin{aligned}f(x)&=3x^2-48\\&=3(x^2-16)\\&=3(x^2-4^2)\\&=3(x-4)(x+4)\end{aligned}[/latex]
Try It 2
Factor:
1. [latex]f(x)=5x^2-20[/latex]
2. [latex]g(x)=-7x^2+63[/latex]
3. [latex]h(x)=-32x^2-72[/latex]
Perfect squares always have an exponent that is divisible by 2. For example, [latex](x^2)^2=x^4[/latex]; [latex](x^3)^2=x^6[/latex]; [latex](x^5)^2=x^{10}[/latex]; 4, 6, and 10 are all divisible by 2. So the difference of two squares can be applied when exponents are even.
Example 3
Factor [latex]f(x)=16x^4-1[/latex]
Solution
[latex]16x^4=4\cdot 4\cdot x^2\cdot x^2=(4x^2)(4x^2)=(4x^2)^2[/latex] so is a perfect square.
[latex]\begin{aligned}f(x)&=16x^4-1\\&=(4x^2)^2-1^2\\&=(4x^2-1)(4x^2+1)\;\;\;\;\;\text{We are not done! } 4x^2-1\text{ is the difference of two squares.}\\&=(2x-1)(2x+1)(4x^2+1)\end{aligned}[/latex]
Try It 3
Factor:
1. [latex]f(x)=25x^4-81[/latex]
2. [latex]g(x)=x^4-16[/latex]
Factoring the Sum and Difference of Cubes
Another binomial form that can be factored is the sum or difference of cubes. When we multiply a binomial and a trinomial we usually end up with a polynomial with 4 terms. Occasionally, some of the terms get cancelled out and we end up with the sum or difference of two cubes, [latex]a^3+b^3[/latex] or [latex]a^3-b^3[/latex]. Although the sum of two squares cannot be factored, the sum of two cubes can be factored into a binomial and a trinomial.
factoring the Sum and Difference of Cubes
For all values [latex]a, b[/latex]:
Notice the pattern of + and – signs in the formulas.
Example 4
Factor [latex]f(x)={x}^{3}+512[/latex].
Solution
[latex]{x}^{3}[/latex] and [latex]512=8^3[/latex] are perfect cubes.
The sum of cubes formula says [latex]a^b+b^3=(a+b)(a^2-ab+b^2)[/latex] [latex]\left(x+8\right)\left({x}^{2}-8x+64\right)[/latex].
So with [latex]a=x[/latex] and [latex]b=8[/latex], we get:
[latex]\begin{aligned}f(x)&={x}^{3}+512\\&=(x+8)(x^2-8x+64)\end{aligned}[/latex]
Analysis of the Solution
After writing the sum of cubes this way, we may need to think whether the binomial and trinomial can be factored further. For this example, both the binomial and trinomial are prime.
Try It 4
Factor the sum of cubes [latex]f(x)=216{a}^{3}+{b}^{3}[/latex].
Example 5
Factor [latex]g(x)=8{x}^{3}-125[/latex].
Solution
Notice that [latex]8{x}^{3}=(2x)^3[/latex] and [latex]125=5^3[/latex] are perfect cubes. Therefore, we have the difference of two cubes.
The formula says [latex]a^3-b^3=(a-b)(a^2+ab+b^2)[/latex], so writing [latex]a=2x[/latex] and [latex]b=5[/latex]:
[latex]\begin{aligned}f(x)&=8x^3-125\\&=(2x)^3-5^3\\&=\left(2x - 5\right)\left(4{x}^{2}+10x+25\right)\end{aligned}[/latex].
Analysis of the Solution
Just as with the sum of cubes, the trinomial factor is always prime so there is no more factoring to be done.
Try It 5
Factor:
1. [latex]f(x)=1,000{x}^{3}-1[/latex]
2. [latex]g(x)=27x^3-8[/latex]
3. [latex]h(x)=64x^3+125[/latex]
Remember that we should always look for a GCF between terms when we are factoring.
Example 6
Factor [latex]f(x)=128x^4-54x[/latex]
Solution
First, notice that there is a common factor of [latex]2x[/latex].
[latex]\begin{aligned}f(x)&=128x^4-54x\\&=2x(64x^3-27)\\&=2x\left ((4x)^3-3^3\right )\\&=2x(4x-3)(16x^2+12x+9)\end{aligned}[/latex]
Try It 6
Factor:
1. [latex]f(x)=500x^5+4x^2[/latex]
2. [latex]g(x)=-16x^4-2x[/latex]
3. [latex]h(x)=108+32x^3[/latex]