ICONICO

UltimaCalc

Finding the Roots of Polynomials with UltimaCalc

Finding the Roots of Polynomials with UltimaCalc
UltimaCalc

This page discusses two related problems: how to find the roots of a polynomial, and how to factorise a polynomial.

Giving you the 3rd Degree

Consider for example the following polynomial:

x3 + 2x2 - 5x - 6

We can ask: For what value (or values) of x, if any, does the polynomial evaluate to zero? And can the polynomial be expressed as the product of simpler polynomials?

The example polynomial has a degree of 3. (The degree of a polynomial is the greatest power of its variable, most often x.) A polynomial whose degree is odd will certainly evaluate to zero for at least one value of x.

To see this, consider the situations where x is very large and negative, and where x is very large and positive. The two values of the polynomial will be of opposite signs. Therefore, at some point in between the polynomial must pass through zero at least once.

On the other hand, when the degree is even, there is no guarantee that the polynomial will be zero for any value of x.

Factorising has the aim of rewriting a polynomial as a product of some lower order polynomials. Whether or not this is possible in theory, the factorisation problem can often seem insurmountable in practice. For the example above, let's assume that it can be factorised into the form:

(x + a) (x + b) (x + c)

This expression can be multiplied out to obtain:

x^3 + x^2(a+b+c) + x(ab+bc+ca) + abc

In this example, it is clear that the product of a, b and c is -6. This gives us a clue that the values of a, b and c need to be chosen from the set 1, 2, 3 and 6. But notice that the product is negative. This means that we need to also consider the values -1, -2, -3 and -6.

We can figure out the correct set of values by trial and error. After all, we do not have so many choices to try out, here. Besides, our guess at the form of the factorisation happened to be correct - we do have three linear factors.

But what if we want to factorise something like:

12x^3 + 32x^2 - 19x - 60

We would now have to consider a factorisation into:

(ax + b) (cx + d) (ex + f)

where we know that a, c and e are factors of 12 and that b, d and f are factors of -60. We now have too many choices open to us. For example, a, c and e have values taken from the set 1, 2, 3, 4, 6, or 12. The values of b, d and f can come from a set of consisting of 24 different values, as we need to consider negative numbers as well as positive ones.

Still, the solution can be found, if we have enough patience. I challenge you to have a go at finding this solution. The answer is given at the bottom of this page, here.

Perhaps another approach might be simpler. Both of these example polynomials are of odd order, so we know that they have at least one root. If we could find a root of a polynomial, we would then be able to divide it by the corresponding factor and end up with a simpler polynomial to work with.

Looking at the first example, if we try out a few values of x we quickly discover that the polynomial is 0 when x = 2. So we know that x - 2 is a factor.

We can divide x3 + 2x2 - 5x - 6 by x-2 to obtain the quadratic polynomial x^2 + 4x + 3. The trial and error approach quickly shows that this can be factorised as (x+3)(x+1). Try using the values -1 and -3 for x in the original polynomial. It evaluates to zero in both cases.

Simple enough? OK, let's consider factorising this one:

36x6 - 66x5 - 128x4 + 131x3 + 168x2 - 6x - 72

