The composite trapezoidal rule approximates a definite integral by applying the trapezoidal rule
on each of
equal subintervals. For
and
,
it is
|
(1)
|
If
has a continuous second derivative, then for some
the error is
|
(2)
|
where the error means the exact integral minus its approximation. Thus the method has error as
.
In big-O notation, this means that the error magnitude
is bounded by a constant multiple of
for all sufficiently small positive
.
The Euler-Maclaurin integration formulas give higher-order endpoint corrections to the composite trapezoidal approximation when the required derivatives exist (Milovanović 2017).
For a smooth periodic function, the endpoint-derivative differences in the Euler-Maclaurin
integration formulas vanish when integrating over a full period. If the periodic
extension is infinitely differentiable, the error decreases faster than every fixed
inverse power of .
An analytic periodic extension gives exponential convergence (Luke 1955, Weideman
2002, Trefethen and Weideman 2014). More precisely, for a
-periodic analytic function
bounded in magnitude by
in the strip
,
where
, put
|
(3)
|
Then
|
(4)
|
For analytic integrands, Javed and Trefethen (2014) give a bound that accounts for both the interior discretization error and the endpoint mismatch. The bound connects the general Euler-Maclaurin integration formulas with exponential convergence in the periodic case.
A change of variables can improve trapezoidal quadrature even for a nonperiodic integrand. Periodizing transformations, such as the Iri-Moriguti-Takasawa transformation, make the transformed endpoint derivatives match, suppressing Euler-Maclaurin correction terms (Laurie 1996; Trefethen and Weideman 2014, §14). Double exponential integration instead transforms a finite interval to the real line and applies a truncated trapezoidal sum to a rapidly decaying integrand. It can handle many integrable endpoint singularities because the Jacobian of the transformation counteracts the singular behavior.
On , a substitution
replaces the integrand
by
.
The Sidi transformation for a positive integer
is
|
(5)
|
For smooth , the transformed integrand and its derivatives of orders
through
vanish at both endpoints (Sidi 1993). The Sag-Szekeres transformation is
|
(6)
|
where
and the endpoints are defined by continuity. All positive-order derivatives of
vanish at the endpoints, so the transformed integrand and all its derivatives vanish
there for smooth
(Sag and Szekeres 1964; Sidi 1993).