# Factoring Calculator

Instructions: Use this factor calculator to do a factor decomposition of any polynomial you provide in the form box below.

Enter the polynomial you want to factor (Ex: p(x) = x^3 + 8/3 x^2 - 5x + 4/3, etc.)

## Polynomial Factor Calculator

This factoring calculator with steps will allow you to find the factor completely a given polynomial that you provide, showing all the steps of the process.

The polynomial you provide needs to be a valid one, something simple like p(x) = x^3 - x + 1, or it can be more complicated, with coefficients that are fractions or any valid numeric expression .

Once you provide a valid polynomial, you can proceed to click on the "Calculate" button, and you will be provided with all the step-by-step run of the process required to factor completely the provided polynomial, a process that can be fairly laborious is done by hand, especially when the degree of the polynomial is high.

There is absolutely no way that to overstate the importance of how knowing how to factor polynomials, as they are in the center of many applications in Algebra, Calculus, Finance and Engineering.

## How to factor polynomials?

Except for quadratic polynomials, factoring polynomials is not necessarily easy, and it can potentially bring difficulties when done by hand. There are a number of steps you should follow in order improve your changes of at least finding some of the factors

## Steps of the factor calculator

• Step 1: Identify the expression you are working with, simplify it as much as possible, and make sure it is a polynomial. If it is not a polynomial, then there is no definite approach to follow
• Step 2: Once you have a simplified polynomial, take notice of its degree. If it is quadratic (degree 2), you can use the quadratic formula to find its factors
• Step 3: If the degree of the polynomial is 3 or higher, check for the constant coefficient, if it is zero, it means you can factor x out, and reduce the degree of the polynomial that remains to be factor
• Step 4: After completing Step 4, you need to test for simple root candidates using the rational zero theorem. If you find any rational root, those are factors of the form (x - a) (where a is a rational root), and then you divide the polynomial by these factors, so you reduce the degree of the polynomial you need to factor
• Step 5: Repeat the previous steps until you either have a complete factorization, or you cannot do any further reduction

There is one thing that although is technical, it needs to be mentioned: the factoring is done over a field, which is a type of Algebraic Structure. Normally, the field we use is the field of real numbers.

If we use the factor calculator for the real numbers field, then not all factors will be of the form $$x - a$$, as we also may have quadratic factors, which are irreducible on the real field. For example, $$x^2 + x + 10$$ cannot be reduced into real linear factors, because the quadratic equation $$x^2 + x + 10 = 0$$ has complex roots.

So in Step 3, when dealing with a quadratic function, the factor may be itself, if its roots are complex.

## Factors and Roots

The way to use a factoring calculation process is to essentially either attempt different types of factoring exploiting certain symmetries or by finding roots. Finding symmetries is not a certain thing, as it truly depends on specific regularities that can be found, which are not common to all polynomials.

Factoring by inspection or by grouping are commonly attempted, but those require specific patterns that are not always there. It is worth it to inspect a polynomial to see if something direct can be done, but the approach of factoring by finding roots is more systematic, and will work in more cases than the inspection methods will.

## Common mistakes to avoid

It is crucial to understand that factor a polynomial is tightly related to finding its root, which is all encompassed in the factor theorem. So, knowing how to factor relies on your ability of knowing how to find roots of a polynomial.

There won't be a formula, unless you are dealing with a quadratic function. For higher degrees, you have different alternatives: you can use the systematic process described above, or you can try to guess and try to do factoring by inspection, or try to use other alternatives like factoring by grouping.

### Example: Polynomial Factors

Factor completely: $$p(x) = x^5 - 3x^4 + 3x^3 - 3x^2 + 2x$$

Solution: The following polynomial has been provided: $$\displaystyle p(x) = x^5-3x^4+3x^3-3x^2+2x$$, which needs to be fully factored on the real numbers.

Initial Step: The provided polynomial expression is irreducible, so there is nothing to simplify. We can proceed to factor it.

Observe that the degree of the given polynomial is $$\displaystyle deg(p) = 5$$, its leading coefficient is $$\displaystyle a_{5} = 1$$ and its constant coefficient is $$\displaystyle a_0 = 0$$.

Rational Roots Candidates: Since the first term with a non-zero coefficient in $$p(x)$$ is $$x$$, we can factor this term out to get

$\displaystyle p(x) = x^5-3x^4+3x^3-3x^2+2x = x \left(x^4-3x^3+3x^2-3x+2 \right)$

but the term in parenthesis has degree that is higher than 2, so there is no elementary formula to factor it. We need to test for possible rational roots.

