Department of Mathematics

Polynomials and Factoring

Worked Examples


Factoring a polynomial allows us to rewrite it in a more manageable form.

Remarks. For polynomials in one variable, finding the factors is equivalent to finding the roots: $x=a$ is a root of a polynomial $p(x)$ if and only if $(x-a)$ is a factor of $p(x)$.
A polynomial $p(x)$ of degree $n$ has at most $n$ roots, and so at most $n$ factors.

Example. Factor $p(x)=x^3-x^2-x+1$ and find its roots.

We find that: $p(x)=(x+1)(x-1)(x-1) \qquad$ (See Factoring Strategy 4 below.)
So, the roots of $p(x)$ are $x=-1$ and $x=1$.

Example. Factor $q(x)=x^3+x^2+x+1$ and find its roots.

We find that: $q(x)=(x+1)(x^2+1)$. So, the only root of $q(x)$ is $x=-1$.


Below is a mini lecture about factoring.

Factoring Strategies

Part 1. Common Factors

You can factor out use the distributive property:
$ab+ac = a(b+c)$
a number and/or a variable if all the terms are divisible by it.


$18a^4b^5c – 6a^3b^6c^2 + 3a^2c^7 = 3a^2c(6a^2b^5 - 2ab^6c + c^6)$ (Details) Each of the terms has coefficient divisible by $3$ and has $a^2c$ among its variables, so we can factor them out.


$(3y-5)(x+7)-z(x+7) = (3y-5-z)(x+7)$.

Part 2. Grouping Terms

In a polynomial with four or more terms, we can try grouping terms to achieve a common factor.

Example. Factor $2xy+3x-14y-21$.

$$\begin{align*} 2xy+3x-(14y+21) &= x(2y+3) -7(2y+3)\\ &=(x-7)(2y+3) \end{align*}$$

Part 3. Quadratic polynomials: $\; ax^2+bx+c$, $\; a \neq 0$

Case 1. $a=1$, i.e. we have a quadratic $x^2+bx+c$.

Then, we can try to factor $x^2+bx+c =(x+r)(x+s)$ for some numbers $r$ and $s$.

Note. $(x+r)(x+s)=x^2+(r+s)x+rs$. So, $r$ and $s$ must satisfy: $$\begin{align*} r+s&=b \\ r \cdot s&=c \end{align*}$$

Example. Factor $x^2+5x-6$.

$$x^2+5x-6=(x+6)(x-1)$$ (Details) We are looking for a pair of numbers whose product is $-6$, such as $(2,-3), (1,-6), (6,-1),(-2,3).$ They also have to add up to $5$. The only choice that satisfies both is $(6,-1)$.

Example. Solve the equation $x^2+x-12=0$.

After factoring, the equation becomes $(x+4)(x-3)=0$. So, the solutions are $x=-4$ and $x=3\;$ (respectively making the first and the second factor zero).

Case 2. $a \neq 1$

In general, if $a \neq 1$, we would hope to factor $$ax^2+bx+c=(px+r)(qx+s)$$ for some numbers $p, q, r, s$. (Details) Note that after expanding, $(px+r)(qx+s)=pqx^2+(ps+rq)x+rs$. So, we need $pq = a$, and $rs=c$.

Example. Factor $2x^2-7x-15$.

Case 3. The Quadratic formula

When factoring a quadratic polynomial $ax^2+bx+c$ proves difficult, we can use the following formula to find its roots:

Quadratic Formula: $$x=\frac{-b \pm \sqrt{b^2-4ac}}{2a}$$

Note: The expression $D=b^2-4ac$ is called the discriminant.
If $D>0$:the polynomial has two roots
$D=0$: the polynomial has one root
$D<0$: the polynomial has no roots

Example. Find the roots of: $15x^2 + x - 2$

Using the quadratic formula, we get: $$\begin{align*} x &=\frac{-1 \pm \sqrt{1-4(-2)(15)}}{2(15)} \\ &=\frac{-1 \pm \sqrt{121}}{30} \\ &=\frac{-12}{30},\frac{10}{30} \\ &=\frac{-2}{5},\frac{1}{3} \end{align*}$$
Case 4. Quadratic-type expressions

Factoring can sometimes be facilitated by recognizing the expression as being of a familiar type, for instance quadratic, after some substitutions if necessary.

Example. Factor $(x^4+3y)^2-(x^4+3y) – 6$

We observe that if we let $u=x^4+3y$, the expression is a quadratic polynomial in $u$, making it faster to factor: $$\begin{align*} u^2-u-6&=(u+2)(u-3) \\ &=(x^4+3y+2)(x^4+3y-3) \\ \end{align*}$$

Part 4. Factoring using roots.

Factoring polynomials in one variable of degree $2$ or higher can sometimes be done by recognizing a root of the polynomial. We then divide by the corresponding factor to find the other factors of the expression.

Example. Factor $p(x)=x^3-x^2-x+1$.

We notice that $p(-1)=0$, so $(x+1)$ is a factor.

Using long division, $(x^3-x^2-x+1)\div(x+1)=(x^2-2x+1)$.

The polynomial $x^2-2x+1$ in turn, fits into the perfect square formula (see the next section), so we get: $$(x^3-x^2-x+1)=(x+1)(x^2-2x+1)=(x+1)(x-1)^2$$
Note: Sometimes factoring makes division easier.


$$(x^2+7x+10)\div(x+2)=\frac{(x+2)(x+5)}{(x+2)} =x+5$$ Recognizing the special formulas in the next section can also aid in factoring.