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 a solution to a 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 a numerical tecniques to solve problems. First and te most obvious is to obtain te approximation. Te equally important second objective is to determine a safety factor for te approximation. ence 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 أخطاء الصياغت : Error 1- Formulation It appened 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. Ex:- 1.36579 1.3658 1.86543 1.865 Ex:- أخطاء المطع :- Errors 3- Truncation Tese error 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
أخطاء الصلبيت : Error 4- Inerent وهي االخطاء المىجىدة في البياناث االساسيت للمسألت أو المىجىدة في االجهزة االلكتشونيت المستخذمت في المسائل العلميت كما ارا اسدنا لياس مسافت أو فىلطيت في مسألت معينت وكزلك تطلك على االخطاء المىجىدة في البياناث مثل االعذاد غيش النسبيت مثل : Ex:- األخطاء المتشاكمت - : Error 5- Accumulation وهي األخطاء التي تنتج من اعتماد كل خطىة على الميم التمشيبيت للخطىة السابمت كما بعض الطشق العذديت للمعادالث التفاضليت حيث تتضمن تكشاسا للمجمىعت من العملياث الحسابيت لخطىاث متعالبت. 1.358 الخطأ المطلك :- Value 6- Absolute It is te difference between te real value and its approximated value : Absolute Error or 7- Relative Error :- Rel. Error Tis error offer written in terms of percentages Ex:- or If te true value and its approximation ten find Rel.error Sol:- Absolute Error = Rel. Error Taylor Teorem :- = Suppose tat [ ( ] and ) exist on [ ], let be a number in [a, b] for every in [ ].tere exists a number zeta (x) between and as: Were 2
is called te Taylor polynomial for, and is called te truncation error ( or remainder term ) associated wit. Te infinite series obtained by taking te limit of as is called te Taylor series for F about.in case of, te Taylor polynomial is often called a Maclaurin polynomial, and te Taylor series is called Maclaurin series. Te term truncation error in te Taylor polynomial refers to te error involved in using summation to approximate te sum of an infinite series. Te function cannot possess finite derivatives of all order at approximation to :- (a) (b) (c) Example : Find te Maclaurin series expansion for for all finite, Sol :... ten So as sown above te function and its derivatives at formula:, are given by te Were te notation means te value of te derivatives of at and te derivative of te function means te function itself. Wen is an even integer is zero. k is one of te integers of te form, ten is plus one, wile if is one of te integer of te form, ten is minus one. 3
Wen we substitute tese values into te Taylor series formula, wit we obtain : 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 ) f x) 7e f ( x) 0.5x f For ( and 0. 3, find a) te approximate value of f (2) Solution: a) For 2 b) te true value of f (2) c) te true error for part (a) d) te relative true error at 2 f ( x ) f ( x) f ( x) 0., f (2 ) f (2) f (2) f ( 2.3) f (2) 0.5(2.3) 7e 7e 22.107 19.028 10.265 f (2 x and 3 0.5(2) x. b) Te exact value of ) can be calculated by using our knowledge of differential calculus. 0.5x f ( x) 7e f '( x) 70.5 e 3.5e 0. 5x 0.5x So te true value of f '(2) is f '(2) 3.5e 0.5(2) 9.5140 c) True error is calculated as = = =0.7561 4
d) = = 0.0758895 = 7.58895% 8 Approximate Error:- is denoted by and is defined as te difference between te present approximation and previous approximation. Approximate Error= 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 ' f ( x ) f ( x) f ( x) 0.5x For f ( x) 7e and at x 2, find te following a) f (2) using 0. 3 Solution: b) (2) f using 0. 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) f '( x). 0., f (2 ) f (2) f '(2) f ( 2.3) f (2) 0.5(2.3) 7e 7e 22.107 19.028 10.265 x and 3 0.5(2) 5
b) Repeat te procedure of part (a) wit 0.15, f ( x ) f ( x) f ( x) x and 0. 15, ' f (2 0.15) f (2) f (2) 0.15 f ( 2.15) f (2) 0.15 0.5(2.15) 0.5(2) 7e 7e 0.15 20.50 19.028 0.15 9.8799 For 2 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? A: In a numerical metod tat uses iterative metods, a user can calculate relative approximate error at te end of eac iteration. Te user may prespecify a minimum acceptable tolerance called te pre-specified tolerance. If te absolute relative approximate error is less tan or equal to te prespecified tolerance tat is,, ten te acceptable error as been reaced and no more iterations would be required. Alternatively, one may prespecify 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. Example 5 x 0. 7 If one cooses 6 terms of te Maclourin series for e to calculate e, ow many significant digits can you trust in te solution? Find your answer witout knowing or using te exact answer. 6
Solution 2 x e x 1 x... 2! Using 6 terms, we get te current approximation as 2 3 4 5 0.7 0.7 0.7 0.7 0.7 e 1 0.7 2! 3! 4! 5! 2.0136 Using 5 terms, we get te previous approximation as 2 3 4 0.7 0.7 0.7 0.7 e 1 0.7 2! 3! 4! 2.0122 Te percentage absolute relative approximate error is = Since of e 0.7 2.0136, at least 2 significant digits are correct in te answer Example 6:- Find te Taylor Series expansion for at Sol: Can using form alternative for Taylor series now 7
Example7 Find te value of 6 oter iger derivatives of Solution f given tat f 4 125, f 4 74, f 4 30, 4 6 f x at x 4 are zero. f and all since fourt and iger derivative of are zero at x 4 8