coeffs
extract all coefficients of a multivariate polynomial
Calling Sequence
Parameters
Description
Thread Safety
Examples
coeffs(p, x, 't')
p
-
multivariate polynomial
x
(optional) indeterminate or list/set of indeterminates
t
(optional) an unevaluated name
The coeffs function returns an expression sequence of all the coefficients of the polynomial p with respect to the indeterminate(s) x.
If x is not specified, coeffs computes the coefficients with respect to all the indeterminates of p (see the indets function). If a third argument t is specified (call by name), it is assigned an expression sequence of the terms of p. There is a one-to-one correspondence between the coefficients and the terms of p.
Note that p must be collected (collect) with respect to the appropriate indeterminates. For multivariate polynomials, you may need to use collect with `distributed`.
The coeffs command is thread-safe as of Maple 15.
For more information on thread safety, see index/threadsafe.
s≔3⁢v2⁢y2+2⁢v⁢y3
coeffs⁡s
3,2
coeffs⁡s,v,t
3⁢y2,2⁢y3
v2,v
r≔−6⁢x+3⁢y+23⁢x2−4⁢x⁢y⁢z+7⁢z2
r≔−4⁢x⁢y⁢z+23⁢x2+7⁢z2−6⁢x+3⁢y
coeffs⁡r
−4,23,7,−6,3
coeffs⁡r,x,k
23,−4⁢y⁢z−6,7⁢z2+3⁢y
k
x2,x,1
u≔coeffs⁡x2−y2−1,x,y,l
u≔1,−1,−1
l3,u3
1,−1
For multivariate polynomials, you may need to use collect with `distributed`.
p≔c+a⁢x2+d+b⁢x⁢y+e⁢y+f:
coeffs⁡p,x,y
Error, invalid arguments to coeffs
coeffs⁡collect⁡p,x,y,distributed,x,y
f,b,c+a,d+e
See Also
coeff
collect
indets
lcoeff
PolynomialTools[CoefficientVector]
tcoeff
Download Help Document