For a concrete comparison, take on . The integral is , whereas the unit-width left and right Riemann sums are and . The exact integer power sum formula gives
The endpoint choice explains the opposite signs of the correction. The remaining correction is one in both cases.
Figure 1.
Left and right Riemann sums for differ from its integral by exact Bernoulli number corrections
. Six rectangles of width one sample at on the left and on the right. Their areas are and ; the smooth area is . The endpoint terms are and , while the correction adds one in each case. Details.
The same method is useful far beyond squares of numbers. Substituting , , and into the integer power sum formula gives the exact fourth-power result
At , this is
Thus a finite polynomial calculation replaces ten additions, or a million additions if is a million. Although the individual corrections can be rational numbers, the result is the exact integer sum.
Figure 2.
Exact Bernoulli number corrections turn an integral into the fourth-power sum
. The first panel builds the sum from integral , endpoint term , and term . The enlarged second panel resolves the final correction , reaching , checked independently by direct addition. Details.
There is also a useful numerical integration interpretation. The average of the left and right Riemann sums is the composite trapezoidal rule. For , the endpoint corrections cancel but its value is , one above the true integral. Subtracting the correction makes this particular polynomial example exact. For , the two interior corrections above can be written and . These are exact identities for these polynomials; extending such corrections to general functions requires a separate error analysis.

Articles by others on the same topic (0)

There are currently no matching articles.