Sie sind auf Seite 1von 3

1

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)

is the Lagrange polynomial


n 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 )

where the weight j is determined by


b

j =

j (t)dt.

(1)

Note that if f (t) itself is a polynomial of degree n, then


n

f (t) =
j =0

f (xj ) j (t). (Why?)


b a

In this case, the Newtow-Cotes quadrature rule evaluates precisely.

f (t)dt

The Newton-Cotes quadrature rule has degree of precision at least n.

An Example Simpsons Rule

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

The error E3 (f ) therefore is given by


b

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

(t)dt. Then (x) = (x).

By integration by parts, we have E3 (f ) = f [a, b, a+b a+b b , x](x)|b , x, x](x)dx. a |a f [a, b, 2 2

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

The degree of precision for Simpsons rule is 3 rather than 2.


a Divide the interval into 2n equally space subintervals with h = b2 and n xi = a + ih for i = 0, 1, . . . , 2n. Upon applying Simpsons rule over two consecutive subintervals [x2j , x2j +2 ] for j = 0, 1, . . . , n 1 and summing up these integrals, we obtain the composite Simpsons rule: b

f (t)dt
a

h {f0 + 4f1 + 2f2 + 4f3 + . . . + 2f2n2 + 4f2n1 + f2n } . 3 (4)

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)

Das könnte Ihnen auch gefallen