coeffs - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


MTM

  

coeffs

  

extract all coefficients of a multivariate polynomial

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

coeffs(P)

coeffs(P, x)

c, t := coeffs(P, x)

Parameters

P

-

multivariate polynomial

x

-

variable

c

-

variable

t

-

variable

Description

• 

coeffs(P) returns the coefficients of the polynomial P with respect to all the indeterminates of P.

• 

coeffs(P,x) returns the coefficients of the polynomial P with respect to x.

• 

[c, t] = coeffs(P,x) also returns an array of the terms of P.  The terms of P line up such that add(i,i=zip(`*`,a,b)); gives back the original polynomial, P.

Examples

> 

with⁡MTM:

> 

t≔2+3+4⁢log⁡x2−5⁢log⁡x

t≔2+3+4⁢ln⁡x2−5⁢ln⁡x

(1)
> 

coeffs⁡expand⁡t

111619

(2)
> 

y≔a+b⁢sin⁡x+c⁢sin⁡2⁢x

y≔a+b⁢sin⁡x+c⁢sin⁡2⁢x

(3)
> 

coeffs⁡y,sin⁡x

a+c⁢sin⁡2⁢xb

(4)
> 

coeffs⁡expand⁡y,sin⁡x

ab+2⁢c⁢cos⁡x

(5)
> 

z≔3⁢x2⁢u2+5⁢x⁢u3

z≔5⁢x⁢u3+3⁢x2⁢u2

(6)
> 

coeffs⁡z

53

(7)
> 

coeffs⁡z,x

3⁢u25⁢u3

(8)
> 

c,t

c,2+3+4⁢ln⁡x2−5⁢ln⁡x

(9)

See Also

MTM[expand]

MTM[log]

MTM[sin]