# 3.6 Numerical integration

 Page 1 / 11
• Approximate the value of a definite integral by using the midpoint and trapezoidal rules.
• Determine the absolute and relative error in using a numerical integration technique.
• Estimate the absolute and relative error using an error-bound formula.
• Recognize when the midpoint and trapezoidal rules over- or underestimate the true value of an integral.
• Use Simpson’s rule to approximate the value of a definite integral to a given accuracy.

The antiderivatives of many functions either cannot be expressed or cannot be expressed easily in closed form (that is, in terms of known functions). Consequently, rather than evaluate definite integrals of these functions directly, we resort to various techniques of numerical integration    to approximate their values. In this section we explore several of these techniques. In addition, we examine the process of estimating the error in using these techniques.

## The midpoint rule

Earlier in this text we defined the definite integral of a function over an interval as the limit of Riemann sums . In general, any Riemann sum of a function $f\left(x\right)$ over an interval $\left[a,b\right]$ may be viewed as an estimate of ${\int }_{a}^{b}f\left(x\right)dx.$ Recall that a Riemann sum of a function $f\left(x\right)$ over an interval $\left[a,b\right]$ is obtained by selecting a partition

$P=\left\{{x}_{0},{x}_{1},{x}_{2}\text{,…},{x}_{n}\right\},\phantom{\rule{0.2em}{0ex}}\text{where}\phantom{\rule{0.2em}{0ex}}a={x}_{0}<{x}_{1}<{x}_{2}<\cdots <{x}_{n}=b$

and a set

$S=\left\{{x}_{1}^{*},{x}_{2}^{*}\text{,…},{x}_{n}^{*}\right\},\phantom{\rule{0.2em}{0ex}}\text{where}\phantom{\rule{0.2em}{0ex}}{x}_{i-1}\le {x}_{i}^{*}\le {x}_{i}\phantom{\rule{0.2em}{0ex}}\text{for all}\phantom{\rule{0.2em}{0ex}}i.$

The Riemann sum corresponding to the partition $P$ and the set $S$ is given by $\sum _{i=1}^{n}f\left({x}_{i}^{*}\right)\text{Δ}{x}_{i},$ where $\text{Δ}{x}_{i}={x}_{i}-{x}_{i-1},$ the length of the i th subinterval.

The midpoint rule    for estimating a definite integral uses a Riemann sum with subintervals of equal width and the midpoints, ${m}_{i},$ of each subinterval in place of ${x}_{i}^{*}.$ Formally, we state a theorem regarding the convergence of the midpoint rule as follows.

## The midpoint rule

Assume that $f\left(x\right)$ is continuous on $\left[a,b\right].$ Let n be a positive integer and $\text{Δ}x=\frac{b-a}{n}.$ If $\left[a,b\right]$ is divided into $n$ subintervals, each of length $\text{Δ}x,$ and ${m}_{i}$ is the midpoint of the i th subinterval, set

${M}_{n}=\sum _{i=1}^{n}f\left({m}_{i}\right)\text{Δ}x.$

Then $\underset{n\to \infty }{\text{lim}}{M}_{n}={\int }_{a}^{b}f\left(x\right)dx.$

As we can see in [link] , if $f\left(x\right)\ge 0$ over $\left[a,b\right],$ then $\sum _{i=1}^{n}f\left({m}_{i}\right)\text{Δ}x$ corresponds to the sum of the areas of rectangles approximating the area between the graph of $f\left(x\right)$ and the x -axis over $\left[a,b\right].$ The graph shows the rectangles corresponding to ${M}_{4}$ for a nonnegative function over a closed interval $\left[a,b\right].$

## Using the midpoint rule with ${M}_{4}$

Use the midpoint rule to estimate ${\int }_{0}^{1}{x}^{2}dx$ using four subintervals. Compare the result with the actual value of this integral.

Each subinterval has length $\text{Δ}x=\frac{1-0}{4}=\frac{1}{4}.$ Therefore, the subintervals consist of

$\left[0,\frac{1}{4}\right],\left[\frac{1}{4},\frac{1}{2}\right],\left[\frac{1}{2},\frac{3}{4}\right],\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}\left[\frac{3}{4},1\right].$

The midpoints of these subintervals are $\left\{\frac{1}{8},\frac{3}{8},\frac{5}{8},\frac{7}{8}\right\}.$ Thus,

