Bernoulli corrections for polynomial sums
ID: bernoulli-corrections-for-polynomial-sums
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 givesThe endpoint choice explains the opposite signs of the correction. The remaining correction is one in both cases.
The same method is useful far beyond squares of numbers. Substituting , , and into the integer power sum formula gives the exact fourth-power resultAt , this isThus 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.
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.
New to topics? Read the docs here!

