Num Chap 1 Edited
Num Chap 1 Edited
Numerical Analysis I
Math ___
Chapter 1
Numerical Error Analysis
Contents:
1.1 Why Numerical Methods?
1.2 Sources of error
1.3 Classification of errors
Round off error
Truncation error
1.4 Representation and Approximation of Numbers
Floating point representation
Chopping and Rounding
1.5 Measurement of errors
Absolute error
Relative error
Percentage error
Mathematical models generally result in need of using the most common mathematical forms:-
Differentiation and Integration,
Nonlinear equations,
Systems of linear equations,
Systems of non-linear equations,
Curve fitting by interpolation or regression, and
Differential Equations (ODE and PDE),
There are two general methods of solving these mathematical modeling forms:
Analytical Methods (Exact solution methods)
Numerical Methods (Approximate solution methods)
In practical application, a researcher would finally obtain results in a numerical form. And,
during manipulation or calculation of these numerical forms, errors will arise.
b) The Data: There may be errors in measuring, estimating and collecting data values.
c) The Methods: the numerical methods used to solve mathematical models are not exact,
generally based on some approximation and as a consequence errors arise.
d) Computational Tools: tools like calculator and computer represent numbers in a limited
space, thus errors are induced. For example, the numbers √ cannot be represent
exactly by a finite number of digits in a computer. And they are approximated by a given
number of digits.
e) Arithmetic and logical Operations: Frequently, errors are introduced in carrying out
arithmetic and logical operations (missing the precedence of the operations). For example;
Simplify the expression .
How computers understand the logical relationship ??
b) Truncation error: are errors caused by using approximate methods in place of an exact
mathematical procedure. That is, an error which is present when an infinite process is
approximated or truncated by a finite process.
For example, If , then we may approximate by
introduced.
Note: Truncation errors can be reduced by retaining more terms in the process.
Since a digital computer or calculator has a fixed storage space of memory, a given number in a
certain base must be represented in a finite space. We usually represent a number in decimal
form (base 10). Thus, all digits of a given number may not be represented in the computer
memory.
The most common conventional way of representation of numbers in a digital computer is
Floating Point Representation.
where, ’s are digits or bits with values from and are called mantissa;
is an integer which is called the exponent.
Exercise: Write the following numbers in floating point representation form;
12.462, 0.80059, 296.844, 0.00519
There are two ways of reducing the number of significant digits in the representation of numbers:
Copping and
Rounding
Suppose we are given a number with floating point representation;
Then,
Chopping the number with decimal places means simply chop-off the digits
i.e ̅
Rounding the number with decimal places means rounding down or up to the
nearest integer. i.e
If , add 1 to and chopping i.e round-up. Here,
̅
If , chop-off the digits i.e round-down. Here,
̅
Special case, when . If the digit preceding the 5 is an even number, then
digit is not rounded up. If the digit preceding the 5 is an odd number, then the
digit is rounded up.
Exercise: Round the following numbers to three and four significant digits.
3.5587 1.341 75.25
0.5896 0.3762 0.1275
9.3866 9.871 0.2555
Remark: Chopping has introduced much more round-off error than rounding. That is,
When we chop to significant digits, then | ̅|
When we round to significant digits, then | ̅|
Example: Using chopping and rounding, find the maximum rounding error committed in 3-digit
Numerically error can be measured and described in three ways; absolutely, relatively and using
percentage.
Definition: An absolute error denoted by is the absolute difference between the true value
(also called the exact value) and the approximate value ̅ .
| ̅|
Activity:
The derivative of a function f (x) at a particular value of x can be approximately calculated by
f ( x h) f ( x )
f ( x)
h
For and h 0.3 , find the Approximate value of f (2) , True value of f (2) and
Absolute error for part.
Definition: Relative error is denoted by and is defined as the ratio between the absolute error
and the true value.
| |
Note: The magnitude of true error does not show how bad the error is. Consider the following
examples, and determine in which case does the error is more significant?
If and ̅ , then and the relative error
Clearly, from the above example, we can observe that relative error is more powerful than
absolute error to describe the magnitude of the error that introduced in a computation.
Exercise: Suppose that you have the task of measuring the length of a bridge and a nail and
come up with 9999cm and 9cm respectively. If the exact values are 10,000cm and 10cm
respectively, then for each case compute: