SlideShare a Scribd company logo
1 of 25
Trapezoidal Rule of Integration 
1
What is Integration 
Integration: 
The process of measuring 
the area under a function 
plotted on a graph. 
b 
I f ( x )dx 
= ò 
a 
Where: 
f(x) is the integrand 
a= lower limit of integration 
b= upper limit of integration 
f(x) 
a b 
y 
http://2 numericalmethods.eng.usf.edu 
x
Basis of Trapezoidal Rule 
Trapezoidal Rule is based on the Newton-Cotes 
Formula that states if one can approximate the 
integrand as an nth order polynomial… 
b 
I f ( x )dx 
= ò 
a 
where f ( x ) » fn( x ) 
n 
fn( x ) = a + a x + ...+ an x - 
+ a n 
x n 
and 0 1 - 
1 
1 
http://3 numericalmethods.eng.usf.edu
Basis of Trapezoidal Rule 
Then the integral of that function is approximated 
by the integral of that nth order polynomial. 
b 
b 
f ( x ) f ( x ) 
ò » ò 
a 
n 
a 
Trapezoidal Rule assumes n=1, that is, the area 
under the linear polynomial, 
ù 
úû 
f ( a ) ò = ( b - a ) é + 
f ( b ) a 
b 
êë 
2 
f ( x )dx 
http://4 numericalmethods.eng.usf.edu
Derivation of the Trapezoidal Rule 
http://5 numericalmethods.eng.usf.edu
Method Derived From Geometry 
The area under the 
curve is a trapezoid. 
The integral 
f x dx Area of trapezoid 
b 
ò ( ) » 
a 
= 1 
( Sum of parallel sides )( height ) 
2 
1 
= ( f ( b ) + f ( a ))( b - a ) 
2 
ù 
úû 
( b a ) f ( a ) f ( b ) 
= - é + 
êë 
2 
f(x) 
a b 
Figure 2: Geometric Representation 
y 
http://6 numericalmethods.eng.usf.edu 
x 
f1(x)
Example 1 
The vertical distance covered by a rocket from t=8 to t=30 
seconds is given by: 
2000 140000 . t dt 
æ ù 
- ö úû 
çè 
êëé 
30 
ò ÷ø 
- 
x = 
ln 
8 
9 8 
t 
140000 2100 
a) Use single segment Trapezoidal rule to find the distance 
covered. 
t E 
b) Find the true error, for part (a). 
e 
c) Find the absolute relative true error, a for part (a). 
http://7 numericalmethods.eng.usf.edu
Solution 
ù 
úû 
I » ( b - a ) é f ( a ) + 
f ( b ) 
êë 
2 
a) 
a = 8 b = 30 
2000 é 
140000 ù 
úû 
- f ( t ) ln 9 8 
. t 
t 
êë 
- 
140000 2100 
= 
ù 
é 
8 2000 140000 - úû 
f ( ) ln 9 8 8 
. ( ) 
( ) 
êë 
- 
140000 2100 8 
= 
ù 
é 
30 2000 140000 - úû 
f ( ) ln 9 8 30 
. ( ) 
( ) 
êë 
- 
140000 2100 30 
= 
=177.27 m / s 
= 901.67 m / s 
http://8 numericalmethods.eng.usf.edu
Solution (cont) 
ù 
úû 
I = ( 30 - 8 ) é 177.27 + 
901.67 
êë 
2 
= 11868 m 
a) 
b) The exact value of the above integral is 
2000 140000 . t dt 
æ é 
ù 
- úû 
çèö 30 
ò ÷ø 
x ln =11061 m 
êë 
- 
= 
8 
9 8 
t 
140000 2100 
http://9 numericalmethods.eng.usf.edu
Solution (cont) 
b) E True Value Approximate Value t = - 
= 11061-11868 
= -807 m 
c) The absolute relative true error, t , would be Î 
Î = 11061-11868 ´ 100 
t = 7.2959% 
11061 
http://10 numericalmethods.eng.usf.edu
Multiple Segment Trapezoidal Rule 
In Example 1, the true error using single segment trapezoidal rule was 
large. We can divide the interval [8,30] into [8,19] and [19,30] intervals 
and apply Trapezoidal rule over each segment. 
2000 æ 
140000 ö ÷ø 
- çè 
f ( t ) ln 9 8 
. t 
t 
- 
140000 2100 
= 
30 
19 
30 
f ( t )dt f ( t )dt f ( t )dt 
ò = ò + ò 
19 
8 
8 
ù 
úû 
(19 8 ) f ( 8 ) f (19 ) ( ) f ( ) f ( ) 
+ - é + úû 
30 19 19 30 
êë 
ù 
= - é + 
êë 
2 
2 
http://11 numericalmethods.eng.usf.edu
Multiple Segment Trapezoidal Rule 
With 
f (8 ) =177.27 m / s 
f ( 30 ) = 901.67 m/ s 
f (19 ) = 484.75 m / s 
ù 
úû 
30 
ò = - é + 2 
+ - é + úû 
(30 19) 484.75 901.67 
êë 
ù 
( ) (19 8) 177.27 484.75 
êë 
2 
8 
f t dt 
= 11266 m 
Hence: 
http://12 numericalmethods.eng.usf.edu
Multiple Segment Trapezoidal Rule 
Et = 11061-11266 
= -205 m 
The true error is: 
The true error now is reduced from -807 m to -205 m. 
Extending this procedure to divide the interval into equal 
segments to apply the Trapezoidal rule; the sum of the 
results obtained for each segment is the approximate 
value of the integral. 
http://13 numericalmethods.eng.usf.edu
Multiple Segment Trapezoidal Rule 
f(x) 
a b 
y 
h = b - a 
b 
I f ( x )dx 
http://14 numericalmethods.eng.usf.edu 
x 
Figure 4: Multiple (n=4) Segment Trapezoidal 
Rule 
Divide into equal segments 
as shown in Figure 4. Then 
the width of each segment is: 
n 
The integral I is: 
= ò 
a
Multiple Segment Trapezoidal Rule 
The integral I can be broken into h integrals as: 
a + ( n - 
)h 
a h 
a h 
1 
+ 
+ 
= + + + + 
b 
2 
f ( x )dx f ( x )dx ... f ( x )dx f ( x )dx 
ò ò ò ò 
a + ( n - 
)h 
a + ( n - 
)h 
a + 
h 
a 
1 
2 
ò b 
a 
f ( x )dx 
Applying Trapezoidal rule on each segment gives: 
ò b a 
f ( x )dx 
ù 
b a n 
1 
f ( a ) f ( a ih ) f ( b ) 
úû 
+ + - = å - 
é + 
êë 
þ ý ü 
î í ì 
= 
n 
i 
1 
2 
2 
http://15 numericalmethods.eng.usf.edu
Example 2 
The vertical distance covered by a rocket from to seconds is 
given by: 
30 
2000 140000 . t dt 
æ é 
ù 
- 9 8 
úû 
ö çè 
x ln 
ò ÷ø 
êë 
- 
= 
8 
t 
140000 2100 
a) Use two-segment Trapezoidal rule to find the distance covered. 
b) Find the true error, E 
t for part (a). 
c) Find the absolute relative true error, e 
a for part (a). http://16 numericalmethods.eng.usf.edu
Solution 
a) The solution using 2-segment Trapezoidal rule is 
ù 
n 
1 
f ( a ) f ( a ih ) f ( b ) 
úû 
I b a 
î í ì + + - = å - 
é + 
êë 
þ ý ü 
= 
n 
i 
1 
2 
2 
n = 2 a = 8 b = 30 
h = b - a = 30 - 8 
= 11 
2 
n 
http://17 numericalmethods.eng.usf.edu
Solution (cont) 
ù 
30 8 2 1 
f ( ) f ( a ih ) f ( ) 
úû 
+ + - = å - 
é + 
êë 
þ ý ü 
î í ì 
8 2 30 
= 
( ) 
I 
i 
2 2 
1 
= 22 + + 
[ f (8 ) 2 f (19 ) f ( 30 )] 
4 
= 22 . + ( . ) + . 
[177 27 2 484 75 901 67] 
4 
= 11266 m 
Then: 
http://18 numericalmethods.eng.usf.edu
Solution (cont) 
b) The exact value of the above integral is 
2000 140000 . t dt 
æ é 
ù 
- úû 
çè 
ö 30 
ò ÷ø 
x ln = 11061 m 
êë 
- 
= 
8 
9 8 
t 
140000 2100 
so the true error is 
Et = True Value - Approximate Value 
=11061 -11266 
http://19 numericalmethods.eng.usf.edu
Solution (cont) 
c) The absolute relative true error, t , would be Î 
100 
Î = True Error ´ t 
True Value 
100 
= 11061-11266 ´ 
11061 
= 1.8534% 
http://20 numericalmethods.eng.usf.edu
Solution (cont) 
Table 1 gives the values 
obtained using multiple 
segment Trapezoidal rule 
for: 
% t Î % a Î 
n Value Et 
1 11868 -807 7.296 --- 
2 11266 -205 1.853 5.343 
3 11153 -91.4 0.8265 1.019 
4 11113 -51.5 0.4655 0.3594 
5 11094 -33.0 0.2981 0.1669 
6 11084 -22.9 0.2070 0.09082 
7 11078 -16.8 0.1521 0.05482 
8 11074 -12.9 0.1165 0.03560 
30 
2000 140000 . t dt 
æ é 
ù 
- úû 
çè 
ö ò ÷ø 
êë 
- 
x = 
ln 
8 
9 8 
t 
140000 2100 
Table 1: Multiple Segment Trapezoidal Rule 
Values 
http://21 numericalmethods.eng.usf.edu
Example 3 
Use Multiple Segment Trapezoidal Rule to find 
the area under the curve 
f ( x ) x 
300 from x = 0 to x =10 . 
ex 
+ 
= 
1 
h = 10 - 0 = 
Using two segments, we get 5 
2 
f ( ) ( ) 0 
10 039 
0 300 00 = 
1 
+ 
= 
e 
f ( ) ( ) = 
5 300 55 . 
and 
f ( ) ( ) = 
10 300 10 10 . 
= 0 136 
1 
e 
+ 
1 
e 
+ 
= 
http://22 numericalmethods.eng.usf.edu
Solution 
ù 
n 
1 
f ( a ) f ( a ih ) f ( b ) 
úû 
é 
+ + - = å - 
êë 
+ 
þ ý ü 
î í ì 
= 
I b a 
n 
i 
1 
2 
2 
ù 
10 0 2 1 
f ( ) f ( ) f ( ) 
úû 
êë é 
+ 
þ ý ü 
+ + - = å - 
î í ì 
0 2 0 5 10 
= 
( ) i 
2 2 
1 
= 10 + + 
[ f ( 0 ) 2 f ( 5 ) f (10 )] 
4 
= 10 + ( . ) + . 
[0 2 10 039 0 136] 
4 
= 50.535 
Then: 
http://23 numericalmethods.eng.usf.edu
Solution (cont) 
So what is the true value of this integral? 
x 
x = 
+ ò 
dx . 
e 
246 59 
10 300 
0 
1 
Making the absolute relative true error: 
% 
. . 
Î = 246 59 - 50 535 ´ 
t 100 
. 
246 59 
= 79.506% 
http://24 numericalmethods.eng.usf.edu
Solution (cont) 
Table 2: Values obtained using Multiple Segment 
Trapezoidal Rule for: 
n Approximate 
Value 
10 
01 
x 
x 
300 dx 
e 
ò + 
Et Ît 
1 0.681 245.91 99.724% 
2 50.535 196.05 79.505% 
4 170.61 75.978 30.812% 
8 227.04 19.546 7.927% 
16 241.70 4.887 1.982% 
32 245.37 1.222 0.495% 
64 246.28 0.305 0.124% 
http://25 numericalmethods.eng.usf.edu

