如何求解mathematica中递推关系的解析解
我再次遇到如下情况:
RSolve[{f[m, n] == f[m, n - 1] + f[m - 1, n],
f[0, n] == 1, f[m, 0] == 1},
f[m, n], {n}]
我尝试使用 RSolve,但出现错误:
RSolve::deqx: Supplied equations are not difference equations
of the given functions.
感谢您的帮助!
I have a recurrence such as following:
RSolve[{f[m, n] == f[m, n - 1] + f[m - 1, n],
f[0, n] == 1, f[m, 0] == 1},
f[m, n], {n}]
I tried to use RSolve, but I got an error:
RSolve::deqx: Supplied equations are not difference equations
of the given functions.
Appreciate your help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
差分方程和初始条件为
Mathematica(7 和 8)不喜欢求解它......无论有没有初始条件。 RSolve 表达式未计算,
我知道 Mathematica 使用 生成函数方法(可能除其他外)来解决此类递归问题,但我不知道为什么它失败在如此简单的情况下。
那么让我们手动完成吧。
设 g(x,n) 为 f(m,n) 的生成函数
现在检查 f(m+1,n) x^m 的总和
现在求解简单的代数差分方程:
也可以使用
RSolve
现在提取 x^m 的系数:
使用二项式简化
所以我们最终得到
这可以使用符号和数字方式进行检查
The difference equation and initial conditions are
Mathematica (7 and 8) does not like solving it... both with and without initial conditions. The RSolve expressions are left unevaluated
I know that Mathematica uses generating functional methods (probably among other things) to solve such recurrences, but I don't know why it fails in such a simple case.
So let's do it by hand.
Let g(x,n) be the generating function for f(m,n)
Now examine the sum of f(m+1,n) x^m
Now solve the simple algebraic-difference equation:
Which can also be done with
RSolve
Now extract the coefficient of x^m:
The binomial is simplified using
So we finally get
This can be checked using symbolic and numeric means
不是答案,但似乎正确的形式应该是(注意最后的
{m, n}
):Mathematica 对此不进行评估。我认为这根本无法解决这个问题。
Not the answer but it seems that the right form should be (note
{m, n}
at the end):Mathematica leaves this unevaluated. I think it just cannot solve this.