Trapezoid Rule

The formula for the trapezoid rule approximation Tn is given by

$\displaystyle \int_{{a}}^{{b}}$f (x)dx $\displaystyle \approx$ Tn = $\displaystyle {\frac{{b-a}}{{2n}}}$$\displaystyle \left(\vphantom{ f(a)+2\sum_{i=1}^{n-1}f\left( a+i\frac{b-a}{n}\right)
+f(b)}\right.$f (a) + 2$\displaystyle \sum_{{i=1}}^{{n-1}}$f$\displaystyle \left(\vphantom{ a+i\frac{b-a}{n}}\right.$a + i$\displaystyle {\frac{{b-a}}{{n}}}$$\displaystyle \left.\vphantom{ a+i\frac{b-a}{n}}\right)$ + f (b)$\displaystyle \left.\vphantom{ f(a)+2\sum_{i=1}^{n-1}f\left( a+i\frac{b-a}{n}\right)
+f(b)}\right)$

with an error bound of

$\displaystyle \left\vert\vphantom{ T_{n}-\int_{a}^{b}f(x)dx}\right.$Tn - $\displaystyle \int_{{a}}^{{b}}$f (x)dx$\displaystyle \left.\vphantom{ T_{n}-\int_{a}^{b}f(x)dx}\right\vert$K$\displaystyle {\frac{{(b-a)^{3}}}{{12n^{2}}}}$

where K is any number such that $\left\vert\vphantom{ f^{\prime \prime }(x)}\right.$f′′(x)$\left.\vphantom{ f^{\prime \prime }(x)}\right\vert$K for all x$\left[\vphantom{ a,b}\right.$a, b$\left.\vphantom{ a,b}\right]$.

$\blacktriangleright$ To approximate $\int_{{0}}^{{\pi }}$x sin x dx using the trapezoid rule

1.
Leave the insertion point in the expression $\int_{{0}}^{{\pi }}$x sin x dx.

2.
From the Calculus submenu, choose Approximate Integral.

3.
Choose Trapezoid in the dialog box with 10 Subintervals.

$\blacktriangleright$ Calculus + Approximate Integral + Trapezoid

$\dint_{{0}}^{{\pi }}$x sin x dx Approximate integral (trapezoid rule) is

${\frac{{1}}{{10}}}$π$\dsum\limits_{{i=1}}^{{9}}$${\frac{{1}}{{10}}}$sin${\frac{{1}}{{10}%
}}$

$\blacktriangleright$ Evaluate Numerically

${\frac{{1}}{{10}}}$π$\dsum\limits_{{i=1}}^{{9}}$${\frac{{1}}{{10}}}$sin${\frac{{1}}{{10}%
}}$ = 3.1157