The Euler-Maclaurin integration and sums formulas can be derived from Darboux's formula by substituting the Bernoulli polynomial
in for the function . Differentiating the identity
(1)
times gives
(2)
Plugging in gives . From the Maclaurin series of
with , we have
which is the Euler-Maclaurin integration formula (Whittaker and Watson 1990, p. 128). It holds when the function is analytic in the integration region
In certain cases, the last term tends to 0 as , and an infinite series can then be obtained for
.
In such cases, sums may be converted to integrals
by inverting the formula to obtain the Euler-Maclaurin sum formula
(8)
which, when expanded, gives
(9)
(Abramowitz and Stegun 1972, p. 16). The Euler-Maclaurin sum formula is implemented in the Wolfram Language as the function
NSum with
option Method -> "EulerMaclaurin".
The second Euler-Maclaurin integration formula is used when is tabulated at values , , ..., :