Numerical Teaching-557-2141-1573542168
Numerical Teaching-557-2141-1573542168
Numerical Teaching-557-2141-1573542168
م
Numerical Analysis
CHAPTER ONE
Approximations and Errors
The difference between exact solution and numerical solution is that
numerical solution gives the answer with some "error", because numerical solution
involved an approximation.
For many engineering problems, we cannot obtain analytical solution;
therefore, we cannot compute the errors associated with numerical solution.
In professional practice, errors can be costly and sometimes catastrophic. If
a structure or device fails, lives can be lost.
accurate accurate
precise
(the average is accurate) and
not accurate
not precise precise
Example1.1- Calculate the absolute and relative error in the following cases:
a)True value = 1 x 10-6, Approximate value = 0.5 x 10-6
b)True value = 1 x 106, Approximate value = 0.99 x 106
Solution:
Solution:
(x) is correct to 4 significant digits, this means there will be error in the
(fifth) digit. The maximum value of this error will be: Et = 0.00005 (5 is
the max. value of the 5th digit)
𝐴𝑏𝑠𝑜𝑙𝑢𝑡𝑒 𝑒𝑟𝑟𝑜𝑟 0.00005
Relative error (Єr) = = = 0.000125
𝑇𝑟𝑢𝑒 𝑣𝑎𝑙𝑢𝑒 0.4000
Example1.3-
Find the approximate maximum error in (5.43 x 27.2).
Solution:
Here we have to calculate error in product.
Let A= 5.43 and B= 27.2
The error in A is Ea = 0.005, and error in B is Eb = 0.05
∴ Product absolute error (Eap) = A * Eb + B * Ea
= 5.43 * 0.05 + 27.2 * 0.005 = 0.4075
Example1.4- Determine the value of (e0.5) correct to three significant digits
𝑥2 3
using the expansion ex = 1 + x + 2! + 𝑥3! + ……, if true value = 1.648720.
Solution:
No. of Total value Absolute error Relative error (Єr)
terms
1 ex = e0.5 = 1 1.64872 – 1 = 𝟎.𝟔𝟒𝟖𝟕𝟐
= 0.393
𝟏.𝟔𝟒𝟖𝟕𝟐
0.64872
2 ex= 1+x =1+0.5 =1.5 1.64872-1.5 = 𝟎.𝟏𝟒𝟖𝟕𝟐
= 0.090
𝟏.𝟔𝟒𝟖𝟕𝟐
0.14872
3 ex=1+x+x2/2! 1.64872-1.625= 𝟎.𝟎𝟐𝟑𝟕𝟐
= 0.01438
𝟏.𝟔𝟒𝟖𝟕𝟐
=1+0.5+(0.5)2/2! 0.02372
= 1.625
4 e =1+x+x2/2! +x3/3!
x
1.64872-1.645833= 𝟎.𝟎𝟎𝟐𝟖𝟖𝟕
==0.001751
2 𝟏.𝟔𝟒𝟖𝟕𝟐
=1+0.5+(0.5) /2! + 0.002887
(0.5)3/3!
= 1.64583
x 𝟎.𝟎𝟎𝟎𝟐𝟖𝟐𝟓
5 e = 1.6484375 1.64872-1.6484375= = 0.0001486
0.0002825 𝟏.𝟔𝟒𝟖𝟕𝟐
∴ 𝑓𝑖𝑣𝑒 𝑡𝑒𝑟𝑚𝑠 𝑎𝑟𝑒 𝑛𝑒𝑒𝑑𝑒𝑑 𝑓𝑜𝑟 𝑑𝑒𝑡𝑒𝑟𝑚𝑖𝑛𝑒 𝑡𝑒 𝑣𝑎𝑙𝑢𝑒 𝑜𝑓 𝐞𝟎.𝟓 𝑐𝑜𝑟𝑟𝑒𝑐𝑡 𝑓𝑜𝑟
𝑡𝑟𝑒𝑒 𝑠𝑖𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑡 𝑑𝑖𝑔𝑖𝑡𝑠
25.4
Example1.5: The quotient gives the result 2.05335489. Find the maximum
12.37
error.