∑ 黎曼和计算器(左/右/中点/梯形,任意函数)Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function)
输入函数 f(x)(如 x^2、sin(x)、exp(-x)),区间 [a, b] 和分割数 n,计算左端点、右端点、中点黎曼和以及梯形法则的近似值,并与辛普森法的高精度积分对比误差,列出每个子区间的取样点。也保留常数函数模式。本地处理。Enter a function f(x) (such as x^2, sin(x) or exp(-x)), an interval [a, b] and the number of subintervals n to get the left, right and midpoint Riemann sums and the trapezoid rule, compared against a high-accuracy Simpson integral, with the sample points listed for each subinterval. The constant-function mode is kept. Processed locally.
使用说明与常见问题How-to & FAQ
「黎曼和计算器(左/右/中点/梯形,任意函数)」是什么?What is the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) tool?
输入函数 f(x)(如 x^2、sin(x)、exp(-x)),区间 [a, b] 和分割数 n,计算左端点、右端点、中点黎曼和以及梯形法则的近似值,并与辛普森法的高精度积分对比误差,列出每个子区间的取样点。也保留常数函数模式。本地处理。Enter a function f(x) (such as x^2, sin(x) or exp(-x)), an interval [a, b] and the number of subintervals n to get the left, right and midpoint Riemann sums and the trapezoid rule, compared against a high-accuracy Simpson integral, with the sample points listed for each subinterval. The constant-function mode is kept. Processed locally.
如何使用「黎曼和计算器(左/右/中点/梯形,任意函数)」?How do I use the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) tool?
在「黎曼和计算器(左/右/中点/梯形,任意函数)」中,填写「函数」、「f(x)」、「f 值(常数)」、「a」、「b」等参数,结果会随输入实时计算并显示在下方。In the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function): Fill in "Function", "f(x)", "f value (const)", "a", "b"; results are recalculated instantly as you type.
黎曼和是什么?What is a Riemann sum?
把区间 [a, b] 分成 n 段,每段宽 Δx = (b − a)/n,用矩形面积 f(xᵢ*)·Δx 之和近似积分。xᵢ* 取左端点、右端点或中点,就得到左、右、中点和。Split [a, b] into n pieces of width Δx = (b − a)/n and add the rectangle areas f(xᵢ*)·Δx to approximate the integral. Taking xᵢ* at the left end, right end or middle gives the left, right and midpoint sums.
哪种最准确?Which one is most accurate?
对光滑函数,中点和与梯形法则的误差约与 1/n² 成正比,通常比左右端点和(约 1/n)准确得多;中点和的误差通常约为梯形法则的一半,方向相反。For smooth functions the midpoint and trapezoid errors shrink like 1/n², much faster than the left and right sums (about 1/n). The midpoint error is usually about half the trapezoid error, with the opposite sign.
x² 在 [0, 4] 上的例子Example: x² on [0, 4]
n = 4 时左和 14、右和 30、中点和 20、梯形 22,真实积分为 64/3 ≈ 21.333。函数可写 x^2、sqrt(x)、exp(x)、sin(x)、ln(x) 等,π 写作 pi。With n = 4 the left sum is 14, right 30, midpoint 20 and trapezoid 22, against the exact 64/3 ≈ 21.333. Write functions like x^2, sqrt(x), exp(x), sin(x) or ln(x), and pi for π.
能举个计算实例吗?Can you show a worked example?
例如在「黎曼和计算器(左/右/中点/梯形,任意函数)」中填 函数 = 常数 f = c,f 值(常数) = 2,a = 0,b = 4,矩形数 = 4,结果区显示:黎曼和:8;真实 ∫c:8;左端点和:8(误差 0);右端点和:8(误差 0);中点和:8(误差 0);梯形法则:8(误差 0);积分参考值(辛普森,n = 2000):8;Δx:1For example, entering Function = Constant f = c, f value (const) = 2, a = 0, b = 4, Rectangles = 4 in the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) gives: Riemann sum: 8; True ∫c: 8; Left sum: 8 (error 0); Right sum: 8 (error 0); Midpoint sum: 8 (error 0); Trapezoid rule: 8 (error 0); Integral reference (Simpson, n = 2000): 8; Δx: 1
哪些输入会被检查?Which inputs are validated?
「黎曼和计算器(左/右/中点/梯形,任意函数)」会检查这些输入——「f 值(常数)」、「a」:所选方式用到时必须填写;「b」:必须填写,且不能等于 a;「矩形数」:必须填写,须为 1–100,000 的整数;绝对值超过 10¹⁵ 的数也会被拒绝。不符合时结果区显示具体提示,不会给出数字。The Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) checks its inputs — "f value (const)", "a": required when the chosen option uses it; "b": required, and must differ from a; "Rectangles": required, must be a whole number from 1 to 100,000; numbers above 10¹⁵ in absolute value are rejected too. When a value fails, the result area names the problem instead of showing a number.
有哪些选项可以调整?What options can I adjust?
「黎曼和计算器(左/右/中点/梯形,任意函数)」的设置:「函数」可选 任意 f(x)、常数 f = c(默认 任意 f(x));「f(x)」默认 x^2;「f 值(常数)」默认 2;「a」默认 0;「b」默认 4;「矩形数」默认 4。每次生成结果都按当前设置处理。Settings in the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) — "Function": Any f(x), Constant f = c (default Any f(x)); "f(x)" default x^2; "f value (const)" default 2; "a" default 0; "b" default 4; "Rectangles" default 4. The result always uses the current settings.
「黎曼和计算器(左/右/中点/梯形,任意函数)」免费吗?需要注册吗?Is the Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) free? Do I need an account?
「黎曼和计算器(左/右/中点/梯形,任意函数)」完全免费,无需注册或安装,打开网页即可使用,手机和电脑都能用;输入的内容只在你的浏览器本地处理。The Riemann Sum Calculator (Left, Right, Midpoint, Trapezoid for Any Function) is completely free with no sign-up or install and works on phones and desktops; what you enter is processed only in your browser.