MECN 3500 Inter - Bayamon Lecture Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo Department of Mechanical Engineering Inter American University of Puerto Rico Bayamon Campus
Lecture 10 MECN 3500 Inter - Bayamon 2 Tentative Lectures Schedule TopicLecture Mathematical Modeling and Engineering Problem Solving 1 Introduction to Matlab 2 Numerical Error 3 Root Finding System of Linear Equations 7-8 Least Square Curve Fitting 9 Numerical Integration 10 Ordinary Differential Equations
Lecture 10 MECN 3500 Inter - Bayamon Newton-Cotes Integration Formulas Numerical Integration 3
Lecture 10 MECN 3500 Inter - Bayamon To solve numerical problems and appreciate their applications for engineering problem solving. 4 Course Objectives
Lecture 10 MECN 3500 Inter - Bayamon Introduction
Lecture 10 MECN 3500 Inter - Bayamon They are based on the strategy of replacing a complicated function or tabulated data with an approximating function that is easier to integrate: where f n (x) is a polynomial of degree n. f1(x)f1(x) f2(x)f2(x)
Lecture 10 MECN 3500 Inter - Bayamon Piecewise functions can be used also to approximate the integral. 3 piecewise linear functions to approximate f(x) between a and b.
Lecture 10 MECN 3500 Inter - Bayamon Two forms of the Newton-Cotes formulas: Closed Forms: the data points at the beginning and end of the limits of integration are known. Open Forms: integration limits extend beyond the range of the data.
Lecture 10 MECN 3500 Inter - Bayamon The Trapezoidal Rule The integral is approximated by a line:
Lecture 10 MECN 3500 Inter - Bayamon Statement: Use the trapezoidal rule to estimate Example 21.1 Solution:
Lecture 10 MECN 3500 Inter - Bayamon One way to improve the accuracy of the trapezoidal rule is to divide the integration interval from a to b into a number of segments and apply the method to each segment. The areas of individual segments can then be added to yield the integral for the entire interval. The Multiple-Application Trapezoidal Rule
Lecture 10 MECN 3500 Inter - Bayamon
Lecture 10 MECN 3500 Inter - Bayamon
Lecture 10 MECN 3500 Inter - Bayamon The total integral is Substituting the trapezoidal rule for each integral: Grouping terms:
Lecture 10 MECN 3500 Inter - Bayamon 15
Lecture 10 MECN 3500 Inter - Bayamon Statement: Use the multiple-application trapezoidal rule for n = 2 to estimate Example 21.1 Solution:
Lecture 10 MECN 3500 Inter - Bayamon
Lecture 10 MECN 3500 Inter - Bayamon Computer Algorithms for the Trapezoidal Rule
Lecture 10 MECN 3500 Inter - Bayamon More accurate estimate of an integral is obtained if a high-order polynomial is used to connect the points. The formulas that result from taking the integrals under such polynomials are called Simpson’s rules. Simpson’s Rules
Lecture 10 MECN 3500 Inter - Bayamon This rule results when a second-order interpolating polynomial is used. After integration, Simpson’s 1/3 Rule
Lecture 10 MECN 3500 Inter - Bayamon 21
Lecture 10 MECN 3500 Inter - Bayamon Statement: Single Application of Simpson’s 1/3 Rule From a=0 to b=0.8. recall that the exact integral is Which is approximately 5 times more accurate than for a single application of the trapezoidal rule (Example 21.1) Example 21.4 Solution:
Lecture 10 MECN 3500 Inter - Bayamon This rule results when a third-order interpolating polynomial is used. Simpson’s 8/3 Rule
Lecture 10 MECN 3500 Inter - Bayamon 24
Lecture 10 MECN 3500 Inter - Bayamon Statement: Single Application of Simpson’s 3/8 rule to integrate From a=0 to b=0.8. Simpson’s rule 3/8 requires four equally spaced points: Example 21.6 Solution:
Lecture 10 MECN 3500 Inter - Bayamon Statement: Estimate the cross section area of the stream. Case Studies
Lecture 10 MECN 3500 Inter - Bayamon Consider this example
Lecture 10 MECN 3500 Inter - Bayamon Trapezoidal rule (h = 4): Trapezoidal rule (h = 2):
Lecture 10 MECN 3500 Inter - Bayamon Integration with Matlab Use quad for functions. Software
Lecture 10 MECN 3500 Inter - Bayamon Homework8 Omar E. Meza Castillo Ph.D. 30