SlideShare a Scribd company logo
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Numerical Integration
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Objectives
• The student should be able to
– Understand the need for numerical integration
– Derive the trapezoidal rule using linear
interpolation
– Apply the trapezoidal rule
– Derive Simpson’s rule using parabolic
interpolation
– Apply Simpson’s rule
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Need for Numerical Integration!
( )
6
11
01
2
1
3
1
23
1
1
0
231
0
2
=−





++=






++=++= ∫ x
xx
dxxxI
( ) 11
0
1
0
1 −−−
−=−== ∫ eedxeI xx
∫
−
=
1
0
2
dxeI x
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Interpolation!
• If we have a function that needs to be
integrated between two points
• We may use an approximate form of the
function to integrate!
• Polynomials are always integrable
• Why don’t we use a polynomial to
approximate the function, then evaluate
the integral
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• To perform the
definite integration of
the function between
(x0 & x1), we may
interpolate the
function between the
two points as a line.
( ) ( )0
01
01
0 xx
xx
yy
yxf −
−
−
+≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• Performing the integration on the approximate
function:
( ) ( )∫∫ 





−
−
−
+≈=
1
0
1
0
0
01
01
0
x
x
x
x
dxxx
xx
yy
ydxxfI
1
0
0
2
01
01
0
2
x
x
xx
x
xx
yy
xyI 













−
−
−
+≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• Performing the integration on the approximate
function:
















−
−
−
+−
















−
−
−
+≈ 00
2
0
01
01
0010
2
1
01
01
10
22
xx
x
xx
yy
xyxx
x
xx
yy
xyI
( ) ( )
2
01
01
yy
xxI
+
−≈
• Which is equivalent to the area of the trapezium!
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
The Trapezoidal Rule
( ) ( )
2
01
01
yy
xxI
+
−≈
( ) ( )
( ) ( )
2
2
12
12
01
01
yy
xx
yy
xxI
+
−+
+
−≈
Integrating from x0 to x2:
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
General Trapezoidal Rule
• For all the points equally separated
(xi+1-xi=h)
• We may write the equation of the previous slide:
( ) ( ) ( ) ( )
( )321
23
23
12
12
2
2
22
yyy
h
yy
xx
yy
xxI
++=
+
−+
+
−≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
In general






++≈ ∑
−
=
n
n
i
i yyy
h
I
1
1
0 2
2
Where n is the number if intervals and h=total interval/n
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• Integrate
• Using the trapezoidal
rule
• Use 2 points and
compare with the
result using 3 points
∫=
1
0
2
dxxI
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Solution
• Using 2 points (n=1),
h=(1-0)/(1)=1
• Substituting:
( )21
2
1
yyI +≈
( ) 5.010
2
1
=+≈I
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Solution
• Using 3 points (n=2),
h=(1-0)/(2)=0.5
• Substituting:
( )321 2
2
5.0
yyyI ++≈
( ) 375.0125.0*20
2
5.0
=++≈I
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Quadratic Interpolation
• If we get to interpolate a quadratic equation
between every neighboring 3 points, we may use
Newton’s interpolation formula:
( ) ( ) ( )( )103021 xxxxbxxbbxf −−+−+≈
( ) ( ) ( )( )1010
2
3021 xxxxxxbxxbbxf ++−+−+≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Integrating
( ) ( ) ( )( )1010
2
3021 xxxxxxbxxbbxf ++−+−+≈
( ) ( ) ( )( )∫∫ ++−+−+≈
2
0
2
0
1010
2
3021
x
x
x
x
dxxxxxxxbxxbbdxxf
( ) ( )
2
0
2
0
10
2
10
3
30
2
21
232
x
x
x
x
xxx
x
xx
x
bxx
x
bxbdxxf 











++−+





−+≈∫
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
After substitutions and
manipulation!
( ) [ ]210 4
3
2
0
yyy
h
dxxf
x
x
++≈∫
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
For 4-Intervals
( ) [ ]23210 424
3
4
0
yyyyy
h
dxxf
x
x
++++≈∫
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
In General: Simpson’s Rule
( ) 





+++≈ ∑∑∫
−
=
−
=
n
n
i
i
n
i
i
x
x
yyyy
h
dxxf
n 2
,..4,2
1
,..3,1
0 24
30
NOTE: the number of intervals HAS TO BE even
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• Integrate
• Using the Simpson
rule
• Use 3 points
∫=
1
0
2
dxxI
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Solution
• Using 3 points (n=2),
h=(1-0)/(2)=0.5
• Substituting:
• Which is the exact
solution!
( )210 4
3
5.0
yyyI ++≈
( )
3
1
125.0*40
3
5.0
=++≈I
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Homework #7
• Chapter 21, pp. 610-612, numbers:
21.1, 21.3, 21.5, 21.25, 21.28.
• Due date: Week 8-12 May 2005

