Skip to main content

polynomials - What is the inverse of CoefficientList?


I have numbers in vector notation. I need to get polynomial notation from them.


My numbers are {0, 1, 23, 5, 15, 0, 0, 0}. I want to get $x + 23x^2 + 5x^3 + 15x^4$ from this list.


How can I get that polynomial?



Answer



One straightforward approach is to calculate the answer directly:


Total[{0, 1, 23, 5, 15, 0, 0, 0} x^(Range[8] - 1)]

Comments