The Newton-Cotes formulas are a group of formulas for evaluating numeric integration at equally spaced points.
Let , , be equally spaced points, and be the corresponding values. Let be the space , and let be the interpolation variable . Thus to interpolate at x,
A polynomial of degree can be derived to pass through these points and approximate the function . Using divided differences and Newton polynomial, can be obtained as
From the general form of polynomial interpolation error, the error of using to interpolate can be obtained as
where .
Since , the error term of numerical integration is
-
|
|
(1)
|
Let's consider the trapezoid rule in a single interval. In each interval, the integration uses two end points. Thus . Then . Applying (1), we get
where .
Thus the local error is . Consider the composite trapezoid rule. Given that , the global error is
-
|
|
(2)
|
where , .
To justify (2), we can need the theorem below[2] in page 345:
If is continuous and the , then for some value in the interval of all the arguments
Consider Simpson's 1/3 rule. In this case, three equally spaced points are used for integration. Thus . Applying (1), we get
where .
This doesn't mean that the error is zero. It simply means that the cubic term is identically zero. The error term can be obtained from the next term in the Newton polynomial, obtaining
Thus the local error is and the global error is .
Consider Simpson's 3/8 rule. In this case, since four equally spaced points are used. Applying (1), we get
where .
Both the Simpon's 1/3 rule and the 3/8 rule have error terms of order . With smaller coefficient, the 1/3 rule seems more accurate. Then why do we need the 3/8 rule? The 3/8 rule is useful when the total number of increments is odd. Three increments can be used with the 3/8 rule, and then the rest even number of increments can be used with 1/3 rule.
Given the set of data points, solve the numerical integration
|
|
3.1 |
-0.32258065
|
3.5 |
-0.28571429
|
3.9 |
-0.25641026
|
Use the trapezoid rule. First try . That is, use only the two end points. We can get
Compared with the exact solution we have
Using all three points with we can get
and so
Thus the error ratio is . This is close to what we can get by inspecting
- .
Using the data given below, find the maximum error incurred in using Newton's forward interpolation formula to approximate .
|
|
0.1 |
1.10517
|
0.2 |
1.22140
|
0.3 |
1.34986
|
0.4 |
1.49182
|
0.5 |
1.64872
|
When using Simpson's 1/3, what is the error ratio supposed to be?