4 Numerical Methods Root Finding.

Slides:



Advertisements
Similar presentations
Part 2 Chapter 6 Roots: Open Methods
Advertisements

Chapter 6: Roots: Open Methods
Lecture 5 Newton-Raphson Method
Part 2 Chapter 6 Roots: Open Methods
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods.
A few words about convergence We have been looking at e a as our measure of convergence A more technical means of differentiating the speed of convergence.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Open Methods Chapter 6 The Islamic University of Gaza
NUMERICAL METHODS WITH C++ PROGRAMMING
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 8 Roots of Equations Open Methods.
Bracketing Methods Chapter 5 The Islamic University of Gaza
Roots of Equations Open Methods Second Term 05/06.
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
Chapter 3 Root Finding.
MATH 685/ CSI 700/ OR 682 Lecture Notes Lecture 8. Nonlinear equations.
Solving Non-Linear Equations (Root Finding)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
1 Nonlinear Equations Jyun-Ming Chen. 2 Contents Bisection False Position Newton Quasi-Newton Inverse Interpolation Method Comparison.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Chapter 3 Roots of Equations. Objectives Understanding what roots problems are and where they occur in engineering and science Knowing how to determine.
EE:211 Computational Techniques in Electrical Engineering Lecture#2
Numerical Methods.
CHAPTER 3 NUMERICAL METHODS
Numerical Methods Root Finding 4. Fixed-Point Iteration---- Successive Approximation Many problems also take on the specialized form: g(x)=x, where we.
Today’s class Roots of equation Finish up incremental search
Numerical Methods and Computational Techniques Solution of Transcendental and Polynomial Equations.
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
4 Numerical Methods Root Finding Secant Method Modified Secant
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5 Bracketing Methods.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
4 Numerical Methods Root Finding Secant Method Modified Secant
4 Numerical Methods Root Finding.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
Solution of Nonlinear Equations ( Root Finding Problems ) Definitions Classification of Methods  Analytical Solutions  Graphical Methods  Numerical.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
P2 Chapter 8 CIE Centre A-level Pure Maths © Adam Gibson.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Rearranging the equation f(x)=0 into the form x=g(x)
Solution of Nonlinear Equations ( Root Finding Problems )
CHAPTER 3 NUMERICAL METHODS
4 Numerical Methods Root Finding Secant Method Modified Secant
Numerical Methods and Analysis
Numerical Methods.
Newton’s Method for Systems of Non Linear Equations
Read Chapters 5 and 6 of the textbook
Part 2 Chapter 6 Roots: Open Methods
Numerical Methods.
Chapter 6.
Solution of Equations by Iteration
Numerical Analysis Lecture 7.
Computers in Civil Engineering 53:081 Spring 2003
MATH 2140 Numerical Methods
Lecture 10 Root Finding using Open Methods
SOLUTION OF NONLINEAR EQUATIONS
ROOTS OF EQUATIONS.
3.8 Newton’s Method How do you find a root of the following function without a graphing calculator? This is what Newton did.
Finding zeros (also called roots) of a function
Newton’s Method and Its Extensions
FP1: Chapter 2 Numerical Solutions of Equations
Fixed- Point Iteration
Chapter 6.
Part 2 Chapter 6 Roots: Open Methods
1 Newton’s Method.
Presentation transcript:

4 Numerical Methods Root Finding

Fixed-Point Iteration---- Successive Approximation Many problems also take on the specialized form: g(x)=x, where we seek, x, that satisfies this equation. In the limit, f(xk)=0, hence xk+1=xk f(x)=x g(x)

Fractals Images result when we deal with 2-dimensions. Such as complex numbers. Color indicates how quickly it converges or diverges.

Simple Fixed-Point Iteration Rearrange the function f(x)=0 so that x is on the left-hand side of the equation: x=g(x) Use the new function g to predict a new value of x - that is, xi+1=g(xi) The approximate error is given by:

Successive Approximations Begin Compute or choose initial object Compute next object No Object sufficient? Yes End

Fixed-point iterations Math 685/CSI 700 Spring 08 Fixed-point iterations George Mason University, Department of Mathematical Sciences

Example:

Start with a guess say x1=1, Generate Iterative Solution Find the root of f(x) = e-x – x Start with a guess say x1=1, Generate x2=e-x1 = e-1= 0.368 x3=e-x2= e-0.368 = 0.692 x4=e-x3= e-0.692=0.500 In general: After a few more iteration we will get

Find a root near x=1.0 and x=2.0 Solution: Problem Find a root near x=1.0 and x=2.0 Solution: Starting at x=1, x=0.292893 at 15th iteration Starting at x=2, it will not converge Why? Relate to g'(x)=x. for convergence g'(x) < 1 Starting at x=1, x=1.707 at iteration 19 Starting at x=2, x=1.707 at iteration 12 Why? Relate to

Examples Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Fixed Point Iteration The equation f(x) = 0, where f(x) = x3 - 7x + 3, may be re-arranged to give x = (x3 + 3)/7. Intersection of the graphs of y = x and y = (x3 + 3)/7 represent roots of the original equation x3 - 7x + 3 = 0. y = (x3 + 3)/7 y = x

Fixed Point Iteration The rearrangement x = (x3 + 3)/7 leads to the iteration To find the middle root a, let initial approximation x0 = 2. etc. The iteration slowly converges to give a = 0.441 (to 3 s.f.)

