Resultant

The calculator gives the resultant of two univariate polynomials. It also displays the Silvester matrix.

This calculator computes the resultant of two polynomials Res(A,B). Zero resultant means the polynomials have a common factor (root). If the polynomials have no common factors the resultant is always not zero. E.g. the polynomials 3x3+9 x2+x+3 and x2+5x+6 have common factor x+3 and the resultant of these polynomials equals to zero:

Example

PLANETCALC, Resultant

Resultant

Resultant
 
Sylvester matrix
 

The resultant computation

The resultant can be calculated as the determinant of Sylvester matrix, composed of the polynomials coefficients. The calculator displays Sylvester matrix for input polynomials for reference only, since it uses another algorithm, based on Euclidean division. The calculator has a modified version of the resultant computation algorithm published in Computer Algebra and Symbolic Computation book by Joel S. Cohen 1:

//Input polynomials
u(x),v(x)
//result variable
a ⟵ 1
loop {
   //polynomial degrees
    m ⟵ deg(u(x))
    n ⟵ deg(v(x))      
    if ( n = 0 ) {
         a ⟵ a*v[0]^m
         return a;
    }
    //polynomial division remainder
    r(x) ⟵ u(x) mod v(x)
    if ( r(x) = 0 ) {
        return 0;
    }
    s ⟵ deg(r(x))
    a ⟵ a * v[n]^(m-s) * (-1)^(mn)
    u(x) ⟵ v(x)
    v(x) ⟵ r(x)
}

  1. Joel S. Cohen Computer Algebra and Symbolic Computation. Mathematical Methods. par. 7.1 The Resultant Concept 

URL copied to clipboard
PLANETCALC, Resultant

Comments