More Related Content

What's hot

Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...
Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...
Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...Paolo Dagaojes
 
The fundamental theorem of calculus
The fundamental theorem of calculusThe fundamental theorem of calculus
The fundamental theorem of calculusAbby Henry
 
Simple Discount (Principal and Discount)
Simple Discount (Principal and Discount)Simple Discount (Principal and Discount)
Simple Discount (Principal and Discount)MaryJoyCabangisan1610
 
Cramer’s rule of matrix
Cramer’s rule of matrixCramer’s rule of matrix
Cramer’s rule of matrixAbi Malik
 
Sequences and Series
Sequences and SeriesSequences and Series
Sequences and Seriessujathavvv
 
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...polchan
 
The chain rule
The chain ruleThe chain rule
The chain ruleJ M
 
Chuyên đề ngôn ngữ lập trình auto it
Chuyên đề ngôn ngữ lập trình auto itChuyên đề ngôn ngữ lập trình auto it
Chuyên đề ngôn ngữ lập trình auto itbamboosky4991
 
Addition and Subtraction of Functions
Addition and Subtraction of FunctionsAddition and Subtraction of Functions
Addition and Subtraction of Functionsjordhuffman
 
Techniques of Integration ppt.ppt
Techniques of Integration ppt.pptTechniques of Integration ppt.ppt
Techniques of Integration ppt.pptJaysonFabela1
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & rangeRenee Scott
 
