0% found this document useful (0 votes)
147 views

Chapter 1 NM

This chapter discusses numerical error analysis in solving mathematical problems numerically. It identifies two main sources of error as round-off error from representing numbers with limited digits, and truncation error from approximating infinite processes with finite ones. It also describes measuring errors using absolute, relative and percentage differences between exact and approximate solutions. The objectives are to understand sources of error and significant digits, and calculate different types of errors.

Uploaded by

dawitdeginet096
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
147 views

Chapter 1 NM

This chapter discusses numerical error analysis in solving mathematical problems numerically. It identifies two main sources of error as round-off error from representing numbers with limited digits, and truncation error from approximating infinite processes with finite ones. It also describes measuring errors using absolute, relative and percentage differences between exact and approximate solutions. The objectives are to understand sources of error and significant digits, and calculate different types of errors.

Uploaded by

dawitdeginet096
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter1: Numerical Error Analysis

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

Objectives:- After reading this chapter, you should be able to:


 understand the need for numerical methods,
 Identify and understand the sources of error,
 Know the concept of significant digits.
 find the absolute, relative and percentage error,

1.1 Why Numerical methods?

BC [Hawassa University] Page 1


Chapter1: Numerical Error Analysis

Mathematics is used to understand and describe real world problems. The process of
representing physical systems in mathematical form is called Mathematical modeling.
Mathematical models are an integral part in solving engineering or scientific problems. Many
times, these mathematical models are derived from engineering and science principles, while
at other times the models may be obtained from experimental (discrete) data.

Mathematical models generally result in need of using the most common mathematical
forms:-

BC [Hawassa University] Page 2


Chapter1: Numerical Error Analysis

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.

Analysis of error is the central concern in the study of Numerical analysis.

In general, studying this course is used to:


 Analyze discrete data,
 Solve any mathematical models,
 Solve complex analytic problems, which can’t be solved by analytical methods,
 Develop algorithms and write computer programs,

1.2 Sources of error


The main sources of error in obtaining numerical solutions to mathematical problems are :-
a) The Model:- Model construction usually involves simplifications or assumption which
introduce errors.

b) The Data:- There may 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
2
space, thus errors are induced. For example, the numbers π , , √ 3 cannot be represent
3

BC [Hawassa University] Page 3


Chapter1: Numerical Error Analysis

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 8−4 × 4−4 ÷ 2−3.
 How computers understand the logical relationship p ⟹ q ⋀ r ??

1.3 Classification of errors


The errors induced by the sources mentioned above are classified in to two:
a) Round-off error (Inherent errors):- This is occurred when we round-off decimal
numbers to a limited and useable number of significant digits.
Note: Round-off errors can be reduced by working to more significant digits.

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.
1 1 1
For example, If S=1+ + 2 + 3 +… , then we may approximate S by truncating
x x x
the series after some terms, say Sn .
1 1 1 1
i.e S ≈ S n=1+ + 2 + 3 +…+ n . Here an error, called truncation error is
x x x x
introduced.
Note: Truncation errors can be reduced by retaining more terms in the process.

1.4 Representation and Approximation of Numbers


In general numerical calculations usually involve two kinds of numbers; exact and approximate
numbers.
1
 Exact numbers for example are 1 ,5 , , √ 2 , √ 3 , π , e
2
2
 Approximate numbers for example are π=3.1416 , √ 3=1.732 , =0.6666
3
The digits that are used to express a number are called Significant digits. Significant digits are
important in showing the truth one has in a reported number.

BC [Hawassa University] Page 4


Chapter1: Numerical Error Analysis

For example, 2.1596 , 0.55557∧3.0087 have five significant digits. But, 0.0087 has only two
significant digits 8∧7 only [NB: zeroes serve only to fix the position of the decimal point].

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.

Definition: Floating point representation of a t−digit number x in base 10 is:


