chapter 1 scientific computing approximation in scientific computing (1.2) january 12, 2010
DESCRIPTION
Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010. Absolute and Relative Errors. Example: Approximations. Model Earth as an ellipsoid?. Irrational number has infinite digits in decimal expansion. Floating-point number system. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/1.jpg)
Chapter 1Scientific Computing
• Approximation in Scientific Computing (1.2)
January 12, 2010
![Page 2: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/2.jpg)
Absolute and Relative Errors
![Page 3: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/3.jpg)
Example: Approximations
Floating-point number system
Irrational number has infinite digits in decimal expansion
Model Earth as an ellipsoid?
![Page 4: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/4.jpg)
General Strategy in Scientific Computing
![Page 5: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/5.jpg)
Sources of Approximation
![Page 6: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/6.jpg)
Computational and Data Errors
![Page 7: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/7.jpg)
Truncation and Rounding Errors
![Page 8: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/8.jpg)
Example: Finite Difference Approximation
By Taylor Expansion
Truncation Error
![Page 9: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/9.jpg)
Example: Finite Difference Approximation
Minimizing mh/2 + 2epsilon /h
Rounding Error
![Page 10: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/10.jpg)
![Page 11: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/11.jpg)
Forward and Backward Errors
![Page 12: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/12.jpg)
Example
(relative) backward error is about twice the forward error
![Page 13: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/13.jpg)
Example: Backward Error Analysis
![Page 14: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/14.jpg)
Example, cont.
(relative) forward and backward errors are similar.
![Page 15: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/15.jpg)
Example -Sensitivity
![Page 16: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/16.jpg)
Sensitivity and Conditioning
![Page 17: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/17.jpg)
Condition Number
![Page 18: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/18.jpg)
Example
![Page 19: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/19.jpg)
Examples
1. What is the condition number of f (x) = sin(x) at x =0, pi/2 and pi?
cond# = | x cot (x) |
2. What is the condition number of f (x) = x2 + 2x at x =0, 1 and 10? For sufficiently large x?
![Page 20: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/20.jpg)
Stability
![Page 21: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/21.jpg)
Accuracy
![Page 22: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/22.jpg)
Review Problems
• Homework One is out and it is due next Thursday.
(1.2) What are the approximate absolute and relative erros in approximating pi by a) 3 and b) 3.14?
(1.5) Consider the function f(x, y) = x–y. Measure the size of the input (x, y) by | x | + | y |, and assuming that | x | + |y | ~ 1 and x – y ~ ε show that cond(f) ~ 1 / ε. What can you conclude about the sensitivity of substration
![Page 23: Chapter 1 Scientific Computing Approximation in Scientific Computing (1.2) January 12, 2010](https://reader036.vdocuments.mx/reader036/viewer/2022081506/56814616550346895db32174/html5/thumbnails/23.jpg)
(1.7) Let (b, p, U, L) be the four integers that characterize a floating-point number system. Given b= 10, what are the smallest values of p and U, and largest value of L such that both 2365.27 and 0.0000512 can be represented exactly in a normalized floating-point system?
(1.17) Let x be a given nonzero floating-point number in a normalized system and let y be an adjacent floating-point number, also nonzero.
a) What is the minimum possible spacing between x and y? b) What is the maximum possible spacing between x and y?
(1.12) In floating-point arithmetic, which expressions can be evaluated more accurately?
x2 –y2 or (x – y ) ( x + y)Example: x = 3469, y= 3451 b=10, p=3, chopping
Exact value = 124560, and …