The next task is to find the integer numbers that divide the leading coefficient $$a_{4}$$ and the constant coefficient $$a_0$$, that will be used to construct our candidates to be zeroes of the polynomial equation.

▹ The dividers of $$a_{4} = 1$$ are: $$\pm 1$$.

▹ The dividers of $$a_0 = 2$$ are: $$\pm 1,\pm 2$$.

Therefore, dividing each divider of the constant coefficient $$a_0 = 2$$ by each divider of the leading coefficient $$a_{4} = 1$$, we find the following list of candidates to be roots:

$\pm \frac{ 1}{ 1},\pm \frac{ 2}{ 1}$

Now, all the candidates need to be tested to see if they are a solution. The following is obtained from testing each candidates:

$\begin{array}{ccccclcc} x & = & \displaystyle -1 &:& & \displaystyle \left(-1\right)^4-3\cdot \left(-1\right)^3+3\cdot \left(-1\right)^2-3\cdot \left(-1\right)+2 & = & \displaystyle 12 \ne 0 \\\\ x & = & \displaystyle 1 &:& & \displaystyle 1^4-3\cdot 1^3+3\cdot 1^2-3\cdot 1+2 & = & \displaystyle 0 \\\\ x & = & \displaystyle -2 &:& & \displaystyle \left(-2\right)^4-3\cdot \left(-2\right)^3+3\cdot \left(-2\right)^2-3\cdot \left(-2\right)+2 & = & \displaystyle 60 \ne 0 \\\\ x & = & \displaystyle 2 &:& & \displaystyle 2^4-3\cdot 2^3+3\cdot 2^2-3\cdot 2+2 & = & \displaystyle 0 \\\\ \end{array}$

Polynomial Division: Since we don't have enough roots among the rational candidates, we will divide $$\displaystyle x^4-3x^3+3x^2-3x+2$$ by the product of the factors derived from the rational roots, which is $$\displaystyle \left(x-1\right)\left(x-2\right)$$.

Step 1: The leading term of the dividend $$\displaystyle p(x) = x^4-3x^3+3x^2-3x+2$$ is $$\displaystyle x^4$$, whereas the leading term for the divisor $$\displaystyle s(x) = x^2-3x+2$$ is equal to $$\displaystyle x^2$$.

So then, the term we need to multiply $$x^2$$ to get to the leading term of the dividend is $$\displaystyle \frac{ x^4}{ x^2} = x^2$$, so we add this term to the quotient. Also, we multiply this by the divisor to get $$\displaystyle x^2 \cdot \left(x^2-3x+2\right) = x^4-3x^3+2x^2$$, which we need to subtract to the dividend:

$\def\arraystretch{1.5}\begin{array}{rccccc} &\displaystyle x^2 & \displaystyle & \displaystyle &&\\[0.3em] \hline x^2-3x+2\,) & \displaystyle x^4 & \displaystyle -3x^3 & \displaystyle +3x^2 & \displaystyle -3x & \displaystyle +2\\[0.3em] \displaystyle &\displaystyle -x^4 & \displaystyle +3x^3 & \displaystyle -2x^2 & \displaystyle & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle & \displaystyle x^2 & \displaystyle -3x & \displaystyle +2\\[0.3em] \end{array}$

Step 2: In this case, the leading term of the current remainder $$\displaystyle x^2-3x+2$$ is $$\displaystyle x^2$$, and we know the leading term for the divisor is $$\displaystyle x^2$$.

So then, the term we need to multiply $$x^2$$ to get to the leading term of the of current remainder is $$\displaystyle \frac{ x^2}{ x^2} = 1$$, so we add this term to the quotient. Also, we multiply this by the divisor to get $$\displaystyle 1 \cdot \left(x^2-3x+2\right) = x^2-3x+2$$, which we need to subtract to the current reminder:

$\def\arraystretch{1.5}\begin{array}{rccccc} &\displaystyle x^2 & \displaystyle & \displaystyle +1&&\\[0.3em] \hline x^2-3x+2\,) & \displaystyle x^4 & \displaystyle -3x^3 & \displaystyle +3x^2 & \displaystyle -3x & \displaystyle +2\\[0.3em] \displaystyle &\displaystyle -x^4 & \displaystyle +3x^3 & \displaystyle -2x^2 & \displaystyle & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle & \displaystyle x^2 & \displaystyle -3x & \displaystyle +2\\[0.3em] \displaystyle &\displaystyle & \displaystyle & \displaystyle -x^2 & \displaystyle +3x & \displaystyle -2\\[0.3em] \hline \displaystyle & & & & & 0\\[0.3em] \end{array}$