Diagonalization of Matrices
Diagonalization of MatricesDiagonalization of Matrices
Diagonalization of MatricesAmenahGondal1
 
Fundamental Theorem of Calculus
Fundamental Theorem of CalculusFundamental Theorem of Calculus
Fundamental Theorem of Calculusgizemk
 
CHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdfCHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdfmekkimekki5
 
Definite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralDefinite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralShaifulIslam56
 

What's hot (20)

Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...
Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...
Grade 9: Mathematics Unit 4Zero Exponents, Negative Integral Exponents, Ratio...
 
The fundamental theorem of calculus
The fundamental theorem of calculusThe fundamental theorem of calculus
The fundamental theorem of calculus
 
Simple Discount (Principal and Discount)
Simple Discount (Principal and Discount)Simple Discount (Principal and Discount)
Simple Discount (Principal and Discount)
 
Cramer’s rule of matrix
Cramer’s rule of matrixCramer’s rule of matrix
Cramer’s rule of matrix
 
Sequences and Series
Sequences and SeriesSequences and Series
Sequences and Series
 
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...
Learning Guide for Grade 7 Mathematics under the k-12 Curriculum in the Phili...
 
The chain rule
The chain ruleThe chain rule
The chain rule
 
Chuyên đề ngôn ngữ lập trình auto it
Chuyên đề ngôn ngữ lập trình auto itChuyên đề ngôn ngữ lập trình auto it
Chuyên đề ngôn ngữ lập trình auto it
 
