A polynomial root of a polynomial is a number
such that
. The fundamental
theorem of algebra states that a polynomial
of polynomial
degree
has
roots counted with multiplicity.
For example, the roots of the polynomial
|
(1)
|
are ,
1, and 2. Finding roots of a polynomial
is therefore equivalent to polynomial factorization
into factors of polynomial degree 1.
A nonzero polynomial all of whose roots are real is called a real-rooted polynomial.
Any polynomial can be numerically factored, although different algorithms have different strengths and weaknesses.
For monic polynomials of a fixed positive polynomial degree with complex coefficients,
the multiset of roots, including
multiplicities, depends continuously
on the coefficients. If
and
are two such multisets,
a metric that expresses this statement is
|
(2)
|
where
is the symmetric group. The map from a monic
polynomial to its root multiset
is a homeomorphism when the coefficients
have their usual Euclidean metric (Ćurgus
and Mascioni 2006, pp. 85 and 91). This does not imply continuity
of a prescribed ordering of complex roots.
For
,
no choice of ordered root n-tuples
is continuous on the entire space
of monic polynomials of polynomial
degree
(Ćurgus and Mascioni 2006, pp. 91-93).
The roots of a polynomial equation may be found exactly in the Wolfram
Language using Roots[lhs==rhs,
var], or numerically using NRoots[lhs==rhs,
var]. In general, a given root of a polynomial is represented
as Root[#^n+a[n-1]#^(n-1)+...+a[0]&,
k], where
,
2, ...,
is an index identifying the particular root and the pure
function polynomial is irreducible.
Note that in the Wolfram Language,
the ordering of roots is different in each of the
commands Roots,
NRoots,
and Table[Root[p, k],
k, n
].
In the Wolfram Language, algebraic expressions involving Root objects can be combined into a new Root object using the command RootReduce.
In this work, the th
root of a polynomial
in the ordering of the Wolfram
Language's Root
object is denoted
,
where
is a dummy variable. In this ordering, real
roots come before complex ones and complex
conjugate pairs of roots are adjacent. For example,
|
(3)
| |||
|
(4)
|
and
|
(5)
| |||
|
(6)
| |||
|
(7)
|
Let the roots of the polynomial
|
(8)
|
be denoted ,
, ...,
. Then Vieta's formulas
give
|
(9)
| |||
|
(10)
| |||
|
(11)
|
These can be derived by writing
|
(12)
|
expanding, and then comparing the coefficients with (8).
For ,
given an
th
degree polynomial
, the roots can
be found by finding the eigenvalues
of the matrix
|
(13)
|
and taking .
If
,
first factor out the power of
to remove the zero roots. This method
can be computationally expensive, but is fairly robust at finding close and multiple
roots.
If the coefficients of the polynomial
|
(14)
|
are specified to be integers, then rational roots, written in lowest terms, must have a numerator
which is a factor of
and a denominator which is a factor of
(with either sign possible). This is known as the rational
zero theorem.
Bounds on the real roots of a polynomial can be obtained by the upper and lower bound theorem for synthetic
division (Jones, Seward 2012). Assume that the coefficients
are real and the leading coefficient
is positive, multiplying the polynomial
by
if necessary. For a trial value
, write the coefficients in
descending power order, including zeros for missing powers. Bring down the leading coefficient,
then repeatedly multiply the last result by
and add the next original coefficient.
The resulting row contains the coefficients of the
polynomial quotient and the polynomial
remainder on division by
.
If
and the signs in this row alternate, allowing a zero to take either sign, then
is a lower
bound for all real roots. Try
,
,
, ..., computing each row from the original coefficients.
This test gives a lower bound, not necessarily the
greatest lower bound. For example, consider
the polynomial
|
(15)
|
Performing the above algorithm then gives
| 0 | 2 | 2 | 1 | ||
| 2 | 0 | 8 | |||
| 2 | 7 | ||||
| 2 | 5 | 35 |
so
is a lower bound for all real
roots.
If
and all entries in the synthetic division row
are nonnegative, then
is an upper bound for all real roots. Try
, 2, 3, ..., again computing each row from the original coefficients. This test need not give the least
upper bound. For example, take the polynomial
|
(16)
|
Performing the above algorithm gives
| 0 | 2 | 1 | |||
| 1 | 2 | 1 | |||
| 2 | 2 | 3 | |||
| 3 | 2 | 5 | 8 | 25 | 68 |
so 3 is an upper bound for all real roots.
Plotting the roots in the complex plane of all polynomials up to some polynomial degree with integer coefficients less than some cutoff integer in absolute value shows the beautiful structure illustrated above (Trott 2004, p. 23).
An even more stunning figure is obtained by plotting all roots of all polynomials with coefficients up to polynomial
degree
(Borwein and Jörgenson 2001; Pickover 2002; Bailey et al. 2007, p. 18).
Sums over roots of a polynomial can be represented in the Wolfram Language using RootSum.