Therefore, the quotient is $$\displaystyle q(x) = x^2+1$$, and the remainder is $$\displaystyle r(x) = 0$$.

So after dividing, we have advanced in the factorization with

$\displaystyle p(x) = x^5-3x^4+3x^3-3x^2+2x = x \left(x-1\right)\left(x-2\right) \left(x^2+1\right)$

But now, since the quotient found $$\displaystyle x^2+1$$ is quadratic, we can find its roots to see if we can factor it on the real field.

We need to solve the following given quadratic equation $$\displaystyle x^2+1=0$$.

For a quadratic equation of the form $$a x^2 + bx + c = 0$$, the roots are computed using the following formula:

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

In this case, we have that the equation we need to solve is $$\displaystyle x^2+1 = 0$$, which implies that corresponding coefficients are:

$a = 1$ $b = 0$ $c = 1$

First, we will compute the discriminant to assess the nature of the roots. The discriminating is computed as:

$\Delta = b^2 - 4ac = \displaystyle \left( 0\right)^2 - 4 \cdot \left(1\right)\cdot \left(1\right) = -4$

Since in this case we get the discriminant is $$\Delta = \displaystyle -4 < 0$$, which is negative, we know that the given equation has two different conjugate complex roots.

Now, plugging these values into the formula for the roots we get:

$x = \displaystyle \frac{-b \pm \sqrt{b^2-4ac}}{2a} = \displaystyle \frac{0 \pm \sqrt{\left(0\right)^2-4\left(1\right)\left(1\right)}}{2\cdot 1} = \displaystyle \frac{0 \pm \sqrt{-4}}{2}$

so then, we find that:

$\displaystyle x_1 = \frac{0 - i \sqrt{4}}{2} = -i$ $\displaystyle x_2 = \frac{0 + i \sqrt{4}}{2} = i$

So after finding the roots of the last quadratic part, we find two complex roots, so we cannot factor the term $$x^2+1$$ in the real field, so we end the process with $$\displaystyle p(x) = x^5-3x^4+3x^3-3x^2+2x = x \left(x-1\right)\left(x-2\right) \left(x^2+1\right)$$.

Conclusion: Therefore, the final factorization that we obtain is:

$\displaystyle p(x) = x^5-3x^4+3x^3-3x^2+2x = x\left(x-1\right)\left(x-2\right)\left(x^2+1\right)$

The roots found using the factorization process are $$0$$,$$1$$,$$2$$,$$-i$$ and $$i$$ .

### Example: Factor Calculation

Find the factors of the following: $$p(x) = x^4 - 2x^3 - x^2 + 2x$$

Solution:Now we need to factor: $$\displaystyle p(x) = x^4-2x^3-x^2+x$$.

Initial Step: The provided polynomial expression cannot reduced, and then we can proceed directly to factor it.

Rational Roots Candidates: Since the first term with a non-zero coefficient in $$p(x)$$ is $$x$$, we can factor this term out to get

$\displaystyle p(x) = x^4-2x^3-x^2+x = x \left(x^3-2x^2-x+1 \right)$

but the term in parenthesis has degree that is higher than 2, so there is no elementary formula to factor it. We need to test for possible rational roots.

The next task is to find the integer numbers that divide the leading coefficient $$a_{3}$$ and the constant coefficient $$a_0$$, that will be used to construct our candidates to be zeroes of the polynomial equation.

▹ The dividers of $$a_{3} = 1$$ are: $$\pm 1$$.

▹ The dividers of $$a_0 = 1$$ are: $$\pm 1$$.

Therefore, dividing each divider of the constant coefficient $$a_0 = 1$$ by each divider of the leading coefficient $$a_{3} = 1$$, we find the following list of candidates to be roots:

$\pm \frac{ 1}{ 1}$

Now, all the candidates need to be tested to see if they are a solution. The following is obtained from testing each candidates:

$\begin{array}{ccccclcc} x & = & \displaystyle -1 &:& & \displaystyle \left(-1\right)^3-2\cdot \left(-1\right)^2-\left(-1\right)+1 & = & \displaystyle -1 \ne 0 \\\\ x & = & \displaystyle 1 &:& & \displaystyle 1^3-2\cdot 1^2-1+1 & = & \displaystyle -1 \ne 0 \\\\ \end{array}$

But since we have not found any rational roots by inspection, we cannot carry on with the factorization using elementary methods, so the process stops here.

