AngouriMath

Navigation

PolynomialSignTable


← Back to list of classes

Description

Summary

p(x) > 0 for a univariate polynomial over Q of any degree, answered by
the sign of p between consecutive real roots.

Remarks

A polynomial has one sign on each open interval between consecutive real roots, so the
answer is the union of those intervals where the sign is positive. Everything hard is
in the word *consecutive*: the intervals are only the answer if the list of real roots
is complete, and a missed root merges two intervals of opposite sign into one
and reports the wrong half of it as the solution. So this refuses wherever completeness
cannot be established, rather than answering from whatever roots were found.
Completeness is established algebraically and in two steps. First
FactorPrimitive(AngouriMath.Functions.IntegerPolynomial) writes the polynomial as a
product of powers of irreducibles over Q, and it verifies that the factors
multiply back to what it was given — so every real root of the whole is a real root of
exactly one factor, an irreducible being square-free and two distinct irreducibles
being coprime. Second, the number of real roots of each factor is read off its
Discriminant(AngouriMath.Functions.MultivariatePolynomial,System.Int32,System.Collections.Generic.IReadOnlyList{System.Int32}): a factor of degree two has two real
roots where its discriminant is positive and none where it is negative, and one of
degree three has three and one respectively. A factor of degree four needs two more
quantities alongside the discriminant, and there is no such criterion at five — nor a
formula for the roots — which is where this stops. That count is what makes a root
list a complete root list rather than a list of the roots that happened to come back.
The roots themselves come from the solver reached through SolveEquation,
which is exact, and their order is decided numerically, which is not. So the
ordering is checked rather than trusted: the sign of the polynomial at an exact
rational point in each interval is computed in exact integer arithmetic, and the
resulting sequence has to change sign at every root of odd multiplicity and keep it at
every root of even multiplicity. A misordered or merged root shows up as a sequence
that does not, and is refused. The two outermost sample points are placed beyond
Cauchy's bound, so no root can lie outside the sampled range.
Part of the polynomial layer of
#746, item 43 —
and the consumer that the resultant was waiting for.

Members

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 4378 pages online