当我使用 千里马 计算泰勒级数:
f(x,y) := taylor((x+y)^3, [x, y], [2, 3], 2);
f(2,3); /* error: wrong number of arguments */
基本上我想定义一个函数作为
(x+y)^3
的扩展, 接收 x,y
作为参数。我怎样才能做到这一点?
最佳答案
尝试
(%i1) f(x,y) := ''(ratdisrep(taylor(('x+'y)^3, ['x, 'y], [2, 3], 2))) $
(%i2) f(2, 3);
(%o2) 125
或者
(%i1) define(f(x, y), ratdisrep(taylor(('x+'y)^3, ['x, 'y], [2, 3], 2)))$
(%i2) f(2, 3);
(%o2) 125
关于maxima - 将泰勒展开式分配给函数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23294656/