More Related Content

PPT
08 numerical integration 2
Mohammad Tawfik
 
PPT
09 numerical integration
Mohammad Tawfik
 
PPT
08 interpolation lagrange
Mohammad Tawfik
 
PPTX
Techniques of intergration
hirrahAzhar
 
PPT
07 interpolation
Mohammad Tawfik
 
PPTX
INTERPOLATION
tirath prajapati
 
PPTX
Curve fitting
Mayank Bhatt
 
PPTX
Matlab polynimials and curve fitting
Ameen San
 
08 numerical integration 2
Mohammad Tawfik
 
09 numerical integration
Mohammad Tawfik
 
08 interpolation lagrange
Mohammad Tawfik
 
Techniques of intergration
hirrahAzhar
 
07 interpolation
Mohammad Tawfik
 
INTERPOLATION
tirath prajapati
 
Curve fitting
Mayank Bhatt
 
Matlab polynimials and curve fitting
Ameen San
 

What's hot (20)

PPTX
Newton backward interpolation
MUHAMMADUMAIR647
 
PPT
Least Square Optimization and Sparse-Linear Solver
Ji-yong Kwon
 
PDF
Basic concepts of curve fittings
Tarun Gehlot
 
PDF
Applied numerical methods lec8
Yasser Ahmed
 
PDF
Curve fitting - Lecture Notes
Dr. Nirav Vyas
 
PPTX
Numerical method-Picards,Taylor and Curve Fitting.
Keshav Sahu
 
PPTX
Newton Forward Difference Interpolation Method
Adeel Rasheed
 
PPTX
Curve fitting of exponential curve
Divyang Rathod
 
PPT
Least square method
Somya Bagai
 
PPT
Spline Interpolation
aiQUANT
 
PPTX
Mathematical modeling
Champion Christian College
 
PPTX
Pearson's correlation coefficient
Waleed Zaghal
 
PPTX
Curve fitting
shopnohinami
 
PPTX
Computational Dynamics edited
Jesan Alexis Morales
 
PPT
Integral Calculus
itutor
 
PDF
Error analysis statistics
Tarun Gehlot
 
PPTX
Non linear curve fitting
Anumita Mondal
 
PDF
Applied numerical methods lec14
Yasser Ahmed
 
PDF
SPDE presentation 2012
Zheng Mengdi
 
PDF
2021 preTEST4A Vector Calculus
A Jorge Garcia
 
Newton backward interpolation
MUHAMMADUMAIR647
 
Least Square Optimization and Sparse-Linear Solver
Ji-yong Kwon
 
Basic concepts of curve fittings
Tarun Gehlot
 
Applied numerical methods lec8
Yasser Ahmed
 
Curve fitting - Lecture Notes
Dr. Nirav Vyas
 
Numerical method-Picards,Taylor and Curve Fitting.
Keshav Sahu
 
Newton Forward Difference Interpolation Method
Adeel Rasheed
 
Curve fitting of exponential curve
Divyang Rathod
 
Least square method
Somya Bagai
 
Spline Interpolation
aiQUANT
 
Mathematical modeling
Champion Christian College
 
Pearson's correlation coefficient
Waleed Zaghal
 
Curve fitting
shopnohinami
 
Computational Dynamics edited
Jesan Alexis Morales
 
Integral Calculus
itutor
 
Error analysis statistics
Tarun Gehlot
 
Non linear curve fitting
Anumita Mondal
 
Applied numerical methods lec14
Yasser Ahmed
 
SPDE presentation 2012
Zheng Mengdi
 
2021 preTEST4A Vector Calculus
A Jorge Garcia
 
Ad

Viewers also liked (20)

PDF
Applied numerical methods lec10
Yasser Ahmed
 
PDF
Numerical Integration
Mohammad Tawfik
 
PPTX
Complex Variable & Numerical Method
Neel Patel
 
PDF
Integration
Success Olawale
 
PPTX
NUMERICAL INTEGRATION AND ITS APPLICATIONS
GOWTHAMGOWSIK98
 
PPT
Chapter07
rwmiller
 
PPS
Matiasy Kevin1
matias kevin
 
