Hi, Dima; thanks for taking the time to help out a noob -- again.
This is what I did:
sage: a,b,y,z=var('a,b,y,z')
sage: p=z*x^2+x^2-(x^2+y^2)*(a*x-2*b*y)+z*y^2+y^2
sage: type(p)
<type 'sage.symbolic.expression.Expression'>
The book says that I should be able to do this:
sage: p.collect(x).collect(y)
And get this in return:
sage: 2*b*y*x^2 + 2*b*y^3−(a*x−z−1)*x^2−(a*x−z−1)*y^2
But instead, I get:
-a*x^3 + 2*b*x^2*y + 2*b*y^3 - (a*x - z - 1)*y^2 + x^2*z + x^2
???
On Sun, Aug 19, 2018 at 10:46 AM, Dima Pasechnik <[email protected]> wrote:
> how is p created? what is the output of
>
> type(p)
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>
--
The Great Secret?
"It is, and It isn't."
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.