Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
PolynomialTools[CoefficientVector] - return a Vector of coefficients from a univariate polynomial
PolynomialTools[CoefficientList] - return a list of coefficients from a univariate polynomial
Calling Sequence
CoefficientVector(p, x, vectoropts, orderopts)
CoefficientList(p, x, orderopts)
Parameters
p
-
polynom(anything, x)
x
name of main variable
vectoropt
(optional) a sequence of Vector constructor options; see Vector
orderopts
(optional) equation of the form termorder=reverse or termorder=forward
Description
The CoefficientVector(p, x) calling sequence returns a Vector of coefficients from a polynomial p in x.
The CoefficientList(p, x) calling sequence returns a list of coefficients from a polynomial p in x.
If the term order is not specified or termorder=forward, for , the k-th element of the Vector or list returned corresponds to .
If termorder=reverse is specified, then the coefficients will be stored in the reverse of the above order.
These commands are useful because the Maple command coeff is of linear complexity in the degree of the polynomial. Thus, a naive implementation of CoefficientVector would be of quadratic complexity. The actual implementation is of linear complexity. In fact, for CoefficientVector, if sparse storage is specified as an option, the complexity is linear in the actual number of terms.
The inverse commands are FromCoefficientVector and FromCoefficientList.
Examples
For the zero polynomial, the CoefficientVector command returns a zero-dimensional Vector and the CoefficientList command returns an empty list.
Non-expanded polynomials will also work but since collect will be called on them, this could be inefficient.
The coefficients of the polynomial do not have to be numbers.
See Also
coeff, coeffs, expand, FromCoefficientList, PolynomialTools, Vector
Download Help Document