[Maxima] RFC: extracting coefficients of a multivariate polynomial
fateman at cs.berkeley.edu
Thu Apr 24 14:30:43 CDT 2008
oops, one more use of "lv" there, and some other items..
your polynomial variables are not being set up properly;
rat(p,[x,y,z]) is not the same as rat(p,x,y,z).
perhaps try this..
my_coeff5(v,exps,poly) := block(
[c:,k,l,h,rpoly,lv:length(v), ratvars:v], /*maybe should be
rpoly : rat(poly),
for k : 1 thru length(exps) do block(
h : rpoly,
for l : 1 thru lv do block(
h : ratcoeff(h,v[lv+1-l],exps[k][lv+1-l])),
c : cons(h,c)),
More information about the Maxima