Algebraic
Resultant
resultant of two polynomials with algebraic number coefficients
Calling Sequence
Parameters
Options
Description
Examples
Resultant(a, b, x, options)
a,b
-
polynomials in x with algebraic number coefficients
x
name
options
(optional) equation(s) of the form keyword = value, where keyword is either 'symbolic', 'makeindependent', or 'characteristic'
If the option 'symbolic'=true is given and a RootOf whose minimal polynomial factors nontrivially is detected, then Resultant will reduce it to a RootOf of lower degree by picking one of the factors arbitrarily. This will eliminate the possibility of a "reducible RootOf detected" error. The default is 'symbolic'=false.
If the option 'characteristic'=p is given, where p is a non-negative integer, the resultant is computed over an extension of the ring ℤp of integers modulo p. The default is 'characteristic'=0 and means that the resultant is computed over an extension of the rational numbers.
Note that if p is positive but not a prime, then ℤp is not a field, so Resultant may not be able to compute the resultant. If it does not succeed because it encounters an integer that has no inverse modulo p, it issues the error "zero divisor modulo p detected"
If the option 'makeindependent'=true is given, then Resultant will always try to find a field representation for algebraic numbers in the input, regardless of how many algebraic objects the input contains. If the input contains many RootOfs, then this can be a very expensive calculation. If 'makeindependent'=false is given, then no independence checking is performed. The default is 'makeindependent'=FAIL, in which case algebraic dependencies will only be checked for if there are 4 or fewer algebraic objects in the input.
The Resultant command computes and returns the resultant of multivariate polynomials a and b with respect to the single indeterminate x.
Formally, if a and b are polynomials over an integral domain, where:
a=an⁢∏i=1n⁡x−αi
b=bm⁢∏i=1m⁡x−βi
then the resultant of the two polynomials a and b with respect to x is defined to the be the product
anm⁢bmn⁢∏i=1n⁡∏j=1m⁡αi−βj
and is free of x.
The resultant can be calculated using the Euclidean algorithm, but it is also the determinant of the Bezout Matrix and the Sylvester Matrix of a and b with respect to x.
The inputs a and b may contain algebraic number coefficients. These may be represented by radicals or with the RootOf notation (see type,algnum, type,radnum). In general, algebraic numbers will be returned in the same representation as they were received in. Nested radicals and RootOfs are also supported.
The arguments a and b must be polynomials in the variable x, but may contain rational functions of other names, which are considered as elements of the coefficient field. If one of the inputs is a polynomial in x disguised as a rational function, it will first be normalized by Algebraic[Normal].
Non-algebraic sub-expressions such as sin⁡x that are neither variables, rational numbers, or algebraic objects are frozen and temporarily replaced by new local variables, which are not considered to be constant in what follows.
The x parameter can also be a function such as sin⁡x, in which case it will be frozen and treated as a variable. However, functions that are also of type AlgebraicObject such as sin⁡π3 will be converted to algebraic numbers before proceeding, so they cannot be treated as variables. Proceed with caution when using a function for x, as treating some functions as variables may produce mathematically unsound results.
This command preserves partial factorizations in the input and expands polynomials only if necessary.
The output is free of x and is a quotient of polynomials, normalized as follows:
The numerator and the denominator have no non-trivial common factors.
All non-constant factors are monic with respect to a block-lexicographic ordering of the variables, where all global variables are considered larger than all local ones (except possibly if there is only one non-constant factor and no denominator). If all variables have different names, then this ordering is session-independent.
There is at most one constant factor in the denominator, and it is a positive integer.
There are at most two constant factors in the numerator, at most one of them is not a rational number, and the other one, if present, is an integer.
All factors that are not rational numbers have integer content equal to 1, except possibly if there is only one non-constant factor.
All algebraic numbers occurring in the result are reduced modulo their minimal polynomial (see Reduce), and all arguments of functions, if any, are normalized recursively (see Normal).
By definition, the resultant of zero and any polynomial is 0, and the resultant of two non-zero constants is 1.
If the set of radicals and RootOfs in the input cannot be embedded into a field algebraically, then Resultant may not be able to compute the resultant. Resultant will try to find a field representation if there are at most 4 algebraic objects in the input (unless option 'makeindependent' is given; see below), and otherwise attempt to proceed anyway. In such a case, the output may not satisfy all of the properties described above, or it may not be possible to compute a resultant at all. If unsuccessful, a "reducible RootOf detected" error may be returned. (unless the option 'symbolic'=true is given; see below).
This function does not support input containing floats or radical functions such as x.
with⁡Algebraic:
Introductory Examples:
Resultant⁡x2+sqrt⁡2,x+RootOf⁡_Z2−8,x
2+8
LinearAlgebraDeterminant⁡LinearAlgebraSylvesterMatrix⁡x2+sqrt⁡2,x+RootOf⁡_Z2−8,x
RootOf⁡_Z2−82+2
Expand⁡RootOf⁡_Z2−82+sqrt⁡2
Resultant⁡x+y⁢I,x+z2,x
−I⁢y+z2
Resultant⁡x−sqrt⁡2⁢x−RootOf⁡_Z2−3,index=1,x−sqrt⁡3,x
0
The input may contain both radicals and RootOfs, and Resultant will embed the coefficients into an algebraic field, if possible:
Resultant⁡x3+sqrt⁡2,x+RootOf⁡_Z2−6,index=1,x
6⁢3⁢2−2
r1,r2,r3≔seq⁡RootOf⁡_Z3−3,index=i,i=1..3
r1,r2,r3≔RootOf⁡_Z3−3,index=1,RootOf⁡_Z3−3,index=2,RootOf⁡_Z3−3,index=3
Resultant⁡x−r15,x−r2⁢x−r3,x
−RootOf⁡_Z3−3,index=2+RootOf⁡_Z3−3,index=15⁢RootOf⁡_Z3−3,index=2+2⁢RootOf⁡_Z3−3,index=15
Nested and mixed radicals and RootOfs are also supported:
Resultant⁡x2−RootOf⁡_Z2−2,index=1,x−214,x
Resultant⁡x−RootOf⁡_Z2−RootOf⁡_Z2−2,index=1,index=1,x−sqrt⁡sqrt⁡8,x
−234+214
The input must be a pair of polynomials in x. If the inputs are rational expressions in x, an error will be returned:
Resultant⁡x+1a,x+1b,x
a−ba⁢b
Resultant⁡x+1x,x+1a,x
Error, (in Algebraic:-Resultant) polynom(s) in x expected
The coefficients may contain rational functions of arbitrary variables:
Resultant⁡a+b⁢x2+a+ba−b,a−b⁢x2+a−ba+b,x
4⁢b2
The input may contain polynomials disguised as rational functions, because they will be simplified by Normal:
Resultant⁡x2+1x−I,x2+1x+I,x
−2⁢I
Partial factorizations in the input will be preserved, if possible:
Resultant⁡x−a⁢x−sqrt⁡2,x−b⁢x−sqrt⁡8,x
−a−b⁢a−2⁢2⁢−b+2⁢2
Resultant⁡x−a2⁢x−b3,x−c4⁢x−d5,x
a−c8⁢a−d10⁢b−c12⁢b−d15
Non-algebraic sub-expressions such as sin⁡x will be frozen and treated as elements of the coefficient field:
Resultant⁡x−sin⁡x2,x−foo⁡y3,x
−foo⁡y+sin⁡x6
However, whenever possible, such expressions will be converted to algebraic numbers (see ConvertRootOf):
Resultant⁡x−sin⁡π3,x⁢y+exp⁡I⁢π,x
3⁢y2−1
A non-algebraic function can also be used for the x parameter, as long as it is not of type Algebraic Object:
Resultant⁡5⁢sin⁡x+10,3⁢sin⁡x+9,sin⁡x
15
Resultant⁡5⁢sin⁡π7+10,3⁢sin⁡π7+9,sin⁡π7
Error, invalid input: Algebraic:-Resultant expects its 3rd argument, x, to be of type Or(name,And(function,Not(AlgebraicObject))), but received sin(1/7*Pi)
The arguments of functions in the input will be recursively normalized (see Normal):
Resultant⁡sin⁡x2−3x−RootOf⁡_Z2−3⁢x,x+sin⁡x+RootOf⁡_Z2−3,x
sin⁡x+RootOf⁡_Z2−32
Non-algebraic functions in the input may become algebraic after recursive treatment:
Resultant⁡x⁢y,x+cos⁡π⁢y+πy+1,x
−y
All algebraic numbers will be reduced modulo their minimal polynomial (see Reduce):
Resultant⁡x3,RootOf⁡_Z2−2⁢_Z−3⁢x+1,x
7⁢RootOf⁡_Z2−2⁢_Z−3+6
Resultant⁡x3,x+1RootOf⁡_Z2−2⁢_Z−3,x
7⁢RootOf⁡_Z2−2⁢_Z−327−2027
The output will be fully normalized and rationalized:
Resultant⁡x−1⁢a2−b2,xa+b,x
a−b
Resultant⁡x−1⁢sqrt⁡2⁢a+1,xsqrt⁡3−1,x
2⁢2⁢a+2⁢1+34
Algebraic functions such as y are not accepted:
Resultant⁡x+sqrt⁡y,x2+x,x
Error, (in Algebraic:-Resultant) polynom(s) with radalgnum coefficients expected
Floats are not accepted.
Resultant⁡x22−x⋅0.5,x+2,x
When a non-indexed RootOf is given in the input, sometimes the resultant can still be computed:
Resultant⁡2⁢x2+RootOf⁡_Z2−4,x−1,x
RootOf⁡_Z2−4+2
Resultant⁡x+RootOf⁡_Z2−2,index=1⁢RootOf⁡_Z2−3,index=1,x+RootOf⁡_Z2−6,x
−RootOf⁡_Z2−3,index=1⁢RootOf⁡_Z2−2,index=1+RootOf⁡_Z2−6
In this case, Resultant must know whether RootOf⁡_Z2−3⁢_Z+2 without an index represents 1 or 2 in order to fully determine the resultant. Without an index, the result cannot be returned in a fully simplified form:
Resultant⁡x−y−RootOf⁡_Z2−3⁢_Z+2,index=1,xy+1,x
1
Resultant⁡x−y−RootOf⁡_Z2−3⁢_Z+2,index=2,xy+1,x
y+2y+1
Resultant⁡x−y−RootOf⁡_Z2−3⁢_Z+2,xy+1,x
y+RootOf⁡_Z2−3⁢_Z+2y+1
In this case, where the leading coefficient of the polynomial given within a RootOf is a zero divisor, it is impossible to compute the resultant and an error is returned:
Resultant⁡x3+1,RootOf⁡RootOf⁡_Z2−_Z⁢Z3−2⁢x2+2,x
Error, (in Algebraic:-Resultant) reducible RootOf detected. Substitutions are {RootOf(_Z^2-_Z) = 0, RootOf(_Z^2-_Z) = 1}
To force Resultant to reduce this RootOf to one of lower degree by picking one of the substitutions arbitrarily, use option 'symbolic'=true.
Resultant⁡x3+1,RootOf⁡RootOf⁡_Z2−_Z⁢Z3−2⁢x2+2,x,symbolic=true
10
Using option 'characteristic', the resultant can be computed over finite fields:
Resultant⁡x4+4,x−1,x
5
Resultant⁡x4+4,x−1,x,characteristic=5
GreatestCommonDivisor⁡x4+4,x−1,characteristic=5
x+4
Resultant⁡x⁢y2−6,x+2y2+2⁢I⁢y−1,x,characteristic=7
2⁢y+6⁢Iy+I
With option 'makeindependent'=true, the input will be checked for algebraic dependencies even if there are more than 4 algebraic objects in the input:
CubeRootOf−4≔RootOf⁡_Z3+4,index=1
CubeRootOf−2≔RootOf⁡_Z3+2,index=1
CubeRootOf2≔RootOf⁡_Z3−2,index=1
CubeRootOf3≔RootOf⁡_Z3−3,index=1
CubeRootOf4≔RootOf⁡_Z3−4,index=1
CubeRootOf6≔RootOf⁡_Z3−6,index=1
Resultant⁡x+CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3,x+CubeRootOf−4⁢CubeRootOf6,x
−RootOf⁡_Z3+2,index=1⁢RootOf⁡_Z3−3,index=1⁢RootOf⁡_Z3−4,index=1+RootOf⁡_Z3+4,index=1⁢RootOf⁡_Z3−6,index=1
Resultant⁡x+CubeRootOf4⁢CubeRootOf−2⁢CubeRootOf3,x+CubeRootOf−4⁢CubeRootOf6,x,makeindependent=true
With option 'makeindependent'=false, the input will never be checked for algebraic dependencies:
Resultant⁡x+CubeRootOf2⁢CubeRootOf3,x+CubeRootOf6,x
Resultant⁡x+CubeRootOf2⁢CubeRootOf3,x+CubeRootOf6,x,makeindependent=false
−RootOf⁡_Z3−2,index=1⁢RootOf⁡_Z3−3,index=1+RootOf⁡_Z3−6,index=1
See Also
Algebraic[GreatestCommonDivisor]
Algebraic[Normal]
LinearAlgebra[BezoutMatrix]
LinearAlgebra[SylvesterMatrix]
Download Help Document