The trapezoidal rule #
This file contains a definition of integration on [[a, b]] via the trapezoidal rule, along with
an error bound in terms of a bound on the second derivative of the integrand.
Main results #
trapezoidal_error_le: the convergence theorem for the trapezoidal rule.
References #
We follow the proof on (Wikipedia)[https://en.wikipedia.org/wiki/Trapezoidal_rule] for the error bound.
Integration of f from a to b using the trapezoidal rule with N+1 total evaluations of
f. (Note the off-by-one problem here: N counts the number of trapezoids, not the number of
evaluations.)
Equations
Instances For
Just like exact integration, the trapezoidal integration from a to a is zero.
The error of the trapezoidal integration from a to a is zero.
A basic trapezoidal equivalent to IntervalIntegral.sum_integral_adjacent_intervals. More
general theorems are certainly possible, but many of them can be derived from repeated applications
of this one.
Since we have sum_[]_adjacent_intervals theorems for both exact and trapezoidal integration,
it's natural to combine them into a similar formula for the error. This theorem is in particular
used in the proof of the general error bound.
The standard error bound for trapezoidal integration on the general interval [[a, b]].
The error bound for trapezoidal integration in the slightly weaker, but very common, case where
f is C^2.