开发者

How to get the generating function automatically in mathematica

In the appendix of the book http://www.math.upenn.edu/~wilf/DownldGF.html, page 194, the author mentioned that in Mma 2.0 (very old. :P), there is the function which can get the generating functions directly from recurrence relationship, like the example given therein:

Ge开发者_Python百科neratingFunction[{f[n+2]==f[n+1]+f[n], f[0]==0, f[1]==1},f[n],n,x]

But the same function does not seem to do the kind of job anymore in mma 7.0/8.0. Does anyone know how to get the equivalent function? many thanks.


The GeneratingFunction scope has changed. Here you may find the obsolete legacy documentation (by the middle of the document).

Now you can do the same, but in two steps. First solve the recurrence relation with RSolve and the find the Generating Function. Like this:

GeneratingFunction[
 RSolve[{f[n + 2] == f[n + 1] + f[n], f[0] == 0, f[1] == 1}, f[n], n], 
n, x]  

Out

{{GeneratingFunction[f[n], n, x] -> -(x/(-1 + x + x^2))}}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