${M}_{4}=\frac{1}{4}f\left(\frac{1}{8}\right)+\frac{1}{4}f\left(\frac{3}{8}\right)+\frac{1}{4}f\left(\frac{5}{8}\right)+\frac{1}{4}f\left(\frac{7}{8}\right)=\frac{1}{4}·\frac{1}{64}+\frac{1}{4}·\frac{9}{64}+\frac{1}{4}·\frac{25}{64}+\frac{1}{4}·\frac{21}{64}=\frac{21}{64}.$

Since

${\int }_{0}^{1}{x}^{2}dx=\frac{1}{3}\phantom{\rule{0.2em}{0ex}}\text{and}\phantom{\rule{0.2em}{0ex}}|\frac{1}{3}-\frac{21}{64}|=\frac{1}{192}\approx 0.0052,$

we see that the midpoint rule produces an estimate that is somewhat close to the actual value of the definite integral.

## Using the midpoint rule with ${M}_{6}$

Use ${M}_{6}$ to estimate the length of the curve $y=\frac{1}{2}{x}^{2}$ on $\left[1,4\right].$

The length of $y=\frac{1}{2}{x}^{2}$ on $\left[1,4\right]$ is

${\int }_{1}^{4}\sqrt{1+{\left(\frac{dy}{dx}\right)}^{2}}\phantom{\rule{0.1em}{0ex}}dx.$

Since $\frac{dy}{dx}=x,$ this integral becomes ${\int }_{1}^{4}\sqrt{1+{x}^{2}}\phantom{\rule{0.1em}{0ex}}dx.$

If $\left[1,4\right]$ is divided into six subintervals, then each subinterval has length $\text{Δ}x=\frac{4-1}{6}=\frac{1}{2}$ and the midpoints of the subintervals are $\left\{\frac{5}{4},\frac{7}{4},\frac{9}{4},\frac{11}{4},\frac{13}{4},\frac{15}{4}\right\}.$ If we set $f\left(x\right)=\sqrt{1+{x}^{2}},$

$\begin{array}{cc}\hfill {M}_{6}& =\frac{1}{2}f\left(\frac{5}{4}\right)+\frac{1}{2}f\left(\frac{7}{4}\right)+\frac{1}{2}f\left(\frac{9}{4}\right)+\frac{1}{2}f\left(\frac{11}{4}\right)+\frac{1}{2}f\left(\frac{13}{4}\right)+\frac{1}{2}f\left(\frac{15}{4}\right)\hfill \\ & \approx \frac{1}{2}\left(1.6008+2.0156+2.4622+2.9262+3.4004+3.8810\right)=8.1431.\hfill \end{array}$

what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
Do somebody tell me a best nano engineering book for beginners?
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
so some one know about replacing silicon atom with phosphorous in semiconductors device?
Yeah, it is a pain to say the least. You basically have to heat the substarte up to around 1000 degrees celcius then pass phosphene gas over top of it, which is explosive and toxic by the way, under very low pressure.
Harper
Do you know which machine is used to that process?
s.
how to fabricate graphene ink ?
for screen printed electrodes ?
SUYASH
What is lattice structure?
of graphene you mean?
Ebrahim
or in general
Ebrahim
in general
s.
Graphene has a hexagonal structure
tahir
On having this app for quite a bit time, Haven't realised there's a chat room in it.
Cied
what is biological synthesis of nanoparticles
what's the easiest and fastest way to the synthesize AgNP?
China
Cied
types of nano material
I start with an easy one. carbon nanotubes woven into a long filament like a string
Porter
many many of nanotubes
Porter
what is the k.e before it land
Yasmin
what is the function of carbon nanotubes?
Cesar
I'm interested in nanotube
Uday
what is nanomaterials​ and their applications of sensors.
what is nano technology
what is system testing?
preparation of nanomaterial
how to synthesize TiO2 nanoparticles by chemical methods
Zubear
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Berger describes sociologists as concerned with
Leaves accumulate on the forest floor at a rate of 2 g/cm2/yr and also decompose at a rate of 90% per year. Write a differential equation governing the number of grams of leaf litter per square centimeter of forest floor, assuming at time 0 there is no leaf litter on the ground. Does this amount approach a steady value? What is that value?
You have a cup of coffee at temperature 70°C, which you let cool 10 minutes before you pour in the same amount of milk at 1°C as in the preceding problem. How does the temperature compare to the previous cup after 10 minutes?
Abdul