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
Simpson’s Rule
Using a parabola to join three
adjacent points!
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, pp. 610-612, numbers:
21.1, 21.3, 21.5, 21.25, 21.28.
• Due date: Week 15-19 May 2005

More Related Content

PPT
09 numerical integration
PPT
08 numerical integration
PPT
08 interpolation lagrange
PPT
Least Square Optimization and Sparse-Linear Solver
PPTX
Matlab polynimials and curve fitting
PPTX
Curve fitting
PDF
Applied numerical methods lec8
PPTX
INTERPOLATION
09 numerical integration
08 numerical integration
08 interpolation lagrange
Least Square Optimization and Sparse-Linear Solver
Matlab polynimials and curve fitting
Curve fitting
Applied numerical methods lec8
INTERPOLATION

What's hot (20)

PPTX
Numerical method-Picards,Taylor and Curve Fitting.
PPT
Least square method
PDF
Curve fitting - Lecture Notes
PPTX
Newton Forward Difference Interpolation Method
PPT
Spline Interpolation
PDF
Basic concepts of curve fittings
PPTX
Newton backward interpolation
PDF
Applied numerical methods lec10
PPT
07 interpolation
PPT
Numerical integration
PDF
Applied numerical methods lec14
PDF
Cambio Climatico CO2 y la Diferencial de una funcion
PPTX
Curve fitting of exponential curve
PPTX
Curve fitting
PPT
Integral Calculus
PPTX
Mathematical modeling
PPT
1519 differentiation-integration-02
PPTX
Non linear curve fitting
PPTX
METHOD OF LEAST SQURE
PDF
Error analysis statistics
Numerical method-Picards,Taylor and Curve Fitting.
Least square method
Curve fitting - Lecture Notes
Newton Forward Difference Interpolation Method
Spline Interpolation
Basic concepts of curve fittings
Newton backward interpolation
Applied numerical methods lec10
07 interpolation
Numerical integration
Applied numerical methods lec14
Cambio Climatico CO2 y la Diferencial de una funcion
Curve fitting of exponential curve
Curve fitting
Integral Calculus
Mathematical modeling
1519 differentiation-integration-02
Non linear curve fitting
METHOD OF LEAST SQURE
Error analysis statistics
Ad

Viewers also liked (20)

PPTX
NUMERICAL INTEGRATION AND ITS APPLICATIONS
PDF
Numerical Integration
PPT
Chapter07
PPTX
Gaussian Quadrature Formula
PPTX
Complex Variable & Numerical Method
PPTX
Integration application (Aplikasi Integral)
PPT
Gaussian Integration
PDF
Application of the integral
PPTX
Applications of numerical methods
PPT
Numerical differentiation integration
PDF
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-V
PPTX
PPT
Introduction to Finite Elements
PDF
Regression
PPTX
Presentation on Numerical Method (Trapezoidal Method)
PPTX
Numerical integration
PPT
Numerical integration
PPTX
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
PPT
Numerical method
PDF
Numerical Methods 3
NUMERICAL INTEGRATION AND ITS APPLICATIONS
Numerical Integration
Chapter07
Gaussian Quadrature Formula
Complex Variable & Numerical Method
Integration application (Aplikasi Integral)
Gaussian Integration
Application of the integral
Applications of numerical methods
Numerical differentiation integration
Engineering Mathematics-IV_B.Tech_Semester-IV_Unit-V
Introduction to Finite Elements
Regression
Presentation on Numerical Method (Trapezoidal Method)
Numerical integration
Numerical integration
APPLICATION OF NUMERICAL METHODS IN SMALL SIZE
Numerical method
Numerical Methods 3
Ad

Similar to 08 numerical integration 2 (20)

PPTX
hjhhh.pptx
PPTX
I am sharing _APM3715_ Class 4_25 Oct_21_ with you.pptx
PPTX
Presentation on Numerical Integration
PPTX
trapezoidal rule.pptx
PDF
IRJET- Parallelization of Definite Integration
PPTX
NUMERICAL METHOD'S
PPT
Numerical hhhhhhhhhhhhhhhhhIntegration.ppt
PDF
Numerical integration
PDF
numericalmethods-170312161845.pdf
PDF
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
PPTX
CE324-Module-9-10-Week-5-1st-Session.pptx
PPTX
Numerical integration
PPTX
Nsm ppt.ppt
PPT
Calc 4.6
PDF
Overviewing the techniques of Numerical Integration.pdf
PDF
Computational electromagnetics
PDF
Numerical Integration: Trapezoidal Rule
PPT
MATLAB : Numerical Differention and Integration
PPT
23MA401 NM Numerical integration anddifferenciation
PPTX
numerical method hgg hghg hg12500223125.pptx
hjhhh.pptx
I am sharing _APM3715_ Class 4_25 Oct_21_ with you.pptx
Presentation on Numerical Integration
trapezoidal rule.pptx
IRJET- Parallelization of Definite Integration
NUMERICAL METHOD'S
Numerical hhhhhhhhhhhhhhhhhIntegration.ppt
Numerical integration
numericalmethods-170312161845.pdf
Ankit_Practical_File-1.pdf A detailed overview of Rizir as a brand
CE324-Module-9-10-Week-5-1st-Session.pptx
Numerical integration
Nsm ppt.ppt
Calc 4.6
Overviewing the techniques of Numerical Integration.pdf
Computational electromagnetics
Numerical Integration: Trapezoidal Rule
MATLAB : Numerical Differention and Integration
23MA401 NM Numerical integration anddifferenciation
numerical method hgg hghg hg12500223125.pptx

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)

PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Pre independence Education in Inndia.pdf
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Computing-Curriculum for Schools in Ghana
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
master seminar digital applications in india
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Classroom Observation Tools for Teachers
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PDF
Complications of Minimal Access Surgery at WLH
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PDF
Module 4: Burden of Disease Tutorial Slides S2 2025
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
Pharma ospi slides which help in ospi learning
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Pre independence Education in Inndia.pdf
01-Introduction-to-Information-Management.pdf
Microbial diseases, their pathogenesis and prophylaxis
Computing-Curriculum for Schools in Ghana
Supply Chain Operations Speaking Notes -ICLT Program
STATICS OF THE RIGID BODIES Hibbelers.pdf
master seminar digital applications in india
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Classroom Observation Tools for Teachers
O7-L3 Supply Chain Operations - ICLT Program
O5-L3 Freight Transport Ops (International) V1.pdf
Complications of Minimal Access Surgery at WLH
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
Module 4: Burden of Disease Tutorial Slides S2 2025
PPH.pptx obstetrics and gynecology in nursing
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Renaissance Architecture: A Journey from Faith to Humanism
TR - Agricultural Crops Production NC III.pdf
Pharma ospi slides which help in ospi learning

08 numerical integration 2

  • 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 Simpson’s Rule Using a parabola to join three adjacent points!
  • 17. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Working with three points! ( ) [ ]210 4 3 2 0 yyy h dxxf x x ++≈∫
  • 18. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik For 4-Intervals ( ) [ ]432210 44 3 4 0 yyyyyy h dxxf x x +++++≈∫
  • 19. 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
  • 20. ENEM602 Spring 2007 Dr. Eng. Mohammad Tawfik Example • Integrate • Using the Simpson rule • Use 3 points ∫= 1 0 2 dxxI
  • 21. 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
  • 22. 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 15-19 May 2005