Introduction :- Tis course examines problems tat can be solved by metods of approximation, tecniques we call numerical metods. We begin by considering some of te matematical and computational topics tat arise wen approximation solution to te problem. All te problems wose solutions can be approximated involve continuous functions, so calculus is te principal tool to use for deriving numerical metods and verifying tat tey solve te problems. Tere are two tings to consider wen applying numerical tecniques to solve problems. First and te most obvious are to obtain te approximation. Te equally important second objective is to determine a safety factor for te approximation. Hence: Numerical Analysis: - involves te study, development, and analysis of algoritms for obtaining numerical solutions to various matematical problems. Frequently, numerical analysis is called te matematics of scientific computing. Sources of Errors أخطاء الصياغة : Errors 1- Formulation Happen during question form. أخطاء القطع والتدوير - : Errors 2- Rounding off Error and Copping Tese errors are made wen decimal fraction is rounded or copped after te final digit. 1.36579 1.3658 1.86543 1.865 أخطاء القطع :- Errors 3- Truncation Tese errors are made from replacing an infinite process by finite one. (Maclourin series) Now, if we want to find for small ten we will consider te terms wic gives us a good approximation, ence te truncation error is te infinite series. 1
االخطاء الموروثة : Errors 4- Inerent An inerent error is an error found in a program tat causes it to fail regardless of wat te user does and is commonly unavoidable. Tis error requires te programmer or software developer to modify te code to correct te issue. We can found inerent errors in many matematical forms like: األخطاء المتراكمة - : Errors 5- Accumulation Accumulation Errors tose errors wic result from te adoption of eac step of te approximate values of te previous step as in some numerical metods of differential equations wic include duplicate set of calculations for te successive steps. For example: 1.358 الخطأ المطلق :- Error 6- Absolute It is te difference between te real value and its approximated value: Absolute Error or الخطأ النسبي :- Error 7- Relative Rel. Error or Tis error often written in terms of percentages If te real value and its approximation ten find Rel.error Sol:- Absolute Error = Rel. Error = Example 1 Te derivative of a function f (x) at a particular value of x can be approximately calculated by of (2) f ( x) f ( x ) 0.5 f x) x f For ( and 0. 3, find 2
Solution: a) For 2 a) Te approximate value of f (2) b) Te true value of f (2) c) Te Absolut error for part (a) d) Te relative error at x 2. f ( x ) f ( x) 0., f (2 ) f (2) f (2) f ( 2.3) f (2) 0.5(2.3) 22.107 19.028 10.265 f (2 x and 3 b) Te exact value of ) can be calculated by using our knowledge of differential calculus. f '( x) 70.5 e 3.5 e 0. 5x So te true value of f '(2) is f '(2) 3.5e 9.5140 c) True error is calculated as = = =0.7561 d) = = 0.0758895 = 7.58895% 3
8 Approximate Error:- Te approximate error is denoted by and is defined as te difference between te present approximation and previous approximation. Approximate Error= 9. Relative approximate error:- Te relative approximate error is denoted by and is defined as te ratio between te approximate error and te present approximation. Relative approximate error Example 3 Te derivative of a function f (x) at a particular value of x can be approximately calculated by For ' f ( x ) and at x 2 a) f (2) using 0. 3 b) (2) 0. Solution:, find te following f using 15 c) Approximate error for te value of (2) d) Te relative approximate error f for part (b) a) Te approximate expression for te derivative of a function is For 2 f ( x ) f '( x). 0., f (2 ) f (2) f '(2) f ( 2.3) f (2) 0.5(2.3) 22.107 19.028 10.265 x and 3 b) Repeat te procedure of part (a) wit, f ( x ) f ( x) x and 0. 15, ' f (2 ) f (2) f (2) f ( 2.15) f (2) For 2 4
0.5(2.15) 20.50 19.028 9.8799 c) So te approximate error, Ea is E a = = =8474 d) Relative approximate error = 0.038942*100% = 3.8942% Q/ Wile solving a matematical model using numerical metods, ow can we use relative approximate errors to minimize te error? Answer: In a numerical metod tat uses iterative metods, a user can calculate relative approximate error at te end of eac iteration. Te user may pre-specify a minimum acceptable tolerance called te pre-specified tolerance. If te absolute relative approximate error is less tan or equal to te pre-specified tolerance tat is,, ten te acceptable error as been reaced and no more iterations would be required. Alternatively, one may pre-specify ow many significant digits tey would like to be correct in teir answer. In tat case, if one wants at least m significant digits to be correct in te answer, ten you would need to ave te absolute relative approximate error. 5