Week 2 M1Lessons 2-3
Week 2 M1Lessons 2-3
Week 2 M1Lessons 2-3
Numerical Methods:
Introduction, Discrete
Algebra, Accuracy, Errors
M1: Numerical Methods: Introduction,
Discrete Algebra, Accuracy, Errors
2. LEADING ZEROS that comes before all of the nonzero digits are not
significant.
True
SI. Analytical Numerical True Error Percentage
Relative Error
0 0 0 0 0.00
2 16.4 19.6 3.2 19.51
4 27.77 32 4.23 15.23
6 35.64 39.85 4.21 11.81
8 41.1 44.82 3.72 9.05
10 44.87 47.97 3.1 6.91
12 47.49 49.96 2.47 5.20
14 53.39 53.39 0 0.00
Error Definitions
Sample problem for Case 1: The parachutist problem from Lesson 1
One way of reducing error is by lowering the step increment
𝒄
𝒗 𝒕𝒊+𝟏 = 𝒗 𝒕𝒊 + [𝒈 − 𝒗 𝒕𝒊 ](𝒕𝒊+𝟏 − 𝒕𝒊 )
𝒎
True
SI. Analytical Numerical True Error Percentage
Relative Error
0 0.000 0.000 0.000 0.00
0.1 0.972 0.980 0.008 0.82
0.2 1.926 1.942 0.016 0.81
0.3 2.863 2.886 0.023 0.80
0.4 3.783 3.813 0.030 0.79
0.5 4.687 4.723 0.037 0.78
0.6 5.573 5.617 0.043 0.78
0.7 6.444 6.494 0.049 0.77
In case 1, we can define the true error since both
numerical and analytical results are available for
each point. How about for those approximate
functions? How can we define the approximate
error without knowing the analytical result for
every point on the approximate function?
Error Definitions
Case 2: In real world applications, we usually don’t know the answer a priori.
We don’t know the true value due to the absence of analytical result.
Approximate Error:
𝐸𝑎 = Current approximation − Previous Approximation (+/−)
Note: A negative value indicates that the previous approximation is above the current
approximation, otherwise, for a positive value, it is below the current approximation.
Error Definitions
Case 2: In real world applications, we usually don’t know the answer a priori.
We don’t know the true value due to the absence of analytical result.
Iterative approaches in calculating numerical problems apply this case
examples are: Newton’s Method, Taylor Series and etc.
The computation of these approaches are repeated until stopping criteria is
achieved
𝜺𝒂 < 𝜺 𝒔 Pre-specified % tolerance (Use absolute value)
Zero 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
𝚬= 𝒃 𝟏−𝒕
number of
number significant digits in
base mantissa
The Machine Epsilon
Sample problem: Determine the machine epsilon of a machine that uses 7-bit
word. Employ first digit for the sign of number, the next three digits for the sign and
magnitude of the exponent, and remaining digits for the magnitude of the mantissa.
1. Determine the number of significant digits in the mantissa.
God Bless!
References:
1. C. F. Gerald and P. O. Wheatley (2004). Applied Numerical Analysis (7th Ed.) Pearson
Education, Inc.
2. S. C. Chapra and R. P. Canale (2010). Numerical Methods for Engineers (6th Ed.)
McGraw-Hill, New York.