SKMM 3023 Additional Notes - Error Propagation

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

4 October 2013

SKMM 3023 Additional Notes Error Propagation


Some definition
If x is an approximation to x, the difference between the true value and the approximate value is
called the true error:

Ex= x x

(1)

The relative error, Rx is defined as


=
Rx

x x
, x0
x

(2)

A number x is considered to be an approximation to the true value x to d significant digits if d is the


largest positive integer for which
x x 1 d
< 10
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

b) The relative error is


Rx =

x x
x

0.0000073
3.1415927
= 0.0000023237
=

c) Number of significant digit


=
Rx

x x 10 d
<
x
2

105
2
= 0.0000023237 < 0.000005
= 0.0000023237 <

Page 1 of 6

Since d = 5, then x approximates x to five significant digits.


Arithmetic Operation
Let x and y be the exact number and x and y their approximate values. Then
x= x + x
y= y + y

x and y denote errors in x and y, respectively.


a. Addition
x + y = ( x + x ) + ( y + y )
= x + y + ( x + y )
E = x + y ( x + y )

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 =

The error associated with subtraction can be found as


E=
Ex E y =
10.1 105
=
R

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 )

Dropping the second- and higher-order terms and rearranging yields

f ( x ) f ( x=
) f ( x )( x x )
or
f ( x )=

f ( x ) x

(4)

Page 3 of 6

where f ( x ) =

f ( x ) f ( x ) represents an estimate of the error of the function and

x = x x represent an estimate of the error x. Equation (4) provides the capability to


approximate the error in f(x) given the derivative of a function and an estimate of the error
in the independent variable. This is depicted in Figure 1.

Figure 1: Graphical depiction of first-order error propagation

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

Because f(2.5) = 15.625, we predict that

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

where u and v are estimates of error in u and v, respectively.


For n independent variables, x1 , x2 , , xn having errors x1 , x2 , , xn , the following
relationship holds:
f ( x1 , x2 , , xn )

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=

Substituting the appropriate values,


=
y 0.006561 + 0.002187 + 0.001094 + 0.00164
= 0.011482

Therefore, y = 0.164025 0.011482. In other words, y is between 0.152543 and 0.175507 m.


The validity of these estimates can be verified by substituting the extreme values for the
variables in the equation to generate an exact minimum of
720 ( 8.97 )
=
ymin =
0.152818
8 ( 7.55 109 ) 0.000505
4

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

You might also like