Errors in Numerical Calculations
Errors in Numerical Calculations
Contents:
Page
o
o
o
o
o
o
Prepared By
Er. Shree Krishna Khadka
Prepared By
Er. Shree Krishna Khadka
Page
b) Relative error: Ratio of absolute error to a true value of that quantity being
concerned.
Mathematically;
Relative Error(ER ) =
Absolute Error (E A )
True Value X
Absolute Error (E A )
True Value X
100%
cos x = 1
x2
, ex = 1 + x +
2
x2
2
|True Value X |
Absolute Error (E A )
~ |Approximate
Value X 1 |
Absolute Error (E A )
Page
Relative Accuracy ( R A ) =
Prepared By
Er. Shree Krishna Khadka
NUMERICAL EXAMPLES:
Three approximate values of the number 1/3 are given as 0.30, 0.33 and 0.34,
which of these is the best approximation?
Solution:
E1 = |(1/3)-0.30| = 1/30
E2 = |(1/3)-0.33| = 1/300
E3 = |(1/3)-0.34| = 1/150
Since, E2<E3<E1, 0.33 is the best approximation.
Evaluate the sum S=_/3 + _/5 + _/7 to four significant digits and find its
absolute and relative error.
Solution:
_/3 = 1.73205 = 1.732
_/5 = 2.23606 = 2.236
_/7 = 2.64574 = 2.646
10
Page
Prepared By
Er. Shree Krishna Khadka
MATHEMATICAL PRELIMINARIES
Theorem 1: If f(x) is continuous in a x b, and if f(a) and f(b) are of opposite
signs, then f = 0 for at least one number , such that a < < .
Theorem 2 (Rolles Theorem): If f(x) is continuous in a x b, f (x) exists in
a < < and f(a)=f(b)=0, then there exist at least one value of x say , such that
f = 0.
Generalization: If f(x) be a function, which is n-times differentiable on [a, b]. If
f(x) vanishes at the (n+1) distinct points x0 , x1 , x2 , , xn in (a,b), then there exist
a number in (a,b) such that , f n = 0.
Theorem 3 (Intermediate Value Theorem): If f(x) be continuous in [a, b] and
let K be any number between f(a) and f(b), then there exists a number in (a, b)
such f() = K.
Theorem 4 (Mean Value Theorem for Derivative): If f(x) is continuous in [a,
b] and f(x) exists in (a, b), there exists at least one value of x, say between a
and b such that:
f b f(a)
f =
;
a<<
ba
Theorem 5 (Taylors Series for a function of one variable): If f(x) is
continuous and passes continuous derivates of order in an interval and includes
x=a, then:
x a 2
x a n1 n1
f x = f a + x a f a +
f a + +
f
a + R n (x)
2!
(n 1)!
Where; R n x : Remainder term =
xa n n
f
n!
; a < < .
2 f
2 f
(x1 ) + x 2 (x2 ) + + x
2
(xn ) } +
11
2 f
+ x x1 + x x2 + + x xn +
Page
= f x1 , x2
Prepared By
Er. Shree Krishna Khadka
+
(xn )2 }
2
2 x1
x2 2
xn 2
2 f
2 f
+2
x1 x2 +
x2 x3
x1 x2
x2 x3
2 f
+
xn1 xn +
xn1 xn
f
n
i=1 x
xi = x x1 + x x2 + + x xn (ii)
u
u
f x 1
= x
1 u
f x 2
+ x
2 u
f x n
+ + x
Prepared By
Er. Shree Krishna Khadka
(iii)
12
f
n
i=1 x
Page
u=
CONVERGENCE
Page
13
Prepared By
Er. Shree Krishna Khadka
ASSIGNMENT 1
Full Marks: 20
Pass Marks: 10
Que: 1 (3X2=6 Marks)
1.1)
Round off the following numbers to two decimal places.
2.3742, 81.255, 52.275, 48.21416
1.2)
Round off the following numbers to four significant digits.
0.70029, 0.00022218, 2.36425, 38. 46235
1.3)
Page
14
If u=5xy2/z3,
x = y = z = 1 &
x = y = z = 1;
Prepared By
Er. Shree Krishna Khadka