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,
![{\displaystyle {\begin{aligned}x-x_{0}&=sh\,,\\x-x_{1}&=x-(x_{0}+h)=(s-1)h\,,\\\vdots \\x-x_{n}&=(s-n)h\,.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/234bad420f290604905b1b2b3fae02bcbf4039b1)
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
![{\displaystyle {\begin{aligned}P_{n}(x)&=[f_{0}]+[f_{0},f_{1}](x-x_{0})+\cdots +[f_{0},\ldots ,f_{n}](x-x_{0})(x_{1})\ldots (x-x_{n-1})\\&=[f_{0}]+[f_{0},f_{1}]sh+\cdots +[f_{0},\ldots ,f_{n}]s(s-1)\ldots (s-n+1)h^{n}\,.\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/be36153997eca8468a660b9f64af95c78ce85fb7)
From the general form of polynomial interpolation error, the error of using
to interpolate
can be obtained as
![{\displaystyle {\begin{aligned}E_{\text{interpolate}}(x)&=f(x)-P_{n}(x)\\&={\frac {1}{(n+1)!}}(x-x_{0})(x-x_{1})\cdots (x-x_{n})f^{(n+1)}(\xi )\\&={\frac {1}{(n+1)!}}s(s-1)(s-2)\ldots (s-n)h^{n+1}f^{(n+1)}(\xi )\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7c88218f7e061e8242141e6e72aee3ba83a6e778)
where
.
Since
, the error term of numerical integration is
-
![{\displaystyle E_{\text{integrate}}=\int \limits _{x_{0}}^{x_{n}}E_{\text{interpolate}}(x)dx={\frac {h^{n+2}}{(n+1)!}}f^{(n+1)}(\xi )\int \limits _{0}^{n}s(s-1)\cdots (s-n)ds\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/ad6d66e37c7c72bf5916a704816aa6ffee547bd0)
|
|
(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
![{\displaystyle E_{\text{integrate}}=h\int \limits _{0}^{1}{\frac {s(s-1)}{2}}h^{2}f''(\xi )ds=-{\frac {1}{12}}h^{3}f''(\xi )=O(h^{3})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/7eec20ba7fec47354fe4b1fad6ab9de9593564e3)
where
.
Thus the local error is
. Consider the composite trapezoid rule. Given that
, the global error is
-
![{\displaystyle {\begin{aligned}\left|\sum _{i=0}^{n-1}-{\frac {1}{12}}h^{3}f''(\xi _{i})\right|&=n[-{\frac {1}{12}}(x_{n}-x_{0})h^{2}f''({\bar {\xi }})]\\&=-{\frac {1}{12}}(x_{n}-x_{0})h^{2}f''({\bar {\xi }})=O(h^{2})\,,\end{aligned}}}](https://wikimedia.org/api/rest_v1/media/math/render/svg/0d81a4e8203c7108ca43442ad4c57c8d30d1d4b9)
|
|
(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
![{\displaystyle E_{\text{integrate}}=h\int \limits _{0}^{2}{\frac {s(s-1)(s-2)}{6}}h^{3}f'''(\xi )ds=0}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e3d1e10faa791ddd25224e954afae431865da25f)
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
![{\displaystyle E_{\text{integrate}}=h\int \limits _{0}^{2}{\frac {s(s-1)(s-2)(s-3)}{24}}h^{4}f^{(4)}(\xi )ds=-{\frac {1}{90}}h^{5}f^{(4)}(\xi )=O(h^{5})\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/e82b0c7027c86f4c87817d800c05a49edffde0ca)
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
![{\displaystyle E_{\text{integrate}}=h\int \limits _{0}^{3}{\frac {s(s-1)(s-2)(s-3)}{24}}h^{4}f^{(4)}(\xi )ds=-{\frac {3}{80}}h^{5}f^{(4)}(\xi )=O(h^{5})}](https://wikimedia.org/api/rest_v1/media/math/render/svg/a17c0d6740baf3ca33c3b924f1a03eec7b883653)
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
![{\displaystyle x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4) |
|
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
![{\displaystyle I(h=0.8)={\frac {0.8}{2}}(-0.32258065-0.25641026)=-0.23159636}](https://wikimedia.org/api/rest_v1/media/math/render/svg/5c8082ee320af50ebc991f126ebebc9f108bf194)
Compared with the exact solution
we have
![{\displaystyle E_{\text{integrate}}=0.00202192\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/04fd414920499105f2c32bc06b5548a4f2d2910a)
Using all three points with
we can get
![{\displaystyle I(h=0.4)={\frac {0.4}{2}}(-0.32258065-2\times 0.28571429-0.25641026)=-0.23008389}](https://wikimedia.org/api/rest_v1/media/math/render/svg/2756a6bec908c70c83c000adcb8c7a13c7e638de)
and so
![{\displaystyle E_{\text{integrate}}=0.00050945\,.}](https://wikimedia.org/api/rest_v1/media/math/render/svg/daf5088f6db6bd79d37776f036701be72cd7d1ce)
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
.
![{\displaystyle x}](https://wikimedia.org/api/rest_v1/media/math/render/svg/87f9e315fd7e2ba406057a97300593c4802b53e4) |
|
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?