PPTX
Lesson 3 simpsons rule
Dr. Jennifer Chang Wathall
 
PPTX
Indefinite Integral
JelaiAujero
 
PPTX
MIT Math Syllabus 10-3 Lesson 2 : Polynomials
Lawrence De Vera
 
PPT
Calc 4.6
hartcher
 
PPT
Numerical differentiation integration
Tarun Gehlot
 
PPTX
Es272 ch6
Batuhan Yıldırım
 
PPTX
Trapezoidal rule
Dr. Jennifer Chang Wathall
 
PPT
Introduction to Finite Elements
Srinivas Varanasi, Ph.D.
 
ODP
Simp
Loïc Mechura
 
PDF
numerical differentiation&integration
8laddu8
 
PPTX
weddle's rule
Effa Kiran
 
PDF
Regression
Mohammad Tawfik
 
PPTX
Presentation on Numerical Method (Trapezoidal Method)
Syed Ahmed Zaki
 
Applied numerical methods lec10
Yasser Ahmed
 
Numerical Integration
Mohammad Tawfik
 
Complex Variable & Numerical Method
Neel Patel
 
Integration
Success Olawale
 
NUMERICAL INTEGRATION AND ITS APPLICATIONS
GOWTHAMGOWSIK98
 
Chapter07
rwmiller
 
Matiasy Kevin1
matias kevin
 
Lesson 3 simpsons rule
Dr. Jennifer Chang Wathall
 
Indefinite Integral
JelaiAujero
 
MIT Math Syllabus 10-3 Lesson 2 : Polynomials
Lawrence De Vera
 
Calc 4.6
hartcher
 
Numerical differentiation integration
Tarun Gehlot
 
Trapezoidal rule
Dr. Jennifer Chang Wathall
 
Introduction to Finite Elements
Srinivas Varanasi, Ph.D.
 
numerical differentiation&integration
8laddu8
 
weddle's rule
Effa Kiran
 
Regression
Mohammad Tawfik
 
Presentation on Numerical Method (Trapezoidal Method)
Syed Ahmed Zaki
 
Ad

Similar to 08 numerical integration (20)

PDF
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
m52870494
 
PPT
09 numerical differentiation
Mohammad Tawfik
 
PDF
07 interpolationnewton
Mohammad Tawfik
 
PPT
1519 differentiation-integration-02
Dr Fereidoun Dejahang
 
PDF
Approximate Integration
Silvius
 
PDF
06 regression
Mohammad Tawfik
 
PPTX
Numerical Methods and Analysis
Rajshahi University of Engineering and Technology
 
PDF
Numerical integration
DrDeepaChauhan
 
PDF
Overviewing the techniques of Numerical Integration.pdf
ArijitDhali
 
PPT
MATLAB : Numerical Differention and Integration
Ainul Islam
 
PPT
25285 mws gen_int_ppt_trapcontinuous
Jyoti Parange
 
PPT
mtl_gen_int_ppt_romberg.ppt 6 6 6
dimaseryanfahrezi
 
PDF
Numerical Methods 3
Dr. Nirav Vyas
 
PPTX
Numerical Computation
Matlab Assignment Experts
 
PDF
IRJET- Parallelization of Definite Integration
IRJET Journal
 
PDF
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
PDF
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
PDF
Quadrature
Linh Tran
 
PDF
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
PPTX
Interpolation
Brijesh Padhiyar
 
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
m52870494
 
09 numerical differentiation
Mohammad Tawfik
 
07 interpolationnewton
Mohammad Tawfik
 
1519 differentiation-integration-02
Dr Fereidoun Dejahang
 
Approximate Integration
Silvius
 
06 regression
Mohammad Tawfik
 
Numerical integration
DrDeepaChauhan
 
Overviewing the techniques of Numerical Integration.pdf
ArijitDhali
 
MATLAB : Numerical Differention and Integration
Ainul Islam
 
25285 mws gen_int_ppt_trapcontinuous
Jyoti Parange
 
mtl_gen_int_ppt_romberg.ppt 6 6 6
dimaseryanfahrezi
 
Numerical Methods 3
Dr. Nirav Vyas
 
Numerical Computation
Matlab Assignment Experts
 
IRJET- Parallelization of Definite Integration
IRJET Journal
 
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
Quadrature
Linh Tran
 
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
mathsjournal
 
Interpolation
Brijesh Padhiyar
 

More from Mohammad Tawfik (20)

PDF
Supply Chain Management for Engineers - INDE073
Mohammad Tawfik
 
