Download presentation
Presentation is loading. Please wait.
1
Sec:4.2 ERROR PROPAGATION
2
Sec:4.2 ERROR PROPAGATION
The purpose of this section is to study how errors in numbers can propagate through mathematical functions. Why? Example: = round-off errors are directly related to the manner in which numbers are stored in a computer. * Numbers such as ฯ, e, or cannot be expressed by a fixed number of significant figures *numbers on the computer are represented with a binary, or base-2, system. *binary system ๏ floating point numbers โ๐
๐๐๐ ๐๐ข๐๐๐๐๐ *the gap between adjacent numbers are in a relative sense never larger that eps (machine epsilon). Ex: (1+eps/2)-1 Error = relative error = =2.1๐โ16 *round-off errors originate from the fact that computers retain only a fixed number of significant figures during a calculation.
3
โ๐ ๐ =๐โฒ( ๐ )๐ซ ๐ Sec:4.2 ERROR PROPAGATION
Assume that ๐ is an approximation of x. Assume that ๐ is an approximation of x. โ ๐ =๐โ ๐ โ ๐ =๐โ ๐ Suppose that we want to calculate ๐(๐) Suppose that we want to calculate ๐๐ we would like to estimate ๐(๐)โ๐( ๐ ) ๐ณ๐๐: โ๐ ๐ =๐๐๐๐๐๐๐๐ ๐๐ ๐(๐)โ๐( ๐ ) ๐โ ๐ =๐๐โ๐ ๐ Zero-order approximation of ๐ the error of the multiplication by 2 is double the error in x ๐ ๐ =๐ ๐ +๐โฒ(๐)(x- ๐ ) Rearranging terms yields ๐ ๐ โ ๐ ๐ =๐โฒ(๐)(x- ๐ ) Example: Given a value of ๐ฅ = 2.5 with an error of โ ๐ฅ = 0.01, estimate the resulting error in the function, f (x) = ๐ฅ 3 . =๐โฒ(๐)๐ซ ๐ โ๐โฒ( ๐ )๐ซ ๐ Error Propagation in a Function of a Single Variable โ๐ ๐ =๐โฒ( ๐ )๐ซ ๐ โ๐ ๐ =๐โฒ( ๐ )๐ซ ๐ =๐ (2.5) ๐ ๐.๐๐ =๐.๐๐๐๐
4
Sec:4.2 ERROR PROPAGATION
If we have a function of two independent variables u and v, the Taylor series can be written as ๐ ๐ข ๐ +โ, ๐ฃ ๐ +๐ =๐ ๐ข ๐ , ๐ฃ ๐ + ๐๐ ๐๐ข โ+ ๐๐ ๐๐ฃ ๐+ 1 2! ๐ 2 ๐ ๐ ๐ข 2 โ 2 + ๐ 2 ๐ ๐ ๐ฃ 2 ๐ 2 + ๐ 2 ๐ ๐๐ข๐๐ฃ โ๐ +โฆ ๐ ๐ข ๐+1 , ๐ฃ ๐+1 =๐ ๐ข ๐ , ๐ฃ ๐ + ๐๐ ๐๐ข ๐ข ๐+1 โ ๐ข ๐ + ๐๐ ๐๐ฃ (๐ฃ ๐+1 โ ๐ฃ ๐ ) + 1 2! ๐ 2 ๐ ๐ ๐ข ๐ข ๐+1 โ ๐ข ๐ ๐ 2 ๐ ๐ ๐ฃ 2 (๐ฃ ๐+1 โ ๐ฃ ๐ ) 2 + ๐ 2 ๐ ๐๐ข๐๐ฃ ๐ข ๐+1 โ ๐ข ๐ (๐ฃ ๐+1 โ ๐ฃ ๐ ) +โฆ โ๐ ๐, ๐ = ๐๐ ๐๐ ๐ซ ๐ + ๐๐ ๐๐ ๐ซ ๐ โ๐ ๐ ๐ , ๐ ๐ ,โฆ, ๐ ๐ = ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐ + ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐ +โฆ+ ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐
5
Sec:4.2 ERROR PROPAGATION
โ๐ ๐ ๐ , ๐ ๐ ,โฆ, ๐ ๐ โ ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐ + ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐ +โฆ+ ๐๐ ๐ ๐ ๐ ๐ซ ๐ ๐ Example: ๐ญ(๐,๐,๐)= ๐ ๐ ๐ ๐๐ Given: ๐ฅ = with โ ๐ฅ = 30, ๐ฆ = with โ ๐ฆ = 0.03, ๐ง = with โ ๐ง = , estimate the resulting error in the function, F
6
โ Sec:4.2 ERROR PROPAGATION Example:
Stability and Condition The condition of a mathematical problem relates to its sensitivity to changes in its input values. Example: How small is ๐ ๐ฅ ๐ฅโ22=0 ๐ฅ 1 ๐ฅ 2 ๐ฅ 1 โ ๐ฅ 1 ๐ฅ 1 ( โฆ3) ๐ฅ ๐ฅโ22=0 ๐ฅ 2 ๐ฅ 2 โ ๐ฅ 2 We would like to drive an equation similar to : We say that a computation is numerically unstable if small changes in the input values produce correspondingly large changes in the final results Condition Number: Relative error in ๐(๐ฅ) constant Relative error in ๐ฅ โ
7
โ Sec:4.2 ERROR PROPAGATION ๐ ๐โฒ( ๐ ) ๐ ๐
We would like to drive an equation similar to : Condition Number: Condition Number: ๐ ๐โฒ( ๐ ) ๐ ๐ Relative error in ๐(๐ฅ) constant Relative error in ๐ฅ โ The condition number provides a measure of the extent to which a change in x is magnified by f (x). A value of 1 tells us that the functionโs relative error is identical to the relative error in x. A value greater than 1 tells us that the relative error is amplified Zero-order approximation of ๐ ๐ ๐ =๐ ๐ +๐โฒ(๐)(x- ๐ ) ๐ ๐ โ๐ ๐ ๐ ๐ โ ๐ ๐โฒ( ๐ ) ๐ ๐ ๐โ ๐ ๐ Functions with very large values are said to be ill-conditioned.
8
โ โ Sec:4.2 ERROR PROPAGATION Problem 4.12/p105: Sol:
Evaluate and interpret the condition numbers for ๐ ๐ฅ = ๐ฅโ1 +1 ๐ฅ = Sol: ๐ 1 = 1 ๐ = ๐ฅโ ๐ฅ ๐ฅ =1๐โ5 (Relative error in x) ๐โฒ ๐ฅ = (๐ฅโ1)/ ๐ฅโ ๐ฅโ1 Cond = ๐ฅ ๐โฒ( ๐ฅ ) ๐ ๐ฅ = โ =157.6 (condition number) Relative error in ๐(๐ฅ) 157.6 Relative error in ๐ฅ โ โ (estimate relative error in f(x)) 1.576๐โ3 (actual relative error in f(x)) ๐ โ๐ 1 ๐ 1 =3.162๐โ3
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.