Addition and Subtraction of Functions
Addition and Subtraction of FunctionsAddition and Subtraction of Functions
Addition and Subtraction of Functions
 
Techniques of Integration ppt.ppt
Techniques of Integration ppt.pptTechniques of Integration ppt.ppt
Techniques of Integration ppt.ppt
 
Trapezoidal rule
Trapezoidal ruleTrapezoidal rule
Trapezoidal rule
 
Math functions, relations, domain & range
Math functions, relations, domain & rangeMath functions, relations, domain & range
Math functions, relations, domain & range
 
Ring
RingRing
Ring
 
Limits, Continuity & Differentiation (Theory)
Limits, Continuity & Differentiation (Theory)Limits, Continuity & Differentiation (Theory)
Limits, Continuity & Differentiation (Theory)
 
Diagonalization of Matrices
Diagonalization of MatricesDiagonalization of Matrices
Diagonalization of Matrices
 
Roll's theorem
Roll's theoremRoll's theorem
Roll's theorem
 
Fundamental Theorem of Calculus
Fundamental Theorem of CalculusFundamental Theorem of Calculus
Fundamental Theorem of Calculus
 
CHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdfCHAP6 Limits and Continuity.pdf
CHAP6 Limits and Continuity.pdf
 
Functions
FunctionsFunctions
Functions
 
Definite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite IntegralDefinite Integral and Properties of Definite Integral
Definite Integral and Properties of Definite Integral
 

Viewers also liked

Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Syed Ahmed Zaki
 
Numerical integration
Numerical integrationNumerical integration
Numerical integrationMohammed_AQ
 
