Factoring polynomials
Writing an integer as a product of two or more integers is called factoring. For example, if we write $18$ as $2\cdot 9$, we say that we factored the number $18$. The two numbers $2$ and $9$ are called the factors. $18$ can also be written as $3\cdot6$, so now $3$ and $6$ are the factors of $18$.
Like integers, we can factor out polynomials, i.e., we can write a polynomial as a product of two or more polynomials. For example, we can write
$8x^3+4x=4x(2x+1)$. Here, a binomial is written as a product of a monomial and a binomial.
When factoring out a polynomial, first we need to find the greatest common factor.
The greatest common factor (GCF) is the largest factor that divides every term of a polynomial.
Example 1: Factor, $6c^2+8c^5$
Solution:
There are two terms in this problem, so we need to find the greatest common factor of the constants and of the variables.
For the constants $6$ and $8$, the GCF is $2$
For the variable $c$, the GCF is $c^2$, since $2$ is the smallest exponent of $c$ among the two terms.
Now, we can write,
$\begin{align*} 6c^2+8c^5 &=2\cdot 3 c^2+2\cdot4c^2c^3\\ &=2c^2(3+4c^3) \end{align*}$
Example 2: Factor, $12x^3y^2-48xy^5v^3$
Solution:
For the constants, GCF$=12$. For the variables, take the smallest exponents of $x$ and $y$. Since the variable $v$ is in only one of the terms, it has no common factor. So, GCF$=xy^2.$
$\begin{align*} 12x^3y^2-48xy^5v^3 &= 12x\cdot x^2y^2-12\cdot 4xy^2\cdot y^3v^3\\ &=12xy^2(x^2-4y^3v^3) \end{align*}$
Factoring by grouping
Sometimes we can factor a polynomial by splitting it into groups and factoring each group separately. This is called factoring by grouping.
Example 1: Factor, $5x^3-2x^2-15x+6$
Solution: Consider the polynomial as two groups, factor each group, and finally factor out the common factor from the groups.
There are four terms, so we group them two by two.
$\begin{align*} 5x^3-2x^2-15x+6 &= \underline{5x^3-2x^2}\:\:\underline{-15x+6}\\ &= x^2(5x-2)-3(5x-2)\\ &= (5x-2)(x^2-3) \end{align*}$
Example 2: Factor, $3y^4-5y^3+6y-10$
Solution: Group the terms two by two, factor each group, and finally factor out the common factor from the groups.
$\begin{align*} 3y^4-5y^3+6y-10 &= \underline{3y^4-5y^3}\:\:\underline{+6y-10}\\ &= y^3(3y-5)+2(3y-5)\\ &= (3y-5)(y^3+2) \end{align*}$
Factoring a trinomial
Suppose we have a trinomial $ax^2+bx+c$.
To factor it:
1. Multiply the coefficient of $x^2$ (that is, $a$) by the constant term $c$, and call the product $p$.
2. Find two numbers whose sum is $b$ (the coefficient of $x$) and whose product is $p$.
Example 1: Factor, $x^2-8x+15$
Solution:
Multiply the coefficient of $x^2$ and the constant term we get $1\cdot15=15$
Find the factors of $15$,
$(1,15),(3,5),(-1,-15),(-3,-5)$. Out of these, pick the pair that adds to $-8$.
That is $-3$ and $-5$
So, we can write,
$\begin{align*} x^2-8x+15 &= x^2-5x-3x+15 \\ &= x(x-5)-3(x-5)\\ &= (x-5)(x-3) \end{align*}$
Example 2: Factor, $6x^2-13x-5$
Solution:
Multiply the coefficient of $x^2$ and the constant: $6\cdot -5=-30$.
Find the factor pairs of $-30$. Since the number is negative, one factor of each pair must be negative:
$(1,-30),(2,-15),(3,-10),(5,-6)$ and $(-1,30),(-2,15),(-3,10),(-5,6)$
Now, pick the pair that adds to the coefficient of $x$, $-13$ — that is, $(2,-15)$.
So, now we can write,
$\begin{align*} 6x^2-13x-5 &= 6x^2+2x-15x-5 \\ &= 2x(3x+1)-5(3x+1)\\ &= (3x+1)(2x-5) \end{align*}$
Example 3: Factor, $24y^2-34y+12$
Solution:
In the trinomial above, there is a common constant factor, $2$, so factor it out first. Not every trinomial has a common constant factor, but if there is one, take it out first. So, we have,
$24y^2-34y+12 = 2(12y^2-17y+6)$
Now, factor the trinomial inside the parentheses.
Multiply the coefficient of $y^2$ by the constant term: $12\times 6=72$.
Find the factor pairs of $72$:
$(1,72),(2,36),(3,24),(4,18),(6,12),(8,9)$ and $(-1,-72),(-2,-36),(-3,-24),(-4,-18),(-6,-12),(-8,-9)$
Now, pick the pair that adds to $-17$ — that is, $(-8,-9)$.
Now,
$\begin{align*} 24y^2-34y+12 &= 2(12y^2-8y-9y+6)\\ &= 2(4y(3y-2)-3(3y-2)) \\ &=2(3y-2)(4y-3) \end{align*}$
Example 4: Factor, $-6x^2-7x+5$
Solution:
It is important that the coefficient of $x^2$ be positive. So, factor out the minus sign, using parentheses.
That is
$-6x^2-7x+5$=$-(6x^2+7x-5)$
Now, factor the trinomial within the parentheses.
Multiplying $6$ and $-5$, we get $-30$. Factoring this gives the pairs $(1,-30), (2,-15),(3,-10),(5,-6)$ and $(-1,30), (-2,15),(-3,10),(-5,6)$.
The two numbers that add to give $7$ are $-3$ and $10$. Therefore,
$\begin{align*} -6x^2-7x+5 &= -(6x^2-3x+10x-5)\\ &= -(3x(2x-1)+5(2x-1)) \\ &=-(2x-1)(3x+5) \end{align*}$
Factoring a perfect square trinomial
If we have a trinomial of the form $a^2+2ab+b^2$, we can write it as a perfect square:
$(a+b)^2$.
And a trinomial of the form $a^2-2ab+b^2$ as
$(a-b)^2$.
Example 1: Factor, $4y^2+20y+25$
Solution:
The $y^2$ term, $4y^2$, is a perfect square; taking its square root, we get $2y$. The constant term, $25$, is also a perfect square, and its square root is $5$.
Now take $2$ times the product of these square roots: $2\cdot2y\cdot5=10y$. Comparing this with the absolute value of the middle term (the $y$ term), we see that they are the same. So, we can write the trinomial as a perfect square:
$4y^2+20y+25 = (2y)^2+2\cdot 2y\cdot 5 +5^2$
The right-hand side is in the form $a^2+2ab+b^2$, with $a=2y$ and $b=5$, so we can write it as $(a+b)^2$.
Therefore,
$4y^2+20y+25 = (2y+5)^2$
Example 2: Factor, $9x^2-24xy+16y^2$
Solution:
The quadratic trinomial has two variables, $x$ and $y$. We can factor it the same way as a quadratic trinomial in one variable.
The first term is a perfect square, with square root $3x$, and the third term is also a perfect square, with square root $4y$. Now let us check whether $2$ times the product of these square roots equals the absolute value of the middle term: $2\cdot3x\cdot4y=24xy$, which is equal to the absolute value of the middle term. So, we can write the polynomial as a perfect square.
The trinomial is now in the form $a^2-2ab+b^2$, with $a=3x$ and $b=4y$. Therefore, we can write it as $(a-b)^2$.
That is, $9x^2-24xy+16y^2=(3x-4y)^2$
Difference of squares
$a^2-b^2=(a+b)(a-b)$.
Using this formula, we can factor binomials of this form.
Example 1: Factor $49-25y^2$
Solution:
We can write both terms as perfect squares and apply the difference-of-squares formula:
$\begin{align*} 49-25y^2 &=7^2-(5y)^2\\ &=(7+5y)(7-5y) \end{align*}$
Example 2: Factor completely $18y^4-162y^2$.
Solution:
In the polynomial, there are common factors that we can factor out. The greatest common factor is $18y^2$. Factoring that out,
$18y^4-162y^2=18y^2(y^2-9)$
The first term is already a perfect square, and we can write the second term as a perfect square too. Then, applying the formula,
$\begin{align*} 18y^4-162y^2 &=18y^2(y^2-3^2)\\ &=18(y+3)(y-3) \end{align*}$
Example 3: Factor completely $2w^4x^4-32w^4$.
Solution: The greatest common factor is $2w^4$. Factoring this out,
$2w^4x^4-32w^4=2w^4(x^4-16)$.
Now, we can write $16$ as $2^4$.
$2w^4x^4-32w^4=2w^4(x^4-2^4)$.
We can write $x^4=(x^2)^2$ and $2^4=(2^2)^2$. Therefore,
$2w^4x^4-32w^4=2w^4((x^2)^2-(2^2)^2)$.
Applying the difference of squares formula,
$2w^4x^4-32w^4=2w^4(x^2+2^2)(x^2-2^2)$
We can apply the same formula again to the last factor, $(x^2-2^2)$, and we get,
$2w^4x^4-32w^4=2w^4(x^2+4)(x+2)(x-2)$
Sum and difference of cubes
The following formulas are called the sum and difference of cubes:
$a^3+b^3=(a+b)(a^2-ab+b^2)$ and
$a^3-b^3=(a-b)(a^2+ab+b^2)$
Example: Factor $64-27u^3$.
Solution:
We can write $64$ as $4^3$ and the second term as $(3u)^3$. Then we can apply the difference-of-cubes formula:
$\begin{align*} 64-27u^3 &=4^3-(3u)^3\\ &=(4-3u)(4^2+4\cdot3u+(3u)^2)\\ &=(4-3u)(16+12u+9u^2)\\ \end{align*}$