Factoring a Quartic Polynomial

Factoring a quadratic polynomial (degree 2) is a standard topic in algebra; but for higher degrees, things get a lot harder. Here we’ll look at some old questions from the Ask Dr. Math site about factoring quartic (degree 4) polynomials. There is no standard method, but several interesting tricks you might want to know about.

Two quadratic factors … or difference of squares?

We’ll start with this, from Adam in 1998:

Nonlinear Factors

I need to factor x^4 + 4.

I have been told that factoring the sum of two "squared" numbers is not possible; however, my instructor indicates this one can be done.  I have had no luck. Is he pulling my leg?

We can factor a “difference of squares” like \((x^2)^2 – 2^2\), but this is a sum of squares, and that can’t be factored … unless you are allowed to use complex numbers. We’ll get back to that idea!

Doctor Pete answered, starting with what sort of factors we can expect:

Now, usually, when we think of factoring a polynomial, we are thinking of finding a form:

  (x - a)(x - b)(x - c)...

where a, b, c, ... are constants. But factoring is closely connected with a similar problem, which is finding roots of a function. In particular, if you have a polynomial function f(x), and solve the equation:

  f(x) = 0

then what you are finding are the values of a, b, c,... in the factored form. For example, say:

  f(x) = x^2 - 4

Then, observe that f(2) = f(-2) = 0; that is, x = 2, and x = -2 are roots of f(x). Then f(x) has the factored form:

  f(x) = x^2 - 4 = (x - 2)(x + 2)

So linear factors correspond to real roots (also called zeros) of the polynomial, and in particular to rational roots, when we are factoring “over the integers”, meaning we allow only integer coefficients. What if there are none?

However, in the case where:

  f(x) = x^4 + 4

we see that there is no real value of x for which f(x) = 0, because x^4 is always nonnegative. So one cannot expect a factorization of the form:

  (x - a)(x - b)(x - c)(x - d)

where a, b, c, d are all real numbers. However, it may be possible to factor it as:

  (x^2 + px + q)(x^2 + rx + s)

that is, as a pair of irreducible quadratics. Why this may be possible will be clearer in a moment.

What can happen here is that the roots a, b, c, and d may in fact be complex numbers, which will come in conjugate pairs (assuming that the coefficients of the polynomial are integers, or more generally rational numbers), so that products of pairs of factors will form irreducible (unfactorable) quadratic factors. The same is true if some of a, b, c, and d are real but not rational.

For now, suppose that:

  x^4 + 4 = (x^2 + px + q)(x^2 + rx + s)

for some unknown constants p, q, r, s, which are all real numbers. By expanding the righthand side, we see that:

  x^4 + 4 = x^4 + (p+r)x^3 + (q+s+pr)x^2 + (ps+qr)x + qs

If we equate the coefficients on both sides of this equation (why?), then we find that:

       p + r = 0
  q + s + pr = 0
     ps + qr = 0
          qs = 4

We equate coefficients because we want the equation to be true for all x (“identically equal”) so that the two sides are really the same polynomial.

Observe that we have four equations in four unknowns. That gives us hope that we can find a solution, though as a system of nonlinear equations, it is a little harder than you may be used to.

From the first equation p = -r, and substituting this into the third equation gives r(-s + q) = 0. This means r = 0, and/or q = s. 

Suppose r = 0. Then p = 0, and we have from the second equation that q + s = 0. But this is impossible, since qs = 4. So we must have instead that q = s, and hence, from the fourth equation, q = s = 2 or q = s = -2. 

Suppose q = s = -2. Then from the second equation, we have that -2 - 2 + pr = 0, which implies pr = 4. Since r = -p, we find that -p^2 = 4, which is impossible. 

Now suppose, p = r = 2. From the second equation, we then have 2 + 2 + pr = 0, or pr = -4.  Since p = -r, it follows that r^2 = 4. Therefore, r = 2 or -2, and p = -2 or 2. Note that this makes sense, since this produces the factorization:

  x^4 + 4 = (x^2 + 2x + 2)(x^2 - 2x + 2)

and clearly p and r are interchangeable, as long as they have opposite signs. One can check that the factorization is correct by multiplying out the righthand side.

Quadratic factors, complex roots

Now, to gain an understanding of why the polynomial x^4 + 4 factors into two quadratics but not four linear factors, we attempt to find the roots of, say, x^2 + 2x + 2, which is one of the quadratics. Clearly, any root of this polynomial is also a root of x^4 + 4. Using the quadratic formula, we find that the roots are given by:

  x = (-2 + Sqrt[-4])/2 , (-2 - Sqrt[-4])/2
or:
  x = -1 + i , -1 - i

