CoefficientRules
CoefficientRules[poly,{x1,x2,…}]
gives the list {{e11,e12,…}c1,{e21,…}c2,…} of exponent vectors and coefficients for the monomials in poly with respect to the xi.
CoefficientRules[poly,{x1,x2,…},order]
gives the result with the monomial ordering specified by order.
Details and Options
- CoefficientRules works whether or not poly is explicitly given in expanded form.
- CoefficientRules[poly] is equivalent to CoefficientRules[poly,Variables[poly]].
- Possible settings for order are the same as in MonomialList.
- The default order is "Lexicographic".
- CoefficientRules[poly,vars,Modulus ->m] computes the coefficients modulo m.
- CoefficientRules[poly,All,order] is the same as CoefficientRules[poly,Variables[poly],order].
Examples
open allclose allScope (1)
Properties & Relations (2)
FromCoefficientRules reconstructs the original polynomial:
MonomialList gives a different representation:
For two variables "DegreeLexicographic" and "DegreeReverseLexicographic" coincide:
Possible Issues (1)
The list given by Variables[poly] is not always sorted:
Text
Wolfram Research (2008), CoefficientRules, Wolfram Language function, https://reference.wolfram.com/language/ref/CoefficientRules.html.
CMS
Wolfram Language. 2008. "CoefficientRules." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/CoefficientRules.html.
APA
Wolfram Language. (2008). CoefficientRules. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/CoefficientRules.html