SKMM 3023 Additional Notes - Error Propagation
SKMM 3023 Additional Notes - Error Propagation
SKMM 3023 Additional Notes - Error Propagation
Ex= x x
(1)
x x
, x0
x
(2)
(3)
Example
The number 3.1415927 is approximated as 3.1416. Find the following (a) true error, (b) relative
error, and (c) number of significant digits of the approximation.
Solution
a) The true error is
Ex= x x
= 3.1415927 3.1416
= 0.0000073
x x
x
0.0000073
3.1415927
= 0.0000023237
=
x x 10 d
<
x
2
105
2
= 0.0000023237 < 0.000005
= 0.0000023237 <
Page 1 of 6
b. Subtraction
x y = ( x + x ) ( y + y )
= x y + ( x y )
E = x y ( x y )
c. Multiplication
E
= xy xy
= xy ( x x ) ( y y )
=xy ( xy x y y x + x y )
= x y + y x x y
d. Division
x x
y y
E=
x (x x )
y (y y )
=
=
=
x( y y ) y(x x )
y( y y )
y x x y
y( y y )
Question: What are the relative errors for every arithmetic operation above?
Page 2 of 6
Example
The values of x = 2.71828183 and y = 2.71828183 are represented as x = 2.7183 and y = 2.7181.
Determine the error and the relative error associated with the operation x y.
Solution
The errors in x and y can be expressed as Ex= x x and E y= y y , respectively.
Ex =
1.817 105 , Rx =
6.684 106
8.283 105 , Ry =
3.0473 105
Ey =
E
10.1 105
=
0.10202020
x y
0.000099
It can be seen that although the error in x y is very small, the relative error is much larger than that
of x and y alone.
Using Taylors series for error estimation
a. Function of a single variable
Suppose that we have a function f(x) that is dependent on a single independent variable x.
Assume that x is an approximation of x. We, therefore, would like to assess the effect of the
discrepancy between x and x on the value of the function. That is, we would like to estimate
f ( x ) =
f ( x ) f ( x )
The problem with evaluating f ( x ) is that f(x) is unknown because x is unknown. We can
overcome this difficulty if x is close to x and f ( x ) is continuous and differentiable. If these
conditions hold, a Taylor series can be employed to compute f(x) near f ( x ) , as in
f ( x=
) f ( x ) + f ( x )( x x ) +
f ( x )
2
( x x )
f ( x ) f ( x=
) f ( x )( x x )
or
f ( x )=
f ( x ) x
(4)
Page 3 of 6
where f ( x ) =
Example
Given a value of x = 2.5 with an error of x = 0.01, estimate the resulting error in the
function, f(x) = x3.
Using equation (4),
f ( x ) 3 ( 2.5 ) ( 0.01) =
0.1875
2
f=
( 2.5) 15.625 0.1875
or that the true value lies between 15.4375 and 15.8125. In fact, if x were actually 2.49, the
function could be evaluated as 15.4382, and if x were 2.51, it would be 15.8132. For this
case, the first-order error analysis provides a fairly close estimate of the true error.
b. Function of More than One Variable
The foregoing approach can be generalized to functions that are dependent on more than
one independent variable. This is accomplished with multivariable version of the Taylor
series. For example, if we have a function of two independent variables u and v, the Taylor
series can be written as
f
f
( ui +1 ui ) + ( vi +1 vi )
u
v
2
2
f
2 f
1 f
2
2
+ 2 ( ui +1 ui ) + 2
( ui +1 ui )( vi +1 vi ) + 2 ( vi +1 vi ) +
uv
v
2! u
f ( ui +1 , v=
f ( ui , vi ) +
i +1 )
(5)
Page 4 of 6
where all partial derivatives are evaluated at the base point i. If all second-order and higher
terms are dropped, equation (5) can be solved for
f ( u , v =
)
f
f
u +
v
u
v
f
f
f
x1 +
x2 + +
xn
x1
x2
xn
(6)
Example
The deflection y of the top of a sailboat mast is
y=
FL4
8 EI
where F = a uniform side loading (N/m), L = height (m), E = the modulus of elasticity (N/m2),
and I = the moment of inertia (m4). Estimate the error in y given the following data:
F 750 N/m
=
=
F 30 N/m
=
L 9 m =
L 0.03 m
9
2
E = 7.5 10 N/m E = 5 107 N/m2
m4
I 0.0005=
=
I 0.000005 m4
Solution
Using equation (6),
y y y y
F +
L +
E +
I
F
L
E
I
3
4
4
L4 FL
FL
FL
F +
L + 2 E +
I
2
8 EI
2 EI
8 E I
8 EI
y F , L , E , I=
and
Page 5 of 6
780 ( 9.03)
=
ymax =
0.175790
8 ( 7.45 109 ) 0.000495
4
Thus, the first-order estimates are reasonably close to the exact values.
References
1. SINGIRESU S. RAO (2002): Applied Numerical Methods for Engineers and Scientists, ISBN
0-13-089480-X, Prentice Hall.
2. STEVEN C. CHAPRA, RAYMOND P. CANALE (2006): Numerical Methods for Engineers, 5ed,
ISBN 007-124429-8, McGraw-Hill.
Page 6 of 6