Conclusion: Therefore, in this case, we get:

$\displaystyle p(x) = x^4-2x^3-x^2+x = x\left(x^3-2x^2-x+1\right)$

Therefore, the only root found using the factorization process is $$0$$.

### Example: Factoring Calculation

Completely factor $$p(x) = x^3 - \frac{7}{2}x^2 + \frac{7}{2}x - 1$$. What are the roots of this polynomial?

Solution: For this example, we have $$\displaystyle p(x) = x^3-\frac{7}{2}x^2+\frac{7}{2}x-1$$, and we will use the factorization process as the tool to compute its roots.

Initial Step: The provided polynomial expression is irreducible, so there is nothing to simplify. We can proceed to factor it.

We need to attempt to find simple rational roots first, which is achieved with the help of the Rational Root Theorem.

The next task is to find the integer numbers that divide the leading coefficient $$a_{3}$$ and the constant coefficient $$a_0$$, that will be used to construct our candidates to be zeroes of the polynomial equation.

▹ The integer dividers of $$a_{3} = 1$$ are: $$\pm 1$$.

▹ The integer dividers of $$a_0 = -1$$ are: $$\pm 1$$.

Hence, we divide each divider of the constant coefficient $$a_0 = -1$$ by each and every divider of the leading coefficient $$a_{3} = 1$$, so we can find a list of rational candidates to be roots:

$\pm \frac{ 1}{ 1}$

Now, all the candidates need to be tested to see if they are a solution. The following is obtained from testing each candidates:

$\begin{array}{ccccclcc} x & = & \displaystyle -1 &:& & \displaystyle \left(-1\right)^3-\frac{7}{2}\cdot \left(-1\right)^2+\frac{7}{2}\cdot \left(-1\right)-1 & = & \displaystyle -9 \ne 0 \\\\ x & = & \displaystyle 1 &:& & \displaystyle 1^3-\frac{7}{2}\cdot 1^2+\frac{7}{2}\cdot 1-1 & = & \displaystyle 0 \\\\ \end{array}$

Polynomial Division Process: We don't have enough rational roots from the candidates found with the Rational Zero Theorem, so we will divide $$\displaystyle x^3-\frac{7}{2}x^2+\frac{7}{2}x-1$$ by the product of these rational factors derived from the rational root candidates, which leads to $$\displaystyle \left(x-1\right)$$.

Step 1: The leading term of the dividend $$\displaystyle p(x) = x^3-\frac{7}{2}x^2+\frac{7}{2}x-1$$ is $$\displaystyle x^3$$, whereas the leading term for the divisor $$\displaystyle s(x) = x-1$$ is equal to $$\displaystyle x$$.

So then, the term we need to multiply $$x$$ to get to the leading term of the dividend is $$\displaystyle \frac{ x^3}{ x} = x^2$$, so we add this term to the quotient. Also, we multiply this by the divisor to get $$\displaystyle x^2 \cdot \left(x-1\right) = x^3-x^2$$, which we need to subtract to the dividend:

$\def\arraystretch{1.5}\begin{array}{rcccc} &\displaystyle x^2 & \displaystyle & \displaystyle &\\[0.3em] \hline x-1\,) & \displaystyle x^3 & \displaystyle -\frac{7}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle -x^3 & \displaystyle +x^2 & \displaystyle & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle -\frac{5}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \end{array}$

Step 2: Now, the leading term of the current remainder $$\displaystyle -\frac{5}{2}x^2+\frac{7}{2}x-1$$ is $$\displaystyle -\frac{5}{2}x^2$$, and we know the leading term for the divisor is $$\displaystyle x$$.

So then, the term we need to multiply $$x$$ to get to the leading term of the of current remainder is $$\displaystyle \frac{ -\frac{5}{2}x^2}{ x} = -\frac{5}{2}x$$, so we add this term to the quotient. Also, we multiply this by the divisor to get $$\displaystyle -\frac{5}{2}x \cdot \left(x-1\right) = -\frac{5}{2}x^2+\frac{5}{2}x$$, which we need to subtract to the current reminder:

$\def\arraystretch{1.5}\begin{array}{rcccc} &\displaystyle x^2 & \displaystyle -\frac{5}{2}x & \displaystyle &\\[0.3em] \hline x-1\,) & \displaystyle x^3 & \displaystyle -\frac{7}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle -x^3 & \displaystyle +x^2 & \displaystyle & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle -\frac{5}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle & \displaystyle \frac{5}{2}x^2 & \displaystyle -\frac{5}{2}x & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle & \displaystyle x & \displaystyle -1\\[0.3em] \end{array}$

