Hello,
2009/10/12 <[email protected]>:
>
> Hi, I have another question.
>
> I have got the expression,
>
> a^2*x^4+b*x^4+c*x+d*y*x^4...(many items)
>
> I want to get the coefficient of all the x,x^2,x^3,x^4....
>
> here for x^4 is (a^2+b+d*y...)
>
> how can I get it?
Something like this:
sage: var('a,b,c,d,x,y')
(a, b, c, d, x, y)
sage: ex = a^2*x^4+b*x^4+c*x+d*y*x^4
sage: ex.coefficient(x^4)
a^2 + d*y + b
--Mike
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---