Consider the multivariable polynomial $$g(x,y,z,w)=a_1xyw+a_2xy^2+a_3xyz+a_4x^3z+a_5z^3+a_6y^2z+a_7w^4\;,$$ where $a_1,\cdots, a_7$ are constants. I would like to use Maple to extract the coefficients of all the terms of total degree 3 in the above expression. As a first step, I sorted the terms of the polynomial by total degree, using $>\mbox{sort}(g, '\mbox{tdeg}');$ but then I have no idea how to use coeff to collect the coefficients of interest. Any help is welcome!
2026-03-29 18:11:51.1774807911
Maple help needed
390 Views Asked by Bumbble Comm https://math.techqa.club/user/bumbble-comm/detail At
2
Just do the following:
p:="your_polynomial";
vars:=[x,y,z,w];
varset:={op(map(i->op(map(j->op(map(k->i*j*k,vars)),vars)),vars))};
coeffs:=map(i->coeff(p,i),varset);
and you have got everything. There are also powerset methods, but I have no maple here to look them up.