Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Two "brute force" possibilities :

sage: (2*(x+y+z)-51/4).coefficients(x)[0][0].coefficients(y)[0][0].coefficients(
....: z)[0][0]
-51/4
sage: (2*(x+y+z)-51/4).coefficients(x,sparse=False)[0].coefficients(y,sparse=Fal
....: se)[0].coefficients(z,sparse=False)[0]
-51/4

Both can be automated bu looping or reducing on the polynom's variables.

HTH.