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 11 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 Numerical Derivation 11
Lecture 11 MECN 3500 Inter - Bayamon Derivation Formulas Numerical Derivation 3
Lecture 11 MECN 3500 Inter - Bayamon To solve numerical problems and appreciate their applications for engineering problem solving. 4 Course Objectives
Lecture 11 We like to estimate the value of f '(x) for a given function f(x).We like to estimate the value of f '(x) for a given function f(x). The derivative represents the rate of change of a dependent variable with respect to an independent variable.The derivative represents the rate of change of a dependent variable with respect to an independent variable. The difference approximation isThe difference approximation is If x is allowed to approach zero, the difference becomes a derivative:If x is allowed to approach zero, the difference becomes a derivative:
Lecture 11
Numerical Differentiation The Taylor series expansion of f(x) about x i isThe Taylor series expansion of f(x) about x i is From this:From this: This formula is called the first forward divided difference formula and the error is of order O(h).This formula is called the first forward divided difference formula and the error is of order O(h).
Lecture 11 Or equivalently, the Taylor series expansion of f(x) about x i can be written asOr equivalently, the Taylor series expansion of f(x) about x i can be written as From this:From this: This formula is called the first backward divided difference formula and the error is of order O(h).This formula is called the first backward divided difference formula and the error is of order O(h).
Lecture 11 A third way to approximate the first derivative is to subtract the backward from the forward Taylor series expansions:A third way to approximate the first derivative is to subtract the backward from the forward Taylor series expansions: This yields toThis yields to This formula is called the centered divided difference formula and the error is of order O(h 2 ).This formula is called the centered divided difference formula and the error is of order O(h 2 ).
Lecture 11 MECN 3500 Inter - Bayamon Forward Backward Centered
Lecture 11 The forward Taylor series expansion for f(x i+2 ) in terms of f(x i ) isThe forward Taylor series expansion for f(x i+2 ) in terms of f(x i ) is Combine equations:Combine equations: Finite Difference Approximation of Higher Derivatives
Lecture 11 Solve for f ''(x i ):Solve for f ''(x i ): This formula is called the second forward finite divided difference and the error of order O(h).This formula is called the second forward finite divided difference and the error of order O(h). The second backward finite divided difference which has an error of order O(h) isThe second backward finite divided difference which has an error of order O(h) is
Lecture 11 The second centered finite divided difference which has an error of order O(h 2 ) isThe second centered finite divided difference which has an error of order O(h 2 ) is
Lecture 11 High accurate estimates can be obtained by retaining more terms of the Taylor series.High accurate estimates can be obtained by retaining more terms of the Taylor series. The forward Taylor series expansion is:The forward Taylor series expansion is: From this, we can writeFrom this, we can write High-Accuracy Differentiation Formulas
Lecture 11 Substitute the second derivative approximation into the formula to yield:Substitute the second derivative approximation into the formula to yield: By collecting terms:By collecting terms: Inclusion of the 2 nd derivative term has improved the accuracy to O(h 2 ).Inclusion of the 2 nd derivative term has improved the accuracy to O(h 2 ). This is the forward divided difference formula for the first derivative.This is the forward divided difference formula for the first derivative.
Lecture 11 MECN 3500 Inter - Bayamon Forward Formulas
Lecture 11 MECN 3500 Inter - Bayamon Backward Formulas
Lecture 11 MECN 3500 Inter - Bayamon Centered Formulas
Lecture 11 MECN 3500 Inter - Bayamon 19
Lecture 11 Example Estimate f '(1) for f(x) = e x + x using the centered formula of O(h 4 ) with h = Solution From Table 23.3:From Table 23.3:
Lecture 11 In substituting the values:In substituting the values:
Lecture 11 MECN 3500 Inter - Bayamon Omar E. Meza Castillo Ph.D. 22