This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.


Resultant of two polynomials

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.


polylib::resultant(f, g, <x>)
polylib::resultant(fexpr, gexpr, <inds>, <x>)


polylib::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.

Both input polynomials must have exactly the same second and third operand, i.e. their variables and coefficient rings must be identical.

If the arguments are expressions then these are converted into polynomials using poly. polylib::resultant returns FAIL if the expressions cannot be converted.

If the argument 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.

If the coefficient ring is a domain, it must have a "_divide" method.

If the coefficient ring is Expr, polylib::resultant returns an expression if called with two univariate polynomials. See Example 2.

For polynomials over IntMod(n), the computation may stop with an error if n is not prime.


Example 1

If 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);

Example 2

If the coefficient ring of two univariate input polynomials is Expr, the result is an expression:

polylib::resultant(poly(x^2 -1), poly(x + 1));


f, g


fexpr, gexpr





List of indeterminates

Return Values

If the input consists of polynomials in at least two variables, polylib::resultant returns a polynomial in one variable less than the input.

Overloaded By

p, q


The resultant of two polynomials is defined to be the determinant of their Sylvester matrix. A call to polylib::resultant is more efficient than consecutive calls to linalg::sylvester and det.

See Also

MuPAD Functions

Was this topic helpful?