使用Riemann Sum计算函数的面积

时间:2015-03-23 21:17:37

标签: wolfram-mathematica mathematica-8

f[x_] := 2/(2x+2)
Limit[
    Sum[
        deltaX = 1/n;
        xk = 0 + k * deltaX; 
        f[xk]*deltaX, 
        {k, 1, n}
    ],
    n-> \[Infinity]
]

但我有以下代码,它不起作用。错误: $ RecursionLimit :: reclim:超过256的递归深度

该函数在区间[0,1]

上定义

1 个答案:

答案 0 :(得分:1)

工作得很好。也许你已经在内存中设置了变量。

enter image description here