Lecture 27
Lecture 27
Integration
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Graphical Definition of Derivative
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Integration
• Inverse of Differentiation
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Numerical Differentiation and
Integration in Engineering
• All over the place, Fluid mechanics, Mass Transfer, kinetics
Design Equation
for Plug flow
reactor
Heat Transfer Problems
Heat flux
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Cotes Integration Formulas
• Based on the strategy of replacing a
complicated function or tabulated data
with an approximating function that is
easy to integrate:
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Cotes Integration Formulas
• Based on the strategy of replacing a
complicated function or tabulated data
with an approximating function that is
easy to integrate:
(a) The approximation of (b) The approximation of (c) 3 straight line segments
an integral by the area an integral by the area are used to approximate
under a single straight line under a single parabola the integral
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Newton-Cotes Integration Formulas
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Trapezoidal Rule
• Use a first order polynomial in
approximating the function f(x) :
Error:
Trapezoidal rule
where ξ lies somewhere in the
interval from a to b
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Trapezoidal Rule
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Trapezoidal Rule
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem 1: Single Application of the Trapezoidal Rule
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Solution:
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Trapezoidal Rule
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Trapezoidal Rule
• 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.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Trapezoidal Rule
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Trapezoidal Rule
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Error Estimate for
The Multiple-Application Trapezoidal Rule
• Error estimate for one segment is given as:
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the two-segment Trapezoidal Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the error.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the two-segment Trapezoidal Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the error.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the three-segment Trapezoidal Rule to estimate the integral of
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the three-segment Trapezoidal Rule to estimate the integral of
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the n-segment Trapezoidal Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the error.
n h I Et(%)
2 0.4 1.0688 34.9
3 0.2667 1.3704 16.5
4 0.2 1.4848 9.5
5 0.16 1.5399 6.1
6 0.1333 1.5703 4.3
7 0.1143 1.5887 3.2
8 0.1 1.6008 2.4
9 0.0889 1.6091 1.9
10 0.08 1.6150 1.6
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Limitations
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s Rules
• 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.
Error
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s Rules Error
Error
a=x0 x1 b=x2
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the Simpson’s 1/3rd Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the Simpson’s 1/3rd Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use the Simpson’s 1/3rd Rule to estimate the integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Simpson’s 1/3 Rule
• 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 data points.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
The Multiple-Application Simpson’s 1/3 Rule
• 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 data points.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use n=4, Multi-Application Simpson’s 1/3rd Rule to estimate the
integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use n=4, Multi-Application Simpson’s 1/3rd Rule to estimate the
integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use n=4, Multi-Application Simpson’s 1/3rd Rule to estimate the
integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Problem
Use n=4, Multi-Application Simpson’s 1/3rd Rule to estimate the
integral of
f(x) = 0.2 +25x – 200x2 + 675x3 – 900x4 + 400x5
Integrate f(x) from a=0 to b=0.8. Estimate the true and absolute
error. The exact integral is 1.640533.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s 3/8 Rule
Simpson’s 1/3 and 3/8 rules can be
Fit a 3rd order Lagrange interpolating applied in combination to handle
polynomial to four points and integrate multiple applications with odd
number of intervals
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Simpson’s 3/8 Rule
Simpson’s 1/3 and 3/8 rules can be
Fit a 3rd order Lagrange interpolating applied in combination to handle
polynomial to four points and integrate multiple applications with odd
number of intervals
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.