[mg90354] Extracting terms of a polynomial into a list and then multiply each

View: New views
5 Messages — Rating Filter:   Alert me  

[mg90354] Extracting terms of a polynomial into a list and then multiply each

by Bob F :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 + . . .

And I would like to extract each term of this polynomial into a list
like

    { 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,  . . . }

Then I would like to take this list and multiply each element in the
list by the integrated polynomial in order to get a list of
polynomials that shows all of the components of the fully multiplied
polynomial in an expanded form. In other words I would like to show
the term by term expansion of the integral multiplied by itself, ie

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

Was working thru an example of what Euler did to compute Zeta[2] and
was looking for patterns in the polynomial coefficients.

Thanks very much ...

-Bob



[mg90374] Re: [mg90354] Extracting terms of a polynomial into a list and then multiply each

by Thomas Dowling :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

As regards the first part,


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

Apply[List, poly]

or (infix syntax)

List @@ poly

Tom Dowling


On Mon, Jul 7, 2008 at 10:05 AM, Bob F <deepyogurt@...> 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 + . . .
>
> And I would like to extract each term of this polynomial into a list
> like
>
>    { 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,  . . . }
>
> Then I would like to take this list and multiply each element in the
> list by the integrated polynomial in order to get a list of
> polynomials that shows all of the components of the fully multiplied
> polynomial in an expanded form. In other words I would like to show
> the term by term expansion of the integral multiplied by itself, ie
>
>     Expand[ Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]],
> {t, 0, x}] *
>                  Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0,
> 50}]], {t, 0, x}]]
>
> Was working thru an example of what Euler did to compute Zeta[2] and
> was looking for patterns in the polynomial coefficients.
>
> Thanks very much ...
>
> -Bob
>
>
>



[mg90377] Re: [mg90354] Extracting terms of a polynomial into a list and then

by Daniel Lichtblau :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 + . . .
>
> And I would like to extract each term of this polynomial into a list
> like
>
>     { 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,  . . . }
>
> Then I would like to take this list and multiply each element in the
> list by the integrated polynomial in order to get a list of
> polynomials that shows all of the components of the fully multiplied
> polynomial in an expanded form. In other words I would like to show
> the term by term expansion of the integral multiplied by itself, ie
>
>      Expand[ Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]],
> {t, 0, x}] *
>                   Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0,
> 50}]], {t, 0, x}]]
>
> Was working thru an example of what Euler did to compute Zeta[2] and
> was looking for patterns in the polynomial coefficients.
>
> Thanks very much ...
>
> -Bob

You might find it simpler just to work with the series for ArcSin[x],
since that is what the integral will give.

As for getting coefficients, I doubt you will get what you want, to 100
terms, by the expansion you show above. Certainly the last 50 (the high
order terms) will not be the same as if you squared first, then took the
power series. Reason being, if each factor is only correct to order 50,
then their product is only correct to same order.

You can get 50 correct terms to the series expansion of the squared
integral as below. Just integrate the Series, then square.

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

If you want the coefficients in list form, their actually already in the
SeriesData object returned by Series (and retained by Integrate and
Power). Just look at the InputForm (that list will be in the third element).

Daniel Lichtblau
Wolfram Research







[mg90383] Re: [mg90354] Extracting terms of a polynomial into a list and then

by Lou Talman :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


On Jul 7, 2008, at 3:05 AM, Bob F wrote:

> Can anyone suggest a way to extract the terms of a polynomial into a
> list.

Apply[List, P[x]]


--Lou Talman
  Department of Mathematical & Computer Sciences
  Metropolitan State College of Denver

  <http://clem.mscd.edu/%7Etalmanl>




[mg90400] Re: [mg90354] Extracting terms of a polynomial into a list and then

by mante :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 + . . .
>
> And I would like to extract each term of this polynomial into a list
> like
>
>     { 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,  . . . }
>
> Then I would like to take this list and multiply each element in the
> list by the integrated polynomial in order to get a list of
> polynomials that shows all of the components of the fully multiplied
> polynomial in an expanded form. In other words I would like to show
> the term by term expansion of the integral multiplied by itself, ie
>
>      Expand[ Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]],
> {t, 0, x}] *
>                   Integrate[Normal[Series[(1 - t^2)^(-1/2), {t, 0,
> 50}]], {t, 0, x}]]
>
> Was working thru an example of what Euler did to compute Zeta[2] and
> was looking for patterns in the polynomial coefficients.
>
> Thanks very much ...
>
> -Bob
>
>
>  
Something like :
Integrate[
  Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]], {t, 0, x}] Apply[List,
Normal[Series[(1 - t^2)^(-1/2), {t, 0, 50}]]]
?

--
*********************************

    Claude MantĂ©

UMR CNRS 6117 LMGEM
http://www.com.univ-mrs.fr/LMGEM/

Centre d'Océanologie de Marseille
Campus de Luminy, Case 901
13288 MARSEILLE Cedex 09
tel : (+33) 491 829 127
fax : (+33) 491 829 119


*********************************


LightInTheBox - Buy quality products at wholesale price