Fixed Point Iteration The rearrangement x = (x3 + 3)/7 leads to the iteration For x0 = 2 the iteration will converge on the middle root a, since g’(a) < 1. y = x y = (x3 + 3)/7 a x3 x2 x1 x0 a = 0.441 (to 3 s.f.)

Fixed Point Iteration - breakdown The rearrangement x = (x3 + 3)/7 leads to the iteration For x0 = 3 the iteration will diverge from the upper root a. a x0 x1 The iteration diverges because g’(a) > 1.

Example: fixed point problems Math 685/CSI 700 Spring 08 Example: fixed point problems George Mason University, Department of Mathematical Sciences

Examples: FPI Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Example: FPI Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Convergence of FPI Math 685/CSI 700 Spring 08 George Mason University, Department of Mathematical Sciences

Simple Fixed-Point Iteration Convergence

Simple Fixed-Point Iteration Convergence Fixed-point iteration converges if : When the method converges, the error is roughly proportional to or less than the error of the previous step, therefore it is called “linearly convergent.”

Simple Fixed-Point Iteration-Convergence

More on Convergence Graphically the solution is at the intersection of the two curves. We identify the point on y2 corresponding to the initial guess and the next guess corresponds to the value of the argument x where y1 (x) = y2 (x). Convergence of the simple fixed-point iteration method requires that the derivative of g(x) near the root has a magnitude less than 1. Convergent, 0≤g’<1 Convergent, -1<g’≤0 Divergent, g’>1 Divergent, g’<-1

1 False Stop True while a< s & i >maxi or xn=0 x0=xn Print: xo, f(xo) ,a , i False True

Fixed Point Iteration xi+1=(10-xi2)/yi and yi+1=57-3xiyi2 Use an initial guess x =1.5 and y =3.5 The iteration formulae: xi+1=(10-xi2)/yi and yi+1=57-3xiyi2 First iteration, x=(10-(1.5)2)/3.5=2.21429 y=(57-3(2.21429)(3.5)2=-24.37516 Second iteration: x=(10-2.214292)/-24.37516=-0.209 y=57-3(-0.209)(-24.37516)2=429.709 Solution is diverging so try another iteration formula

Birge – Vieta Method Used for finding roots of polynomial functions. Uses “synthetic division” of polynomial to extract factor of the given polynomial in the form of (x – p).

Problem: Find roots of f (x) = 2x³ – 5x + 1 using Birge – Vieta Method. Solution: Assume that x = 1 is root of the equation. Hence initial approximation of the solution is p0 = 1. Synthetic Division will be performed as below: Let f (x) = a0x3 + a1x2 + a2x + a3 p0 a0 a1 a2 a3 p0b0 p1b1 p2b2 p0 b0 b1=a1+p0b0 b1 b2 b3 p1 = p0 – b3/c2 s i m i l a r l y Repeat synthetic division using p1 c0 c1 c2 c3

Birge-Vieta Method NR method with f(x) and f'(x) evaluated using Horner’s method Once a root is found, reduce order of polynomial

Iteration No. 1: 1 2 -5 1 2 2 -3 1 2 2 -3 -2 2 4 1 2 4 1 -1 p1 = p0 – b3/c2 = 1 – (-2)/1 = 3 Iteration No. 2: 3 2 -5 1 6 18 39 Not required 3 2 6 13 40 6 36 147 2 12 49 187 p2 = p1 – b3/c2 = 3 – 40/49 = 2.1837

Iteration No. 5: 1.5185 2 -5 1 3.037 4.6117 -0.5896 1.5185 2 3.037 -0.3883 0.4104 3.037 9.2234 2 6.074 8.8351 p5 = p4 – b3/c2 = 1.5185 – 0.4104/8.8351 = 1.4721 Iteration No. 6: 1.4721 2 -5 1 2.9442 4.3342 -0.9801 1.4721 2 2.9442 -0.6658 0.01986 2.9442 8.6683 2 5.8884 8.0025 p6 = p5 – b3/c2 = 1.4721 – 0.01986/8.0025 = 1.469624

the equation x3+x2-3x-3 using Birge-Vieta Method where x0 = 2. Using the synthetic division, 2|1         1              -3            -3   |           2              6              6   |1         3              3              3¬f(x0)   |           2              10   |1         5              13¬f ’(x0) Now, x1 = 2 – 3/13 = 1.7692

Examples Determine the lowest positive root of: f(x) = 8 e-x sin (x) - 1 Using the Newton-Raphson method (three iterations, x0 = 0.3) and Using the secant method (four iterations, x-1 = 0.5 and x0 = 0.4). Using the modified secant method (three iterations, x0 = 0.3, d = 0.01).

Summary Method Pros Cons Bisection Newton Secant 2/22/2019 Summary Method Pros Cons Bisection - Easy, Reliable, Convergent - One function evaluation per iteration - No knowledge of derivative is needed - Slow - Needs an interval [a,b] containing the root, i.e., f(a)f(b)<0 Newton - Fast (if near the root) - Two function evaluations per iteration - May diverge - Needs derivative and an initial guess x0 such that f’(x0) is nonzero Secant - Fast (slower than Newton) - One function evaluation per iteration - Needs two initial points guess x0, x1 such that f(x0)- f(x1) is nonzero