separable form should be (x - something in terms of x1,x2,x3,x4)*(x- something in terms of x1,x2,x3,x4)*(x -something in terms of x1,x2,x3,x4 )*(x - something in terms of x1,x2,x3,x4)

factor(f, x);

Error, (in factor) 2nd argument, x, is not a valid algebraic extension

how to factor into separable form?

ferrai := -x1^3*x2*x3*x4-x1^2*x2^2*x3^2-x1^2*x2^2*x4^2-x1^2*x3^2*x4^2-x1*x2^3*x3*x4-x1*x2*x3^3*x4-x1*x2*x3*x4^3-x2^2*x3^2*x4^2+x1^2*x2*x3*y+x1^2*x2*x4*y+x1^2*x3*x4*y+x1*x2^2*x3*y+x1*x2^2*x4*y+x1*x2*x3^2*y+x1*x2*x4^2*y+x1*x3^2*x4*y+x1*x3*x4^2*y+x2^2*x3*x4*y+x2*x3^2*x4*y+x2*x3*x4^2*y-x1*x2*y^2-x1*x3*y^2-x1*x4*y^2-x2*x3*y^2-x2*x4*y^2-x3*x4*y^2+y^3;

coeff(ferrai, y^3);

coeff(ferrai, y^2);

coeff(ferrai, y);

res := simplify(ferrai - coeff(ferrai, y^3)*y^3 - coeff(ferrai, y^2)*y^2 - coeff(ferrai, y)*y);

c2 := -coeff(ferrai, y^2)/coeff(ferrai, y^3);

sys1 := c1*c3 - 4*c4 = coeff(ferrai, y)/coeff(ferrai, y^3);

sys2 := -c3^2-(c1^2)*c4+4*c2*c4 = res/coeff(ferrai, y^3);

diff(lhs(sys1),c1) = diff(rhs(sys1),c1);

diff(lhs(sys1),c3) = diff(rhs(sys1),c3);

diff(lhs(sys1),c4) = diff(rhs(sys1),c4);

diff(lhs(sys2),c1) = diff(rhs(sys2),c1);

diff(lhs(sys2),c3) = diff(rhs(sys2),c3);

diff(lhs(sys2),c4) = diff(rhs(sys2),c4);

c1sol := solve(diff(lhs(sys2),c4) = diff(rhs(sys2),c4), c1)[1];

indets(subs(c1=c1sol,sys1));

indets(subs(c1=c1sol,sys2));

indets([subs(c1 = c1sol, sys1), subs(c1 = c1sol, sys2)]);

result := solve({subs(c1 = c1sol, sys1), subs(c1 = c1sol, sys2)},{c3,c4}, explicit);

c1sol := solve(diff(lhs(sys2),c4) = diff(rhs(sys2),c4), c1)[1];

c2sol := -coeff(ferrai, y^2)/coeff(ferrai, y^3);

c3sol := rhs(result[1][1]);

c4sol := rhs(result[1][2]);

f := x^4-c1sol*x^3+c2sol*x^2-c3sol*x+c4sol;

aa := factor(f);

aa := factor(f,x);