I'm using a Ubuntu 18.04.1 LTS, currently with Xfce4, but also Lxde, on a 
Dell G7 with i7-8750H cpu and 16 gb of ram, and I built Sage version 8.3 
from source.

The text I'm working from say that I should get this result:

sage: p.collect(x).collect(y) 

sage: 2*b*y*x^2 + 2*b*y^3−(a*x−z−1)*x^2−(a*x−z−1)*y^2

Am I missing something? 
Is this output correct?
Am I misusing the collect() function?

Thanks for your time.

On Sunday, August 19, 2018 at 3:53:51 AM UTC-7, rob.w...@gmail.com wrote:
>
> 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