Subject: Coefficients in a multivariate polynomial?
From: Alasdair McAndrew
Date: Wed, 5 Jun 2013 23:32:42 +1000
Suppose I want to find the coefficient of x^2y in the expansion of
(x-2*y+3*z-4)^5
I can do:
(%i1) ex:expand((x-2*y+3*z-4)^5);
(%i2) coeff(coeff(coeff(ex,x,2),y,1),z,0);
But surely there must be a simpler way than calling three nested coeff's?
What I have is an expression which may be considered as a multivariate
polynomial, the coefficients being themselves expressions; something like
(1-a^2)xy-(a-b)x^2y+(a-b^2+c)xy^2+...
I need to be able to extract the coefficients: 1-a^2, a-b, a-b^2+c from
this expression. Is there an easy way to do this in Maxima?
Thanks,
Alasdair
--
Blog: http://amca01.wordpress.com
Web: http://sites.google.com/site/amca01/
Facebook: http://www.facebook.com/alasdair.mcandrew