差异列表(Maclaurin扩展)

时间:2015-01-04 20:02:07

标签: haskell iteration differentiation

这里,我有一个可以用来区分的diff功能。

例如diff(sin x)(" x")= cos x

(这里,(sin x)是函数,(" x")是我要区分的变量)

如何使用iterate生成函数[f(x),f'(x),f'(x),f''(x)的微分列表。 ..]

1 个答案:

答案 0 :(得分:2)

flipiterate结合使用:

(flip diff) "x" f = diff f "x"

所以

iterate ((flip diff) "x") f = [ f, f', f'', ...]