I'd like to find the number of real roots of a polynomial f obtained as a resultant using mp_res_mat(). To do this, I write:
LIB "solve.lib";
LIB "rootsur.lib";
ring r = (0,x),(y),dp;
poly p1 = 2*(1+x^2)^2*(1+y^2)*(x^5-x+y)-y^4*x*(1+y^2)-2*x^3*(1+x^2)^2;
poly p2 = 2*(1+y^2)^2*(1+x^2)*(y^5-y-x)-x^4*y*(1+x^2)-2*y^3*(1+y^2)^2;
ideal i = p1,p2;
poly f = det(mp_res_mat(i));
I would now like to invoke nrroots(f), but x is a parameter in the ring r, not a variable, so this doesn't work. How can I take f to a new ring s = 0,x,dp and then invoke nrroots(f)?
Thanks in advance!
I'd like to find the number of real roots of a polynomial f obtained as a resultant using mp_res_mat(). To do this, I write:
LIB "solve.lib";
LIB "rootsur.lib";
ring r = (0,x),(y),dp;
poly p1 = 2*(1+x^2)^2*(1+y^2)*(x^5-x+y)-y^4*x*(1+y^2)-2*x^3*(1+x^2)^2;
poly p2 = 2*(1+y^2)^2*(1+x^2)*(y^5-y-x)-x^4*y*(1+x^2)-2*y^3*(1+y^2)^2;
ideal i = p1,p2;
poly f = det(mp_res_mat(i));
I would now like to invoke nrroots(f), but x is a parameter in the ring r, not a variable, so this doesn't work. How can I take f to a new ring s = 0,x,dp and then invoke nrroots(f)?
Thanks in advance! :)