close

Вход

Забыли?

вход по аккаунту

код для вставкиСкачать
We sometimes need an efficient method to estimate area
when we can not find the antiderivative.
3
y
1
0 x4
x 1
2
8
2
Actual area under curve:
A
A

4
0
1
1
x  1 dx
2
8
4
x x
3
24
A
20
3
1
0
 6 .6
0
1
2
3
4
3
y
1
x 1
2
0 x4
8
2
Left-hand rectangular
approximation:
1
0
Approximate area:
11
1
1
8
1
1
2
2
2
1
8
5
3
3
4
 5.75
4
(too low)

3
y
1
x 1
2
0 x4
8
2
Right-hand rectangular
approximation:
1
0
Approximate area:
1
1
8
1
1
1
2
2
1
8
2
37
3
3
4
 7.75
4
(too high)

Averaging the two:
LRAM
n
 RRAM
n
2
7.75  5.75
 6.75
1.25% error
(too high)
2
6 . 75  6 . 6666
6 . 666666
3
2
1
0
1
2
3
Averaging right and left rectangles gives us trapezoids:
1
9 19 3
T  1     
2
8 28 2
 1  3 17
  
8
 22
 1  17

 3
 
 2 8

4
3
2
1
0
1
9 19 3
T  1     
2
8 28 2
1
 1  3 17
  
8
 22
2
3
4
 1  17

 3
 
 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
4
 6 .7 5
(still too high)

Trapezoidal Rule:
T 
h
2
 y 0  2 y1  2 y 2  ...  2 y n 1 
yn 
h = width of subinterval = (b – a)/n
This gives us a better approximation than either left
or right rectangles.

Trapezoidal Rule:
T 
h
2
 y 0  2 y1  2 y 2  ...  2 y n 1 
yn 
h = width of subinterval = (b – a)/n
To see if the Trapezoidal Rule is an overestimate,
underestimate, or exact, use the Concavity Test.
If f’’(x) = 0, approximation is exact.
If f’’(x) > 0, approximation is an overestimate
If f’’(x) < 0, approximation is an underestimate.
Example 1
2
Use the Trapezoidal Rule with n = 4 to estimate
We must partition [1, 2] into four
subintervals of equal length.

2
x dx
1
x
1
1.25
1.5
1.75
2
f(x)
1
25/16
36/16
49/16
4
T 
h
2
 y 0  2 y1  2 y 2  2 y 3 
y4 
1
T  4
2

 1 

 25 
9
2
  2  
 16 
4

 49 
2
  4 
 16 

1  75 
75
T  
 2 . 34375
 
8 4 
32
h
ba
n

2 1
4

1
4
3
y
1
x 1
2
0 x4
8
2
Compare this with the
Midpoint Rule:
1
0
1
2
1 .0 3 1 2 5
1 .7 8 1 2 5
1 .2 8 1 2 5
Approximate area: 6 .6 2 5
3
4
2 .5 3 1 2 5
0.625% error (too low)
The midpoint rule gives a closer approximation than the
trapezoidal rule, but in the opposite direction.

Trapezoidal Rule:
6 .7 5 0
1.25% error
(too high)
Midpoint Rule:
6 .6 2 5
0.625% error
(too low)
Notice that the trapezoidal rule gives us an answer that
has twice as much error as the midpoint rule, but in the
opposite direction.
If we use a weighted average:
2  6.625   6.750
3
 6.6
This is the
exact answer!

This weighted approximation gives us a closer approximation
than the midpoint or trapezoidal rules.
Midpoint:
M  2 h  y1  2 h  y 3  2 h  y1  y 3 
Trapezoidal:
T 
1
2
h
x1
h
x2
h
x3
h
x4
2M  T

3
 4 h  y1  y 3   h  y 0  2 y 2  y 4  
twice midpoint
1
2
 y2 
y4  2h
T  h  y0  y2   h  y2  y4 
T  h  y0  2 y2  y4 
3
1
 y0  y2  2h 
trapezoidal

h
3

h
3
 4 y1  4 y 3 
y0  2 y2  y4 
 y 0  4 y1  2 y 2  4 y 3 
y4 

Simpson’s Rule:
h
S 
3
 y 0  4 y1  2 y 2  4 y 3  ...  2 y n  2  4 y n 1 
yn 
( h = width of subinterval, n must be even )
Example:
y
1
x 1
2
1
9
3
17

S  1  4   2   4 
 3
3
8
2
8

8
3
1
9
17

 1   3 
 3
3
2
2

2
1

0
1
2
3
4
1
3
 20 
 6 .6

Simpson’s rule can also be interpreted as fitting parabolas
to sections of the curve, which is why this example came
out exactly.
Simpson’s rule will usually give a very good approximation
with relatively few subintervals.
It is especially useful when we have no equation and the
data points are determined experimentally.
p
1/--страниц
Пожаловаться на содержимое документа