1 | initial version |
Possible alternative in SR :
sage: var("x, y, z")
(x, y, z)
sage: f = x^2*(x + y + z + 1) + x^3*(y^2 + z^2 + 1); f
(y^2 + z^2 + 1)*x^3 + (x + y + z + 1)*x^2
sage: f.canonicalize_radical().factor()
(x*y^2 + x*z^2 + 2*x + y + z + 1)*x^2
HTH,
2 | No.2 Revision |
Possible alternative in SR :
sage: var("x, y, z")
(x, y, z)
sage: f = x^2*(x + y + z + 1) + x^3*(y^2 + z^2 + 1); f
(y^2 + z^2 + 1)*x^3 + (x + y + z + 1)*x^2
sage: f.canonicalize_radical().factor()
(x*y^2 + x*z^2 + 2*x + y + z + 1)*x^2
Also :
sage: f.collect_common_factors()
((y^2 + z^2 + 1)*x + x + y + z + 1)*x^2
HTH,