Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Part 3 Truncation Errors (Supplement). 2 Error Propagation How errors in numbers can propagate through mathematical functions? That is, what's the effect.

Similar presentations


Presentation on theme: "1 Part 3 Truncation Errors (Supplement). 2 Error Propagation How errors in numbers can propagate through mathematical functions? That is, what's the effect."— Presentation transcript:

1 1 Part 3 Truncation Errors (Supplement)

2 2 Error Propagation How errors in numbers can propagate through mathematical functions? That is, what's the effect of the discrepancy between x and x A on the value of the function.

3 3 Error Propagation

4 4 Error Propagation – Example Given x A = 2.5 with error of 0.01, estimate the resulting error in the function f ( x ) = x 3. Estimatation (May be incorrect but provides good approx.) True Bound (Not always possible to calculate this way)

5 5 Example (continue) Estimating maximum bound

6 6 Condition numbers Measure the sensitivity to small changes in input values of a function (i.e. relative change in f ( x ) vs. relative change in x ) Defined as the ratio of these relative errors Small condition number => function is stable around x. Large condition number => function is unstable around x

7 7 Textbook Ex 4.12(c) Condition number is small, so we can calculate f ( x ) accurately provided we formulate the formula properly. How should we evaluate f ( x ) to avoid subtracting two close numbers?

8 8 Total numerical error = truncation error + round-off error Small step size implies small truncation errors but small step size is more likely to introduce round-off errors due to adding big numbers to small numbers and subtractive cancellations. For optimal accuracy, analyze the underlying method (reformulate the method if necessary) and find a step size that minimize the total numerical error.

9 9 Exercise a)What is the Taylor series of f(x) at 0 ? b)What is the Taylor series of f(x) at 2 ? If taking enough terms, which of the above two Taylor series expansion would calculate f(1.5) more accurately? What can you say about the above two Taylor series expansions of f(x) ?

10 10 Exercise What is |R 7 | of the Taylor series of f(x) at 0 ?

11 11 Exercise How do you propose we calculate using only basic arithmetic operators?

12 12 Exercise How do you propose we calculate using only basic arithmetic operators?

13 13 Exercise Using the above series, how many terms do we need to calculate ln(2) with truncation error less than 10 -6 ? Is this approach practical for calculating ln(2)? Why?


Download ppt "1 Part 3 Truncation Errors (Supplement). 2 Error Propagation How errors in numbers can propagate through mathematical functions? That is, what's the effect."

Similar presentations


Ads by Google