where i is the square root of -1. These numbers are complex numbers, which explains why a linear factorization can't be found.

Alternatively, we could go ahead and treat the polynomial as a difference of squares: $$x^4 + 4 = x^4 – (-4) = (x^2)^2 – (2i)^2 = (x^2 – 2i)(x^2 + 2i)$$ so that $$x = \pm\sqrt{2i}\text{ or } x = \pm\sqrt{-2i}$$

There are several ways to find the square root of a complex number; the easiest typically is to use polar (or exponential) form, but we can also suppose that $$(x + yi)^2 = 2i\\ (x^2 – y^2) + 2xyi = 2i\\ x^2 – y^2 = 0, 2xy = 2\\ x=y=\pm1$$ and similarly for the other case. So our full linear factorization (over the complex numbers) is $$(x – (-1 + i))(x – (-1 – i))(x – (1 + i))(x – (1 – i))$$

The product of the first two (complex conjugate) factors is $$((x+1)-i))((x+1)+i)) = (x+1)^2-i^2 = x^2 + 2x + 1 + 1 = x^2 + 2x + 2$$ We’re just following Doctor Pete’s process in reverse.

Two quadratic factors, using symmetry

The next question is from 1996 (anonymous):

Factoring Quartics

Can you help me factorize f(x) = x^4 - 6x^3 + 11x^2 - 6x + 1 and solve f(x) = 0?

Doctor Liu answered:

Solving polynomial equations of degree higher than 2 (quadratic) generally involves some guesswork. For example, you first try the RATIONAL ROOT TEST to see if it has any rational roots. If none, then the problem is certainly more difficult, and with luck, (or if the problem is designed to be solvable), you factor it into a product of QUADRATIC polynomials.

RATIONAL ROOT TEST

The only possible rational roots of a polynomial (set equal to zero) are rational numbers whose:

  (i) numerators are divisors of the CONSTANT term

  (ii) denominators are divisors of the COEFFICIENT of the HIGHEST degree term.

For the present case, since the constant term and the leading coefficient are both 1, we need only test the rational numbers 1 and -1. Direct calculation shows that neither of these satisfies the equation, so the equation has NO rational root.

This is the first method I would usually try. When the coefficients have few factors, it is commonly the fastest way. Here, since the only candidates are 1 and -1, we just use synthetic division with these two numbers (equivalent to evaluating the polynomial for those values), and we have eliminated this possibility.

There is a “formula” for quartic equations (as also for cubic equations, but not for any higher degree), but I don’t think I’ve ever even tried to use it!.

As we saw above, when there are no rational roots, there are no linear factors (over the integers), which leaves only one possibility for the factors:

The only way to solve the equation is FACTORIZATION into a product of two QUADRATIC factors. Generally, we would try:

  (x^2 + ax + b)(x^2 + cx + d)

However, in the present case, observe that the polynomial is SYMMETRIC. So, we try to see if it is possible to arrange these quadratic factors to be SYMMETRIC as well. In other words, we try to factor it in the form:

  (x^2 + ax + 1)(x^2 + cx + 1)

The symmetry referred to is that the coefficients are 1, -6, 11, -6, 1, reading the same in both directions. But we could also come to the same conclusion merely because the constant term is 1, so the constant terms of both factors must be 1.

Expanding this product, we have:

  (x^2 + ax + 1)(x^2 + cx + 1)
   = x^4 + ax^3 + x^2 + cx^3 + acx^2 + cx + x^2 + ax + 1 
   = x^4 + (a+c)x^3 + (ac + 2)x^2 + (a+c)x + 1.

Comparing with the given polynomial, we would like to have:

  a + c = -6  
  ac + 2 = 11 ---> ac = 9

The only possibility is  a = c = -3.

If you can see this immediately, that is wonderful, and you should proceed directly to the next paragraph.

As before, we equate corresponding coefficients because they must be the same polynomial, term by term.

If not, you find these numbers a and c by first eliminating one of them, and see that you run into a QUADRATIC equation:

        -6 - a = c 
       a(-6 - a) = 9
     -6a - a^2 = 9
  a^2 + 6a + 9 = 0
       (a+3)^2 = 0
             a = -3

From this, c = -3 as well.

The quick way is to think as we do when factoring a quadratic, and just list possible products giving 9, looking for a pair of factors whose sum is -6. They are obviously -3 and -3.

Since a and c are the same, the two quadratic factors are the same.

This means that the given polynomial is indeed a SQUARE:

  x^4 - 6x^3 + 11x^2 - 6x + 1 = (x^2 - 3x + 1)^2

Its roots are therefore those of  x^2 - 3x + 1 = 0

