Professional Documents
Culture Documents
Newton-Cotes Formula
The way the trapezoidal rule is derived can be generalized to higher degree polynomial interpolants. Such a quadrature rule is called a Newton-Cotes formula. Let x0 , x1 , . . . , xn be given nodes in [a, b]. Recall that the Lagrange interpolation of a function at these nodes is given by the polynomial
n
p(t) =
j =0
f (xj ) j (t)
where each
j (t)
:=
i=0,i=j
t xi , j = 0, 1, . . . , n. xj xi
We therefore have
b b n
f (t)dt
a a
p(t)dt =
j =0
j f (xj )
j =
j (t)dt.
(1)
f (t) =
j =0
f (t)dt
It is nice to know how the weight j should be calculated. However, there are some other concerns: These weights are dicult to evaluate. How high can the degree of precision be pushed? Suppose we approximate f (t) by a quadratic polynomial p2 (t) that b interpolates f (a), f a+ and f (b). 2 It can be shown that (I derived it in class) Q3 (f ) = a+b ba [f (a) + 4f ( ) + f (b)]. 6 2 (2)
The error part is tricky! Observe that the function (in variable s) from Newtons forb b mula, g (s) = p2 (s) + f [a, b, a+ , t](s a)(s b)(s a+ ), in2 2 a+b terpolates f at a, b, 2 and t. Thinking t as arbitrary, we should have f (t) = p2 (t) + f [a, b, a+b a+b , t](t a)(t b)(t ) 2 2
E3 (f ) =
f [a, b,
a
a+b , t] (t)dt 2
(3)
b with (t) := (t a)(t b)(t a+ ). 2 We already know that the degree of precision is 2. Can this be better?
3 The function (x) changes sign as x crosses E3 (x) by a dierent approach. Let (x) :=
x a a+b . 2
So we have to analyze
Observe that (a) = (b) = 0. Observe also that (x) > 0 for all x (a, b). We may apply the mean value theorem to conclude that E3 (f ) = a+b , x, x](x)dx 2 a b a+b = f [a, b, (x)dx , , ] 2 a 5 f (4) ( ) 4 b a = 4! 15 2 f [a, b, = f (4) ( ) 90 ba 2
5 b
f (t)dt
a
The error formula for the composite Simpsons rule can be obtained in the same way as we derived the error formula for the composite trapezoidal rule: E3,cs = (b a)h4 (4) f ( ). 180 (5)