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 geometric
insight
– Apply the trapezoidal rule
– 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
Area under the graph!
• Definite integrations always result in the
area under the graph (in x-y plane)
• Are we capable of evaluating an
approximate value for the area?
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• To perform the
definite integration of
the function between
(x0 & x1), we may
assume that the area
is equal to that of the
trapezium:
( ) ( )01
01
2
1
0
xx
yy
dxxf
x
x
−
+
≈∫
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Adding adjacent areas
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
The Trapezoidal Rule
( ) ( )
( ) ( )
2
2
12
12
01
01
yy
xx
yy
xxI
+
−+
+
−≈
Integrating from x0 to x2:
( ) ( ) ( ) ( )
2
212112101001 yxxyxxyxxyxx
I
−+−+−+−
≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
The Trapezoidal Rule
( ) ( ) hxxxx =−=− 1201
If the points are equidistant
2
2110 hyhyhyhy
I
+++
≈
( )210 2
2
yyy
h
I ++≈
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Dividing the whole interval into “n”
subintervals






++≈ ∑
−
=
n
n
i
i yyy
h
I
1
1
0 2
2
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
The Algorithm
• To integrate f(x) from a to b, determine the
number of intervals “n”
• Calculate the interval length h=(b-a)/n
• Evaluate the function at the points yi=f(xi)
where xi=x0+i*h
• Evaluate the integral by performing the
summation






++≈ ∑
−
=
n
n
i
i yyy
h
I
1
1
0 2
2
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Note that
X0=a
Xn=b
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Example
• Integrate
• Using the trapezoidal
rule
• Use 2,3,&4 points and
compare the results
∫=
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
X Y
0 0
1 1
2 points, 1 interval
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
X Y
0 0
0.5 0.25
1 1
3 points, 2 interval
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Solution
• Using 4 points (n=3),
h=(1-0)/(3)=0.333
• Substituting:
( )4321 22
2
333.0
yyyyI +++≈
( ) 3519.01444.0*2111.0*20
2
333.0
=+++≈I
X Y
0 0
0.33 0.111
0.667 0.444
1 1
4 points, 3 interval
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
Let’s use Interpolation!
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
Simpson’s Rule
Using a parabola to join three
adjacent points!
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
Working with three points!
( ) [ ]210 4
3
2
0
yyy
h
dxxf
x
x
++≈∫
ENEM602 Spring 2007
Dr. Eng. Mohammad Tawfik
For 4-Intervals
( ) [ ]432210 44
3
4
0
yyyyyy
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, p. 610, numbers:
21.5, 21.6, 21.10, 21.11.

More Related Content

PPT
08 numerical integration 2
PPT
08 numerical integration
PPT
Least Square Optimization and Sparse-Linear Solver
PPTX
Matlab polynimials and curve fitting
PDF
Applied numerical methods lec10
PPTX
Curve fitting
PPT
Numerical integration
PPT
Least square method
08 numerical integration 2
08 numerical integration
Least Square Optimization and Sparse-Linear Solver
Matlab polynimials and curve fitting
Applied numerical methods lec10
Curve fitting
Numerical integration
Least square method

What's hot (20)

PDF
Applied numerical methods lec8
PDF
Curve fitting - Lecture Notes
PPTX
Numerical method-Picards,Taylor and Curve Fitting.
PPT
Spline Interpolation
PDF
Cambio Climatico CO2 y la Diferencial de una funcion
PPTX
NUMERICAL INTEGRATION : ERROR FORMULA, GAUSSIAN QUADRATURE FORMULA
PPT
1519 differentiation-integration-02
PDF
Applied numerical methods lec14
PPTX
Numerical integration;Gaussian integration one point, two point and three poi...
PDF
Basic concepts of curve fittings
PPTX
Techniques of intergration
PPTX
INTERPOLATION
PPTX
Gauss Quadrature Formula
PPT
Numerical integration
PPTX
Curve fitting
PPTX
Non linear curve fitting
PPT
1575 numerical differentiation and integration
PPT
Integral Calculus
PDF
Data Approximation in Mathematical Modelling Regression Analysis and Curve Fi...
PPTX
Curve fitting of exponential curve
Applied numerical methods lec8
Curve fitting - Lecture Notes
Numerical method-Picards,Taylor and Curve Fitting.
Spline Interpolation
Cambio Climatico CO2 y la Diferencial de una funcion
NUMERICAL INTEGRATION : ERROR FORMULA, GAUSSIAN QUADRATURE FORMULA
1519 differentiation-integration-02
Applied numerical methods lec14
Numerical integration;Gaussian integration one point, two point and three poi...
Basic concepts of curve fittings
Techniques of intergration
INTERPOLATION
Gauss Quadrature Formula
Numerical integration
Curve fitting
Non linear curve fitting
1575 numerical differentiation and integration
Integral Calculus
Data Approximation in Mathematical Modelling Regression Analysis and Curve Fi...
Curve fitting of exponential curve
Ad

