MTH 343 · 4.3 Elements of numerical integration
Choose a closed or open Newton–Cotes formula, a function, an interval [a, b] and n up to 10. The lab places the n + 1 equally spaced nodes, draws the polynomial Pₙ through them that the formula integrates in place of f, and compares the result with the exact value and the error bound.
The formula is a weighted sum of the values of f at the nodes.
The same integral with every formula of the selected kind. Click an n to select it.
Each solid point is the absolute error of one formula on your interval, and each hollow point on a dashed line is its error bound. An error never exceeds the bound of the same color. The vertical axis is logarithmic. A logarithmic axis has no 0, so an exact result or a bound of 0 sits on the separate 0 line at the bottom. The kind you did not select is faded. Click a point to select that n.