library(resultant)
x <- qlone(1)
y <- qlone(2)
p <- x^2 * y * (y^2 - 5*x + 6)
q <- x^2 * y * (3*y + 2)
principalSubresultants(p, q, var = 1) # should be 0, 0, non-zero, ...
principalSubresultants(p, q, var = 2) # should be 0, non-zero, ...
Run the code above in your browser using DataLab