Read the explanation
Select the native cubic function, x cubed on the interval zero to four, and the eight partition preset. The exact integral is x to the fourth divided by four, evaluated at the endpoints, giving sixty four. Start with the native left endpoint rule, then change only the rule selector to right endpoints. Each interval has width one half. Since the cubic increases on this interval, left rectangles lie below the curve and right rectangles above it. The exact held left sum is forty nine, and the right sum is eighty one. Both drawings have seventy pixels per x unit and three point eight pixels per function unit. The gold curve is the same exact cubic in each panel. This endpoint comparison follows the actual source computation; it does not use the source menu item labelled Darboux, which actually computes midpoint samples. Change to the native midpoint rule. Compare the eight partition preset with the thirty two partition preset, keeping the cubic and its interval unchanged. The interval width falls from one half to one eighth. Each rectangle now samples the centre of its own interval. Summing these source samples gives sixty three point five at eight partitions, and sixty three point nine six eight seven five at thirty two. For this particular cubic on zero to four, midpoint error is exactly thirty two divided by n squared. Increasing the partition count by four therefore reduces absolute error by sixteen, from one half to zero point zero three one two five. Both held diagrams use common axes. The separate error bars use six hundred pixels per area unit. This is the exact finite sum for the stated function and rule, not a universal error formula for every function. Return to eight partitions. Keep the cubic and the interval fixed, then change the native rule from midpoint to trapezoidal. A midpoint rectangle uses one central height. The trapezoidal rule instead uses the average of the two endpoint heights on each interval. For this cubic, the held midpoint result is sixty three point five, below the exact integral sixty four. The trapezoidal result is sixty five, above it. Signed error means approximation minus exact integral. Our bars are anchored at zero error and use one hundred eighty pixels per area unit: negative one half extends downward ninety pixels, while positive one extends upward one hundred eighty. For this stated cubic, midpoint signed error is negative thirty two divided by n squared and trapezoidal signed error positive sixty four divided by n squared. We are teaching these actual source rules and their verified finite sums, not the incorrectly named Darboux reference or the numerically approximated step function integral.