polylib::resultant --
resultant of two polynomials
Introductionpolylib::resultant(f, g) returns the
resultant of f and g with respect to their
first variable.
polylib::resultant(f, g, x) returns the
resultant of f and g with respect to the
variable x.
polylib::resultant(fexpr, gexpr, inds, x)
returns the resultant of fexpr and gexpr with
respect to the variable x; fexpr and
gexpr are viewed as polynomials in the indeterminates
inds.
Call(s)polylib::resultant(f, g <, x>)
polylib::resultant(fexpr, gexpr <, inds> <,
x>)
Parametersf, g |
- | polynomials |
fexpr, gexpr |
- | expressions |
x |
- | indeterminate |
inds |
- | list of indeterminates |
ReturnsIf the input consists of polynomials in at least two variables,
polylib::resultant returns a polynomial in one variable
less than the input.
If the input consists of univariate polynomials,
polylib::resultant returns an element of the coefficient
ring.
If the input consists of expressions,
polylib::resultant returns an expression.
p, q
Related
Functionspolylib::discrim,
linalg::det, linalg::sylvester
Detailspoly.
polylib::resultant returns FAIL if the
expressions cannot be converted.inds is missing, the input expressions
are converted into polynomials in all indeterminates occurring in at
least one of them. They are not independently converted, hence
the conversion cannot result in two polynomials with different
variables causing an error. See example 1."_divide" method.Expr,
polylib::resultant returns an expression if called with
two univariate polynomials. See example 2.IntMod(n), the computation may
stop with an error if n is not prime.
Example
1If the input consists of expressions, the sets of indeterminates occurring in the expressions need not coincide:
>> polylib::resultant(a*x + c, c*x + d, x);
2
a d - c
Example
2If the coefficient ring of two univariate input
polynomials is Expr, the result is an expression:
>> polylib::resultant(poly(x^2 -1), poly(x + 1));
0
Backgroundpolylib::resultant is
more efficient than consecutive calls to linalg::sylvester and linalg::det.resultant