which algorithm do maple use to calculate summation from zero to infinity

343 Views Asked by At

when calculating generating function, there is a need to do summation of ,

summation(f(x)*z^n/n!, n=0..infinity)

what algorithm do maple use to do this awesome work?

1

There are 1 best solutions below

0
On

Do you really mean f(x) (where x is a function of neither z nor n) rather than f(z) or f(z,n)?!

If you really mean f(x) then the result is just f(x)*exp(z), the computation of which is not especially awesome.

To make the question interesting let's suppose that you actually meant,

`sum( f(z,n)*z^n/n!, n=0..infinity )`

where f(z,n) is an explicit expression and not just some function call of unknown f.

The help-page for SumTools (which sum calls) mentions that Gosper's algorithm for indefinite summation and Zeilberger's algorithm are its principal methods. And you can find quite a lot about them via google. See this, perhaps.

If you want to see Maple at work on a particular example then you can step through most of it in the Maple debugger or you can adjust various reporting mechanisms so as to get more verbose computations. Eg,

restart:
infolevel[sum]:=6: infolevel[rsolve]:=6: infolevel[LREtools]:=6:
trace(SumTools:-DefiniteSum:-ClosedForm):
trace(`sum/hypergeom`):
trace(`sum/hypergeom/separate`):
trace(`sum/hypergeom/term`):

sum(n^7/n!,n=1..infinity);

sum(sin(n)/n!,n=1..infinity);

Yet another mechanism is to set printlevel high (say, 25) but doing so may just producing a flood of output that you find confusing.

Your example's index's upper value was infinity. But for upper index value K, say, the code can go through LRETools and so perhaps see the reference at the bottom of this page.