MathGroup Archive 2006

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

Search the Archive

Re: RE:Beginner--[Please Help]How to get coefficient list issued from a Series Command

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70430] Re: RE:Beginner--[Please Help]How to get coefficient list issued from a Series Command
  • From: dimmechan at yahoo.com
  • Date: Mon, 16 Oct 2006 02:34:38 -0400 (EDT)
  • References: <egn90j$1cd$1@smc.vnet.net>

Although I believe your query should have been solved by mine or
others' replies at

http://groups.google.gr/group/comp.soft-sys.math.mathematica/browse_thread/thread/130433016f628d48/4d3f74a2f4a61ac8?hl=el#4d3f74a2f4a61ac8

I will make an attempt to answer you again.

Here is one list of polynomials

(a[#1] + b[#1]*x + c[#1]*x^2 & ) /@ Range[20]
{a[1] + x*b[1] + x^2*c[1], a[2] + x*b[2] + x^2*c[2], a[3] + x*b[3] +
x^2*c[3], a[4] + x*b[4] + x^2*c[4],
  a[5] + x*b[5] + x^2*c[5], a[6] + x*b[6] + x^2*c[6], a[7] + x*b[7] +
x^2*c[7], a[8] + x*b[8] + x^2*c[8],
  a[9] + x*b[9] + x^2*c[9], a[10] + x*b[10] + x^2*c[10], a[11] +
x*b[11] + x^2*c[11], a[12] + x*b[12] + x^2*c[12],
  a[13] + x*b[13] + x^2*c[13], a[14] + x*b[14] + x^2*c[14], a[15] +
x*b[15] + x^2*c[15], a[16] + x*b[16] + x^2*c[16],
  a[17] + x*b[17] + x^2*c[17], a[18] + x*b[18] + x^2*c[18], a[19] +
x*b[19] + x^2*c[19], a[20] + x*b[20] + x^2*c[20]}

Here is the coefficients of each element of previous list

(CoefficientList[#1, x] & ) /@ %
{{a[1], b[1], c[1]}, {a[2], b[2], c[2]}, {a[3], b[3], c[3]}, {a[4],
b[4], c[4]}, {a[5], b[5], c[5]}, {a[6], b[6], c[6]},
  {a[7], b[7], c[7]}, {a[8], b[8], c[8]}, {a[9], b[9], c[9]}, {a[10],
b[10], c[10]}, {a[11], b[11], c[11]},
  {a[12], b[12], c[12]}, {a[13], b[13], c[13]}, {a[14], b[14], c[14]},
{a[15], b[15], c[15]}, {a[16], b[16], c[16]},
  {a[17], b[17], c[17]}, {a[18], b[18], c[18]}, {a[19], b[19], c[19]},
{a[20], b[20], c[20]}}

Here is the previous list in the format you want

% /. {a[i_], b[i_], c[i_]} :> ToExpression[{StringJoin[ToString[a],
ToString[i]], StringJoin[ToString[b], ToString[i]],
     StringJoin[ToString[c], ToString[i]]}]
{{a1, b1, c1}, {a2, b2, c2}, {a3, b3, c3}, {a4, b4, c4}, {a5, b5, c5},
{a6, b6, c6}, {a7, b7, c7}, {a8, b8, c8}, {a9, b9, c9},
  {a10, b10, c10}, {a11, b11, c11}, {a12, b12, c12}, {a13, b13, c13},
{a14, b14, c14}, {a15, b15, c15}, {a16, b16, c16},
  {a17, b17, c17}, {a18, b18, c18}, {a19, b19, c19}, {a20, b20, c20}}

And here is the desired sums

Plus @@@ % // ColumnForm
a1 + b1 + c1
a2 + b2 + c2
...etc...

Regards
Dimitris


  • Prev by Date: Re: Demostration
  • Next by Date: Re: variable metric method automatic gradient yields Indeterminate
  • Previous by thread: Re: RE:Beginner--[Please Help]How to get coefficient list issued from a Series Command
  • Next by thread: Equilibrium points for 3 nonlinear ODE