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.
with⁡MTM:
t≔2+3+4⁢log⁡x2−5⁢log⁡x
t≔2+3+4⁢ln⁡x2−5⁢ln⁡x
coeffs⁡expand⁡t
111619
y≔a+b⁢sin⁡x+c⁢sin⁡2⁢x
coeffs⁡y,sin⁡x
a+c⁢sin⁡2⁢xb
coeffs⁡expand⁡y,sin⁡x
ab+2⁢c⁢cos⁡x
z≔3⁢x2⁢u2+5⁢x⁢u3
z≔5⁢x⁢u3+3⁢x2⁢u2
coeffs⁡z
53
coeffs⁡z,x
3⁢u25⁢u3
c,t
c,2+3+4⁢ln⁡x2−5⁢ln⁡x
See Also
MTM[expand]
MTM[log]
MTM[sin]
Download Help Document