MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Extracting terms of a polynomial into a list and then multiply each

  • To: mathgroup at smc.vnet.net
  • Subject: [mg90397] Re: Extracting terms of a polynomial into a list and then multiply each
  • From: Bill Rowe <readnews at sbcglobal.net>
  • Date: Tue, 8 Jul 2008 02:27:11 -0400 (EDT)

On 7/7/08 at 5:05 AM, deepyogurt at gmail.com (Bob F) wrote:

>Can anyone suggest a way to extract the terms of a polynomial into a
>list. For example the integral of the series expansion of

>1 -------------------- (1 - t^2) ^(1/2)

>could be expressed in Mathematica (the first 50 terms) as

>Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]], {t, 0,
>x}]

>and gives the polynomial

>x + x^3/6 + (3 x^5)/40 + (5 x^7)/112 + (35 x^9)/1152 + (63 x^11)/
>2816 + (231 x^13)/13312 + (143 x^15)/10240 +
>(6435 x^17)/557056 + (12155 x^19)/1245184 + (46189 x^21)/
>5505024 + . . .

Any expression can be converted to a list using Apply. For example,

In[17]:= List @@ (3 x^2 + 2 x + 1)

Out[17]= {1,2 x,3 x^2}

Another function you might find useful is CoefficientList. For example,

In[19]:= CoefficientList[3 x^2 + 2 x + 1, x]

Out[19]= {1,2,3}


  • Prev by Date: Minimum input for GroebnerBasis
  • Next by Date: Re: A strange precision behavior?
  • Previous by thread: Re: Extracting terms of a polynomial into a list and then
  • Next by thread: Glitch in online documentation system (a minor bug, actually?)