Step 3: Now, the leading term of the current remainder $$\displaystyle x-1$$ is $$\displaystyle x$$, and we know the leading term for the divisor is $$\displaystyle x$$.

So then, the term we need to multiply $$x$$ to get to the leading term of the of current remainder is $$\displaystyle \frac{ x}{ x} = 1$$, so we add this term to the quotient. Also, we multiply this by the divisor to get $$\displaystyle 1 \cdot \left(x-1\right) = x-1$$, which we need to subtract to the current reminder:

$\def\arraystretch{1.5}\begin{array}{rcccc} &\displaystyle x^2 & \displaystyle -\frac{5}{2}x & \displaystyle +1&\\[0.3em] \hline x-1\,) & \displaystyle x^3 & \displaystyle -\frac{7}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle -x^3 & \displaystyle +x^2 & \displaystyle & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle -\frac{5}{2}x^2 & \displaystyle +\frac{7}{2}x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle & \displaystyle \frac{5}{2}x^2 & \displaystyle -\frac{5}{2}x & \displaystyle \\[0.3em] \hline \displaystyle &\displaystyle & \displaystyle & \displaystyle x & \displaystyle -1\\[0.3em] \displaystyle &\displaystyle & \displaystyle & \displaystyle -x & \displaystyle +1\\[0.3em] \hline \displaystyle & & & & 0\\[0.3em] \end{array}$

Hence, from the division quotient, we conclude that $$\displaystyle q(x) = x^2-\frac{5}{2}x+1$$, with a remainder of $$\displaystyle r(x) = 0$$.

So the, we will get:

$\displaystyle p(x) = x^3-\frac{7}{2}x^2+\frac{7}{2}x-1 = \left(x-1\right) \left(x^2-\frac{5}{2}x+1\right)$

But the equation $$\displaystyle x^2-\frac{5}{2}x+1$$ is quadratic, so the roots can be computed directly.

So then, we need to compute the discriminant in order to know about the nature of the roots. The formula for the discriminating is:

$\Delta = b^2 - 4ac = \displaystyle \left( -\frac{5}{2}\right)^2 - 4 \cdot \left(1\right)\cdot \left(1\right) = \frac{9}{4}$

But we see that the discriminant is $$\Delta = \displaystyle \frac{9}{4} > 0$$, which is positive, and therefore, we conclude that the equation has two different real roots.

Now, we plug these values in to get:

$x = \displaystyle \frac{-b \pm \sqrt{b^2-4ac}}{2a} = \displaystyle \frac{\frac{5}{2} \pm \sqrt{\left(-\frac{5}{2}\right)^2-4\left(1\right)\left(1\right)}}{2\cdot 1} = \displaystyle \frac{\frac{5}{2} \pm \sqrt{\frac{9}{4}}}{2}$

so then, we find that:

$x_1 = \frac{\frac{5}{2}}{2}-\frac{1}{2}\sqrt{\frac{9}{4}}=\frac{\frac{5}{2}}{2}-\frac{1}{2}\cdot\frac{3}{2}=\frac{5}{4}-\frac{3}{4}=\frac{1}{2}$ $x_2 = \frac{\frac{5}{2}}{2}+\frac{1}{2}\sqrt{\frac{9}{4}}=\frac{\frac{5}{2}}{2}+\frac{1}{2}\cdot\frac{3}{2}=\frac{5}{4}+\frac{3}{4}=2$

With the solutions of the quadratic equation above, which has two real roots, we further decompose the original polynomial as: $$\displaystyle p(x) = x^3-\frac{7}{2}x^2+\frac{7}{2}x-1 = \left(x-1\right) \left(x-\frac{1}{2}\right)\left(x-2\right)$$.

Conclusion: Hence, in this case we achieve a full simplification :

$\displaystyle p(x) = x^3-\frac{7}{2}x^2+\frac{7}{2}x-1 = \left(x-1\right)\left(x-\frac{1}{2}\right)\left(x-2\right)$

Based on the above factorization, the roots found are: $$1$$,$$\frac{1}{2}$$ and $$2$$ .

## More polynomial calculators

There are a lot of things you can do with polynomial, you can graph them, you can analyze their end behavior, but those are simpler, accessory tasks towards the main task that is factoring a polynomial and finding its roots.

The general problem for higher degrees is complicated, and usually we reduce ourselves to quadratic functions, and potentially cubic functions that have certain symmetries that allow for an easy factoring.