Re: Time-consuming series coefficients

*To*: mathgroup at smc.vnet.net*Subject*: [mg40253] Re: Time-consuming series coefficients*From*: Rolf Mertig <rolf at mertig.com>*Date*: Fri, 28 Mar 2003 04:29:56 -0500 (EST)*Organization*: Mertig Consulting*Reply-to*: rolf at mertig.com*Sender*: owner-wri-mathgroup at wolfram.com

Is this what you want? (timings on a 1GHz Linux box): Mathematica 4.2 for Linux Copyright 1988-2002 Wolfram Research, Inc. -- Motif graphics initialized -- In[1]:= !!tay t[n_,p_,q_] := Block[{f, res = 1}, f[i_] = (E^(z*p*(q)^(i - 1)) - 1)*u + 1 + O[z]^(n + 1); Do[res = Expand[Normal[res*f[j]]] + O[z]^(n + 1), {j, 1, n}]; SeriesCoefficient[res, n]]; Table[Print["n = ",j, " time = ", ti[j]=First[Timing[r[j]=t[j,1/2,1/2]]]];ti[j]/Second,{j,10,50,10}] In[1]:= <<tay n = 10 time = 0.35 Second n = 20 time = 2.82 Second n = 30 time = 16.83 Second n = 40 time = 74.97 Second n = 50 time = 262.01 Second Out[1]= {0.35, 2.82, 16.83, 74.97, 262.01} Rolf Mertig Mertig Consulting http://www.mertig.com http://www.mathxls.com "marchibald" <marchibald at maths.wits.ac.za> wrote in message news:<b5uoel$lfe$1 at smc.vnet.net>... > Hi, > > I have the following function from which I would like to extract the > coefficient of z^{50}, and then expand the result as a series in u: > > f[z_,u_] := Product[1 + u (Exp(zpq^{i - 1}) - 1), {i,50}] > > where p=q=1/2. > > The product from i=1 to 10 can be done in a reasonable amount of time, but > anything larger takes far too long. > > Does anyone have an idea of how to expand f[z,u] as a series quickly, or even > to extract the coefficient of z^{50} some other way? > > Thanks, > > M. Archibald > University of the Witwatersrand

**Follow-Ups**:**Re: Re: Time-consuming series coefficients***From:*Dr Bob <majort@cox-internet.com>