(2-3) Numerical Integration
(2-3) Numerical Integration
Numerical Integration
…in GEM602: Numerical Methods for Graduate Students
Differentiation Integration
• Calculus is the
mathematics of change. y f ( xi + x) − f ( xi ) b
= I = f ( x)dx
Since engineers x x
continuously deal with dy f ( xi + x) − f ( xi )
a
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010
Newton-Cotes Integration Formulas
…the on closed integration formulas…
The difference between closed (a) and open (b) integration formulas
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Newton-Cotes Integration Formulas
…the algebraic ‘approximating function’…
b b
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Trapezoidal Rule
…a straight line approximation approach…
b b
I = f ( x)dx f1 ( x)dx
a a
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Trapezoidal Rule
…multiple application…
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Simpson’s Rules: 1/3 Rule
…quadratic (a.k.a. parabolic) approximation approach…
• More accurate estimate of an integral is obtained
if a high-order polynomial is used to connect the
points. These formulas are called Simpson’s rules.
Using a = x0 b = x2
( x − x1 )( x − x2 ) ( x − x0 )( x − x2 ) ( x − x0 )( x − x1 )
x2
I = f ( x0 ) + f ( x1 ) + f ( x2 )dx
x0
( x0 − x1 )( x0 − x2 ) ( x1 − x0 )( x1 − x2 ) ( x2 − x0 )( x2 − x1 )
after integratio n and algebraic manipulati on, the following formula results :
b−a
I
h
f ( x0 ) + 4 f ( x1 ) + f ( x2 ) h= SIMPSON' S 1/3 RULE
3 2
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Simpson’s Rules: 1/3 Rule
…multiple applications…
• Just as the trapezoidal rule, Simpson’s rule can be improved by dividing
the integration interval into a number of segments of equal width.
• However, it is limited to cases where values are equispaced, there are an
even number of segments and odd number of points.
b−a
h= n =# of seg. a = x0 b = xn
n
x2 x4 xn
x0 x2 xn−2
h
I= ( f ( x0 ) + 4 f ( x1 ) + f ( x2 ))
3
h
+ ( f ( x2 ) + 4 f ( x3 ) + f ( x4 )) +
3
h
...... + ( f ( xn − 2 ) + 4 f ( xn −1 ) + f ( xn ))
3
h n −1 n−2
I = f ( x0 ) + 4 f ( xi ) + 2 f ( x j ) + f ( xn )
3 i =1, 3, 5... j = 2 , 4 , 6...
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Simpson’s Rules: 3/8 Rule
…cubic approximation approach…
Simpson’s 1/3 and 3/8 rules can be
Fit a 3rd
order Lagrange interpolating applied in tandem to handle
polynomial to four points and integrate multiple applications with odd
number of intervals
b b
I = f ( x)dx f 3 ( x)dx
a a
I f ( x0 ) + 3 f ( x1 ) + 3 f ( x2 ) + f ( x3 )
3h
8
(b − a )
h =
3
f ( x0 ) + 3 f ( x1 ) + 3 f ( x2 ) + f ( x3 )
I (b − a )
8
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Newton-Cotes Integration Formulas
…closed forms…
Truncation
Points Name Formula
Error
Simpson’s
3 (b-a) * (f(x0)+ 4f(x1)+f(x2))/6 (1/2880)(b-a)5f(4)(ξ)
1/3
Simpson’s
4 (b-a) * (f(x0)+ 3f(x1)+ 3f(x2)+ f(x3))/8 (1/6480)(b-a)5f(4)(ξ)
3/8
(b-a) * (7f(x0) + 32f(x1) + 12f(x2) + 32f(x3) +
5 Boole’s proportional with (b-a)7
7f(x4))/90
Same order,
but Simpson’s 3/8
is more accurate
In engineering practice, higher order (greater than 4-point) formulas are rarely used
Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Numerical Integration
Numerical Methods for Graduate Students
Any Questions?
Comments? -End of Presentation-
Thank you for your attention!
IMAGE ATTRIBUTION:
1. Title Slide – [Cosmus Mathematicus], Suhrid Saha, available online at: https://cdn-images-
1.medium.com/max/222/1*[email protected]