b
x=± 0. d 1 d2 d 3 … … d t ×10
where, d i’s are digits or bits with values from 0 ¿ 9 and are called mantissa; d 1 ≠0
b 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 x with floating point representation;
b
x=± 0. d 1 d2 d 3 … … d t d t +1 d t+2 … … . ×10
Then,
 Chopping the number x with t decimal places means simply chop-off the digits
d t +1 d t +2 …
b
i.e x ≈ x=±0. d 1 d 2 d 3 … … d t × 10
 Rounding the number x with t decimal places means rounding down or up to the
nearest integer. i.e
If d t +1 >5, add 1 to d t and chopping i.e round-up. Here,
−t b
x ≈ x=±(0. d 1 d 2 d 3 … … d t +10 )×10
If d t +1 <5, chop-off the digits d t +1 d t +2 … i.e round-down. Here,
b
x ≈ x=±0. d 1 d 2 d 3 … … d t × 10

BC [Hawassa University] Page 5


Chapter1: Numerical Error Analysis

Special case, when d t +1=5 . 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,
error =|x−x|≤10
b−t
 When we chop x to t significant digits, then
error =|x−x|≤ 0.5× 10
b−t
 When we round x to t significant digits, then
Example: Using chopping and rounding, find the maximum rounding error committed in 3-digit
5
computation of =1. 6̇ . And compare the error that generated in both cases.
3

5
Solution: The floating point representation of x= ˙ ×101 . Here
is x=0. 16
3
b=1 ,t=3
˙ ×101 to 3-significant digits, the approximate value of x is
a) When we chop x=0. 16
x=0.166 × 10 . Then, error =|x−x|≤10
1 b−t 1−3 −2
=10 =10 =0.01.
⇒ The maximum error committed is 0.01
˙ ×101 to 3-significant digits, the approximate value of x is
b) When we round x=0. 16
x=0.167 × 10 .Then, error =|x−x|≤ 0.5× 10
1 b−t 1−3
=0.5 ×10 =0.005.
⇒ The maximum error committed is 0.005
From the above example, we can observe that the round off error due to chopping is greater
than rounding.

1.5 Measurement of errors

To be able to deal with the issue of errors, we need to

BC [Hawassa University] Page 6


Chapter1: Numerical Error Analysis

 Identify where the error is coming from, followed by


 Quantifying or measuring the error, and lastly
 Minimize the error as per our needs.

Numerically error can be measured and described in three ways; absolutely, relatively and using
percentage.

What is true or absolute error?

Definition: An absolute error denoted by E a is the absolute difference between the true value x
(also called the exact value) and the approximate value x .
E a=|x−x|

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
' '
and h=0 .3 , find the Approximate value of f ( 2 ) , True value of f ( 2 ) and
0.5 x
For f ( x )=7 e
Absolute error for part.

What is relative error?

Definition: Relative error is denoted by Er and is defined as the ratio between the absolute error
and the true value.
Ea Ea
Er = ≈
|x| | x|

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?
0.1
If x=2 and x=2.1 , then E a=0.1 and the relative error Er = =0.05
2
0.1
If y=2000 and y=2000.1, then again E a=0.1 but now Er = =0.00005
2000
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.

What is percentage error?


Definition: Percentage error is denoted by ( E p ) and is defined as:

BC [Hawassa University] Page 7


Chapter1: Numerical Error Analysis

E p =Er ×100 %

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:

a. The absolute error


b. The relative error
c. The percentage error and
d. Determine in which case does the error is more significant

Computational Efficiency!!!

The execution speed of a program for a numerical solution depends mostly on the number of
functions and arithmetic operations performed in the program. Therefore, we need to reduce the
number of function calls and operations to write and run an algorithm.

Error Estimation!!!

To approximate an error that is generated through iteration, we mostly use approximate percent
relative error (ε a) :

ε a= ( present approximation−previous approximation


Present approximation )∗100 %
To get better solution, we have to minimize the errors by increasing the number of iteration with
the desired tolerance of error ε

That means, to terminate the computation/iteration the stopping criteria is until ε a< ε

BC [Hawassa University] Page 8

You might also like