MathGroup Archive 2005

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

Search the Archive

Re: Recursion problem in SymbolicSum

  • To: mathgroup at smc.vnet.net
  • Subject: [mg60698] Re: [mg60693] Recursion problem in SymbolicSum
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sun, 25 Sep 2005 02:36:09 -0400 (EDT)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

This version does not have a problem.

$Version

5.2 for Mac OS X (June 20, 2005)

PoissonProb[mu_,k_]=Exp[-mu] mu^k/k!;

(expr=
      Sum[PoissonProb[mu,k] (k+1-9)/(k+1),{k,9,Infinity}])/.
  mu->1.05

1.8235340949601087*^-7

Sum[PoissonProb[1.05,k](k+1-9)/(k+1),{k,9,Infinity}]

1.823534118168531*^-7

You could also try

(expr//Simplify)/.mu->1.05

1.8235341138425525*^-7

(expr//FullSimplify)/.mu->1.05

1.8235341128410885*^-7

expr/.mu->105/100//N

1.8235341192068037*^-7

expr/.mu->105/100//Simplify//N

1.8235341148198358*^-7


Bob Hanlon

> 
> From: djw1005 at cus.cam.ac.uk (D.J. Wischik)
To: mathgroup at smc.vnet.net
> Date: 2005/09/24 Sat AM 02:55:35 EDT
> Subject: [mg60698] [mg60693] Recursion problem in SymbolicSum
> 
> I was surprised to get problems (recursion limit exceeded) when executing
> a symbolic sum. The terms in the sum depend on a parameter mu. When I
> leave mu unspecified and calculate the sum and then substitute a 
numerical
> value for mu, I get the right answer. When I specify mu in the sum, the
> symbolic sum fails. (The sum definitely exists and is finite.) I would be
> grateful if anyone could explain this behaviour. 
> 
> PoissonProb[mu_, k_] = Exp[-mu] mu^k / k!;
> 
> Sum[PoissonProb[mu, k] (k + 1 - 9)/(k + 1), {k, 9, Infinity}] /. 
>   {mu -> 1.05}
> 
> [returns the answer 1.82353 * 10^(-7) as expected]
> 
> Sum[PoissonProb[1.05, k](k + 1 - 9)/(k + 1), {k, 9, Infinity}]
> 
> [ $RecursionLimit::reclim: Recursion depth of 256 exceeded.
> $IterationLimit::itlim: Iteration limit of 4096 exceeded. 
> and then it returns the following. ]
> 
> \!\(0.34993774911115527`\ \((4.298654386611213`*^-6 - 
>       7.999999999999789`\ \
> Hold[If[MatchQ[Numerator[SymbolicSum`InfiniteDump`expr1$214],
> SymbolicSum`a$_ \
> + SymbolicSum`b$_ /; \(! 
>                 FreeQ[SymbolicSum`a$,
>                    K$94]\) && \(! FreeQ[SymbolicSum`b$, K$94]\)], \
> \((SymbolicSum`InfiniteDump`infinitesum[#1, K$94, 0] &)\) /@ 
>                     Expand[SymbolicSum`InfiniteDump`expr1$214],
>                        SymbolicSum`InfiniteDump`HypergeometricSeries[
>                         1, SymbolicSum`InfiniteDump`expr1$214, \
> SymbolicSum`InfiniteDump`expr2$214, K$94, 0, SymbolicSum`eps
$214]]])\)\)
> 
> Damon.
> 
> 


  • Prev by Date: Re: Rotate Frame Label?
  • Next by Date: Notation for variational calculus?
  • Previous by thread: Re: Recursion problem in SymbolicSum
  • Next by thread: Re: Recursion problem in SymbolicSum