[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread Francois Maltey
Hello wxuyec, > The same expression, How can I want to get > > the coefficient of x^4*y? > The coefficient of the coefficient... try var('a b x y') res = expand ((a+b+x+y+1)^6) res.coefficient (x^4) res.coefficient (y) res.coefficient (x^4).coefficient(y) res.coefficient (y).coefficient(x^4)

[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread wxuyec
The same expression, How can I want to get the coefficient of x^4*y? Thank you! Mike Hansen 写道: > Hello, > > 2009/10/12 : > >> 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

[sage-support] Re: [sage-support]how to collect the same items

2009-10-12 Thread Mike Hansen
Hello, 2009/10/12 : > > 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')