Академический Документы
Профессиональный Документы
Культура Документы
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
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
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
h2 (b a) 00
f (n(x))
12
(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
h4 (b a) (4)
f (n(x))
180