Title: Quadrature rules are based on polynominal interpolation
1Numerical Quadrature
Quadrature rules are based on polynominal
interpolation
(1) Sample integrant function f at a finite set
of points
(2) Interpolate the point
(3) Integrate the interpolating polynominal
In practice, the interpolating polynominal is not
determined explicitely, but used to determine the
weights.
2Closed Newton-Cotes
The simplest and for many cases most practical
quadrature scheme is the trapezoidal rule
Consider two points x0 a and
x1 b and interpolate using 1st order Lagrange
polynominal
Trapezoidal Rule
3Closed Newton-Cotes
Simpsons Rule
Use 3 points x0 a x1 h a(b-a)/2
x2 b --gtgt quadratic polynominal
Simpsons 3-Point Rule
Simpsons 3 point rule is exact for polynominals
up to degree 3
4Closed Newton-Cotes
Simpsons 3/8 Rule
Lets use 4 points x 0a x1 x2
x3b --gtgt cubic polynominal
Simpsons 3/8-Rule has the same degree of
accuracy as Simpsons 3-Point Rule.
This phenomena is true for all even-order
Newton-Cotes formulas
5Another Example
Example
Lets use Simpsons rule
-- gt Closed formula does not work
6Open Newton-Cotes
7Open Newton-Cotes
Example
Closed formula does not work
MidpointRule (n0)
n1 Open Rule
n2 Open Rule
8Drawbacks of Newton-Cotes
The Newton-Cotes rules are simple and often
effective, but they have drawbacks
Using a large number of equally spaced nodes may
incur erratic behavior associated with
high-degree polynominal interpolation
9Composite Quadrature
Solution Subdivide the original interval into
subintervals, and apply simple quadrature rules
in each subinterval
Summing the partial results then yields an
approximation for the overall integral
10Composite Quadrature
Solution Subdivide the original interval into
subintervals, and apply simple quadrature rules
in each subinterval
Summing the partial results then yields an
approximation for the overall integral
we will subdivide the interval a,b into n
subintervals of length h (b-a)/n
11Composite Quadrature
Subdivide interval a,b into n subintervals of
length h (b-a)/n
Composite trapezoidal rule
Computationally preferred formula (less function
calls and arithmetic)
12Composite Quadrature
The error in the original Trapezoidal Rule was
given by
For one subinterval
And when we sum over all subintervals
13Composite Quadrature
Finally, the Composite Trapezoidal Rule is given
by
The dominant term in the error of the Composite
Trapezoidal Rule is O(h2)
Cutting the width of each subinterval by two
--gtgt Reduction in the overall error by a factor
of about 1/4.
14Composite Quadrature
Example If the composite trapezoidal rule is to
be used to compute
with an error of at most 1/2 x 10-4, how many
points should be used?
The error formula is
So, in the interval 0, 1 we have f(x) 2.
In order to have an error of at most 1/2 x 10-4,
we need
15Composite Quadrature
Example If the composite trapezoidal rule is to
be used to compute
with an error of at most 1/2 x 10-4, how many
points should be used?
Hence, at least n1 59 points are needed for
the required accuracy.
With 58 subintervals the integral using the
trapezoidal rule is 0.7468059064
If we analytically integrate the function we get
0.7468241330
16Composite Quadrature
Subdivide interval a,b into n subintervals of
length h (b-a)/n
Composite trapezoidal rule
Computationally preferred formula (less function
calls and arithmetic)
17Recursive Quadrature
Lets subdivide the interval a,b into 2k-1
equal parts (k1,2,)
and replace n by 2k-1 and use hk (b-a)/2k-1, we
obtain
Here Rk,1 denotes the result of applying the
composite trapezoid rule with 2k-1 equal
subintervals.
18Recursive Quadrature
For example R3,1 uses the values of f at five
points a, a(b-a)/4, a2(b-a)/4,
a3(b-a)/4, b
For R4,1 we need values of f at 9 points a,
a(b-a)/8, a2(b-a)/8, a3(b-a)/8, .,
a7(b-a)/8, b
For R4,1 we need values of f at the 5 points used
for R3,1 plus four new additional points.
19Recursive Quadrature
If Rk-1,1 has been calculated we can write Rk,1 as
We want to calculate the expression in the
brackets with as little additional work as
possible!
20Recursive Quadrature
Thus for the term in the brackets
- Here we have used that each term in the first sum
that corresponds to an even value of i is
canceled out by a term in the second sum. - Only odd values of i contribute.
21Recursive Quadrature
Recursive Trapezoid Formula
If Rk-1,1 is available, then Rk,1 can be computed
by
This formula allows us to compute a sequence of
approximations to a definite integral using the
trapezoidal rule without reevaluating the
integrant at points where it has already been
evaluated.