Lecture7 - Engineering Analysis ENG 3420 Fall 2009 Dan C...

This preview shows pages 1–12. Sign up to view the full content.

1 Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Lecture 7 Lecture 7 ± Last time: ² Roundoff and truncation errors ² More on Matlab ± Today: ² Approximations ² Finding the roots of the equation f(x)=0 ² Structured programming ² File creation and file access ² Relational operators ± Next Time ² Open methods for finding the roots of the equation f(x) = 0 Note: No office hours on Thursday. The TA will come to the class and answer questions about Project1.
3 The Taylor Series fx i + 1 () = i + f ' x i h + f '' x i ( ) 2! h 2 + f (3) x i 3! h 3 + L + f ( n ) x i ( ) n ! h n + R n

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Truncation Error ± In general, the n th order Taylor series expansion will be exact for an n th order polynomial. ± In other cases, the remainder term R n is of the order of h n+1 , meaning: ² The more terms are used, the smaller the error, and ² The smaller the spacing, the smaller the error for a given number of terms.
5 Numerical Differentiation ± The first order Taylor series can be used to calculate approximations to derivatives: ² Given: ² Then: ± This is termed a “forward” difference because it utilizes data at i and i +1 to estimate the derivative. f ( x i + 1 ) = f ( x i ) + f ' ( x i ) h + O ( h 2 ) f ' ( x i ) = f ( x i + 1 ) f ( x i ) h + O ( h )

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 ± There are also backward difference and centered difference approximations, depending on the points used: ± Forward: ± Backward: ± Centered: f ' ( x i ) = Differentiation (cont’d) f ( x i + 1 ) f ( x i ) h + O ( h ) f ' ( x i ) = f ( x i ) f ( x i 1 ) h + O ( h ) f ' ( x i ) = f ( x i + 1 ) f ( x i 1 ) 2 h + O ( h 2 )
7 Total Numerical Error ± The total numerical error is the summation of the truncation and roundoff errors. ± The truncation error generally increases as the step size increases, while the roundoff error decreases as the step size increases - this leads to a point of diminishing returns for step size.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Other Errors ± Blunders - errors caused by malfunctions of the computer or human imperfection. ± Model errors - errors resulting from incomplete mathematical models. ± Data uncertainty - errors resulting from the accuracy and/or precision of the data.
9 Finding the roots of the equation f(x)=0 ± Graphical method Æ plot of the function and observe where it crosses the x -axis ± Bracketing methods Æ making two initial guesses that “bracket” the root - that is, are on either side of the root ² Bisection Æ divide the interval in half ² False position Æ connect the endpoints of the interval with a straight line and determine the location of the intercept of the x-axis.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 Graphical Methods ± A simple method for obtaining the estimate of the root of the equation f(x) =0 is to make a plot of the function and observe where it crosses the x -axis. ± Graphing the function can also indicate where roots may be and where some root-finding methods may fail: a) Same sign, no roots b) Different sign, one root c) Same sign, two roots d) Different sign, three roots
11 Bracketing Methods ± Bracketing methods are based on making two initial guesses that “bracket” the root - that is, are on either side of the root.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/17/2012 for the course EGN 3420 taught by Professor Staff during the Spring '08 term at University of Central Florida.

Page1 / 38

Lecture7 - Engineering Analysis ENG 3420 Fall 2009 Dan C...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online