Example
1. Consider the
function
, the
equally spaced quadrature nodes
,
,
,
,
and
, and
the corresponding function values
,
,
,
, and
. Apply
the various quadrature formulas (4) through (7).
![[Graphics:Images/NewtonCotesMod_gr_56.gif]](../Images/NewtonCotesMod_gr_56.gif)
![[Graphics:Images/NewtonCotesMod_gr_57.gif]](../Images/NewtonCotesMod_gr_57.gif)
Trapezoidal
Rule Simpson’s
Rule
![[Graphics:Images/NewtonCotesMod_gr_58.gif]](../Images/NewtonCotesMod_gr_58.gif)
![[Graphics:Images/NewtonCotesMod_gr_59.gif]](../Images/NewtonCotesMod_gr_59.gif)
Simpson’s
3/8
Rule Boole’s
Rule
Solution 1.
Using (8) the Trapezoidal Rule:
Mathematica's Computation is:
Using (9) Simpson’s Rule:
Mathematica's Computation is:
Using (10) Simpson’s
Rule:
Mathematica's Computation is:
Using (11) Boole’s Rule:
Mathematica's Computation is:
It
is important to realize that the quadrature formulas (4) through (7)
applied in the example above give approximations for definite
integrals over different intervals. The
graph of the curve
and
the areas under the Lagrange polynomials
,
,
,
and
are
shown in the figures for this example.
(c) John H. Mathews 2004