Errors Uj

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

1.

3 Errors
Occurrence of error is unavoidable in the field of scientific computing. In-
stead, numerical analysts try to investigate the possible and best ways to
minimise the error. The study of the error and how to estimate and min-
imise it are the fundamental issues in error analysis.

1.3.1 Error Analysis


In numerical analysis we approximate the exact solution of the problem by
using numerical method and consequently an error is committed. The numer-
ical error is the difference between the exact solution and the approximate
solution.

Definition 2 (Numerical Error). Let x be the exact solution of the underlying


problem and x∗ its approximate solution, then the error (denoted by e) in
solving this problem is

e = x − x∗ .

1.3.2 Sources of Error in Numerical Computations


• Blunders (Gross Errors) These errors also called humans errors,
and are caused by humans mistakes and oversight and can be minimised
by taking care during scientific investigations. These errors will add to
the total error of the underlying problem and can significantly affect
the accuracy of solution.

• Modelling Errors These errors arise during the modelling process


when scientists ignore effecting factors in the model to simplify the
problem. Also, these errors known as formulation errors.

• Data Uncertainty These errors are due to the uncertainty of the


physical problem data and also known as data errors.

• Discretisation Errors Computers represent a function of continuous


variable by a number of discrete values. Also, scientists approximate
and replace complex continuous problems by discrete ones and this
results in discretisation errors.

7
1.3.3 Absolute and Relative Errors
Definition 3 (Absolute Error). The absolute error ê of the error e is defined
as the absolute value of the error e

ê = |x − x∗ |.

Definition 4 (Relative Error). The relative error ẽ of the error e is defined


as the ratio between the absolute error ê and the absolute value of the exact
solution x

ê |x − x∗ |
ẽ = = , x 6= 0.
|x| |x|
Example 2. Let x = 3.141592653589793 is the value of the constant ratio π
correct to 15 decimal places and x∗ = 3.14159265 be an approximation of x.
Compute the following quantities:

a. The error.

b. The absolute error.

c. The relative error.

Solution:

a. The error

e = x − x∗ = 3.141592653589793 − 3.14159265 = 3.589792907376932e − 09


= 3.589792907376932 × 10−9 = 0.000000003589792907376932.

b. The absolute error

ê = |x−x∗ | = |3.141592653589793−3.14159265| = 3.589792907376932e−09.

c. The relative error


ê |x − x∗ | 3.141592653589793 − 3.14159265
ẽ = = =
|x| |x| 3.141592653589793
3.589792907376932e − 09
= = 1.142666571770530e − 09.
3.141592653589793

8
1.3.4 Roundoff and Truncation Errors
Computers represent numbers in finite number of digits and hence some
quantities cannot be represented exactly. The error caused by replacing a
number a by its closest machine number is called the roundoff error and
the process is called correct rounding.

Truncation errors also sometimes called chopping errors are occurred


when chopping an infinite number and replaced it by a finite number or by
truncated a series after finite number of terms.

Example 3. Approximate the following decimal numbers to three digits by


using rounding and chopping (truncation) rules:

1. x1 = 1.34579.

2. x2 = 1.34679.

3. x3 = 1.34479.

4. x4 = 3.34379.

5. x5 = 2.34579.

Solution:

(i) Rounding:

(a) x1 = 1.35.
(b) x2 = 1.35.
(c) x3 = 1.34.
(d) x4 = 3.34.
(e) x5 = 2.35.

(ii) Chopping:

(a) x1 = 1.34.
(b) x2 = 1.34.
(c) x3 = 1.34.
(d) x4 = 3.34.
(e) x5 = 2.34.

You might also like