wolfram-mathematica - 当 r 在 Mathematica 中是符号时,如何找到函数的 r 阶导数?

标签 wolfram-mathematica symbolic-math

我有一个功能 f(t)=2/(2-t) .在不使用 Mathematica 的情况下,在 t=0(即 2^(-r)*r!)处获得 r 阶导数并不难。在 Mathematica 计算的情况下,当 r=4 时,我可以像这样得到 r 阶导数:D[2/(2-t), {t, 4}] .但是,当 r 是任何整数时,如何在 Mathematica 中获得 t=0 处的 rth 导数?我尝试使用这个表达式,但它没有按预期工作:

Simplify[D[2/(2 - t), {t, r}], Assumptions -> Element[r, Integers]]  /. {t->0}

是否可以像我们人类一样在 Mathematica 中象征性地进行上述数学运算?

最佳答案

对于分析函数,您可以使用 SeriesCoefficient。

nthDeriv[f_, x_, n_] := n!*SeriesCoefficient[f[x], {x, x, n}]

你的例子:
f[t_] := 2/(t - 2)

nthDeriv[f, t, n]
(*
-> Out[39]= n!*Piecewise[{{-2*(2 - t)^(-1 - n), n >= 0}}, 0]
*) 

关于wolfram-mathematica - 当 r 在 Mathematica 中是符号时,如何找到函数的 r 阶导数?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8278367/

相关文章:

algorithm - Maple中如何查看函数/方法的源码实现?

MATLAB vpa() 不计算指数表达式的变量点数?

matlab - MATLAB 中的双傅里叶级数

algorithm - 在给定经纬度、日期和时间的情况下查找阴影的方向

wolfram-mathematica - 数学 : using simplify to do common sub-expression elimination and reduction in strength

matlab - Octave:一个矩阵的多个子矩阵

r - R中方程组的求解

c# - Wolfram .NET 连接器 EvaluateToImage 给出动画

wolfram-mathematica - 在 Mathematica 中,ListPlot 使用什么插值函数?

clojure - Clojure 中的机器学习