PDF
Supply Chain Management 01 - Introduction
Mohammad Tawfik
 
PDF
Supply Chain Management 02 - Logistics
Mohammad Tawfik
 
PDF
Supply Chain Management 03 - Inventory Management
Mohammad Tawfik
 
PDF
Creative problem solving and decision making
Mohammad Tawfik
 
PDF
Digital content for teaching introduction
Mohammad Tawfik
 
PDF
Crisis Management Basics
Mohammad Tawfik
 
PDF
DISC Personality Model
Mohammad Tawfik
 
PDF
Training of Trainers
Mohammad Tawfik
 
PDF
Effective Delegation Skills
Mohammad Tawfik
 
PDF
Train The Trainer
Mohammad Tawfik
 
PDF
Business Management - Marketing
Mohammad Tawfik
 
PDF
Stress Management
Mohammad Tawfik
 
PDF
Project Management (CAPM) - Integration
Mohammad Tawfik
 
PDF
Project Management (CAPM) - The Framework
Mohammad Tawfik
 
PDF
Project Management (CAPM) - Introduction
Mohammad Tawfik
 
PDF
The Creative Individual
Mohammad Tawfik
 
PDF
Introduction to Wind Energy
Mohammad Tawfik
 
PDF
Finite Element for Trusses in 2-D
Mohammad Tawfik
 
PDF
Future of Drones ITW'16
Mohammad Tawfik
 
Supply Chain Management for Engineers - INDE073
Mohammad Tawfik
 
Supply Chain Management 01 - Introduction
Mohammad Tawfik
 
Supply Chain Management 02 - Logistics
Mohammad Tawfik
 
Supply Chain Management 03 - Inventory Management
Mohammad Tawfik
 
Creative problem solving and decision making
Mohammad Tawfik
 
Digital content for teaching introduction
Mohammad Tawfik
 
Crisis Management Basics
Mohammad Tawfik
 
DISC Personality Model
Mohammad Tawfik
 
Training of Trainers
Mohammad Tawfik
 
Effective Delegation Skills
Mohammad Tawfik
 
Train The Trainer
Mohammad Tawfik
 
Business Management - Marketing
Mohammad Tawfik
 
Stress Management
Mohammad Tawfik
 
Project Management (CAPM) - Integration
Mohammad Tawfik
 
Project Management (CAPM) - The Framework
Mohammad Tawfik
 
Project Management (CAPM) - Introduction
Mohammad Tawfik
 
The Creative Individual
Mohammad Tawfik
 
Introduction to Wind Energy
Mohammad Tawfik
 
Finite Element for Trusses in 2-D
Mohammad Tawfik
 
Future of Drones ITW'16
Mohammad Tawfik
 

Recently uploaded (20)

PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PDF
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
PDF
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
PDF
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
PDF
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
PDF
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PDF
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
PDF
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
PDF
Software Development Methodologies in 2025
KodekX
 
PDF
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
PDF
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
Using Anchore and DefectDojo to Stand Up Your DevSecOps Function
Anchore
 
A Day in the Life of Location Data - Turning Where into How.pdf
Precisely
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
SparkLabs Primer on Artificial Intelligence 2025
SparkLabs Group
 
