Professional Documents
Culture Documents
Saharudin Haron
Page 2 - 1
Dimensional Homogeneity
Valid equation must be dimensionally homogenous Both sides of equation must have same dimensions V(m/s) = Vo(m/s) + g(m/s2)t(s) Example : Consider this equation D(ft) = 3t(s) + 4 What is the dimension and unit for constants 3 and 4? Constant 3 Constant 4 length/time length
ft/s ft
Page 2 - 2
Scientific Notation
Large and very small number often encountered in process calculations Convenient way to represent such number is to use scientific notation Expressed between 0.1 and 10 and a power of 10 123 000 000 = 1.23 x 108 (or 0.123 x 109) 0.000028 = 2.8 x 10-5 (or 0.28 x 10-4)
Page 2 - 3
Significant Figure
The significant of a number are the digits from the first nonzero on the left to either the last digit (zero or nonzero) on the right if there is decimal point the last nonzero digit of the number if there is no decimal point 2300 or 2.3 x 103 has two significant figures 2300. or 2.300 x 103 has four significant figures 2300.0 or 2.3000 x 103 has five significant figures 23040 or 2.304 x 104 has four significant figures 0.035 or 3.5 x 10-2 has two significant figures 0.03500 or 3.500 x 10-2 has four significant figures
Page 2 - 4
Multiplication and division The answer should be equal to the lowest significant figure of any multiplicands or divisors (3) (4) (7) (3.57)(4.286) = 15.30102 (2) (4) (3) (9) (5.2 x 10-4)(0.1635 x 107)/(2.67) = 318.426966 rounding the last digit 5 to even number 1.35 => 1.4 1.25 => 1.2 (3) 15.3
Page 2 - 5
Significant Figure
(assignment in class)
Calculate the following and give your answer according to the rule of significant figure: a) b) c) d) (3.4)(2.75) (1.76)(0.00120)/(78.2) (5.400 x 103)/27 (9.83 x 107)(0.2 x 10-5)
Page 2 - 6
Page 2 - 7
Page 2 - 8
Errors
Numerical error arise from the use of approximation to represent exact mathematical operations and quantities Truncation Error - approximation of mathematical procedures Round-off error - approximation of exact numbers The relation between exact, or true and the approximate True value = Approximation + error Et = true value - approximation Short comings - no magnitude how big the error is To rectify the problem - Fractional Relative Error = Error/True value true error Percent relative error is given by t = 100% true value
Page 2 - 9
Errors
Example: The measured lengths of a bridge and a pen are 9999 cm and 9 cm respectively. If the true values are 10,000 cm and 10 cm respectively, compute, (a) true error and (b) true percent relative error for each case. Solution: a) The error for measuring the bridge is: Et = 10,000 9999 = 1 cm and for the pen is: Et = 10 9 = 1 cm b) The percent Relative Error for the bridge is:
t = 1/10,000 * 100 = 0.01 % and for the pen is: t = 1/10 * 100% = 10 %
Page 2 - 10
Approximation of error
In actual situation the true value is rarely available Typically the case when we investigate the theoretical behavior of technique of simple system approximate error a = 100% approximation The challenge of numerical method is to find the approximation error Solving this by using iterative approach by using the previous value as basis
a =
The iteration is stop until |a| < s (the prespecified tolerance) Tolerance to at least n significant figures is given as s = (0.5 X 10 2-n)%
Page 2 - 11
Error Estimates
Exponential function can be estimated by
2 3 n x x x ex = 1 + x + + + L + 2! 3! n!
(Maclaurin Series)
Find the estimate of e 0.5 with s to 3 significant figures. The true value for this function is 1.648721271. Results from iteration
e 0.5 = 1 + 0.5 = 1.5 1.648721271 1.5 t = 100% = 9.02 1.648721271 1.5 1 a = 100% = 33.3% 1.5
Page 2 - 12
1 2 3 4 5 6
After six terms are included, the approximate error falls below ea = 0.05 %
Page 2 - 13
and
x 2 x3 x 4 = 1 x + - + - ... 2 3! 4!
ex =
1 = x e
1 x 2 x3 x 4 1 + x + + + + ... 2 3! 4!
and calculate the errors. Compare the answers with the true value of 2.485168 x 10-4 after 6 iteration.
Page 2 - 14
Round-off Errors
Related to the manner in which numbers are stored in computer Due to the problems of word, string of binary digits and bits 22 7 , , , e 7 In every day life we are using the base-10 system 0,1, 2, 3, 4, 5, 6, 7, 8, 9 For larger quantity combination of this digit is used. 86409 = (8 X 104) + (6 X 103) + (4 X 102) + (0 X 101) + (9 X 100) The computers are using the system of binary unit or base-2 11 in computer (base -2) is equivalent to 3 in the base-10 system 1 0 0 0 0 0 0 0 1 0 1 0 1 1 0 1
Range of Integers
Problem Statement Determine the range of integers in base-10 that can be presented on a 16 - bit computer Solution
Of the 16 bits, the first bit holds the sign. The remaining 15 bits can hold binary numbers from 0 to 11111111111111. Converted to a decimal integer which equals to 32767. Thus the ranging of 16-bit computer will be :
-32,767 to 32767
Page 2 - 16
Truncation Error
Occur because an exact mathematical procedure is estimated Example first order equation in falling parachute problem using finite different method
Page 2 - 17
f ( xi +1) f ( xi ) + f ( xi )( xi +1 xi )
Use to predict linear equation
f ( xi +1) f ( xi ) + f ( xi )( xi +1 xi ) +
f ( xi )( xi +1 xi )2 2
second order
Page 2 - 18
Rn = 0 ( h n +1 )
Page 2 - 19
f ( xi +1) f ( xi )
The remainder or error of this zero order prediction will be
Ro f ( xi ) h +
f ( xi ) 2 f ( xi ) 3 h + h +L 2! 3!
Page 2 - 20
a Ex
e r p ct
Ro
f(xi ) x i+1 x
xi h
Page 2 - 21
from xi = 0 with h = 1. That is, predict the functions value at xi+1 = 1. (f(1) = 0.2 - true value)
Taylor series with n = 0 (zero-order); f (xi+1) f (xi)
The first derivative must be determined & evaluated at x = 0; f (0) = -0.4(0.0)3 0.45(0.0)2 1.0(0.0) 0.25 = -0.25 Therefore, the first-order approximation: f (xi+1) 1.2 0.25h f (1) 0.95 This results in a reduction of the Et to; Et = 0.2 0.95 = -0.75
Page 2 - 23
f = -1.2(0.0)2 0.9(0.0) 1.0 = -1.0 Therefore, the second-order approximation: f (xi+1) 1.2 0.25h 0.5 h2 f (1) 0.45 The Et is reduced further to = 0.2 0.45 = -0.25
Page 2 - 24
f (x) = 1.2 0.25h 0.5h2 0.15h3 0.1h4 where the remainder term is; R4 = f (5) ( )/5! h5 = 0 R4 = 0 because the 5th derivative of a 4th-order polynomial is zero.
Consequently, the Taylor series expansion to the fourth derivative yields an exact estimate at xi+1 = 1:
Approximation of f(x)
f(x) zero order 1.0 first order 0.5
Tr u e
second order 0 xi = 0 h
Page 2 - 26
xi+1 = 1
from x = 1. Compute the true percent relative error t for each approximation.
Page 2 - 27
Ro un
tio a c n Tru
rror e n
d-o ff
erro r
Page 2 - 28