انت هنا الان : شبكة جامعة بابل > موقع الكلية > نظام التعليم الالكتروني > مشاهدة المحاضرة
الكلية كلية تكنولوجيا المعلومات
القسم قسم البرامجيات
المرحلة 2
أستاذ المادة حيدر كاظم زغير الجبوري
28/10/2014 11:26:34
Introduction :- This course examines problems that can be solved by methods of approximation , techniques we call numerical methods . We begin by considering some of the mathematical and computational topics that arise when approximation a solution to a problem . All the problems whose solutions can be approximated involve continuous functions , so calculus is the principal tool to use for deriving numerical methods and verifying that they solve the problems . There are two things to consider when applying a numerical techniques to solve problems . First and the most obvious is to obtain the approximation . The equally important second objective is to determine a safety factor for the approximation . hence Numerical Analysis : - involves the study , development , and analysis of algorithms for obtaining numerical solutions to various mathematical problems . Frequently , numerical analysis is called the mathematics of scientific computing . Sources of Errors Formulation Error : أخطاء الصياغة It happened during question form . Rounding off Error and Chopping Errors : - أخطاء القطع والتدوير These errors are made when decimal fraction is rounded or chopped after the final digit . Ex:- 1.36579 ?(??(rounding ) ) 1.3658 1.86543 ?(??(chopping ) ) 1.865 Truncation Errors :- أخطاء القطع These error are made from replacing an infinite process by finite one . Ex:- sin??x=x- x^3/3!?+ x^5/5!- x^7/7!+ …………….. (Maclourin series ) Now , if we want to find sin??x ? for small x then we will consider the terms x- x^3/3!+ x^5/5! Which gives us a good approximation , hence the truncation error is the infinite series - x^7/7!+ x^9/9! .
Inherent Error : أخطاء الصلبية وهي الاخطاء الموجودة في البيانات الاساسية للمسألة أو الموجودة في الاجهزة الالكترونية المستخدمة في المسائل العلمية كما اذا اردنا قياس مسافة أو فولطية في مسألة معينة وكذلك تطلق على الاخطاء الموجودة في البيانات مثل الاعداد غير النسبية مثل : Ex:- e^1 ,? ,?2 Accumulation Error : - الأخطاء المتراكمة وهي الأخطاء التي تنتج من اعتماد كل خطوة على القيم التقريبية للخطوة السابقة كما بعض الطرق العددية للمعادلات التفاضلية حيث تتضمن تكرارا للمجموعة من العمليات الحسابية لخطوات متعاقبة . sin??x=1.35843? 1.358
Absolute Value :- الخطأ المطلق It is the difference between the real value and its approximated value : Absolute Error = |True value-approximated value| or e_x=x-x^* Relative Error :- Rel. Error =(Absolute value)/|True value| or ?_x= e_x/x This error offer written in terms of percentages Ex:- If the true value =0.561 and its approximation 0.56 then find Rel.error Sol:- Absolute Error = |True value-approximated value|= =|0.561-0.56|=0.001 Rel. Error =(Absolute value )/|True value| = 0.001/(|0.561| )=0.0017 % Taylor Theorem :- Suppose that f?c^n [a,b] and f^((n+1 ) ) exist on [a,b] , let x_0 be a number in [a, b] for every x in [a,b] .there exists a number zeta (x) between x_0 and x as: F(x)= p_n (x)+ R_n (x) Where p_n (x)=f(x_0 )+ ?f(x_0 )?^ (x-x_0 )+?f(x_0 )?^ /2! (x-x_0 )^2+?+ (f^n (x_0 ))/n! ?(x-x_0)?^n p_n (x)=?_(k=0)^n??(f^k (x_0 ))/k! ?(x-x_0)?^k ? p_n (x) is called the (n^th) Taylor polynomial for x_0 , and R_n (x) is called the truncation error ( or remainder term ) associated with P_n (x) . The infinite series obtained by taking the limit of P_n (x) as n?? is called the Taylor series for F about x_0 .In case of x_0=0 , the Taylor polynomial is often called a Maclaurin polynomial , and the Taylor series is called Maclaurin series . The term truncation error in the Taylor polynomial refers to the error involved in using summation to approximate the sum of an infinite series . The function cannot possess finite derivatives of all order at x=a approximation to y=e^x :- y=1+x y=1+x+x^2/2! y=1+x+x^2/2!+x^3/3! Example : Find the Maclaurin series expansion for sin??(x)? for all finite x , (-?Sol : ?x_0=0 then f(x)=sin??(x) f(o)=0 ? f^ (x)=cos??(x)=sin?(x+?/2) f^ (o)=1 ? f^ (x)=-sin??(x)=sin(x+?) f^ (o)=0 ? f^ (x)=?-cos ???(x) =sin?(x+3?/2) f^ (o)=1 ? . . . f^k (x)=sin??(x+k?/2) f^ (o)=sin?(k?/2) ? So as shown above the function and its derivatives at x=0 are given by the formula: f^k (x)=sin?(k?/2) , k=0,1,2,3 ,… Where the notation f^k (0) means the value of the k^th derivatives of f(x) at x=0 and the ?zero?^(th ) derivative of the function means the function itself . When k is an even integer 0 ,2 ,4 ,…,sin?(k?/2) is zero . When k is one of the integers 1,5 ,9 ,13 ,… of the form 4m+1 , then ?sin(???k?/2?) is plus one , while if k is one of the integer 3,7 ,… of the form 4m+3 , then sin??(k?/2)? is minus one. When we substitute these values into the Taylor series formula , with x_0=0 we obtain : sin??(x)=x-x^3/3!+x^5/5!-? x^7/7!+?+ ((-1)^(n-1) x^((2n-1) ))/(2n-1)!+0.x^2n
= ?_(k=1)^n?((-1)^(k-1) x^((2k-1) ))/(2k-1)!+0.x^2n Example 1 The derivative of a function at a particular value of can be approximately calculated by of For and , find a) the approximate value of b) the true value of c) the true error for part (a) d) the relative true error at . Solution: a) For and , b) The exact value of can be calculated by using our knowledge of differential calculus. So the true value of is c) True error is calculated as e_x= |True value – Approximate value| =|9.5140-10.265| =|-0.7561| =0.7561 d) ?_x=(Absoluete Value )/|true Value | = 0.7561/|9.5140| = 0.0758895 =
8 – Approximate Error:- is denoted by E_a and is defined as the difference between the present approximation and previous approximation. Approximate Error= |Present Approximation – Previous Approximation| Relative approximate error:- is denoted by ?_a and is defined as the ratio between the approximate error and the present approximation. Relative approximate error =(approximate error)/|Present Approximation| Example 3 The derivative of a function at a particular value of can be approximately calculated by For and at , find the following a) using b) using c) approximate error for the value of for part (b) d) the relative approximate error Solution: a) The approximate expression for the derivative of a function is . For and , b) Repeat the procedure of part (a) with For and , c) So the approximate error , is |Present Approximation – Previous Approximation| = |9.8799-10.265| = |-0.38474| =0.38474 d) Relative approximate error =(approximate error)/|Present Approximation| =0.38474/|9.8799| = 0.038942*100% = 3.8942% Q/ While solving a mathematical model using numerical methods, how can we use relative approximate errors to minimize the error? A: In a numerical method that uses iterative methods, a user can calculate relative approximate error ?_a at the end of each iteration. The user may pre-specify a minimum acceptable tolerance called the pre-specified tolerance ?_s . If the absolute relative approximate error ?_a is less than or equal to the pre-specified tolerance ?_s , that is, ?_a??_s , then the acceptable error has been reached and no more iterations would be required . Alternatively, one may pre-specify how many significant digits they would like to be correct in their answer. In that case, if one wants at least significant digits to be correct in the answer, then you would need to have the absolute relative approximate error. ?_a ?0.5*?10?^(2-m) %
Example 5 If one chooses 6 terms of the Maclourin series for to calculate , how many significant digits can you trust in the solution? Find your answer without knowing or using the exact answer. Solution Using 6 terms, we get the current approximation as Using 5 terms, we get the previous approximation as The percentage absolute relative approximate error is ?_a =|2.0136-2.0122|/|2.0136| *100 =0.069527 % Since ?_a ?0.5*?10?^(2-2)% , at least 2 significant digits are correct in the answer of Example 6:- Find the Taylor Series expansion for sin?(2) at x_0= ?/2 Sol: f(x)=sinx f(?/2)=sin?(?/2)=1 f^ (x)=cos??(x)=sin?(x+?/2) ? f^ (?/2)=0 f^ (x)= -sin?(x)=sin?(x+?) f^ (?/2)=-1 f^ (x)= -cos?(x)=sin?(x+3?/2) f^ (?/2)=0 sin?(x)=1+0(x-?/2)-(1(x-?/2)^2)/2!+?0(x-?/2)?^3/3!+?1(x-?/2)?^4/3!+? ??sin??(2)=1+0(0.42920)+(1(0.42920)^2)/2!+?0(0.42920)?^3/3!+?1(0.42920)?^4/4!+? ? 0.90931 Can using form alternative for Taylor series now f(x_0+h)=f(x_0 )+f^ (x_0 )h+f^ (x_0 ) h^2/2!+f^ (x_0 ) h^3/3!+f^ (x_0 ) h^4/4!+?
Example7 Find the value of given that , , , and all other higher derivatives of at are zero. Solution f(x_0+h)=f(x_0 )+f^ (x_0 )h+f^ (x_0 ) h^2/2!+f^ (x_0 ) h^3/3!+f^ (x_0 ) h^4/4!+? ?x_0=4 h=6-4=2 since fourth and higher derivative of f(x) are zero at f(4+2)=f(4)+f^ (4)2+f^ (4) 2^2/2!+f^ (4) ?2/3!?^3 f(6)=125+74(2)+30(2^2/2!)+6?2/3!?^3 =125+148+60+8 =341
المادة المعروضة اعلاه هي مدخل الى المحاضرة المرفوعة بواسطة استاذ(ة) المادة . وقد تبدو لك غير متكاملة . حيث يضع استاذ المادة في بعض الاحيان فقط الجزء الاول من المحاضرة من اجل الاطلاع على ما ستقوم بتحميله لاحقا . في نظام التعليم الالكتروني نوفر هذه الخدمة لكي نبقيك على اطلاع حول محتوى الملف الذي ستقوم بتحميله .
|