Solution of Nonlinear Equation (b)

Slides:



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

Lecture 5 Fixed point iteration Download fixedpoint.m From math.unm.edu/~plushnik/375.
Chapter 6: Roots: Open Methods
Lecture 5 Newton-Raphson Method
Fixed point iterations and solution of non-linear functions
Part 2 Chapter 6 Roots: Open Methods
Numerical Solution of Nonlinear Equations
Polynomial Approximation PSCI 702 October 05, 2005.
Suggested problems from text (6 th edition) Chapter 3.1 p85 Problems 1, 4, 9, 10 Computer problems 1, 2, 4, 7 Chapter 3.2 p101 Problems 4, 15, 17, 19 Computer.
CSE 330: Numerical Methods
Lecture 14: Newton’s method for system of two nonlinear equations Function newton2d01 Set initial (x,y) point, maximum number of iterations, and convergence.
Chapter: 3c System of Linear Equations
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Chapter 4 Roots of Equations
Roots of Equations Open Methods (Part 2).
Revision.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Systems of Non-Linear Equations
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.
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.
Secant Method Another Recursive Method. Secant Method The secant method is a recursive method used to find the solution to an equation like Newton’s Method.
Chapter 4 Roots of Polynomials.
8/30/ Secant Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Solving Non-Linear Equations (Root Finding)
Newton-Raphson Method
9/20/ Secant Method Civil Engineering Majors Authors: Autar Kaw, Jai Paul
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Loop Application: Numerical Methods, Part 1 The power of Matlab Mathematics + Coding.
Newton-Raphson Method Chemical Engineering Majors Authors: Autar Kaw, Jai Paul Transforming Numerical Methods Education.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Graphics Graphics Korea University kucg.korea.ac.kr 2. Solving Equations of One Variable Korea University Computer Graphics Lab. Lee Seung Ho / Shin.
1 Solution of Nonlinear Equation Dr. Asaf Varol
Quadrature rules 1Michael Sokolov / Numerical Methods for Chemical Engineers / Numerical Quadrature Michael Sokolov ETH Zurich, Institut für Chemie- und.
Numerical Methods.
11/30/ Secant Method Industrial Engineering Majors Authors: Autar Kaw, Jai Paul
CHAPTER 3 NUMERICAL METHODS
Newton’s Method, Root Finding with MATLAB and Excel
Today’s class Roots of equation Finish up incremental search
Newton-Raphson Method. Figure 1 Geometrical illustration of the Newton-Raphson method. 2.
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
Solving Non-Linear Equations (Root Finding)
Numerical Methods Solution of Equation.
4 Numerical Methods Root Finding Secant Method Modified Secant
Yasser F. O. Mohammad Assiut University Egypt. Previously in NM Bracketing Methods Bisection False Position Fixed Point Iteration Local Convergence Methods.
1 Lecture 8 Post-Graduate Students Advanced Programming (Introduction to MATLAB) Code: ENG 505 Dr. Basheer M. Nasef Computers & Systems Dept.
6/13/ Secant Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Project on Newton’s Iteration Method Presented by Dol Nath Khanal Project Advisor- Professor Dexuan Xie 05/11/2015.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
Part 3 Chapter 12 Iterative Methods
Secant Method.
Multiplicity of a Root First Modified Newton’s Method
Read Chapters 5 and 6 of the textbook
MATH 2140 Numerical Methods
Secant Method – Derivation
Solving Nonlinear Equation
Newton-Raphson Method
Computers in Civil Engineering 53:081 Spring 2003
Newton-Raphson Method
SOLUTION OF NONLINEAR EQUATIONS
Chemical Engineering Majors Authors: Autar Kaw, Jai Paul
Section 4.8: Newton’s Method
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.
Newton’s Method and Its Extensions
7. Trial and Error Searching
Newton-Raphson Method
1 Newton’s Method.
Presentation transcript:

Solution of Nonlinear Equation (b) Dr. Asaf Varol asvarol@mail.wvu.edu

Secant Method Similar approach as the Newton-Raphson method Differs because the derivative does not need to be calculated analytically, which can be a great advantage F(xi) = [F(xi) - F(xi-1)]/(xi – xi-1) Disadvantage is that two initial guesses are needed instead of one

Graphical Interpretation of Newton-Raphson and Secant Method  

Example: Secant Method Water flow from a tower at a height h, through a pipe of diameter D and length L which is connected to the tower running vertically downward and then laid horizontally to the desired point of delivery. For this system the following equation for the flow rate Q is found. Find the roots using the Secant Method.

Matlab Program

Result for Secant Method

Multiplicity of Roots and Newton-Based Methods In some situations, one root can fulfill the role of being a root more than one time. For example, the equation F(x) = x3 - x2 - x + 1= (x + 1)(x - 1)2 = 0   has three roots, namely x = -1, and x = 1 with a multiplicity of two Using l’Hospital’s Rule, the Newton-Raphson method can be modified xi+1 = xi - F(xi)/F(xi) Or, if the second derivative is also zero then l'Hospital's rule can be applied once more to obtain xi+1 = xi - F(xi)/F(xi)

