Newton-Cotes
Integration
(Trapezoidal Rule)
MATH161: NUMERICAL METHODS
Newton-Cotes Integration
The Newton-Cotes formulas are the most common numerical integration schemes. They are
based on the strategy of replacing a complicated function or tabulated data with an
approximating function that is easy to integrate.
where ππππ π₯π₯ = a polynomial of the form
ππππ π₯π₯ = ππ0 + ππ1 π₯π₯ + β― + ππππ−1 π₯π₯ ππ−1 + ππππ π₯π₯ ππ
ππ = ππππππππππ ππππ π‘π‘βππ ππππππππππππππππππππ
The approximation of an integral by the area under (a) a single
straight line and (b) a single parabola.
Newton-Cotes Integration
Closed –those where the data points at the beginning and end of the limits of
integration are known
β¦ Trapezoidal Rules
β¦ Simpson’s Rules
β¦ Simpson’s 1/3 Rules
β¦ Simpson’s 3/8 Rule
Open – have integration limits that extend beyond the range of the data
β¦ Midpoint Method
Trapezoidal Rule
Where,
ππ ππ − ππ ππ
ππ1 π₯π₯ = ππ ππ +
ππ − ππ
ππ
πΌπΌ = οΏ½ ππ ππ +
ππ
ππ ππ − ππ ππ
ππ − ππ
π₯π₯ − ππ
π₯π₯ − ππ ππππ
The result of the integration is:
ππ ππ + ππ ππ
πΌπΌ = ππ − ππ
2
which is called the trapezoidal rule.
Error of Trapezoidal Rule
An estimate for the local truncation error of a single application of the trapezoidal rule is:
πΈπΈπ‘π‘ = −
1 ′′
ππ ππ
12
οΏ½ππ − ππ)3
where ππ lies somewhere in the interval from ππ to ππ. If the function being integrated is linear,
the trapezoidal rule will be exact. Otherwise, for functions with second- and higher-order
derivatives (i.e., with curvature), some error can occur.
Example: Trapezoidal Rule
Given:
ππ ππ = ππ. ππ + ππππππ − ππππππππππ + ππππππππππ − ππππππππππ + ππππππππππ
from ππ = 0 to ππ = 0.8. The exact value of the integral can be determined analytically to
be 1.640533.
Multiple-Application Trapezoidal Rule
One way to improve the accuracy of the trapezoidal rule is to divide the integration interval from ππ to ππ into a
number of segments and apply the method to each segment. The areas of individual segments can then be added to
yield the integral for the entire interval. The resulting equations are called multiple-application, or composite,
integration formulas.
π₯π₯1
π₯π₯2
π₯π₯ππ
πΌπΌ = οΏ½ ππ π₯π₯ ππππ + οΏ½ ππ π₯π₯ ππππ + β― + οΏ½
π₯π₯0
π₯π₯1
π₯π₯ππ−1
ππ π₯π₯ ππππ
Substituting the trapezoidal rule for each segment where: β =
ππ − ππ
ππ
ππ π₯π₯0 + ππ π₯π₯1
ππ π₯π₯1 + ππ π₯π₯2
ππ π₯π₯ππ−1 + ππ π₯π₯ππ
+β
+β―+β
2
2
2
Grouping terms, the composite trapezoidal rule is:
πΌπΌ = β
ππ−ππ
ππ
π°π° = ππ ππππ + ππ οΏ½ ππ ππππ + ππ ππππ
ππ
ππ=ππ
Multiple-Application Trapezoidal Rule
Illustration of the multiple-application
trapezoidal rule for:
(a) Two segments,
(b) Three segments,
(c) Four segments,
(d) Five segments.
Example: Multiple Application
Trapezoidal Rule
Given:
ππ ππ = ππ. ππ + ππππππ − ππππππππππ + ππππππππππ − ππππππππππ + ππππππππππ
from ππ = 0 to ππ = 0.8. The exact value of the integral can be determined analytically to
be 1.640533.