2
$\begingroup$

Say I have a list

L = {0,1,2,4,6}

how can I form a power series with coefficients in L

x + 2x^2 + 4x^3 + 6x^4

?

$\endgroup$
  • 4
    $\begingroup$ (I'm sure this is a dupe, but I can't find the original.) Try Expand[FromDigits[Reverse[{0, 1, 2, 4, 6}], x]] $\endgroup$ – J. M.'s technical difficulties Feb 3 at 23:05
  • 1
    $\begingroup$ also L. x^Range[0, Length[L] - 1]? $\endgroup$ – kglr Feb 3 at 23:10
  • 1
    $\begingroup$ Or SeriesData[x, 0, L, 0, Length@L, 1] if someone wants a Series... $\endgroup$ – Michael E2 Feb 3 at 23:36
  • $\begingroup$ @MichaelE2 - SeriesData[x, 0, L, 0, Length@L, 1] // Normal for polynomial $\endgroup$ – Bob Hanlon Feb 3 at 23:41
  • 1
    $\begingroup$ @Bernoulli - don't ask new questions in comments. Also, when asking the new question you must include the definition of p for anyone to understand why you are getting an expansion. $\endgroup$ – Bob Hanlon Feb 3 at 23:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.