Вы находитесь на странице: 1из 3

MATH 171 Notes (7 May 2015)

NUMERICAL INTEGRATION
GOAL to find an approxmation to the definite integral I(f ) :=

Rb
a

f (x)dx.

NEWTON-COTES FORMULA
CLOSED NEWTON-COTES FORMULA
An (n + 1)-point closed Newton-Cotes formula uses points xi = x0 + ih for i = 0, 1 . . . , n where
x0 = a, xn = b and h = (b a)/n has the form
Z b
Z xn
n
X
f (x)dx =
f (x)dx
ai f (xi )
a

x0

where
Z

xn

i=0

xn

Li (x)dx =

ai =

x0

x0

n
Y
j=0,j6=i

x xj
dx.
xi xj

P
THEOREM Suppose that ni=0 ai f (xi ) denotes the (n+1)-point closed Newton-Cotes formula
with x0 = a, xn = b and h = (b a)/n. There exists n(x) (a, b) such that
Z b
Z
n
X
hn+3 f (n+2) (n(x)) n 2
f (x)dx =
ai f (xi ) +
t (t 1) (t n)dt
(n + 2)!
a
0
i=0

C n+2 ([a, b])

if n is even and f
and
Z b
Z
n
X
hn+2 f (n+1) (n(x)) n
f (x)dx =
ai f (xi ) +
t(t 1) (t n)dt
(n + 1)!
a
0
i=0

if n is odd and f

C n+2 ([a, b]).

TRAPEZOIDAL RULE Consider a = x0 , b = x1 , h = x1 x0 . Then


x x1
x x0
f (x) p1 (x) =
f (x0 ) +
f (x1 )
x0 x1
x1 x0
Z b
Z b
f (x)dx
p1 (x)dx
a
a
Z x1
Z x1
f (x0 )
f (x1 )
(x x1 )dx +
(x x0 )dx
=
x 0 x 1 x0
x1 x0 x0
x1 x0
=
(f (x0 ) + f (x1 )) = T1 (f )
2
COMPOSITE TRAPEZOIDAL RULE Let f C 2 ([a, b]), n may be odd or even, h =
(b a)/n and xi = x0 + ih for i = 0, . . . , n. Then the composite trapezoidal rule can be written
as
Z b=xn
n1
X
h
f (x)dx Tn (f ) = [f (a) + 2
f (xi ) + f (b)]
2
a=x0
i=1

Proof Consider I = [a, b]. Subdivide I into n equal subintervals, n + 1 points a = x0 <
x1 < < xn = b, h = (b a)/n. Then
Z xn
n1
n1
n1
X Z xi+1
Xh
X
h
f (x)dx =
f (x)dx
(f (xi ) + f (xi+1 )) = [f (a) + 2
f (xi ) + f (b)].
2
2
x0
xi
i=0

i=0

i=1

ERROR FORMULA FOR THE SIMPLE TRAPEZOIDAL RULE Let f C 2 ([a, b])
and h = b a. The local error using T1 (f ) is given by
ET1 (f ) =

h3 00
f (n(x))
12

for some n(x) (a, b).


ERROR FOR COMPOSITE TRAPEZOIDAL RULE
ETn (f ) =

h2 (b a) 00
f (n(x))
12

for some n(x) (a, b).


SIMSPONS RULE consists of connecting three points on the curve by a parabola. Consider
a = x0 , x1 = x0 + h, x2 = x0 + 2h = b, h = (b a)/2. Then
f (x) p2 (x) =
Z

(x x1 )(x x2 )
(x x0 )(x x2 )
(x x0 )(x x1 )
f (x0 ) +
f (x1 ) +
f (x2 )
(x0 x1 )(x0 x2 )
(x1 x0 )(x1 x0 )
(x2 x0 )(x2 x1 )

Z
f (x)dx

p2 (x)dx

Z x2
Z x2
f (x1 )
f (x0 )
(x x1 )(x x2 )dx +
(x x0 )(x x2 )dx
=
(x0 x1 )(x0 x2 ) x0
(x1 x0 )(x1 x2 ) x0
Z x2
f (x2 )
+
(x x0 )(x x1 )dx
(x2 x0 )(x2 x1 ) x0
h
= [f (x0 ) + 4f (x1 ) + f (x2 )] = T2 (f )
3
THEOREM Let f C 4 ([a, b]), n be even, h = (b a)/n and xi = a + ih for i = 0, 1, . . . , n.
Then the composite Simspons rule for n subintervals can be written as
Z
a

n/21
n/2
X
X
h
f (x)dx Sn (f ) = [f (a) + 2
f (x2i ) + 4
f (x2i1 ) + f (b)].
3
i=1

i=1

Proof
Z

xn

f (x)dx =
x0

n/21 Z x
X
2(i+1)
i=0

f (x)dx

x2i

n/21

X h
(f (x2i ) + 4f (x2i+1 ) + f (x2i+2 ))
3
i=0

n/21
n/2
X
X
h
= [f (a) + 2
f (x2i ) + 4
f (x2i1 ) + f (b)].
3
i=1

i=1

ERROR FORMULA FOR SIMPLE SIMPSONS RULE Let f C 4 ([a, b]) and h =
(b a)/2. The local error using S2 (f ) is
ES2 (f ) =

h5 (4)
f (n(x))
90

for some n(x) (a, b).


ERROR FOR COMPOSITE SIMPSONS RULE
ESn (f ) =

h4 (b a) (4)
f (n(x))
180

for some n(x) (a, b).


HIGHER ORDER FORMULAS
1. SIMPSPONS 3/8 RULE
Z x3
3h
3h5 (4)
f (x)dx =
(f0 + 3f1 + 3f2 + f3 )
f (n(x)), n(x) (x0 , x3 )
8
80
x0
2. BOOLES RULE
Z x4
8h7 (6)
2h
(7f0 + 32f1 + 12f2 + 32f3 + 7f4 )
f (n(x)), n(x) (x0 , x4 )
f (x)dx =
45
945
x0
3. SIX-POINT RULE
Z x5
5h
275h7 (6)
f (x)dx =
(19f0 +75f1 +50f2 +50f3 +75f4 +19f5 )
f (n(x)), n(x) (x0 , x5 )
288
12096
x0
4. WEDDLES RULE
Z x6
3h
h7 (6)
f (x)dx =
(f0 + 5f1 + f2 + 6f3 + f4 + 5f5 + f6 )
f (n(x)), n(x) (x0 , x6 )
10
140
x0

Вам также может понравиться