Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Question on Nest[]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg15055] Re: [mg15006] Question on Nest[]
  • From: Jurgen Tischer <jtischer at col2.telecom.com.co>
  • Date: Wed, 9 Dec 1998 04:12:35 -0500
  • Organization: Universidad del Valle
  • References: <199812050630.BAA04480@smc.vnet.net.>
  • Sender: owner-wri-mathgroup at wolfram.com

Wagner,
I think a lot depends on what you need (and what you mean by efficient).
Since you obviously want numerical results, the first choice for me
would be to use NSum. It's not very fast but has checks built in which
make you feel better than trying to invent your own formula. If this
turns out to lame for your needs, try FunctionInterpolation (you better
define f by something like f[m_?NumericQ]:=...). I checked it for the
interval [0,2] and it was good for some 5 digits. If this is too low in
precision, use the options on NSum and on FunctionInterpolation. 

Jurgen


Wagner Truppel wrote:
> 
> Howdy,
> 
> I'm (still) trying to evaluate the sum
> 
> f[m_] := E^(-m) Sum[ m^i Sqrt[i] / i!, { i, 1.0, Infinity } ]
> 
> in an efficient way. I tried compiling this expression, but Mathematica
> refused to compile i!. I then replaced i! by Gamma[i+1.0], but then I
> get  compilation errors due to the arbitrary precision nature of the
> computation. Finally, I decided to try someting based on the identity:
> 
> Sum[ m^i Sqrt[i] / i!, { i, 1.0, n } ] = m/1 ( Sqrt[1] + m/2 ( Sqrt[2] +
> m/3 ( Sqrt[3] + ... + Sqrt[n] ) ) ) )
> 
> So I tried
> 
> i = 0.0;
> Expand[ Nest[ ( i++; m/i ( Sqrt[i] + # ) )&, 0, n ] ]
> 
> but it doesn't produce the correct polynomial in m. What am I missing??
> 
> Thanks in advance for any help.
> 
> Wagner



  • Prev by Date: Re: nice Gotcha!
  • Next by Date: Re: What's wrong in this plot?
  • Previous by thread: Question on Nest[]
  • Next by thread: Re: Question on Nest[]