MTH351 20130403 week 1 Wednesday April 3, 2013 page 1 Do page 10 problem 10 like regular Taylor series and also by substituting t=x2. f '(x) = 2xex 2 2 2 f ''(x) = 2 (ex +2x 2 ex ) ∞ f (n) (a)(x-a)n f(x)= ∑ n! n=0 f(0)=1 f’(0)=0 f’’(0)=2 f’’’(0)=0 fiv(0)=12? CH3 root finding There are no formulas for finding roots so we have to use numerical analysis. We need to find roots for other classes, like differential equations. Most methods of finding roots use iterations. Start near the root. Start with an interval from a to b with a being less than the root and b being more than the root. Step 1: To make sure that a continuous function having a root can be narrowed down to an interval containing the root, we use the Intermediate Value Theorem. IVT: Suppose f(x) is a continuous function on a closed interval [a,b]. If k is any point between f(a) and f(b) there exists a point c in (a,b) s.t. f(c)=k. Corollary: Suppose f(x) is a continuous function on [a,b] s.t. f(a)*f(b)≤0. Then ∃c∈(a,b) s.t. f(c)=0. Bisection method-guaranteed to converge but very slow. Keep picking midpoint and decide which half to keep. Suppose f(x) has a root in [a,b] s.t. f(a)*f(b)<0. Then ∃c∈(a,b) s.t. f(c)=0. the bisection method: We repeatedly halve the interval [a,b], keeping the half on which f(x) changes sign. This method guarantees the convergence to a root, say Pn. ex) f(x)=x3+4x2-10 try [1,2] n 1 2 3 13 When do we stop? an 1 1 1.25 1.364990235 bn 2 1.5 1.5 1.36523475 Pn 1.5 1.25 1.375 1.365112305 f(Pn) 2.37 -1.796875 .16210938 -.00194 Stopping procedure: The following can be applied to any iterative technique considered in this chapter. Select a tolerance ε>0 and generate P…Pn until one of the following conditions is met: i |PN -PN-1 |<ε ii | PN -PN-1 | <ε PN iii PN ≠0 f(PN )<ε Summary of bisection method 1. Define c= a+b 2 c is PN 2. If b-c≤ε, then accept c as the root and stop. 3. If sign(f(b))*sign(f(b))<0, then set a=c if sign(f(a))*sign(f(c))<0. Otherwise, set b=c. theorem: Let f be continuous on [a,b] and suppose f(a)*f(b)<0. The bisection procedure guarantees a sequence {Pn} approximating P with the property: |P-Pn |≤ 1 (b-a) 2n n≥1 That is exponential, which means very slow. pf) Let an, bn, and Pn denote the nth computed values of a, b, and c respectively. Then we have: bn -an = 1 (b -a ) 2 n-1 n-1 n≥1 Note that bn-an is the length of the interval and bn-1-an-1 is the length of the previous interval. It follows that: bn -an = bn -an = 1 (b-1) 2n-1 n≥1 Call this equation 1. 1 1 1 1 2 1 10 1 n-1 (bn-1 -an-1 )= ( (bn-2 -an-2 )) = ( ) (bn-2 -an-2 )= ( ) (bn-10 -an-10 )= ( ) (b-a) 2 2 2 2 2 2 where b-a denotes the length of the original interval. We know that: 1 |P-Pn |≤Pn -an =bn -Pn = (bn -an ) 2 Call this equation 2. Since the root p is either in [an,Pn] or [Pn,bn]. Now equations 2 and 1 give: 1 1 1 1 |P-Pn |≤ (bn -an )= ( n-2 (b-a)) = n (b-a) 2 2 2 2 n≥1 This shows that the iterates Pn converge to P as n⟶∞ with O(2-n) (rate of convergence)