4. HAFTA BLM33 SAYISAL ANALİZ Okt. Yasin ORTAKCI yasinortakci@karabuk.edu.tr Karabük Üniversitesi Uzaktan Eğitim Uygulama ve Araştırma Merkezi
BLM33 NONLINEAR EQUATION SYSTEM Two or more degree polinomial or the polinomials that consist of trigonometric, logarithmic and exponential terms are called nonlinear equation systems. Nonlinear equations are shown with f(x) = 0 form if they are single variable functions. If the function is multi variable function, that function is shown with f(x 1, x,x 3,.. ) = 0 form. Solving nonlinear equations system is a process of finding roots of function f(x). These roots are the junction points for curve of f(x) funciton and x axis. Before finding root process, the root range must be defined. a b and f(x) C[a, b] and if f(a) f(b) < 0, there is at least one x k that supplies f(x k ) = 0. The most primative and easiest way of finding approximate roots of a function is graphic method. Graphic Method In graphic method, Some f(x k ) values are calculate bu using x k and a graphic is drew by using (x k,f(x k )) points. The root of function is estimated by using graphic. Ex: Examine f(x) = xe x in [0,1] interval with 0.5 steps.
BLM33 3 X F(x) 0,0-0,5-1,6788993 0,5-1,175639 0,75-0,4150 1,0 0,71881 f(0,75) f(1,0) < 0, so root in [0.75,1.0] interval. f(0,85) = 0,011300 so root in [0.85,1.0] interval. To solve single variable function, f(x) = 0, different types of methods are used: These methods are iterative methods that starts to iterate by taking approximate starting points value. The most common methods are; 1. Bisection Method. Lineer Interpolasyon (Regula-Falsi) Method 3. Newton-Raphson Method 4. Secant Method
BLM33 4 1. BISECTION METHOD Suppose f is a continuous function defined on the interval [a, b], with f (a) and f (b) of opposite sign ( f(a) f(b) < 0 ). If so there is at least one root in [a, b] interval. Although the procedure will work when there is more than one root in the interval (a,b), we assume for simplicity that the root in this interval is unique. The method calls for a repeated halving (or bisecting) of subintervals of [a, b] at each step. f(a) f(b) < 0 and hence there is one root in [a, b] interval. 1. iteration: x 1 = a+b ;. iteration: IF f(a) f(x 1 ) < 0 ELSE x = a+x 1 ; x = b+x 1 ;
BLM33 5 3. iteration: IF f(a) f(x ) < 0 ise ELSE x 3 = a+x ; x 3 = x 1 +x ; Iterations continue until to make calculated error smaller than referrenced error. EX: f(x) = x 4 9x 3 x + 10x 130 equation has a root in (1,). Find this root with approximation error ε y 0,013 Solution: a = 1.0 and b =.0 a = 1.0 and f(1.0) = 0,b =.0 and f(.0) = 46 1.Step : f(a) f(b) = ( 0) 46 < 0 So there is at least one root x 1 = = 1 + = 1.5 and f(1.5) = 0. b = x 1 = 1.5. Step: f(a) f(b) < 0 so
BLM33 6 x = = 1 + 1.5 = 1.5 and f(1.5) = 1.8 b = x = 1.5 3.Step : f(a) f(b) < 0 so x 3 = = 1 + 1.5 = 1.15 and f(x 3 ) = 8.7 a = x 3 = 1.15 4.Step : f(a) f(b) < 0 so x 4 = = 1.15 + 1.5 = 1.1875 and f(x 4 ) = 3.408 a = x 4 = 1.1875 5.Step : f(a) f(b) < 0 so x 5 = = 1.1875 + 1.5 = 1.1875 and f(x k ) = 0.80688
BLM33 7 a = x k = 1.1875 6.Step : f(a) f(b) < 0 so x 6 = = 1.1875 + 1.5 = 1.34375 and f(x 6 ) = 0,4709 b = x 6 = 1.34375 1.34375 1.1875 ε y = 0,0165 1.34375 ALGORTIHM 1. IF f(a) f(b) < 0. REPEAT 3. x k = a+b ; 4. IF f(a) f(x k ) < 0 5. b = x k 6. ELSE 7. a = x k 8. Hatayı Hesapla (ε) 9. UNTIL (ε Hata Toleransı) 10. ELSE 11. There is no root in (a,b) interval.
BLM33 8 Theorem: Suppose that f C[a, b] and f(a) f(b) < 0.The Bisection method generates a sequence {x n } n=1 approximating x r. Error can be formulated as; Maximum error can be formulated as; ε ε max = b a n b a n
BLM33 9.LINEER INTERPOLASYON (REGULA-FALSİ) YÖNTEMİ Linear Interpolation method is used to increase convergence speed.it is faster than Bisection method even if they both used nearly same algorithm. Root is tried to calculate by using similarity of triangle. f C[a, b], by using smilarity of triangle rules: b x 1 b a = f(b) f(b) f(a) x 1 = b b a f(b) f(a) f(b)
BLM33 10 x 1 = b f(b) b f(a) b f(b) + a f(b) f(b) f(a) x 1 = a f(b) b f(a) f(b) f(a) Iterations continue until to make calculated error smaller than referrenced error like Bisection method. Kaynakça Richard L. Burden, Richard L. Burden (009). Numerical Analysis Brooks/Cole Cengage Learning, Boston. Doç. Dr. İbrahim UZUN, (004), "Numarik Analiz Beta Yayıncılık.