up previous next
coefficients

list of coefficients of a polynomial or vector

Syntax
coefficients(F:POLY or VECTOR):LIST
coefficients(F:POLY, X:INDET):LIST
coefficients(F:POLY, S:LIST):LIST

Description
This function returns the coefficients of F. In the first form, a list of the (non-zero) coefficients is returned; the order being decreasing on the terms in F as determined by the term-ordering of the ring to which F belongs.

In the second form, the function views F as a polynomial in X, and returns a list of coefficients which are polynomials in the remaining variables; their order is decreasing in powers of X, and a zero value is given for those powers of X absent from F.

In the third form, the coefficients of the specified terms are returned; their order is determined by the list S.

Example
/**/  Use R ::= QQ[x,y,z];
/**/  F := 3*x^2*y + 5*y^3 - x*y^5;
/**/  coefficients(F);
[-1, 3, 5]

  ScalarProduct(Coefficients(F), Support(F)) = F;
True
-------------------------------
  V := Vector(3x^2+y, x-5z^3); --***OBSOLETE MANUAL: WORK IN PROGRESS***
  Coefficients(V);
[-5, 3, 1, 1]
-------------------------------
  ScalarProduct(Coefficients(V), Support(V)) = V;
True
-------------------------------
/**/  coefficients(x^3*z+x*y+x*z+y+2*z, x);
[z, 0, y + z, y + 2z]
-------------------------------
/**/  F := (1 + 2x + 3y^4 + 5z^6)^7;
/**/  Skeleton := [1, x^3, y^12, z^19, x^2*y^8*z^12];
/**/  coefficients(F, Skeleton);
[1, 280, 945, 0, 567000]

See Also