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

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
Engineering Analysis ENG 3420 Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 11:00-12:00
Background image of page 1

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

View Full DocumentRight Arrow Icon
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.
Background image of page 2
3 The Taylor Series fx i + 1 ( 29 = fx i (29 + f ' x i (29 h + f '' x i (29 2! h 2 + f (3) x i (29 3! h 3 + L + f ( n ) x i (29 n ! h n + R n
Background image of page 3

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

View Full DocumentRight Arrow Icon
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.
Background image of page 4
5 Numerical Differentiation Problem approximate the derivative of the function f(x) knowing the values of the function at discrete values of x. 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 )
Background image of page 5

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

View Full DocumentRight Arrow Icon
6 Differentiation (cont’d) There are also backward difference and centered difference approximations, depending on the points used: Forward: Backward: Centered: f ' ( x i ) = 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 )
Background image of page 6
Truncation and round-off errors Truncation error results from ignoring all but a finite number of terms of an infinite series. Round-off error the difference between an approximation of a number used in computation and its exact (correct) value. An example of round-off error is provided by an index devised at the Vancouver stock exchange. At its inception in 1982, the index was given a value of 1000.000. After 22 months of recomputing the index and truncating to three decimal places at each change in market value, the index stood at 524.881, despite the fact that its "true" value should have been 1009.811. Another example is the fate of the Ariane rocket launched on June 4, 1996 (European Space Agency 1996). In the 37th second of flight, the inertial reference system attempted to convert a 64-bit floating-point number to a 16-bit number, but instead triggered an overflow error which was interpreted by the guidance system as flight data, causing the rocket to veer off course and be destroyed. Important: the textbook uses the term truncation error incorrectly.
Background image of page 7

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

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 41

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

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online