Viewers also liked (20)

PPTX
NUMERICAL INTEGRATION AND ITS APPLICATIONS
PPTX
[4] num integration
PPT
8.7 numerical integration
PPT
Calc 4.6
PPT
System of linear algebriac equations nsm
PPTX
NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING
PPT
MATLAB : Numerical Differention and Integration
PPTX
Numerical and statistical methods new
PPTX
numerical method in statistics (MEAN AND MEDIAN)
PPTX
5 random variables
PPTX
Arrays & functions in php
PDF
Probability mass functions and probability density functions
PPT
07 interpolation
PPTX
Gauss jordan
PDF
Math1003 1.13 - Significant Digits, Accuracy, Precision
PPTX
Polynomial regression
PPT
Introduction to Finite Elements
PPTX
Regression
PPTX
Linear programming graphical method (feasibility)
PPTX
Probability Density Function (PDF)
NUMERICAL INTEGRATION AND ITS APPLICATIONS
[4] num integration
8.7 numerical integration
Calc 4.6
System of linear algebriac equations nsm
NUMERICAL & STATISTICAL METHODS FOR COMPUTER ENGINEERING
MATLAB : Numerical Differention and Integration
Numerical and statistical methods new
numerical method in statistics (MEAN AND MEDIAN)
5 random variables
Arrays & functions in php
Probability mass functions and probability density functions
07 interpolation
Gauss jordan
Math1003 1.13 - Significant Digits, Accuracy, Precision
Polynomial regression
Introduction to Finite Elements
Regression
Linear programming graphical method (feasibility)
Probability Density Function (PDF)
Ad

Similar to 09 numerical integration (20)

PDF
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
PDF
Numerical Integration
PPTX
numerical method hgg hghg hg12500223125.pptx
PDF
Numerical Integration: Trapezoidal Rule
PDF
Computational electromagnetics
PPTX
hjhhh.pptx
PPTX
I am sharing _APM3715_ Class 4_25 Oct_21_ with you.pptx
PPT
08 interpolation lagrange
PDF
IRJET- Parallelization of Definite Integration
PDF
Approximate Integration
PDF
Numerical integration
PPT
25285 mws gen_int_ppt_trapcontinuous
PDF
Overviewing the techniques of Numerical Integration.pdf
PPT
09 numerical differentiation
PPTX
trapezoidal rule.pptx
PPTX
NUMERICAL METHOD'S
PDF
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
PDF
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
PPT
CIS541_07_Integration.ppt
PDF
07 interpolationnewton
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
Numerical Integration
numerical method hgg hghg hg12500223125.pptx
Numerical Integration: Trapezoidal Rule
Computational electromagnetics
hjhhh.pptx
I am sharing _APM3715_ Class 4_25 Oct_21_ with you.pptx
08 interpolation lagrange
IRJET- Parallelization of Definite Integration
Approximate Integration
Numerical integration
25285 mws gen_int_ppt_trapcontinuous
Overviewing the techniques of Numerical Integration.pdf
09 numerical differentiation
trapezoidal rule.pptx
NUMERICAL METHOD'S
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
A NEW STUDY OF TRAPEZOIDAL, SIMPSON’S1/3 AND SIMPSON’S 3/8 RULES OF NUMERICAL...
CIS541_07_Integration.ppt
07 interpolationnewton

