# 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}$

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.
what is the Synthesis, properties,and applications of carbon nano chemistry
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
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
Yes, Nanotechnology has a very fast field of applications and their is always something new to do with it...
what is system testing
what is the application of nanotechnology?
Stotaw
In this morden time nanotechnology used in many field . 1-Electronics-manufacturad IC ,RAM,MRAM,solar panel etc 2-Helth and Medical-Nanomedicine,Drug Dilivery for cancer treatment etc 3- Atomobile -MEMS, Coating on car etc. and may other field for details you can check at Google
Azam
anybody can imagine what will be happen after 100 years from now in nano tech world
Prasenjit
after 100 year this will be not nanotechnology maybe this technology name will be change . maybe aftet 100 year . we work on electron lable practically about its properties and behaviour by the different instruments
Azam
name doesn't matter , whatever it will be change... I'm taking about effect on circumstances of the microscopic world
Prasenjit
how hard could it be to apply nanotechnology against viral infections such HIV or Ebola?
Damian
silver nanoparticles could handle the job?
Damian
not now but maybe in future only AgNP maybe any other nanomaterials
Azam
Hello
Uday
I'm interested in Nanotube
Uday
this technology will not going on for the long time , so I'm thinking about femtotechnology 10^-15
Prasenjit
can nanotechnology change the direction of the face of the world
At high concentrations (>0.01 M), the relation between absorptivity coefficient and absorbance is no longer linear. This is due to the electrostatic interactions between the quantum dots in close proximity. If the concentration of the solution is high, another effect that is seen is the scattering of light from the large number of quantum dots. This assumption only works at low concentrations of the analyte. Presence of stray light.
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