We could look for trial factors based on the possible factors of the coefficients 36 and -72. But only if we were desperate! There are just too many possibilities. OK, can we find some roots and divide out the corresponding factors? Yes, if we can find any. Notice that the polynomial has degree 6, an even number. As the degree is even, we are not guaranteed to be able to find any roots (there might not be any!.

At this point, unless we have a great stroke of luck, we need help. I opened up my trusty UltimaCalc calculator, set it to 12 digit precision, and asked it to try finding the roots, using its built-in polynomial roots calculator. It found the following values:

-1.33333333333, 0.633974596216, 1.5 and 2.36602540378

It seems that two of the roots are -4/3 and 3/2. The other two roots are not recognisable as anything simple. They would seem to be the two roots of a quadratic factor. Let's assume that this factor is the product of the two linear factors corresponding to these roots, (x-a)(x-b). If we multiply out this expression, we obtain

x2 - x(a+b) + ab

Doing the indicated arithmetic, we find that 0.633974596216+2.36602540378 = 3 and 0.633974596216*2.36602540378 = 1.5.

So our quadratic term looks like x2 - 3x + 3/2. Now we know that this cannot be right, as all of the coefficients of the original polynomial are integers. So let's multiply all the coefficients of our quadratic by the lowest common multiple of the denominators of its coefficients. In our case, this LCM is simply 2, and our quadratic becomes:

2x2 - 6x + 3. We also need to eliminate the fractions from the factors corresponding to the other two roots. These factors become (3x + 4) and (2x - 3).

Now we are almost finished. We know three of the factors of the original polynomial. Let's multiply them together:

(3x + 4)(2x - 3)(2x2 - 6x + 3)

The result is:

12x4 - 38x3 + 69x - 36

We can divide this polynomial into the original polynomial. The result will be only of second order, just three steps in the division, so this is not a big deal. The result is:

3x2 + 4x + 2

This quadratic has no roots. Its value is always positive. In fact, it is never less than 2/3 regardless of the value of x.

So we seem to have factorised our original polynomial. Just one more thing is necessary, which is to check for any numerical factor which might have gone missing. A simple way to do this is to multiply together the leading coefficients of all the factors, and compare this with the leading factor of the original. (The leading coefficient of a polynomial is defined as the coefficient of its highest power of x, or whatever its variable might be.) In our case, the two values are the same, and we therefore do not have a missing numerical factor.

So we have factorised the polynomial:

36x6 - 66x5 - 128x4 + 131x3 + 168x2 - 6x - 72

and we have found its factors to be:

(3x + 4)(2x - 3)(2x2 - 6x + 3)(3x2 + 4x + 2)

Using UltimaCalc, it took longer to describe the process than to actually do it, except maybe for the polynomial division.

Irreducible Polynomials

In the discussion above, it was assumed that not only were the coefficients of the polynomial rational numbers (i.e. either integers or ratios), but that the values of their roots (and the coefficients of their factors) were also rational numbers.

For example, how consider the polynomial x3 - 2. This clearly has a root at x3 = 2. If we divide x3 - 2 by the corresponding factor of x - 21/3, the result is x2 + 21/3x + 22/3. This can only be accepted as a factorisation if we widen the range of acceptable numbers (the number field) to include 21/3.

Another example is x4 + 5x + 3. UltimaCalc easily finds that this polynomial has two roots, located at approximately x = -1.4252375 and x = -0.6318846. However, there does not seem to be any relationship between these two values. Neither their sum nor their product is a rational number.

These two examples show irreducible polynomials. They can not be factorised if we constrain the acceptable range of numbers to be rationals.

In conclusion

Perhaps you are wondering whether there is a better method of factorising polynomials. Well, there are certainly other ways. The problem of how to quickly factorise a high-order polynomial is such an important one, and is such a challenge, that it continues to be a topic of active research.

Some good techniques have been found, but they are too involved to consider doing them by hand, and you would need to be a mathematician to even understand the method you were using.

However, all is not lost. UltimaCalc Professional can do the work for you. Using its Algebra module, you can find a polynomial factorisation with ease, for polynomials up to the tenth order or higher. And it can do a great deal more, too, of course.

Answer to the challenge

The polynomial 12x^3 + 32x^2 - 19x - 60 can be factorised as (2x+3) (2x+5) (3x-4). Of course, I cheated here. If you tried this yourself, I don't know how long it took you. It took me just seconds - the time taken to get UltimaCalc Professional to solve it using its Algebra module.

Our Software Stores

IconicoAccurate Design and Development Software

BitsDuJourDiscount Deal Coupons for Windows and Mac Software Apps

Our Software Services

IcoBlogOur Official Blog

© copyright 2004-2024 Iconico, Inc. Code & Design. All Rights Reserved. Terms & Conditions Privacy Policy Terms of Use Login