Numerical integration
Numerical integrationNumerical integration
Numerical integrationSunny Chauhan
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methodsTarun Gehlot
 
Multiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleMultiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleTanmoy Debnath
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14John Ham
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature FormulaDhaval Shukla
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 
Gaussian Integration
Gaussian IntegrationGaussian Integration
Gaussian IntegrationReza Rahimi
 
Eulermethod2
Eulermethod2Eulermethod2
Eulermethod2stellajoh
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10Yasser Ahmed
 

Viewers also liked (20)

Integration
IntegrationIntegration
Integration
 
Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)Presentation on Numerical Method (Trapezoidal Method)
Presentation on Numerical Method (Trapezoidal Method)
 
weddle's rule
weddle's ruleweddle's rule
weddle's rule
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Calc 4.6
Calc 4.6Calc 4.6
Calc 4.6
 
Es272 ch6
Es272 ch6Es272 ch6
Es272 ch6
 
Numerical Integration
Numerical IntegrationNumerical Integration
Numerical Integration
 
Numerical integration
Numerical integrationNumerical integration
Numerical integration
 
Applications of numerical methods
Applications of numerical methodsApplications of numerical methods
Applications of numerical methods
 
C++ TUTORIAL 8
C++ TUTORIAL 8C++ TUTORIAL 8
C++ TUTORIAL 8
 
Multiple sagement trapezoidal rule
Multiple sagement trapezoidal ruleMultiple sagement trapezoidal rule
Multiple sagement trapezoidal rule
 
MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14MAT210/Integration/Basic 2013-14
MAT210/Integration/Basic 2013-14
 
1519 differentiation-integration-02
1519 differentiation-integration-021519 differentiation-integration-02
1519 differentiation-integration-02
 
[4] num integration
[4] num integration[4] num integration
[4] num integration
 
Gaussian Quadrature Formula
Gaussian Quadrature FormulaGaussian Quadrature Formula
Gaussian Quadrature Formula
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 
Gaussian Integration
Gaussian IntegrationGaussian Integration
Gaussian Integration
 
Romberg’s method
Romberg’s methodRomberg’s method
Romberg’s method
 
Eulermethod2
Eulermethod2Eulermethod2
Eulermethod2
 
Applied numerical methods lec10
Applied numerical methods lec10Applied numerical methods lec10
Applied numerical methods lec10
 

Similar to Trapezoidal Rule of Integration Explained

Numerical Differentiations Solved examples
Numerical Differentiations Solved examplesNumerical Differentiations Solved examples
Numerical Differentiations Solved examplesDevelopedia
 
Bca3010 computer oreineted numerical methods
Bca3010   computer oreineted numerical methodsBca3010   computer oreineted numerical methods
Bca3010 computer oreineted numerical methodssmumbahelp
 
1. (5 pts) Which of these graphs represent a one-to-one function .docx
1. (5 pts) Which of these graphs represent a one-to-one function .docx1. (5 pts) Which of these graphs represent a one-to-one function .docx
1. (5 pts) Which of these graphs represent a one-to-one function .docxlindorffgarrik
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuacionesNatalia
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)asghar123456
 
Solution Manual Image Processing for Engineers by Yagle and Ulaby
Solution Manual Image Processing for Engineers by Yagle and UlabySolution Manual Image Processing for Engineers by Yagle and Ulaby
Solution Manual Image Processing for Engineers by Yagle and Ulabyspaceradar35
 
TM plane wave scattering from finite rectangular grooves in a conducting plan...
TM plane wave scattering from finite rectangular grooves in a conducting plan...TM plane wave scattering from finite rectangular grooves in a conducting plan...
TM plane wave scattering from finite rectangular grooves in a conducting plan...Yong Heui Cho
 

Similar to Trapezoidal Rule of Integration Explained (20)

assignment_2
assignment_2assignment_2
assignment_2
 
Online Signals and Systems Assignment Help
Online Signals and Systems Assignment HelpOnline Signals and Systems Assignment Help
Online Signals and Systems Assignment Help
 
Signal Processing Homework Help
Signal Processing Homework HelpSignal Processing Homework Help
Signal Processing Homework Help
 
