Beruflich Dokumente
Kultur Dokumente
5 Numerical Integration
Mt. Shasta, California
Photo by Vickie Kelly, 1998
1 2
y x 1
8
0 x4
1 2
x 1 dx
8
4
1 3
A
x x
24
0
20
A
6.6
3
1 2
y x 1
8
0 x4
Left-hand rectangular
approximation:
1
8
1
2
1
8
3
4
(too low)
1 2
y x 1
8
0 x4
Right-hand rectangular
approximation:
1
8
1
2
1
8
3
4
(too high)
7.75 5.75
6.75
2
1.25% error
(too high)
1
9
1 9 3
T 1
2
8
2 8 2
1 17
1 3 17
3
2 8
2 2 8
1
9
1 17
1 9 3 1 3 17
T 1
3
2
8
2 8
2 8 2 2 2 8
1
9 9 3 3 17 17
T 1 3
2
8 8 2 2 8 8
1 27
T
2 2
27
6.75
4
Trapezoidal Rule:
h
T y0 2 y1 2 y2 ... 2 yn 1 yn
2
( h = width of subinterval )
1 2
y x 1
8
0 x4
1.28125
1.78125
2.53125
Trapezoidal Rule:
(too high)
Midpoint Rule:
(too low)
Ahhh!
2 6.625 6.750
6.6
3
Oooh!
Wow!
This is the
exact answer!
M 2h y1 2h y3 2h y1 y3
Trapezoidal:
T
h x h x
1
2
h x h x
3
4
2M T
3
1
4h y1 y3 h y0 2 y2 y4
3
twice midpoint
trapezoidal
1
1
y
y
2
h
0 2
y2 y4 2h
2
2
T h y0 y 2 h y 2 y 4
T h y0 2 y 2 y 4
h
4 y1 4 y3 y0 2 y2 y4
3
h
y0 4 y1 2 y2 4 y3 y4
3
Simpsons Rule:
h
S y0 4 y1 2 y2 4 y3 ... 2 yn 2 4 yn 1 yn
3
( h = width of subinterval, n must be even )
Example: y 1 x 2 1
8
1
9
3
17
S 1 4 2 4 3
3
8
2
8
1
9
17
1 3 3
3
2
2
1
20 6.6
3