ODE and num. math.: Roots of functions (N) [lectures] c pHabala 2016 DEN: Roots of functions numerically Definition. By a root of a function f we mean any number r such that f (r) = 0. Fact. Let f be a function and r ∈ IR its root. Assume that there is a neighborhood U of r and m1 > 0 such that f is differentiable on U and m1 ≤ |f 0 | on U . Then for r̂ ∈ U we have the estimate |r − r̂| ≤ m11 |f (r̂)|. Definition. Consider a certain iterating method for finding a root of a function. We say that it is a method of order q, or that it has error of order q, where q > 0, if it satisfies one of the following conditions: • For every sequence {xk } generated by this method that converges to a root r, there is some K > 0 such that the inequality |r − xk+1 | ≤ K|r − xk |q is true for k sufficiently large. • For every sequence {xk } generated by this method that converges to a root r there is a an upper estimate ek for |r − xk | and K > 0 such that the inequality ek+1 ≤ K eqk is true for k sufficiently large. The latter is sometimes called the R-order of convergence. Fact. Let f be a function on an interval [a, b]. If f (a) · f (b) < 0 (i.e. f (a) and f (b) have opposite signs) and f is continuous on [a, b], then f must have a root in the interval [a, b]. Algorithm (bisection method for finding root of f ) Given: a function f continuous on interval [a, b] and a tolerance ε. Assumption: f (a) and f (b) have opposite signs. 0. Set x0 = a, y0 = b. Let k = 0. 1. Assumption: f (xk ) and f (yk ) have opposite signs. Let mk = 21 (xk + yk ). 2. If f (mk ) = 0 or |yk − xk | < ε then algorithm stops, output is mk . Otherwise: If f (xk ) and f (mk ) have opposite signs, set xk+1 = xk , yk+1 = mk , increase k by one and go back to step 1. If f (mk ) and f (yk ) have opposite signs, set xk+1 = mk , yk+1 = yk , increase k by one and go back to step 1. Theorem. Assume that a function f continuous on [a, b] satisfies f (a)·f (b) < 0. Then the sequence {mk } generated by the bisection method with starting values x0 = a, y0 = b converges to a root of f . The bisection method is of linear order. 1 ODE and num. math.: Roots of functions (N) [lectures] Algorithm c pHabala 2016 (regula falsi method for finding root of a function f ) Given: a function f continuous on interval [a, b] and a tolerance ε. Assumption: f (a) and f (b) have opposite signs. 0. Set x0 = a, y0 = b. Let k = 0. 1. Assumption: f (xk ) and f (yk ) have opposite signs. (yk )−yk f (xk ) Let rk = xk ff (y . k )−f (xk ) 2. If |rk − rk−1 | < ε or |f (rk )| < ε then algorithm stops, output is rk . Otherwise: If f (xk ) and f (rk ) have opposite signs, set xk+1 = xk , yk+1 = rk , increase k by one and go back to step 1. If f (rk ) and f (yk ) have opposite signs, set xk+1 = rk , yk+1 = yk , increase k by one and go back to step 1. Algorithm (secant method for finding root of a function f ) Given: a function f continuous on IR and a tolerance ε. 0. Choose x0 , x1 . Let k = 1. k )−xk f (xk−1 ) 1. Let xk+1 = xk−1f f(x(xk )−f . (xk−1 ) If |xk=1 − xk | < ε or |f (xk+1 )| < ε then algorithm stops, output is xk+1 . Otherwise: Otherwise increase k by one and go back to step 1. Theorem. Let f be a function continuous on an interval [a, b]. Assume that it is concave-up or concave-down on [a, b] and f (a)f (b) < 0. Then for arbitrary values x0 , x1 chosen so that f (x0 ) > 0, f (x1 ) > 0 for the concave-up case, or f (x0 ) < 0, f (x1 ) < 0 for the concave-down case, the sequence {xk } generated by the secant method converges to a root r ∈ (a, b) of f . 2 ODE and num. math.: Roots of functions (N) [lectures] c pHabala 2016 Theorem. Let f be a function twice continuously differentiable on some neighborhood U of its root r. Let {xk } be a sequence generated by the secant method such that xk → r. If the root r is simple, then there is a √ 1+ 5 α constant K and N ∈ IN such that |r − xk+1 | ≤ K|r − xk | for k ≥ N , where α = 2 . Algorithm (Newton method for finding root of a function f ) Given: a function f continuous on IR and a tolerance ε. 0. Choose x0 . Let k = 0. k) 1. Let xk+1 = xk − ff0(x (xk ) . If |xk+1 − xk | < ε or |f (xk+1 )| < ε the the algorithm stops, output is xk+1 . Otherwise increase k by one and go back to step 1. Theorem. Let f be a function on an interval [a, b] such that f (a) · f (b) < 0. Assume that f is twice continuously differentiable on (a, b) and f 0 6= 0, f 00 6= 0 on (a, b). If x0 ∈ (a, b) is chosen so that f (x0 ) · f 00 (x0 ) > 0, then the sequence {xn } generated by the Newton methodou converges to a root r ∈ [a, b] of f . Theorem. Let r be a root of a function f that is twice continuously differentiable on some neighborhood U of r and for which there are m1 , M2 > 0 such that |f 0 | ≥ m1 and |f 00 | ≤ M2 on U . Consider a sequence {xk } 2 2 generated by the Newton method. Then for all xk , xk+1 ∈ U we have estimates |r − xk+1 | ≤ M m1 |r − xk | M2 and |r − xk+1 | ≤ 2m |xk+1 − xk |2 . 1 3 ODE and num. math.: Roots of functions (N) [lectures] c pHabala 2016 Definition. Let ϕ be a function. By a fixed point of ϕ we mean any number xf satisfying ϕ(xf ) = xf . Theorem. Let ϕ be a function, x0 ∈ IR and xk+1 = ϕ(xk ) for k ∈ IN . If xk → xf and ϕ is continuous at xf , then ϕ(xf ) = xf . Definition. Let ϕ be a function on an interval I. We say that it is contractive there, or that it is a contraction, if there exists q < 1 such that for all x, y ∈ I we have |ϕ(x) − ϕ(y)| ≤ q · |x − y|. Theorem. (Banach’s fixed-point theorem) Let ϕ be a contractive function on I = [a, b] with coefficient q such that ϕ[I] ⊆ I. Then there exists exactly one solution xf of the equation ϕ(x) = x in I. Moreover, for all choices of x0 ∈ I the sequence given by xk+1 = ϕ(xk ) converges to xf and satisfies |xf − xk+1 | ≤ q|xf − xk | |xf − xk+1 | ≤ and q |xk+1 − xk |. 1−q Theorem. Assume that function ϕ defined on an interval I has a continuous derivative on the interior I O of I. If there is q < 1 such that |ϕ0 (t)| ≤ q on I O , then ϕ is a contraction on I with coefficient q. 4
© Copyright 2025 Paperzz