05_AJMS_332_21.pdf
05_AJMS_332_21.pdf05_AJMS_332_21.pdf
05_AJMS_332_21.pdf
 
Solutions fox
Solutions   foxSolutions   fox
Solutions fox
 
Calculo Diferencial
Calculo DiferencialCalculo Diferencial
Calculo Diferencial
 
Numerical Differentiations Solved examples
Numerical Differentiations Solved examplesNumerical Differentiations Solved examples
Numerical Differentiations Solved examples
 
Numerical methods generating polynomial
Numerical methods generating polynomialNumerical methods generating polynomial
Numerical methods generating polynomial
 
Bca3010 computer oreineted numerical methods
Bca3010   computer oreineted numerical methodsBca3010   computer oreineted numerical methods
Bca3010 computer oreineted numerical methods
 
1. (5 pts) Which of these graphs represent a one-to-one function .docx
1. (5 pts) Which of these graphs represent a one-to-one function .docx1. (5 pts) Which of these graphs represent a one-to-one function .docx
1. (5 pts) Which of these graphs represent a one-to-one function .docx
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
Raices de ecuaciones
Raices de ecuacionesRaices de ecuaciones
Raices de ecuaciones
 
Efoom 2020
Efoom 2020Efoom 2020
Efoom 2020
 
Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)Amth250 octave matlab some solutions (2)
Amth250 octave matlab some solutions (2)
 
Signals and System Assignment Help
Signals and System Assignment HelpSignals and System Assignment Help
Signals and System Assignment Help
 
D021018022
D021018022D021018022
D021018022
 
Solution Manual Image Processing for Engineers by Yagle and Ulaby
Solution Manual Image Processing for Engineers by Yagle and UlabySolution Manual Image Processing for Engineers by Yagle and Ulaby
Solution Manual Image Processing for Engineers by Yagle and Ulaby
 
TM plane wave scattering from finite rectangular grooves in a conducting plan...
TM plane wave scattering from finite rectangular grooves in a conducting plan...TM plane wave scattering from finite rectangular grooves in a conducting plan...
TM plane wave scattering from finite rectangular grooves in a conducting plan...
 
unit 4,5 (1).docx
unit 4,5 (1).docxunit 4,5 (1).docx
unit 4,5 (1).docx
 
Control System Assignment Help
Control System Assignment HelpControl System Assignment Help
Control System Assignment Help
 