Multiplicity of Roots and Newton-Based Methods  

Example E2.4.1 Problem: Apply Newton-Raphson method to the polynomial equation   F(x) = x3 - 3x2 + 3x - 1 = (x - 1)3 = 0 Solution: First we apply Newton-Raphson method without any modification of the given function. It can be shown that the method does not converge for any of the starting values x0 = 0., 0.5, 0.9, and 1.5. In fact the iterations oscillate between 0.2504306 and 0.4258722. But if we make the following substitution U(x) = F(x) and U(x) = F(x) and apply the same method, i.e. xi+1 = xi - U(xi)/U(xi) then the method converges in 24 iterations to the root x=.9999999 with an error bound of 1.0E-07, and starting value of x=0.0

Systems of Nonlinear Equations Extension of the previous methods to systems of N equations with N variables Our discussion will be limited to solutions to the following system of nonlinear equations: F(x,y) = 0 G(x,y) = 0 For example, x2 + y2 - 2 = 0 -exp(-x) + y2 - 1 = 0

Jacobi Iteration Method Jacobi method is an extension of the fixed-point iteration method to systems of equations The equations F(x,y) = 0 G(x,y) = 0 need to be transformed into x = f(x,y) y = g(x,y) Actual iteration is similar to the case of one equation with one variable xi+1 = f(xi,yi) yi+1 = g(xi,yi)

Jacobi Iteration Method Convergence criteria - in the vicinity of the root (xr, yr),

Example E2.5.1a

Matlab for Jacobi Method %Jacobi Iteration Method x0=0.0; y0=0.0 E=1.0E-4; % %---writing out headers to the file 'jacobimethod.dat' fid=fopen('jacobi.dat','w'); fprintf(fid,'Roots of Equations x-5+exp(-xy)=0 \n\n') fprintf(fid,'Roots of Equations y-1+exp(-0.5x)cos(xy)=0 \n\n') fprintf(fid,'Using Jacobi Method \n') fprintf(fid,'iter x y ErrorX ErrorY \n'); fprintf(fid,'------------------------------------------\n'); %---entering the loop to determine the root

Matlab for Jacobi Method (Cont’d) for i=1:100 x1=5-exp(-x0*y0); y1=1-exp(-0.5*x0)*cos(x0*y0); errorx=abs(x1-x0); errory=abs(y1-y0); %---writing out results to the file 'jacobi method.dat' % fprintf(fid,'%4.1f %7.4f %7.4f %7.4f %7.4f \n',i,x1,y1,errorx,errory); if abs(x1-x0)<E&abs(y1-y0)<E break; end x0=x1; y0=y1; fclose(fid) disp('Roots approximation=') x1,y1

Results for Jacobi Method

Gauss-Seidel Iteration Method Similar to the Jacobi iteration method Differs by using updated x or y values (i.e. the approximate roots) for calculations

Newton’s Method (I) Consider the two nonlinear equations F(x,y) = 0 G(x,y) = 0 The Taylor series expansion for a function F(x, y) is where ( )x and ( )xx denote the first and second partial derivatives with respect to x, and similarly for ( )y , ( )yy and ( )xy

Newton’s Method (II) Keeping the first three terms on the right-hand side yields Solving these equations for x and y after letting yields where J is the Jacobian defined by J = (FxGy - GxFy)

Newton’s Method (III) Retaining only two terms and thus simplifying the equations,

Technique of Underrelaxation and Overrelaxation Expresses ‘confidence’ in the new estimate of the root Underrelaxation 0 < < 1 Overrelaxation - 1 < < 2 Can be applied to Newton’s method as

Case Study C2.2: Two Intersecting Circles

Case Study C2.2: Two Intersecting Circles (Cont’d)

Case Study C2.3: Damped Oscillation of an Object

Case Study C2.3: Damped Oscillation of an Object (continued)

Case Study C2.3: Damped Oscillation of an Object (continued)

Case Study C2.3: Damped Oscillation of an Object (continued)

Case Study C2.3: Damped Oscillation of an Object (continued)

Case Study C2.3: Damped Oscillation of an Object (continued)

Case Study C2.3: Damped Oscillation of an Object (continued)

End of Chapter 2b

References Celik, Ismail, B., “Introductory Numerical Methods for Engineering Applications”, Ararat Books & Publishing, LCC., Morgantown, 2001 Fausett, Laurene, V. “Numerical Methods, Algorithms and Applications”, Prentice Hall, 2003 by Pearson Education, Inc., Upper Saddle River, NJ 07458 Rao, Singiresu, S., “Applied Numerical Methods for Engineers and Scientists, 2002 Prentice Hall, Upper Saddle River, NJ 07458 Mathews, John, H.; Fink, Kurtis, D., “Numerical Methods Using MATLAB” Fourth Edition, 2004 Prentice Hall, Upper Saddle River, NJ 07458 Varol, A., “Sayisal Analiz (Numerical Analysis), in Turkish, Course notes, Firat University, 2001