resultant: Resultant of two polynomials

View source: R/resultant.R

resultantR Documentation

Resultant of two polynomials

Description

Resultant of two polynomials with rational coefficients.

Usage

resultant(qspray1, qspray2, var = 1)

Arguments

qspray1, qspray2

two qspray polynomials with at most nine variables

var

integer indicating with respect to which variable the resultant is desired (e.g. 1 for x and 2 for y)

Value

If both qspray1 and qspray2 are univariate polynomials, the function returns a bigq rational number. Otherwise, it returns a qspray polynomial that does not involve the var-th variable.

Examples

library(resultant)
x <- qlone(1)
y <- qlone(2)
f <- x^4 - x^3 + x^2 - 2*x*y^2 + y^4
g <- x - 2*y^2
resultant(f, g, var = 1)
resultant(f, g, var = 2)

resultant documentation built on Sept. 11, 2024, 8:01 p.m.