Aim: How can we approximate the area under a curve using

Download Report

Transcript Aim: How can we approximate the area under a curve using

Aim: How can we approximate the area
under a curve using the Trapezoidal Rule?
Do Now:
Evaluate
cos x
 x dx
No can do!
some elementary functions do not have
antiderivatives that are elementary
Fundamental Theorem of Calculus
cannot be applied
solution: must approximate
Aim: Trapezoidal Rule
Course: Calculus
The Trapezoidal Rule
Area of Trapezoid
1
A  h  b1  b2 
2
a
x0
x1
x2
x3
x4
b
x5
x x
x
partition into equal subintervals
ba
x 
n
Aim: Trapezoidal Rule
ba
x 
5
Course: Calculus
The Trapezoidal Rule
f(x1) Area of Trapezoid
f(x0)
x0
x1
1
A  h  b1  b2 
2
ba
n
1  x1  x0 
Area of 1st
f ( x0 )  f ( x1 ) 
A1  


Trapezoid
2 n 
Area of ith A   f ( xi 1 )  f ( xi )   b  a 
  n 
Trapezoid i 
2

Total Area is sum of all Trapezoids
Aim: Trapezoidal Rule
Course: Calculus
The Trapezoidal Rule
1
a
x0
2
x1
3
x2
4
x3
5
x4
b
x5
ba
n
Total Area is sum of all Trapezoids
 b  a   f ( x0 )  f ( x1 )
A



2
 n 
Aim: Trapezoidal Rule
f ( xn1 )  f ( xn ) 


2

Course: Calculus
The Trapezoidal Rule
1
a
x0
2
x1
3
x2
4
x3
5
x4
b
x5
f ( xn1 )  f ( xn ) 
 b  a   f ( x0 )  f ( x1 )
A
 



2
2
 n 

ba
A
 f ( x0 )  f ( x1 )  f ( x1 )  f ( x2 )  

 2n 
ba
A
 f ( x0 )  2 f ( x1 )  2 f ( x2 ) 

 2n  Aim: Trapezoidal Rule
 2 f ( xn1 )  f ( xn )
Course: Calculus
Trapezoidal Rule
ba
A  lim 
 f ( x0 )  2 f ( x1 ) 

n
 2n 
 2 f ( xn1 )  f ( xn )
n


f
(
a
)

f
(
b
)

x
ba
 lim 
  f ( xi )x 
x 
n
2
n
i 1


n
f ( a )  f ( b )  b  a 

 lim
 lim  f ( xi )x
n
n
2n
i 1
 0   f  x  dx
b
a
Let f be continuous
onn[a, b].f (The
b
xi ) Trapezoidal
f ( xi 1 )  Rule
b
f  x  dx  
f
x


for approximating
is
given
by
a

ai 1f  x  dx 2

b
a
ba
f  x  dx  
 f ( x0 )  2 f ( x1 ) 

 2n 
Aim: Trapezoidal Rule
 2 f ( xn1 )  f ( xn )
Course: Calculus
Model Problem
Use the Trapezoidal Rule to approximate


0
sin x dx
1.5
and compare results for n = 4 and n = 8
f x  = sinx 
ba
x 
n
 0 
x 

4
4
1
0.5
1.5

4
0

2
1
2
3
4
3

-0.5
1
x 
 0
8


80.5
0

8

4
Aim: Trapezoidal Rule
-0.5
1
3
8

2
3
52
7
Course: Calculus
4
8
8
3

Model Problem

b
a
ba
f  x  dx  
 f ( x0 )  2 f ( x1 ) 

 2n 
 2 f ( xn1 )  f ( xn )
n=4


3
  

sin
x
dx

sin0

2sin

2sin

2sin

sin

 8 
0
4
2
4
 

  
 1 2
    0  2  2  2  0  
 1.896
8
4
n=8


3


sin
0

2sin

2sin

2sin


8
4
8




5
3
7 
  
0 sin x dx   16   2sin 2  2sin 8  2sin 4  2sin 8 
  sin 



sin x dx  2 
0



3 
  
    2  2 2  4sin  4sin   1.974
16  
8
8 
Aim:
Trapezoidal Rule
Course: Calculus




Approximation Rules
n
 f  x  dx   f ( x )x
b
a
0
i 1
left endpoint
ba

 y0  y1  y2

 n 
n
 f  x  dx   f ( x )x
b
a
1
i 1
right endpoint
ba

 y1  y2  y3

 n 

b
a
 yn1 
 b  a 
f  x  dx  
 y1  y3  y5

 n  2
2
2
n

i 1
 yn 

 y 2 n1 
2 
 x i  x i 1 
f
x midpoint

2


Aim: Trapezoidal Rule
Course: Calculus
Approximation Rules
Riemann Sum
b
f x i xi   f  x  dx
 
 f  x  x  f  x  x  f  x  x
 f  x  x   f  x  x
5
RP  
i 1

b
a
a
1
1
4
4
2
i
ba
f  x  dx  
 f ( x0 )  2 f ( x1 ) 

 2n 
n

i 1
3
2
i
 2 f ( xn1 )  f ( xn )
 f ( x i )  f ( x i 1 ) 
f
x

2


Aim: Trapezoidal Rule
3
Trapezoidal
Rule
Course: Calculus
Model Problem
Approximate the area under the curve y  x
3
from x  2 to x  3 using 4 inscribed trapezoids.
Area of Trapezoid
1
A  h  b1  b2 
2
ba 32 1
x 


n
4
4
1 3
f ( x1 )  (2 )
4
f ( x0 )  f (2)  (2)  8
3
1 3
f ( x2 )  (2 )
2
3 3
f ( x3 )  (2 )
4
f ( x4 )  (3)3
1045
1 3
1 3
3 3
 1  3
3
A     2  2(2 )  2(2 )  2(2 )  3  
4
2
4
64
 8 


3
2
3
x 
x dx 
 16.25

4 2
4
3
Aim: Trapezoidal Rule
Course: Calculus
16.328125
Model Problem
Approximate the area under the curve
y  2 x  x 2 from x  1 to x  2 using
trapezoids - n = 4
Aim: Trapezoidal Rule
Course: Calculus