MTM
coeffs
extract all coefficients of a multivariate polynomial
Calling Sequence
Parameters
Description
Examples
coeffs(P)
coeffs(P, x)
c, t := coeffs(P, x)
P
-
multivariate polynomial
x
variable
c
t
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.
withMTM:
t≔2+3+4logx2−5logx
t≔2+3+4lnx2−5lnx
coeffsexpandt
111619
y≔a+bsinx+csin2x
coeffsy,sinx
a+csin2xb
coeffsexpandy,sinx
ab+2ccosx
z≔3x2u2+5xu3
z≔5xu3+3x2u2
coeffsz
53
coeffsz,x
3u25u3
c,t
c,2+3+4lnx2−5lnx
See Also
MTM[expand]
MTM[log]
MTM[sin]
Download Help Document