Lecture 5 Newton-Raphson Method

Slides:



Advertisements
Similar presentations
E. T. S. I. Caminos, Canales y Puertos1 Engineering Computation Lecture 4.
Advertisements

Part 2 Chapter 6 Roots: Open Methods
Numerical Computation Lecture 4: Root Finding Methods - II United International College.
Part 2 Chapter 6 Roots: Open Methods
Numerical Solution of Nonlinear Equations
Roundoff and truncation errors
CSE 330: Numerical Methods
Open Methods Chapter 6 The Islamic University of Gaza
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods.
PHYS2020 NUMERICAL ALGORITHM NOTES ROOTS OF EQUATIONS.
Roots of Equations Open Methods (Part 2).
Chapter 6 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.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Chapter 1 Introduction The solutions of engineering problems can be obtained using analytical methods or numerical methods. Analytical differentiation.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
Open Methods Chapter 6 The Islamic University of Gaza
Dr. Marco A. Arocha Aug,  “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 8 Roots of Equations Open Methods.
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.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM.
Chapter 4 Roots of Polynomials.
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.
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
CISE301_Topic11 CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4:
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Lecture 8 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
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.
Numerical Methods for Engineering MECN 3500
Numerical Methods.
Today’s class Roots of equation Finish up incremental search
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
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 7 Roots of Polynomials.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
4 Numerical Methods Root Finding Secant Method Modified Secant
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
4 Numerical Methods Root Finding.
Solution of Nonlinear Equations ( Root Finding Problems ) Definitions Classification of Methods  Analytical Solutions  Graphical Methods  Numerical.
Solution of Nonlinear Equations ( Root Finding Problems )
4 Numerical Methods Root Finding Secant Method Modified Secant
Secant Method.
Newton’s Method for Systems of Non Linear Equations
Read Chapters 5 and 6 of the textbook
Chapter 6.
Numerical Analysis Lecture 45.
Computers in Civil Engineering 53:081 Spring 2003
SOLUTION OF NONLINEAR EQUATIONS
4 Numerical Methods Root Finding.
ROOTS OF EQUATIONS.
Newton’s Method and Its Extensions
Chapter 6.
1 Newton’s Method.
EE, NCKU Tien-Hao Chang (Darby Chang)
CISE-301: Numerical Methods Topic 1: Introduction to Numerical Methods and Taylor Series Lectures 1-4: KFUPM CISE301_Topic1.
Presentation transcript:

Lecture 5 Newton-Raphson Method Assumptions Interpretation Examples Convergence Analysis Reading Assignment: Sections 6.2 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Root finding Problems Many problems in Science and Engineering are expressed as These problems are called root finding problems EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Solution Methods Several ways to solve nonlinear equations are possible. Analytical Solutions possible for special equations only Graphical Solutions Useful for providing initial guesses for other methods Numerical Solutions Open methods Bracketing methods EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Bracketing Methods In bracketing methods, the method starts with an interval that contains the root and a procedure is used to obtain a smaller interval containing the root. Examples of bracketing methods : Bisection method False position method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Open Methods In the open methods, the method starts with one or more initial guess points. In each iteration a new guess of the root is obtained. Open methods are usually more efficient than bracketing methods They may not converge to the root. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

These will be covered in EE3561 Solution Methods Many methods are available to solve nonlinear equations Bisection Method Newton’s Method Secant Method False position Method Muller’s Method Bairstow’s Method Fixed point iterations ………. These will be covered in EE3561 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Newton-Raphson Method (also known as Newton’s Method) Given an initial guess of the root x0 , Newton-Raphson method uses information about the function and its derivative at that point to find a better guess of the root. Assumptions: f (x) is continuous and first derivative is known An initial guess x0 such that f ’(x0) ≠0 is given EE3561_Unit 2 (c)AL-DHAIFALLAH1435

EE3561_Unit 2 (c)AL-DHAIFALLAH1435

EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Newton’s Method F.m FP.m EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example Iteration xk f(xk) f’(xk) xk+1 |xk+1 –xk| 4 33 3 1 9 16 2.4375 4 33 3 1 9 16 2.4375 0.5625 2 2.0369 9.0742 2.2130 0.2245 0.2564 6.8404 2.1756 0.0384 0.0065 6.4969 2.1746 0.0010 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Convergence analysis of the Newton’s Method The Taylor series expansion can be represented as An approximate solution can be obtained by At the intersection with x axis f(xi+1)=0, which gives EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Convergence analysis of the Newton’s Method Substituting the true value xr into Eq (B6.2.1) yields Subtracting Eq (B6.2.2) from Eq (B6.2.3) yields Substituting and gives EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Convergence analysis of the Newton’s Method If we assume convergence, both xi and should eventually approximated by the root xr, and Eq(B6.2.5) can be rearranged to yield Which means that the current error is proportional to the square of the previous error which indicates quadratic convergence rate. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Convergence Analysis Remarks When the guess is close enough to a simple root of the function then Newton’s method is guaranteed to converge quadratically. Quadratic convergence means that the number of correct digits is nearly doubled at each iteration. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Problems with Newton’s Method If the initial guess of the root is far from the root the method may not converge. Newton’s method converges linearly near multiple zeros { f(r) = f ’(r) =0 }. In such a case modified algorithms can be used to regain the quadratic convergence. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Multiple Roots EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Problems with Newton’s Method Runaway 4/10/2017 Problems with Newton’s Method Runaway x0 x1 The estimates of the root is sent away from the root because a near-zero slope is reached The estimates of the root is going away from the root. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Problems with Newton’s Method Flat Spot 4/10/2017 Problems with Newton’s Method Flat Spot x0 A zero slope causes division by zero which means that the solution soots off horizontally and never hits the x axis The value of f’(x) is zero, the algorithm fails. If f ’(x) is very small then x1 will be very far from x0. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Problems with Newton’s Method Cycle 4/10/2017 Problems with Newton’s Method Cycle x1=x3=x5 x0=x2=x4 Cycling between two values happens when an inflection point (f’’(x)=0) occurs in the vicinity of a root. The algorithm cycles between two values x0 and x1 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Newton’s Method for Systems of nonlinear Equations 4/10/2017 Newton’s Method for Systems of nonlinear Equations Newton’s Method for Systems of nonlinear Equations The Newton’s method can be extended to solve system of non-linear equations. To be able to solve systems of non-linear equations, you must be familiar with the following. Computing derivatives of vector valued functions Basic matrix calculations (addition, multiplication, determinant,…) Computing inverse of square matrices EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example Solve the following system of equations EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Solution Using Newton’s Method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example Try this Solve the following system of equations EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example Solution EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Secant Method Examples Convergence Analysis EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Newton’s Method (Review) EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Secant Method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Secant Method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Secant Method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Secant Method Yes NO Stop EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Modified Secant Method 4/10/2017 Modified Secant Method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

4/10/2017 Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example x(i) f( x(i) ) x(i+1) |x(i+1)-x(i)| -1.0000 1.0000 -1.1000 0.0585 -1.1062 0. 0062 0.0102 -1.1052 0.0009 0.0001 0.0000 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Convergence Analysis The rate of convergence of the Secant method is super linear It is better than Bisection method but not as good as Newton’s method EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Comparison of Root finding methods Advantages/disadvantages Examples EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Summary Bisection Newton Secant Reliable, Slow One function evaluation per iteration Needs an interval [a,b] containing the root, f(a) f(b)<0 No knowledge of derivative is needed Newton Fast (if near the root) but may diverge Two function evaluation per iteration Needs derivative and an initial guess x0, f ’ (x0) is nonzero Secant Fast (slower than Newton) but may diverge one function evaluation per iteration Needs two initial points guess x0, x1 such that f (x0)- f (x1) is nonzero. EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Solution _______________________________ k xk f(xk) ________________________________ 0 1.0000 -1.0000 1 1.5000 8.8906 2 1.0506 -0.7062 3 1.0836 -0.4645 4 1.1472 0.1321 5 1.1331 -0.0165 6 1.1347 -0.0005 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Five iterations of the solution k xk f(xk) f’(xk) ERROR ______________________________________ 0 1.0000 -1.0000 5.0000 1 1.2000 0.786 13.93 0.2 2 1.1436 0.0930 10.7348 0.0564 3 1.1349 0.0019 10.2969 0.009 4 1.1347 0.0000 10.2876 0.0002 5 1.1347 0.0000 10.2876 0.0000 EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example Estimates of the root of x-cos(x)=0 0.60000000000000 initial guess 0.74401731944598 1 correct digit 0.73909047688624 4 correct digits 0.73908513322147 10 correct digits 0.73908513321516 14 correct digits EE3561_Unit 2 (c)AL-DHAIFALLAH1435

Example In estimating the root of x-cos(x)=0 To get more than 13 correct digits 4 iterations of Newton (x0=0.6) 43 iterations of Bisection method (initial interval [0.6, .8] 5 iterations of Secant method ( x0=0.6, x1=0.8) EE3561_Unit 2 (c)AL-DHAIFALLAH1435