Orbitly Pitch Deck|A Mission-Driven Platform for Side Project Collaboration (...
zz41354899
 
Cloud-Migration-Best-Practices-A-Practical-Guide-to-AWS-Azure-and-Google-Clou...
Artjoker Software Development Company
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Security features in Dell, HP, and Lenovo PC systems: A research-based compar...
Principled Technologies
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
How-Cloud-Computing-Impacts-Businesses-in-2025-and-Beyond.pdf
Artjoker Software Development Company
 
AI-Cloud-Business-Management-Platforms-The-Key-to-Efficiency-Growth.pdf
Artjoker Software Development Company
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
Unlocking the Future- AI Agents Meet Oracle Database 23ai - AIOUG Yatra 2025.pdf
Sandesh Rao
 
Software Development Methodologies in 2025
KodekX
 
Oracle AI Vector Search- Getting Started and what's new in 2025- AIOUG Yatra ...
Sandesh Rao
 
Research-Fundamentals-and-Topic-Development.pdf
ayesha butalia
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 

08 numerical integration

  • 1. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Numerical Integration
  • 2. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Objectives • The student should be able to – Understand the need for numerical integration – Derive the trapezoidal rule using linear interpolation – Apply the trapezoidal rule – Derive Simpson’s rule using parabolic interpolation – Apply Simpson’s rule
  • 3. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Need for Numerical Integration! ( ) 6 11 01 2 1 3 1 23 1 1 0 231 0 2 =−      ++=       ++=++= ∫ x xx dxxxI ( ) 11 0 1 0 1 −−− −=−== ∫ eedxeI xx ∫ − = 1 0 2 dxeI x
  • 4. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Interpolation! • If we have a function that needs to be integrated between two points • We may use an approximate form of the function to integrate! • Polynomials are always integrable • Why don’t we use a polynomial to approximate the function, then evaluate the integral
  • 5. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • To perform the definite integration of the function between (x0 & x1), we may interpolate the function between the two points as a line. ( ) ( )0 01 01 0 xx xx yy yxf − − − +≈
  • 6. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Performing the integration on the approximate function: ( ) ( )∫∫       − − − +≈= 1 0 1 0 0 01 01 0 x x x x dxxx xx yy ydxxfI 1 0 0 2 01 01 0 2 x x xx x xx yy xyI               − − − +≈
  • 7. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Performing the integration on the approximate function:                 − − − +−                 − − − +≈ 00 2 0 01 01 0010 2 1 01 01 10 22 xx x xx yy xyxx x xx yy xyI ( ) ( ) 2 01 01 yy xxI + −≈ • Which is equivalent to the area of the trapezium!
  • 8. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik The Trapezoidal Rule ( ) ( ) 2 01 01 yy xxI + −≈ ( ) ( ) ( ) ( ) 2 2 12 12 01 01 yy xx yy xxI + −+ + −≈ Integrating from x0 to x2:
  • 9. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik General Trapezoidal Rule • For all the points equally separated (xi+1-xi=h) • We may write the equation of the previous slide: ( ) ( ) ( ) ( ) ( )321 23 23 12 12 2 2 22 yyy h yy xx yy xxI ++= + −+ + −≈
  • 10. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik In general       ++≈ ∑ − = n n i i yyy h I 1 1 0 2 2 Where n is the number if intervals and h=total interval/n
  • 11. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Integrate • Using the trapezoidal rule • Use 2 points and compare with the result using 3 points ∫= 1 0 2 dxxI
  • 12. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Solution • Using 2 points (n=1), h=(1-0)/(1)=1 • Substituting: ( )21 2 1 yyI +≈ ( ) 5.010 2 1 =+≈I
  • 13. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Solution • Using 3 points (n=2), h=(1-0)/(2)=0.5 • Substituting: ( )321 2 2 5.0 yyyI ++≈ ( ) 375.0125.0*20 2 5.0 =++≈I
  • 14. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Quadratic Interpolation • If we get to interpolate a quadratic equation between every neighboring 3 points, we may use Newton’s interpolation formula: ( ) ( ) ( )( )103021 xxxxbxxbbxf −−+−+≈ ( ) ( ) ( )( )1010 2 3021 xxxxxxbxxbbxf ++−+−+≈
  • 15. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Integrating ( ) ( ) ( )( )1010 2 3021 xxxxxxbxxbbxf ++−+−+≈ ( ) ( ) ( )( )∫∫ ++−+−+≈ 2 0 2 0 1010 2 3021 x x x x dxxxxxxxbxxbbdxxf ( ) ( ) 2 0 2 0 10 2 10 3 30 2 21 232 x x x x xxx x xx x bxx x bxbdxxf             ++−+      −+≈∫
  • 16. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik After substitutions and manipulation! ( ) [ ]210 4 3 2 0 yyy h dxxf x x ++≈∫
  • 17. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik For 4-Intervals ( ) [ ]23210 424 3 4 0 yyyyy h dxxf x x ++++≈∫
  • 18. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik In General: Simpson’s Rule ( )       +++≈ ∑∑∫ − = − = n n i i n i i x x yyyy h dxxf n 2 ,..4,2 1 ,..3,1 0 24 30 NOTE: the number of intervals HAS TO BE even
  • 19. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Integrate • Using the Simpson rule • Use 3 points ∫= 1 0 2 dxxI
  • 20. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Solution • Using 3 points (n=2), h=(1-0)/(2)=0.5 • Substituting: • Which is the exact solution! ( )210 4 3 5.0 yyyI ++≈ ( ) 3 1 125.0*40 3 5.0 =++≈I
  • 21. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Homework #7 • Chapter 21, pp. 610-612, numbers: 21.1, 21.3, 21.5, 21.25, 21.28. • Due date: Week 8-12 May 2005