0% found this document useful (0 votes)
53 views11 pages

(2-3) Numerical Integration

numerical methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
53 views11 pages

(2-3) Numerical Integration

numerical methods
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

A Lecture on

Numerical Integration
…in GEM602: Numerical Methods for Graduate Students

Dr. Ian Dominic F. Tabañag


Instructor
Calculus Fundamentals
…essential concept…

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

systems and processes = lim


that change, calculus is an dx x→0 x
essential tool of
engineering.
• Standing at the heart of
calculus are the concepts
of differentiation and
integration

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

• Based on the strategy of replacing a I =  f ( x)dx   f n ( x)dx


complicated function or tabulated data a a

with an approximating function that is f n ( x) = a0 + a1 x +  + an x n


easy to integrate:

Zero order approximation First-order Second-order

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…

• Use a first order polynomial in


approximating the function f(x) :

b b
I =  f ( x)dx   f1 ( x)dx
a a

• The area under this first order


polynomial is an estimate of the
integral of f(x) between a and b:
Error:
f (a) + f (b)
I = (b − a) 1
2 Et = − f ( )(b − a) 3
12
Trapezoidal rule where x lies somewhere in the
interval from a to b

Chapra, S. C. Applied Numerical Methods with MATLAB for Engineers and Scientists, 6th ed., McGraw-Hill: New York 2010.
Trapezoidal Rule
…multiple application…

• The accuracy can be improved by dividing the


interval from a to b into a number of
segments and applying the method to each
segment.

• The areas of individual segments are added


to yield the integral for the entire interval.
b−a
h= n = # of seg. a = x0 b = xn
n
x1 x2 xn

I=  f ( x)dx +  f ( x)dx +  +  f ( x)dx


x0 x1 xn−1
f ( x0 ) + f ( x1 ) f ( x1 ) + f ( x 2 ) f ( x n−1 ) + f ( x n )
Using the trapezoidal rule, we get: I =h +h ++ h
2 2 2
b−a  n −1

I=
2n 
f ( x 0 ) + f ( x n ) + 2 
i =1
f ( x )
i 

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.

Simpson’s 1/3 Rule: results when a 2nd order


Lagrange interpolating polynomial is used for f(x)
a=x0 x1 b=x2
b b
I =  f ( x)dx   f 2 ( x)dx where f 2 ( x ) is a second - order polynomial.
a a

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

I=  f ( x)dx +  f ( x)dx + ... +  f ( n − 2 ) ( x)dx


0 2

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

2 Trapezoidal (b-a) * (f(x0)+ f(x1))/2 (1/12)(b-a)3f ”(ξ)

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]

You might also like