up previous next

Coefficients

Syntax

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

Summary

list of coefficients of a polynomial or vector

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 ::= Q[x,y,z];
F := 3x^2y+5y^3-xy^5;
Coefficients(F);
[-1, 3, 5]
-------------------------------
ScalarProduct(Coefficients(F),Support(F)) = F;
TRUE
-------------------------------
V:=Vector(3x^2+y,x-5z^3);
Coefficients(V);
[-5, 3, 1, 1]
-------------------------------
ScalarProduct(Coefficients(V),Support(V))=V;
TRUE
-------------------------------
Coefficients(x^3z+xy+xz+y+2z,x);
[z, 0, y + z, y + 2z]
-------------------------------
F := (1+2*x+3*y^4+5*z^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