Hi.
I'm using this polynomial:

p = z*x^2 + x^2 − (x^2 + y^2 )*(a*x − 2*b*y) + z*y^2 + y^2

and when I issue this command:

p.collect(x).collect(y)

to Sage 8.3 in the terminal, I get this response:

-a*x^3 + 2*b*x^2*y + 2*b*y^3 - (a*x - z - 1)*y^2 + x^2*z + x^2

Notice that only y is collected.
Here is the results from p.collect(x):

-a*x^3 - a*x*y^2 + 2*b*y^3 + (2*b*y + z + 1)*x^2 + y^2*z + y^2

X is collected OK.
Here's p.collect(y)

-a*x^3 + 2*b*x^2*y + 2*b*y^3 - (a*x - z - 1)*y^2 + x^2*z + x^2

Y is collected OK.
But put them both together p.collect(x).collect(y):

-a*x^3 + 2*b*x^2*y + 2*b*y^3 - (a*x - z - 1)*y^2 + x^2*z + x^2

And only y is collected!

Would you please tell me how to fix this?

Thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to