resultant

Resultant of two polynomials with respect to a variable.

Category: Mathematics > Polynomials

Syntax

R = resultant(p, q, var)

Resultant of p and q, eliminating var.

Description

The resultant is the determinant of the Sylvester matrix built from the coefficients of p and q. It is zero exactly when the two polynomials have a common root, so it is a test for common factors without computing the roots.

With more than one variable it eliminates var and yields a polynomial in the others, whose roots are the values of the other variables for which a common root exists. For example the resultant of x^2 + y^2 - 1 and x - y with respect to x is 2*y^2 - 1, which gives the y coordinates of the circle-line intersection.

Input arguments

p, q
Symbolic polynomials.
var
Variable to eliminate. May be omitted when there is a single variable.

Output arguments

R
Polynomial in the remaining variables, or a number when none remains.

Example

Common root and elimination

syms x y
resultant(x^2 - 3*x + 2, x^2 - 1, x)
resultant(x^2 + y^2 - 1, x - y, x)
Output
ans = 0
ans = 2*y^2 - 1

See also

gbasis polynomialReduce solve