# composite trapezoidal rule

The composite trapezoidal rule is a method for approximating a definite integral by evaluating the integrand at $n$ points. Let $[a,b]$ be the interval of integration with a partition $a=x_{0}. Then the formal rule is given by

 $\int\limits_{a}^{b}f(x)\,dx\;\approx\;\frac{1}{2}\sum_{j=1}^{n}(x_{j}-x_{j-1})% \left[f(x_{j-1})+f(x_{j})\right].$

The composite trapezoidal rule can also be applied to a partition which is uniformly spaced (i.e. (http://planetmath.org/Ie) $x_{j}-x_{j-1}=h$ for all $j\in\{1,\ldots,n\}$). In this case, the formal rule is given by

 $\int\limits_{a}^{b}f(x)\,dx\;\approx\;\frac{h}{2}\left[f(a)+2\sum_{j=1}^{n-1}f% (a+jh)+f(b)\right].$

Remark:
The composite trapezoidal rule uses the trapezoidal rule on each subinterval, which is readily observed from

 $\displaystyle\int\limits_{a}^{b}f(x)\,dx$ $\displaystyle=$ $\displaystyle\;\sum_{j=1}^{n}\int\limits_{x_{j-1}}^{x_{j}}f(x)\,dx$ $\displaystyle\approx$ $\displaystyle\;\frac{1}{2}\sum^{n}_{j=1}(x_{j}-x_{j-1})\left[f(x_{j-1})+f(x_{j% })\right].$

If $f$ is Riemann integrable on $[a,b]$, $|f^{\prime\prime}(x)|\leq M$ for all $x\in[a,b]$, and $n$ is the number of intervals   of the partition used to approximate $\int_{a}^{b}f(x)\,dx$, then

 $\left|\int\limits_{a}^{b}f(x)\,dx-\frac{1}{2}\sum_{j=1}^{n}(x_{j}-x_{j-1})% \left[f(x_{j-1})+f(x_{j})\right]\right|\leq\frac{M(b-a)^{3}}{12n^{2}}.$
Title composite trapezoidal rule CompositeTrapezoidalRule 2013-03-22 16:05:16 2013-03-22 16:05:16 Wkbj79 (1863) Wkbj79 (1863) 11 Wkbj79 (1863) Theorem msc 41A05 msc 41A55 composite trapezoid rule TrapezoidalRule