Numerical methods - lecture 3 Jiří Zelinka Autumn 2017 Jiří Zelinka 1/15 Repetition Equation f{x) = 0 .—> x = g(x) Fixed point method: Iteration process: xk+1 = g(xk) Geometric meaning The fixed point x is the intersection of the function g and line y = x. 2/15 The existence and uniqueness of the fixed point Theorem: If for the function g continuous on / = [a, b] the following condition holds Vx G / : g (x) e /, then there exists at least one fixed point x e / of the function g. Moreover, if there exits constant L < 1 that for all x e / VxG / : |g'(x)| < L, then there exit one fixed point x and for any xq G / the iteration process given by formula Xfr+i = g(xk) converges to this fixed point. Function g is called contraction. Jiří Zelinka Numerical methods - lecture 3 3/15 The error of the iteration 1 - L x0 - x! Classification of the fixed points The fixed point x of the function g is called • attractive if |g'(x)| < 1, then the iterative process converges on some neighborhood of x. • repelling if |gr'(x)| > 1, then the iterative process doesn't converge. Creating of the iteration function g(x) = x - g(x) = x - f_(x) K f_{x) h(x) Jiří Zelinka Numerical methods - lecture 3 4/15 Newton(-Raphson) method Let us return to the equation f(x) = 0. Xo - initial iteration, X\ - intersection of the tangent to f in Xq the axis x. xk+1 = xk f'(xk) Iteration function: Xk+i - intersection of the tangent to f in x^ the axis x —> tangent method Jiří Zelinka □ [31 Numerical methods - lecture 3 5/15 Convergence Theorem 1 Newtom methods converges to the root x if the function f has continuous derivative in some neighborhood of x, f'{x) ^ 0 and the initial iteration xq is close enogh to x. Theorem 2 If f has continuous the second derivative in some neighborhood of x and f'{x) ^ 0 then g\x) = 0 for the iteration function of Newton method. 6/15 Example 1: Computation of y(a) f (x) =x2-a, f'{x) = 2x. xk+1 = xk X/. d X/. ~\- 3 2xl 2xl Example : Computation of - without division: xk+1 = xk{2 - axk) □ [31 Jiří Zelinka Numerical methods - lecture 3 7/15 Fourier conditions Theorem 3 O Let f has continuous the second derivative in [a, 6], f (a) • f(b) < 0. O Let Vx e [a, b] : f'{x) ^ 0 and f" doesn't change its sign in [a, b] Let's choose x0 G {a, 6} such that f (x0) • f" > 0. Then the sequence generated by Newton method converges monotonously to x. 8/15 Fourier conditions for convex function f m > o 23456789 10 11 Jiří Zelinka □ [31 Numerical methods - lecture 3 Fourier conditions for concave function f{x0) < 0 0123456789 Jiří Zelinka □ [31 Numerical methods - lecture 3 Methods derived from Newton method Secant methods f(xk) - f (xfc_i) xk - Xk_i i — 1,2,... Xk+l = Xk f(xk) - f(xk-i) i = 1, 2,... Jiří Zelinka □ [31 Numerical methods - lecture 3 11/15 Methods derived from Newton method False position methods (regula falsi) Similar to secant method with sign control: f(a)f(b) < 0, f e C[a, b], x0 = a, xx = b, f(x0)f(x1) < 0 Xk+l = *k xk -xs f m - f m f(xk), k = 0,1,... wher s is the largest index for which f(xk)f(xs) < 0. Remark: If f is convex or concave in [a, b] then s = 0 or s = 1 for all iterations. □ UP Jiří Zelinka Numerical methods - lecture 3 12/15 Regula falsi for convex function Jiří Zelinka 13/15 Order of the convefgence Let p > 1, Xk —> x, ek = xk — x. If lim e/c e/c+i p = C < oo then p is called the order (rate) of the convergence of the sequence (xk)^=0. If the sequence (x^)^ is generated by the numerical methods, then p is the order (rate) of the method 5 -f) <\ (y 14/15 Theorem Let the derivatives of the iteration function g be continuouns to order q > p. Then the order of the convergence of the sequence (x/c)/£=o generated by the iteration process xk+i — §{xk) is equal to p iff g(x) = x, g'(x) = 0, g"{x) = 0.....g^(x) = 0, g{p)(x) / 0, Orders of methods: Fixed point 1 Newton 2 Secant ^fi = 1.618 Regula falsi 1 15/15