Midpoint Rule

In general, the midpoint approximation Mn for $\int_{{a}}^{{b}}$f (x)dx with n subdivisions is given by

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

with an error bound of

$\displaystyle \left\vert\vphantom{ M_{n}-\int_{a}^{b}f(x)dx}\right.$Mn - $\displaystyle \int_{{a}}^{{b}}$f (x)dx$\displaystyle \left.\vphantom{ M_{n}-\int_{a}^{b}f(x)dx}\right\vert$K$\displaystyle {\frac{{(b-a)^{3}}}{{24n^{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 midpoint method

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 Midpoint in the dialog box with 10 Subintervals.

$\blacktriangleright$ Calculus + Approximate Integral + Midpoint

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

${\frac{{1}}{{10}}}$π$\dsum\limits_{{i=0}}^{{9}}$${\frac{{1}}{{10}}}$$\left(\vphantom{ i+\frac{1}{2}%
}\right.$i + ${\frac{{1}}{{2}%
}}$$\left.\vphantom{ i+\frac{1}{2}%
}\right)$πsin${\frac{{1}}{{10}}}$$\left(\vphantom{ i+\frac{1}{2}}\right.$i + ${\frac{{1}}{{2}}}$$\left.\vphantom{ i+\frac{1}{2}}\right)$π

$\blacktriangleright$ Evaluate Numerically

${\frac{{1}}{{10}}}$π$\dsum\limits_{{i=0}}^{{9}}$${\frac{{1}}{{10}}}$$\left(\vphantom{ i+\frac{1}{2}%
}\right.$i + ${\frac{{1}}{{2}%
}}$$\left.\vphantom{ i+\frac{1}{2}%
}\right)$πsin${\frac{{1}}{{10}}}$$\left(\vphantom{ i+\frac{1}{2}}\right.$i + ${\frac{{1}}{{2}}}$$\left.\vphantom{ i+\frac{1}{2}}\right)$π = 3.1545

Note    You can also find approximate integrals by specifying only the expression x sin x (without the $\int_{{0}}^{{\pi }}$ or the dx), in which case you enter the lower and upper ends of the range in the dialog box.

To get the following output you enter 0 as Lower End of Range and 3.14159 as Upper End of Range in the dialog box.

$\blacktriangleright$ Calculus + Approximate integral + Midpoint

x sin x Approximate integral (midpoint rule) is

.31416$\sum_{{i=0}}^{{9}}$$\left(\vphantom{ .31416i+.15708}\right.$.31416i + .15708$\left.\vphantom{ .31416i+.15708}\right)$sin$\left(\vphantom{ .31416i+.15708}\right.$.31416i + .15708$\left.\vphantom{ .31416i+.15708}\right)$

$\blacktriangleright$ Evaluate

.31416$\dsum\limits_{{i=0}}^{{9}}$$\left(\vphantom{ .31416i+.15708}\right.$.31416i + .15708$\left.\vphantom{ .31416i+.15708}\right)$sin$\left(\vphantom{ .31416i+.15708}\right.$.31416i + .15708$\left.\vphantom{ .31416i+.15708}\right)$ = 3.1545