The Euler-Maclaurin integration formulas relate integrals to sums and endpoint derivatives.
They follow from Darboux's formula by substituting
a Bernoulli polynomial for
.
Differentiating the identity
|
(1)
|
times gives
|
(2)
|
for . Hence the endpoint values agree for
, while
|
(3)
| |||
|
(4)
|
The remaining values needed in the substitution are
|
(5)
| |||
|
(6)
| |||
|
(7)
|
where the first two formulas use positive integers
with
and
,
respectively, and
is a Bernoulli number.
For a positive integer , the resulting even-order integration formula is
|
(8)
|
This holds when is analytic near the
integration line segment. For a real interval,
continuous derivatives suffice (Whittaker and Watson
1990, p. 128).
For positive integers and
,
the finite Euler-Maclaurin sum formula is
|
(9)
|
where
|
(10)
|
and is the periodic Bernoulli
polynomial, with
denoting the floor function.
This finite identity requires
to have
continuous derivatives on
(NIST, §2.10).
An infinite expansion follows if as
.
The first terms are
|
(11)
|
(Abramowitz and Stegun 1972, p. 16). Without a vanishing remainder, the infinite expansion need not converge. The Euler-Maclaurin sum formula is implemented in the Wolfram Language as the function NSum with option Method -> "EulerMaclaurin".
For the midpoint version, let ,
where
and
. Write
and
.
The
midpoint samples are
,
, ...,
.
For a positive integer
,
|
(12)
|
where
|
(13)
|
This holds when has
continuous derivatives on
. The infinite midpoint expansion follows when
this remainder tends to 0. Its correction sum has a positive sign. It can also be
derived by writing the midpoint sum as
,
where
is the composite trapezoidal
rule with step
,
and applying the finite Euler-Maclaurin formula to both terms.
The endpoint corrections can also be approximated without evaluating high-order derivatives analytically. Centered finite differences replace the combined correction terms by values of an antiderivative, or by values of both the function and an antiderivative. The mixed construction uses Hermite interpolation (Fornberg 2020). The centered stencils require all their sample values to be available, possibly outside the integration interval. Suitable formulas retain the formal approximation order, but introduce additional errors. High-order mixed formulas can require extra arithmetic precision because their weights grow.
The Abel-Plana formula represents the same difference between a sum and an integral by a complex endpoint integral. For suitable analytic functions, expanding this integral recovers the Euler-Maclaurin correction terms. The resulting infinite derivative expansion need not converge. The two summation theorems can be derived from each other on their respective function classes, and are also connected to the Poisson sum formula (Butzer et al. 2011, Milovanović 2017).