Trapezoidal Rule of Integration Explained

  • 1. Trapezoidal Rule of Integration 1
  • 2. What is Integration Integration: The process of measuring the area under a function plotted on a graph. b I f ( x )dx = ò a Where: f(x) is the integrand a= lower limit of integration b= upper limit of integration f(x) a b y http://2 numericalmethods.eng.usf.edu x
  • 3. Basis of Trapezoidal Rule Trapezoidal Rule is based on the Newton-Cotes Formula that states if one can approximate the integrand as an nth order polynomial… b I f ( x )dx = ò a where f ( x ) » fn( x ) n fn( x ) = a + a x + ...+ an x - + a n x n and 0 1 - 1 1 http://3 numericalmethods.eng.usf.edu
  • 4. Basis of Trapezoidal Rule Then the integral of that function is approximated by the integral of that nth order polynomial. b b f ( x ) f ( x ) ò » ò a n a Trapezoidal Rule assumes n=1, that is, the area under the linear polynomial, ù úû f ( a ) ò = ( b - a ) é + f ( b ) a b êë 2 f ( x )dx http://4 numericalmethods.eng.usf.edu
  • 5. Derivation of the Trapezoidal Rule http://5 numericalmethods.eng.usf.edu
  • 6. Method Derived From Geometry The area under the curve is a trapezoid. The integral f x dx Area of trapezoid b ò ( ) » a = 1 ( Sum of parallel sides )( height ) 2 1 = ( f ( b ) + f ( a ))( b - a ) 2 ù úû ( b a ) f ( a ) f ( b ) = - é + êë 2 f(x) a b Figure 2: Geometric Representation y http://6 numericalmethods.eng.usf.edu x f1(x)
  • 7. Example 1 The vertical distance covered by a rocket from t=8 to t=30 seconds is given by: 2000 140000 . t dt æ ù - ö úû çè êëé 30 ò ÷ø - x = ln 8 9 8 t 140000 2100 a) Use single segment Trapezoidal rule to find the distance covered. t E b) Find the true error, for part (a). e c) Find the absolute relative true error, a for part (a). http://7 numericalmethods.eng.usf.edu
  • 8. Solution ù úû I » ( b - a ) é f ( a ) + f ( b ) êë 2 a) a = 8 b = 30 2000 é 140000 ù úû - f ( t ) ln 9 8 . t t êë - 140000 2100 = ù é 8 2000 140000 - úû f ( ) ln 9 8 8 . ( ) ( ) êë - 140000 2100 8 = ù é 30 2000 140000 - úû f ( ) ln 9 8 30 . ( ) ( ) êë - 140000 2100 30 = =177.27 m / s = 901.67 m / s http://8 numericalmethods.eng.usf.edu
  • 9. Solution (cont) ù úû I = ( 30 - 8 ) é 177.27 + 901.67 êë 2 = 11868 m a) b) The exact value of the above integral is 2000 140000 . t dt æ é ù - úû çèö 30 ò ÷ø x ln =11061 m êë - = 8 9 8 t 140000 2100 http://9 numericalmethods.eng.usf.edu
  • 10. Solution (cont) b) E True Value Approximate Value t = - = 11061-11868 = -807 m c) The absolute relative true error, t , would be Î Î = 11061-11868 ´ 100 t = 7.2959% 11061 http://10 numericalmethods.eng.usf.edu
  • 11. Multiple Segment Trapezoidal Rule In Example 1, the true error using single segment trapezoidal rule was large. We can divide the interval [8,30] into [8,19] and [19,30] intervals and apply Trapezoidal rule over each segment. 2000 æ 140000 ö ÷ø - çè f ( t ) ln 9 8 . t t - 140000 2100 = 30 19 30 f ( t )dt f ( t )dt f ( t )dt ò = ò + ò 19 8 8 ù úû (19 8 ) f ( 8 ) f (19 ) ( ) f ( ) f ( ) + - é + úû 30 19 19 30 êë ù = - é + êë 2 2 http://11 numericalmethods.eng.usf.edu
  • 12. Multiple Segment Trapezoidal Rule With f (8 ) =177.27 m / s f ( 30 ) = 901.67 m/ s f (19 ) = 484.75 m / s ù úû 30 ò = - é + 2 + - é + úû (30 19) 484.75 901.67 êë ù ( ) (19 8) 177.27 484.75 êë 2 8 f t dt = 11266 m Hence: http://12 numericalmethods.eng.usf.edu
  • 13. Multiple Segment Trapezoidal Rule Et = 11061-11266 = -205 m The true error is: The true error now is reduced from -807 m to -205 m. Extending this procedure to divide the interval into equal segments to apply the Trapezoidal rule; the sum of the results obtained for each segment is the approximate value of the integral. http://13 numericalmethods.eng.usf.edu
  • 14. Multiple Segment Trapezoidal Rule f(x) a b y h = b - a b I f ( x )dx http://14 numericalmethods.eng.usf.edu x Figure 4: Multiple (n=4) Segment Trapezoidal Rule Divide into equal segments as shown in Figure 4. Then the width of each segment is: n The integral I is: = ò a
  • 15. Multiple Segment Trapezoidal Rule The integral I can be broken into h integrals as: a + ( n - )h a h a h 1 + + = + + + + b 2 f ( x )dx f ( x )dx ... f ( x )dx f ( x )dx ò ò ò ò a + ( n - )h a + ( n - )h a + h a 1 2 ò b a f ( x )dx Applying Trapezoidal rule on each segment gives: ò b a f ( x )dx ù b a n 1 f ( a ) f ( a ih ) f ( b ) úû + + - = å - é + êë þ ý ü î í ì = n i 1 2 2 http://15 numericalmethods.eng.usf.edu
  • 16. Example 2 The vertical distance covered by a rocket from to seconds is given by: 30 2000 140000 . t dt æ é ù - 9 8 úû ö çè x ln ò ÷ø êë - = 8 t 140000 2100 a) Use two-segment Trapezoidal rule to find the distance covered. b) Find the true error, E t for part (a). c) Find the absolute relative true error, e a for part (a). http://16 numericalmethods.eng.usf.edu
  • 17. Solution a) The solution using 2-segment Trapezoidal rule is ù n 1 f ( a ) f ( a ih ) f ( b ) úû I b a î í ì + + - = å - é + êë þ ý ü = n i 1 2 2 n = 2 a = 8 b = 30 h = b - a = 30 - 8 = 11 2 n http://17 numericalmethods.eng.usf.edu
  • 18. Solution (cont) ù 30 8 2 1 f ( ) f ( a ih ) f ( ) úû + + - = å - é + êë þ ý ü î í ì 8 2 30 = ( ) I i 2 2 1 = 22 + + [ f (8 ) 2 f (19 ) f ( 30 )] 4 = 22 . + ( . ) + . [177 27 2 484 75 901 67] 4 = 11266 m Then: http://18 numericalmethods.eng.usf.edu
  • 19. Solution (cont) b) The exact value of the above integral is 2000 140000 . t dt æ é ù - úû çè ö 30 ò ÷ø x ln = 11061 m êë - = 8 9 8 t 140000 2100 so the true error is Et = True Value - Approximate Value =11061 -11266 http://19 numericalmethods.eng.usf.edu
  • 20. Solution (cont) c) The absolute relative true error, t , would be Î 100 Î = True Error ´ t True Value 100 = 11061-11266 ´ 11061 = 1.8534% http://20 numericalmethods.eng.usf.edu
  • 21. Solution (cont) Table 1 gives the values obtained using multiple segment Trapezoidal rule for: % t Î % a Î n Value Et 1 11868 -807 7.296 --- 2 11266 -205 1.853 5.343 3 11153 -91.4 0.8265 1.019 4 11113 -51.5 0.4655 0.3594 5 11094 -33.0 0.2981 0.1669 6 11084 -22.9 0.2070 0.09082 7 11078 -16.8 0.1521 0.05482 8 11074 -12.9 0.1165 0.03560 30 2000 140000 . t dt æ é ù - úû çè ö ò ÷ø êë - x = ln 8 9 8 t 140000 2100 Table 1: Multiple Segment Trapezoidal Rule Values http://21 numericalmethods.eng.usf.edu
  • 22. Example 3 Use Multiple Segment Trapezoidal Rule to find the area under the curve f ( x ) x 300 from x = 0 to x =10 . ex + = 1 h = 10 - 0 = Using two segments, we get 5 2 f ( ) ( ) 0 10 039 0 300 00 = 1 + = e f ( ) ( ) = 5 300 55 . and f ( ) ( ) = 10 300 10 10 . = 0 136 1 e + 1 e + = http://22 numericalmethods.eng.usf.edu
  • 23. Solution ù n 1 f ( a ) f ( a ih ) f ( b ) úû é + + - = å - êë + þ ý ü î í ì = I b a n i 1 2 2 ù 10 0 2 1 f ( ) f ( ) f ( ) úû êë é + þ ý ü + + - = å - î í ì 0 2 0 5 10 = ( ) i 2 2 1 = 10 + + [ f ( 0 ) 2 f ( 5 ) f (10 )] 4 = 10 + ( . ) + . [0 2 10 039 0 136] 4 = 50.535 Then: http://23 numericalmethods.eng.usf.edu
  • 24. Solution (cont) So what is the true value of this integral? x x = + ò dx . e 246 59 10 300 0 1 Making the absolute relative true error: % . . Î = 246 59 - 50 535 ´ t 100 . 246 59 = 79.506% http://24 numericalmethods.eng.usf.edu
  • 25. Solution (cont) Table 2: Values obtained using Multiple Segment Trapezoidal Rule for: n Approximate Value 10 01 x x 300 dx e ò + Et Ît 1 0.681 245.91 99.724% 2 50.535 196.05 79.505% 4 170.61 75.978 30.812% 8 227.04 19.546 7.927% 16 241.70 4.887 1.982% 32 245.37 1.222 0.495% 64 246.28 0.305 0.124% http://25 numericalmethods.eng.usf.edu