CH 1 - Basic Concepts in Error Estimation
CH 1 - Basic Concepts in Error Estimation
Numerical Analysis I
Prepared By
Biruk Endeshaw Mekonnen
March 8, 2021
Chapter 1
Basic Concepts in Error Estimation
1.1 INTRODUCTION
Numerical technique is widely used by scientists and engineers to solve their problems. A
major advantage for numerical technique is that a numerical answer can be obtained even
when a problem has no analytical solution. However, result from numerical analysis is an
approximation, in general, which can be made as accurate as desired. The reliability of the
numerical result will depend on an error estimate or bound, therefore the analysis of error
and the sources of error in numerical methods is also a critically important part of the study
of numerical technique.
(ii) Approximate Number: There are numbers, which are not exact.
√
e.g., 2 = 1.41421..., e = 2.7183...., etc. are not exact numbers since they contain in-
finitely many non-recurring digits. Therefore the numbers obtained by retaining a few
digits, are called approximates numbers, e.g., 3.142, 2.718 are the approximate values of
π and e.
(iii) Significant digits: The significant digits are the number of digits used to express a num-
ber. The digits 1, 2, 3, 4, 5, 6, 7, 8, 9 are significant digits. 0 00 is also a significant figure ex-
cept when it is used to fix the decimal point or to fill the places of unknown or discarded
digits.
For example, each number 5879, 3.487, 0.4762 contains four significant digits while the
numbers 0.00486, 0.000382, 0.0000376 contains only three significant digits since zeros
only help to fix the position of the decimal point.
Similarly, in the number 0.0002070, the first four 0 00 s are not significant digits since they
serve only to fix the position of decimal point and indicate the place values of the other
digits. The other two 0 00 s are significant.
To be more clear, the number 2.0683 contains five significant digits.
(b) lie to the right of decimal point and at the same time to the right of a non-zero
digit;
3900 two
39.0 two
6
3.9 × 10 two
Note 1.1. Significant digits are counted from left to right starting with the non-zero digit
on the left.
(iv) Round off Numbers: There are numbers with many digits, e.g., 22 7
= 3.142857143. In
practical, it is desirable to limit such numbers to a manageable number of digits, such
as 3.14 or 3.143. This process of dropping unwanted digits is called rounding-off.
Number are rounded-off according to the following rules:
To round-off a number to n significant digits, discard all digits to the right of nth digit
and if this discarded number is
3. Exactly 5 in (n+1)th place, increase the nth digit by unity if it is odd otherwise leave
it unchanged.
e.g., 11.675 to 11.68, 11.685 to 11.68.
Example 1.1. Round-off the following numbers correct to four significant figures:
58.3643, 979.267, 7.7265, 56.395, 0.065738 and 7326853000.
1.3 ERRORS
A computer has a finite word length and so only a fixed number of digits are stored and used
during computation. This would mean that even in storing an exact decimal number in its
converted form in the computer memory, an error is introduced. This error is machine de-
pendent and is called machine epsilon. After the computation is over, the result in the ma-
chine form (with base b) is again converted to decimal form understandable to the users and
some more error may be introduced at this stage. In general, we can say that
(1) Inherent Error: Errors which are already present in the statement of a problem before
its solution are called inherent errors. Such errors arises either due to the fact that the
given data is approximate or due to limitations of mathematical tables, calculators, or
the digital computer.
Inherent error can be minimized by taking better data, by using high precision comput-
ing aids and by correcting obvious errors in the data. Accuracy refers to the number of
significant digits in a value, for example, 53.965 is accurate to 5 significant digits.
Precision refers to the number of decimal positions or order of magnitude of the last
digit in the value. For example, in 53.965, precision is 10−3 .
(2) Round-off Error: Rounding errors arise from the process of rounding-off numbers dur-
ing the computation. They are also called procedural errors or numerical errors. Such
errors are unavoidable in most of the calculations due to limitations of computing aids.
The round-off error can be reduced by carrying the computation to more significant
figures at each step of computation. At each step of computations, retain at least one
more significant figure than that given in the data, perform the last operation, and then
round off.
(3) Truncation Error: Truncation errors are caused by using approximate results or by re-
placing an infinite process with a finite one.
If we are using a decimal computer having a fixed word length of 4 digits, rounding-off
of 13.658 gives 13.66, whereas truncation gives 13.65.
e.g., If S = ∞
P Pn
i=1 ai xi is replaced by or truncated to S = i=1 ai xi , then the error devel-
x x2 x 3 x4
if e = 1 + x + + + + . . . ∞ = X (say) is truncated to
2! 3! 4!
x2 x3
1+x+ + = X 0 (say), then truncation error = X − X 0
2! 3!
(4) Absolute Error: Absolute error is the numerical difference between the exact or true
value of a quantity and its approximate value.
Thus, if X is the true value of a quantity and X 0 is its approximate value, then |X − X 0 |
is called the absolute error and denoted by Ea . Therefore
Ea = |X − X 0 |
(5) Relative Error: The relative error Er is defined by
X − X0 Ea
Er = =
X True value
X − X0
Ep = 100 × Er = 100 ×
X
Note 1.2. 1. The relative and percentage errors are independent of units used while absolute
error is expressed in terms of these units.
3. If the first significant digit of a number is k and the number is correct to n significant
digits, then the relative error < (k×101 n−1 ) .
√
Example 1.2. Suppose 1.414 is used as an approximation to 2. Find the absolute and relative
errors.
√
Solution: True value 2 = 1.41421356
Approximate value = 1.414
Ea 0.21356 × 10−3
Relative error Er = = √
True value 2
−3
= 0.151 × 10 .
Example 1.3. If 0.333 is the approximate value of 31 , find the absolute, relative, and percentage
errors.
Solution: Given that True value (X) = 13 , and its Approximate value (X 0 ) = 0.333
Therefore, Absolute Error, Ea = |X − X 0 |
= | 31 − 0.333| = |0.333333 − 0.333| = 0.000333
0.000333
Relative Error, Er = 0.333333 = 0.000999 and
Percentage Error, Ep = Er × 100 = 0.000999 × 100 = 0.099%.
√ √ √
Example 1.4. Calculate the sum of 3, 5 and 7 to four significant digits and find its abso-
lute and relative errors.
√ √ √
Solution: Here 3 = 1.732, 5 = 2.236, 7 = 2.646
Hence Sum = 6.614 and
Absolute error = Ea = 0.0005 + 0.0005 + 0.0005 = 0.0015
(Because 12 × 10−3 = 0.0005). Also the total absolute error shows that the sum is correct up to
3 significant figures. Therefore S = 6.61 and
Relative Error, Er = 0.0015
6.61
= 0.0002.
Exercise 1.1. An approximate value of π is given by 3.1428571 and its true value is 3.1415926.
Find the absolute and relative errors.
√ √
Exercise 1.2. Calculate the value of 102 − 101 correct to four significant digits.
Let y = f (x1 , x2 ) be a function of two variables x1 and x2 . To determined the error ∆y in y due
to the errors ∆x1 , ∆x2 in x1 , x2 respectively.
y + ∆y = f (x1 + ∆x1 , x2 + ∆x2 )
Using Taylor’s series for two variables, to expand the R.H.S of above, we get
1 ∂ 2f ∂ 2f ∂ 2f
∂f ∂f 2 2
y + ∆y = f (x1 , x2 ) + ∆x1 + ∆x2 + (∆x1 ) + 2 ∆x1 ∆x2 + 2 (∆x2 ) + · · ·
∂x1 ∂x2 2 ∂x21 ∂x1 x2 ∂x2
Errors ∆x1 , ∆x2 are small so that the terms containing (∆x1 )2 , (∆x2 )2 and higher powers of
∆x1 , ∆x2 are being neglected. Therefore
∂f ∂f
y + ∆y = f (x1 , x2 ) + ∆x1 + ∆x2
∂x1 ∂x2
∂y ∂y
∆y = ∆x1 + ∆x2
∂x1 ∂x2
Because y = f (x1 , x2 ).
In general, the error ∆y in the function y = f (x1 , x2 , ..., xn ) corresponding to the errors ∆xi in
xi (i = 1, 2, . . . . . . , n) is given by
∂y ∂y ∂y
∆y = ∆x1 + ∆x2 + . . . + ∆xn (1.1)
∂x1 ∂x2 ∂xn
Equation (1.1) represents the general formula for Errors. If equation (1.1) divided by y we get
relative error
∆y ∂y ∆x1 ∂y ∆x2 ∂y ∆xn
Er = = + + ··· +
y ∂x1 y ∂x2 y ∂xn y
On taking modulus both of the sides, we get maximum relative error.
Also from equation (1.1), by taking modulus we get maximum absolute error.
∂y ∂y ∂y
∆y ≤ ∆x1 + ∆x2 + . . . + ∆xn
∂x1 ∂x2 ∂xn
Let X = x1 + x2 + . . . . . . + xn
X + ∆X = (x1 + ∆x1 ) + (x2 + ∆x2 ) + . . . . . . + (xn + ∆xn )
= (x1 + x2 + . . . . . . + xn ) + (∆x1 + ∆x2 + . . . . . . + ∆xn )
Therefore, ∆X = ∆x1 + ∆x2 + . . . . . . + ∆xn ; this is an absolute error.
Dividing by X we get, ∆X X
= ∆x
X
1
+ ∆x
X
2
+ . . . . . . + ∆xX
n
; which is a relative error.
The maximum relative error is
∆X
X
≤ ∆x X
1
+ ∆xX
2
+ . . . . . . + ∆x X
n
.
Therefore it shows that when the given numbers are added then the magnitude of absolute
error in the result is the sum of the magnitudes of the absolute errors in that numbers.
Let X = x1 − x2
X + ∆X = (x1 + ∆x1 ) − (x2 + ∆x2 )
= (x1 − x2 ) + (∆x1 − ∆x2 )
Therefore ∆X = ∆x1 − ∆x2 is the Absolute error
and ∆X
X
= ∆x
X
1
− ∆x
X
2
is the Relative error.
1 ∂X x2 x3 · · · · · · xn 1
Now, = =
X ∂x1 x1 x2 · · · · · · xn x1
1 ∂X x1 x3 · · · · · · xn 1
= =
X ∂x2 x1 x2 · · · · · · xn x2
······
1 ∂X x1 x2 · · · · · · xn−1 1
= =
X ∂xn x1 x2 · · · · · · xn−1 xn xn
∆X ∆X
Absolute Error = X
X= X
· (x1 x2 · · · xn )
∂X ∂X ∂X
∆X = ∆x1 + ∆x2 + . . . + ∆xn
∂x1 ∂x2 ∂xn
∆X 1 ∂X 1 ∂X
We have = · ∆x1 + · · ∆x2
X X ∂x1 X ∂x2
∆x1 1 ∆x2 −x1
= x1 · + x1
x2
x2 x2
x22
∆x1 ∆x2
= −
x1 x2
∆X ∆x1 ∆x2
Therefore X
≤ x1
+ x2
which is relative error.
∆X
Absolute Error = |∆X| ≤ X
X
∂X
∆X = ∆X = kxk−1 ∆x
∂x
∆X ∆x
=k
X x
∆X ∆x
∴ ≤k
X x
Also the errors ∆x, ∆y, ∆z may be positive or negative, we take the absolute value of terms on
R.H.S. is,
Solution: Given u = 2V 6 − 5V
∂u
∆u = ∂V ∆V = (12V 5 − 5)∆V
∂u 12V 5 −5
u
× 100 = 6
6V −5V
∆V × 100
12−5
= 2−5 × 0.05 × 100 = − 37 × 5 = −11.66%
(a) If f (x) is continuous in a ≤ x ≤ b, and if f (a) and f (b) are of opposite sign, then f (d) = 0
for at least one number d such that a < d < b.
(b) Intermediate value Theorem: Let f (x) be continuous in a ≤ x ≤ b and let any number
between f (a) and f (b), then there exists a number d in a < x < b such that f (d) = l.
(c) Mean Value Theorem for Derivatives If f (x) is continuous in [a, b] and f 0 (x) exists in
(a, b) then there exists at least one value of x, say d, between a and b such that, f 0 (d) =
f (b)−f (a)
b−a
,a < d < b
(d) Rolle’s Theorem: If f (x) is continuous in a ≤ x ≤ b, f 0 (x) exists in a < x < b and f (a) =
f (b) = 0 then there exists at least one value of x, say d, such that f 0 (d) = 0, a < d < b
(f ) Taylor’s Series for a Function of One Variable: If f (x) is continuous and possesses con-
x2 00 xn
f (x) = f (0) + xf 0 (0) + f (0) + . . . + f n (0) + . . .
2! n!
∂f ∂f
f (x1 + ∆x1 , x2 + ∆x2 ) = f (x1 , x2 ) + ∆x1 + ∆x2
∂x1 ∂x2
1 ∂ 2f ∂ 2f ∂ 2f
2 2
+ (∆x1 ) + 2 ∆x1 ∆x2 + 2 (∆x2 ) + . . .
2 ∂x21 ∂x1 ∂x2 ∂x2
1. Prove that the relative error of a product of three non-zero numbers does not exceed the
sum of the relative errors of the given numbers.
1 1 5 4
(a) ≈ 0.1 (b) ≈ 0.00 (c) ≈ 0.56 (d) ≈ 0.44
11 11 9 9
3. If S = 4x2 y 3 z −4 , find the maximum absolute error and maximum relative errors in S.
When errors in x = 1, y = 2, z = 3 respectively are equal to 0.001, 0.002, 0.003.
[Ans. 0.0035, 0.0089]
4. Find the percentage error if the number 5007932 is approximated to four significant
figures. [Ans. 0.018% ]
y
5. Compute the relative maximum error in the function u = 7 xx2 , when x = y = z = 1 and
errors in x, y, z be 0.001. [Ans. 0.006]