Download presentation
Presentation is loading. Please wait.
Published byKiersten Germany Modified over 10 years ago
1
E. T. S. I. Caminos, Canales y Puertos1 Engineering Computation Lecture 4
2
E. T. S. I. Caminos, Canales y Puertos2 Error Analysis for N-R : Recall that Taylor Series gives: where x r x x i and f(x r ) = 0 Open Methods (Newton-Raphson Method)
3
E. T. S. I. Caminos, Canales y Puertos3 Dividing through by f '(x i ) yields E i+1 is proportional to E i 2 ==> quadratic rate of convergence. OR Open Methods (Newton-Raphson Method)
4
E. T. S. I. Caminos, Canales y Puertos4 Summary of Newton-Raphson Method: Advantages: 1.Can be fast Disadvantages: 1.May not converge 2. Requires a derivative Open Methods (Newton-Raphson Method)
5
E. T. S. I. Caminos, Canales y Puertos5 Secant Method Approx. f '(x) with backward FDD: Substitute this into the N-R equation: to obtain the iterative expression: Open Methods (Secant Method)
6
E. T. S. I. Caminos, Canales y Puertos6 Secant Method x i = x i+1 x f(x) f(x i ) xixi f(x i-1 ) f(x) x i-1 x i+ 1 x f(x i ) xixi f(x i-1 ) x i-1 x i+ 1 Open Methods (Secant Method)
7
E. T. S. I. Caminos, Canales y Puertos7 1) Requires two initial estimates: x i-1 and x i These do NOT have to bracket root ! 2) Maintains a strict sequence: Repeated until: a. | f(x i+1 ) | < k with k = small number b. c. Max. number of iterations is reached. 3. If x i and x i+1 were to bracket the root, this would be the same as the False-Position Method. BUT WE DON'T! Open Methods (Secant Method)
8
E. T. S. I. Caminos, Canales y Puertos8 Fixed point Method predict a value of x i+1 as a function of x i. Convert f(x) = 0 to x = g(x) iteration steps:x i+1 = g(x i ) x(new) = g(x(old) ) Open Methods (Fixed point method)
9
E. T. S. I. Caminos, Canales y Puertos9 Example II: x = sin(x) –> x i+1 = sin(x i ) OR x = arcsin(x) –> x i+1 = arcsin(x i ) Example I: Open Methods (Fixed point method)
10
E. T. S. I. Caminos, Canales y Puertos10 Convergence: Does x move closer to real root (?) Depends on: 1. nature of the function 2. accuracy of the initial estimate Interested in: 1. Will it converge or will it diverge? 2. How fast will it converge ? (rate of convergence) Open Methods (Fixed point method)
11
E. T. S. I. Caminos, Canales y Puertos11 Convergence of the Fixed point Method: Root satisfies: x r = g(x r ) The Taylor series for function g is: x i+1 = g(x r ) + g'(x)(x i - x r )x r < x < x i Subtracting the second equation from the first yields (x r – x i+1 ) = g'(x) (x r – x i ) or 1. True error for next iteration is smaller than the true error in the previous iteration if |g'(x)| < 1.0 (it will converge). 2. Because g'(x) is almost constant, the new error is directly proportional to the old error (linear rate of convergence). Open Methods (Fixed point method)
12
E. T. S. I. Caminos, Canales y Puertos12 Further Considerations: Convergence depends on how f(x) = 0 is converted into x = g(x) So... Convergence may be improved by recasting the problem. Open Methods (Fixed point method)
13
E. T. S. I. Caminos, Canales y Puertos13 can be small, even though x new is not close to root. Remedy: Do not completely rely on a to ensure that the problem is solved. Check to make sure |f(x new ) | < . Convergence Problem: For slowly converging functions Open Methods (Fixed point method)
14
E. T. S. I. Caminos, Canales y Puertos14 Open Methods (Fixed point method)
15
E. T. S. I. Caminos, Canales y Puertos15 Open Methods
16
E. T. S. I. Caminos, Canales y Puertos16 Why do open methods fail? Function may not look linear. Remedy: recast into a linear form. For example, Is a poorly constrained problem in that there is a large, nearly flat zone for which the derivative is near zero. Recast as: i f(i) = 0 = 7,500 i - 1000 [ 1 - (1+i) -20 ] Open Methods
17
E. T. S. I. Caminos, Canales y Puertos17 Recast as:i f(i) = 0 = 7,500 i - 1000 [ 1 - (1+i) -20 ] –The recast function, "i f(i) will have the same roots as f(i) plus an additional root at i = 0. –It will not have a large, flat zone, thus: h(i) = i f(i) = 7,500 i – 1000 [ 1 – (1+ i) –20 ] – To apply N-R we also need the first derivative: h'(i) = 7,500 - 20,000 (1+ i) -21 Open Methods
18
E. T. S. I. Caminos, Canales y Puertos18 Cases of Multiple Roots Multiple Roots: f(x) = (x – 2) 2 (x – 4) x = 2 represents two of the three roots. Open Methods
19
E. T. S. I. Caminos, Canales y Puertos19 Problems and Approaches: Cases of Multiple Roots 1.Bracketing Methods fail locating x = 2. Note that f(x ) f(x r ) > 0. 2. At x = 2, f(x) = f '(x) = 0. Newton-Raphson and Secant methods may experience problems. Rate of convergence drops to linear. Luckily, f(x) 0 faster than f '(x) 0 3. Other remedies, recasting problem: Find x such that u(x) = 0 where : Note that u(x) and f(x) have same roots. Open Methods
20
E. T. S. I. Caminos, Canales y Puertos20 m = 1: linear convergence m = 2: quadratic convergence Method m Bisection1 False Position1 Secant, mult. root1 NR, mult. root1 Secant, single root1.618"super linear" NR, single root2 Accel. NR, mult. root (f(x)/f'(x)=0)2 Summary -- Rates of Convergence
21
E. T. S. I. Caminos, Canales y Puertos21 A real rootfinding problem can be viewed as having three phases: 1) Opening moves: One needs to find the region of the parameter space in which desired root can be found. Understanding of problem, physical insight, and common sense are valuable. 2) Middle Game: Use robust algorithm to reduce initial region of uncertainty. 3) End game: Generate a highly accurate solution in a few iterations. Three Phase Rootfinding Strategy
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.