More from Mohammad Tawfik (20)

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

Recently uploaded (20)

PDF
Empathic Computing: Creating Shared Understanding
PDF
KodekX | Application Modernization Development
PDF
Electronic commerce courselecture one. Pdf
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Cloud computing and distributed systems.
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
KodekX | Application Modernization Development
Electronic commerce courselecture one. Pdf
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Programs and apps: productivity, graphics, security and other tools
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
MYSQL Presentation for SQL database connectivity
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Chapter 3 Spatial Domain Image Processing.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Cloud computing and distributed systems.
Per capita expenditure prediction using model stacking based on satellite ima...
20250228 LYD VKU AI Blended-Learning.pptx
Agricultural_Statistics_at_a_Glance_2022_0.pdf
NewMind AI Weekly Chronicles - August'25 Week I
Understanding_Digital_Forensics_Presentation.pptx

09 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 geometric insight – Apply the trapezoidal rule – 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 Area under the graph! • Definite integrations always result in the area under the graph (in x-y plane) • Are we capable of evaluating an approximate value for the area?
  • 5. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • To perform the definite integration of the function between (x0 & x1), we may assume that the area is equal to that of the trapezium: ( ) ( )01 01 2 1 0 xx yy dxxf x x − + ≈∫
  • 6. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Adding adjacent areas
  • 7. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik The Trapezoidal Rule ( ) ( ) ( ) ( ) 2 2 12 12 01 01 yy xx yy xxI + −+ + −≈ Integrating from x0 to x2: ( ) ( ) ( ) ( ) 2 212112101001 yxxyxxyxxyxx I −+−+−+− ≈
  • 8. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik The Trapezoidal Rule ( ) ( ) hxxxx =−=− 1201 If the points are equidistant 2 2110 hyhyhyhy I +++ ≈ ( )210 2 2 yyy h I ++≈
  • 9. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Dividing the whole interval into “n” subintervals       ++≈ ∑ − = n n i i yyy h I 1 1 0 2 2
  • 10. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik The Algorithm • To integrate f(x) from a to b, determine the number of intervals “n” • Calculate the interval length h=(b-a)/n • Evaluate the function at the points yi=f(xi) where xi=x0+i*h • Evaluate the integral by performing the summation       ++≈ ∑ − = n n i i yyy h I 1 1 0 2 2
  • 11. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Note that X0=a Xn=b
  • 12. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Integrate • Using the trapezoidal rule • Use 2,3,&4 points and compare the results ∫= 1 0 2 dxxI
  • 13. 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 X Y 0 0 1 1 2 points, 1 interval
  • 14. 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 X Y 0 0 0.5 0.25 1 1 3 points, 2 interval
  • 15. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Solution • Using 4 points (n=3), h=(1-0)/(3)=0.333 • Substituting: ( )4321 22 2 333.0 yyyyI +++≈ ( ) 3519.01444.0*2111.0*20 2 333.0 =+++≈I X Y 0 0 0.33 0.111 0.667 0.444 1 1 4 points, 3 interval
  • 16. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Let’s use Interpolation!
  • 17. 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
  • 18. 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 − − − +≈
  • 19. 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               − − − +≈
  • 20. 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!
  • 21. 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:
  • 22. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Simpson’s Rule Using a parabola to join three adjacent points!
  • 23. 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 ++−+−+≈
  • 24. 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             ++−+      −+≈∫
  • 25. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik After substitutions and manipulation! ( ) [ ]210 4 3 2 0 yyy h dxxf x x ++≈∫
  • 26. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Working with three points! ( ) [ ]210 4 3 2 0 yyy h dxxf x x ++≈∫
  • 27. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik For 4-Intervals ( ) [ ]432210 44 3 4 0 yyyyyy h dxxf x x +++++≈∫
  • 28. 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
  • 29. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Integrate • Using the Simpson rule • Use 3 points ∫= 1 0 2 dxxI
  • 30. 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
  • 31. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Homework #7 • Chapter 21, p. 610, numbers: 21.5, 21.6, 21.10, 21.11.