Lecture+14--Error+interaction+and+bracket+method

Lecture+14--Error+interaction+and+bracket+method -...

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

View Full Document Right Arrow Icon
Truncation + Roundoff Errors Example: Truncation error vs roundoff error in computing f (0) for f ( x ) = exp( x ) Forward difference method: * f ( x , dx ) = [ f ( x + dx ) – f ( x )] / dx (1) * Roundoff error in computing [ f ( x + dx ) – f ( x )] is 10-16 . * Thus the roundoff error for f is R.E. ~ O (10-16) / dx (2) * Clearly small for larger dx ; but will increase as dx decreases.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Truncation + Roundoff Errors Example: Truncation error vs roundoff error in computing f (0) Forward difference method: * f ( x , dx ) = [ f ( x + dx ) – f ( x )] / dx (1) * R.E. ~ O(10-16) / dx (2) * Truncation error based on Taylor series expansion: f ( x + dx ) = f ( x )+ f ( x ) dx + 1/2 f ( x ) ( dx )2 + 1/6 f ″′ ( x ) ( dx )3+… [ f ( x + dx ) - f ( x )]/ dx = f (x) + 1/2 f ( x ) ( dx ) + f ″′ ( x ) ( dx )2+… (3) * Thus in approximating f ( x ) by [ f ( x + dx ) - f ( x )]/ dx , we commit an error of 1/2 f ( x ) ( dx ) to the leading order .
Background image of page 2
Truncation + Roundoff Errors Example: Truncation error vs roundoff error in computing f (0) Forward difference method: f ( x , dx ) = [ f ( x + dx ) – f ( x )] / dx R.E. ~ O (10-16) / dx T.E. ~ 1/2 f ( x )*( dx ) ; f ( 0 ) =1 for exp( x ). Total error: = R.E. + T.E. ~ 10-16/ dx +1/2*( dx ) 1.E-09 1.E-08 1.E-07 1.E-06 1.E-05 1.E-04 1.E-03 1.E-02 1.E-01 1.E+00 1.E-15 1.E-13 1.E-11 1.E-09 1.E-07 1.E-05 1.E-03 1.E-01 1.E+01 abs(f'-1) f(x)=exp(x) f'(0)=[exp( δ x)-1]/ δ x δ x decreasing truncation error increasing due to roundoff error
Background image of page 3

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

View Full DocumentRight Arrow Icon
Truncation + Roundoff Errors Example: Truncation error vs roundoff error in computing f (0)
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2011 for the course EGM 3344 taught by Professor Raphaelhaftka during the Spring '09 term at University of Florida.

Page1 / 26

Lecture+14--Error+interaction+and+bracket+method -...

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

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