Now, by the quadratic formula, we get:

  x = (3 +/- Sqrt 5)/2.

Each of these is counted twice as a root of the 4th degree equation.

Here is the graph of the polynomial, showing double zeros at \(\frac{3+\sqrt{5}}{2} \approx 2.618\) and \(\frac{3-\sqrt{5}}{2} \approx 0.382\):

Using substitution

Our third question is from John in 2004:

Solving a Quartic Equation with Substitutions

I'm trying to solve y(y + 1)(y + 2)(y + 3) = 7920, which is a problem from my friend's kid.  First I multiplied it all out:

         (y^2 + y)(y + 2)(y + 3) = 7920
        (y^3 + 3y^2 + 2y)(y + 3) = 7920
  y^4 + 6y^3 + 11y^2 + 6y - 7920 = 0

I am not able to solve it by factoring.  Am I on the right track?  I haven't done any maths for more than 10 years, and I think I forgot almost everything I learned!

Can you please give me a hint?

Doctor Douglas answered:

Hi John. 

Your work so far is fine, and you are trying to factor this last equation: y^4 + 6y^3 + 11y^2 + 6y - 7920 = 0.

You can factor the equation in a number of ways:

1. You can divide through by guesses such as (y-3), (y+6), (y-8), ... and see if any of these happen to work.  Because this was given as a problem for a schoolkid, I'm guessing that the roots are probably integers, so this not an unreasonable approach.

This could be done by starting with the rational root theorem; or it could be done by simply guessing at a solution to the original equation. Since \(y(y+1)(y+2)(y+3) = 7920\) is not far from \(y^4 = 7920\), we might just try values of \(y\) near \(\sqrt[4]{7920}\approx 9.43\); trying \(y=8\) we find that \((8)(9)(10)(11) = 7920\), where the average of the four factors is 9.5. Or, one could just factor the number 7920 and try to arrange the prime factors as a product of consecutive integers. But one would still wonder (if one had the mathematician gene) whether this is the only (real) solution! We’ll see …

Using symmetry again

2. Another way to do this is to realize that the four roots are equally-spaced, because the factors come in a nice arithmetic progression:  y, y+1, y+2, y+3.  So let's average those and define u = y + 3/2 as the center of this set of four numbers, and the equation becomes

  (u - 3/2)(u - 1/2)(u + 1/2)(u + 3/2) - 7920 = 0

This is nice, because the factors multiply out such that the cross terms cancel:

  [(u - 3/2)(u + 3/2)][(u - 1/2)(u + 1/2)] - 7920 = 0
      (u^2 - 9/4)         (u^2 - 1/4)      - 7920 = 0

There is a lot of insight hidden here! (If you’re curious, we’ll be coming back to how he chose that transformation.) He paired up the factors to make two differences of squares, which is a nice way to save work.

And if we make one more substitution, using v = u^2, this IS a quadratic equation in terms of v:

  (v - 9/4)(v - 1/4)       - 7920 = 0
   v^2 - 10v/4 + 9/16      - 7920 = 0
  16v^2 - 40v  +  9     - 16*7920 = 0
  16v^2 - 40v  - 126711           = 0

Now you can factor this quadratic trinomial using many methods, or you can use the quadratic formula with a = 16, b = -40 and c = 126711.

You will find that this quadratic equation factors as follows:

  16*(v - 90.25)(v + 87.75) = 0

and has roots of v = 90.25 or -87.75

If we want to avoid decimals (as I typically do), we can split the 16 between the other factors, obtaining the equation $$(4v-361)(4v+351)=0$$ The roots are \(\frac{361}{4}\) and \(-\frac{351}{4}\).

Since v = u^2, the second root leads to no real solution for u, and we must have
 
    v = 90.25
  u^2 = 90.25
    u = sqrt(90.25)
    u = 9.5 or -9.5

which means that going back to 

  (u - 3/2)(u - 1/2)(u + 1/2)(u + 3/2)

our set of y's is either {8, 9, 10, 11} or {-11, -10, -9, -8}.

This is a tough problem because of the substitution steps, so don't feel bad about not being able to do it!

So there are, in fact, two real solutions, not just the one positive solution we could find easily!

Reversing all the substitutions, our equation factors as $$(4v – 361)(4v + 351) = 0\\ (4u^2 – 361)(4u^2 + 351) = 0\\ (2u – \sqrt{361})(2u + \sqrt{361})(4u^2 + 351) = 0\\ \left(2\left(y+\frac{3}{2}\right) – 19\right)\left(2\left(y+\frac{3}{2}\right) + 19\right)\left(4\left(y+\frac{3}{2}\right)^2 + 351\right) = 0\\ (2y-16)(2y+22)\left(4\left(y^2+3y+\frac{9}{4}\right) + 351\right) = 0\\ 4(y-8)(y+11)(4y^2+12y+9+351) = 0\\ 4(y-8)(y+11)(4y^2+12y+360) = 0\\ 16(y-8)(y+11)(y^2+3y+90) = 0$$

Why that substitution?

John replied,

Thanks for the prompt reply.  I followed most of your work, but I'm a little confused by the step where you chose u = y + 3/2.  Why do I need to define "u" as the center of the set of numbers, not the beginning or end of the numbers?  Is this a maths theory?

Doctor Douglas responded:

That's a very good question!

Mostly this was simply an inspired guess, guided by our desire to take advantage of the left-right symmetry of the roots.  By doing so, we separate the odd (y^3 and y^1) terms from the even (y^4, y^2, y^0) terms, and the latter set is what leads to our quadratic trinomial via the substitution v = y^2.  Note that this trick worked only because of the nice progression of factors {y, y+1, y+2, y+3}.  It would have been much tougher to work with the set {y, y+1, y+2, y+4}.

John closed:

Thanks Dr. Math for helping me.  Your work was interesting and your comments helpful.  I appreciate it!

I used the same technique in Fun with a Quartic Equation, which has links to some of these answers, and more.

Here is a graph of the function on the left of our equation in its original form:

We can see here that the function is symmetrical about the line \(x=-\frac{3}{2}\); the substitution shifted the graph to the right 1.5 units, so that it would be symmetrical about the y-axis, making it an even function and therefore easy to solve.

In order to see the solutions (where this function crosses the line \(y=7920\)), we need to zoom out considerably:

Wishful thinking

Finally, we have a question from Zubin in 2005:

Factoring x^4 + (x^2)(y^2) + y^4

Is there any mathematical way or pattern to factor the polynomial x^4 + (x^2)(y^2) + y^4, since it does factor into the polynomials x^2 + xy + y^2 and x^2 - xy + y^2, which are then not factorable?

At first it seemed simply a square of two sums, but unfortunately the middle term is not doubled.  The only way I could factor this was by guessing and checking.  I find it very difficult to put this polynomial into any category.  It does not factor by grouping, synthetic factorization, division, etc. I have now been led to believe that I have not yet gotten to the point in my education where I can factor this.  This was a question that arose when my pre-calculus teacher had to review factoring.

Doctor Schwa answered:

Hi Zubin -

What you need is the problem-solving strategy called "wishful thinking".  I WISH that the question were x^4 + 2 x^2 y^2 + y^4, because then I could factor it into (x^2 + y^2)^2.

How can I make it so?  Well, I can't just change the question, so if I add an x^2 y^2 to it to fit my wish, I must also subtract an x^2 y^2.  Does that hint help you see how to find the factors?

Here is what happens: $$x^4 + x^2y^2 + y^4 = (x^4 + 2x^2y^2 + y^4)-x^2y^2\\ = (x^2+y^2)^2-(xy)^2 = (x^2+y^2+xy)(x^2+y^2-xy)$$ And that’s what Zubin had found.

The next way might be described as an instance of recognition of a familiar pattern:

There's another method, too, which is to know how to factor a difference of cubes:

   (a^3 - b^3) = (a - b)(a^2 + ab + b^2).

Now, if we divide both sides by (a - b), you can see that what you have matches the pattern of the right side:

  (a^3 - b^3)
  ----------- = (a^2 + ab + b^2)
    (a - b)

Setting a = x^2 and b = y^2, we have:

   (x^6 - y^6)
   ----------- = x^4 + x^2 y^2 + y^4
   (x^2 - y^2)

Now, to work from there, you can factor x^6 - y^6 as a difference of SQUARES instead of a difference of cubes.  Do you see where that leads?

Feel free to write back and let me know how it goes, or if you'd like more hints along either of those two paths to the solution.

So far, this doesn’t look promising, because we want a product of polynomials, not a quotient. But let’s try it: $$x^4+x^2y^2+y^4 = \frac{x^6-y^6}{x^2-y^2} = \frac{(x^3-y^3)(x^3+y^3)}{(x-y)(x+y)}\\ = \frac{x^3-y^3}{x-y} \frac{x^3+y^3}{x+y} = (x^2+xy+y^2)(x^2-xy+y^2)$$ where we used the difference of cubes again at the end.

That’s a cute trick, not generally applicable, and again discovered largely by seeing things you might do, and doing them, hoping it will help.

1 thought on “Factoring a Quartic Polynomial”

  1. Pingback: Factoring Tricks from an Old Textbook – The Math Doctors

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.