Solving Non-Linear Equations (Root Finding)

Similar documents
Root Finding: Close Methods. Bisection and False Position Dr. Marco A. Arocha Aug, 2014

Bisection and False Position Dr. Marco A. Arocha Aug, 2014

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

CHAPTER-II ROOTS OF EQUATIONS

3.1 Introduction. Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x x 1.5 =0, tan x x =0.

Numerical Methods. Root Finding

Numerical Analysis. EE, NCKU Tien-Hao Chang (Darby Chang)

Chapter 3: Root Finding. September 26, 2005

Determining the Roots of Non-Linear Equations Part I

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

Solution of Nonlinear Equations

Numerical Methods Lecture 3

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods

APPROXIMATION OF ROOTS OF EQUATIONS WITH A HAND-HELD CALCULATOR. Jay Villanueva Florida Memorial University Miami, FL

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435

Variable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University

Practical Numerical Analysis: Sheet 3 Solutions

Scientific Computing. Roots of Equations

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn

Root Finding (and Optimisation)

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane.

Nonlinear Equations. Chapter The Bisection Method

ROOT FINDING REVIEW MICHELLE FENG

Solution of Algebric & Transcendental Equations

Chapter 1. Root Finding Methods. 1.1 Bisection method

A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions

Scientific Computing: An Introductory Survey

Math 4329: Numerical Analysis Chapter 03: Newton s Method. Natasha S. Sharma, PhD

CHAPTER 4 ROOTS OF EQUATIONS

Math Numerical Analysis

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy,

Hence a root lies between 1 and 2. Since f a is negative and f(x 0 ) is positive The root lies between a and x 0 i.e. 1 and 1.

Zeroes of Transcendental and Polynomial Equations. Bisection method, Regula-falsi method and Newton-Raphson method

Lecture 7: Minimization or maximization of functions (Recipes Chapter 10)

ROOTFINDING. We assume the interest rate r holds over all N in +N out periods. h P in (1 + r) N out. N in 1 i h i

Math 131. The Derivative and the Tangent Line Problem Larson Section 2.1

Section 1.4 Tangents and Velocity

15 Nonlinear Equations and Zero-Finders

Figure 1: Graph of y = x cos(x)

Chapter 4. Solution of Non-linear Equation. Module No. 1. Newton s Method to Solve Transcendental Equation

SOLVING EQUATIONS OF ONE VARIABLE

CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018

Numerical Analysis Fall. Roots: Open Methods

INTRODUCTION TO NUMERICAL ANALYSIS

Numerical Methods in Informatics

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

Chapter 2 Solutions of Equations of One Variable

Outline. Scientific Computing: An Introductory Survey. Nonlinear Equations. Nonlinear Equations. Examples: Nonlinear Equations

Nonlinear Equations. Not guaranteed to have any real solutions, but generally do for astrophysical problems.

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

Chapter 6. Nonlinear Equations. 6.1 The Problem of Nonlinear Root-finding. 6.2 Rate of Convergence

4 Nonlinear Equations

Numerical Methods. Roots of Equations

Scientific Computing. Roots of Equations

Math 471. Numerical methods Root-finding algorithms for nonlinear equations

Computational Methods CMSC/AMSC/MAPL 460. Solving nonlinear equations and zero finding. Finding zeroes of functions

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations

1.4 DEFINITION OF LIMIT

Root Finding Methods

Numerical Solution of f(x) = 0

Goals for This Lecture:

Math 473: Practice Problems for Test 1, Fall 2011, SOLUTIONS

GENG2140, S2, 2012 Week 7: Curve fitting

converges to a root, it may not always be the root you have in mind.

Intro to Scientific Computing: How long does it take to find a needle in a haystack?

Numerical Analysis: Solving Nonlinear Equations

Roots of Equations. ITCS 4133/5133: Introduction to Numerical Methods 1 Roots of Equations

Math 117: Calculus & Functions II

THE SECANT METHOD. q(x) = a 0 + a 1 x. with

Lecture 8. Root finding II

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems

UNIT II SOLUTION OF NON-LINEAR AND SIMULTANEOUS LINEAR EQUATION

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable.

Line Search Methods. Shefali Kulkarni-Thaker

Midterm Review. Igor Yanovsky (Math 151A TA)

MA 8019: Numerical Analysis I Solution of Nonlinear Equations

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University

Finding the Roots of f(x) = 0

Finding roots. Lecture 4

AP Calculus AB. Chapter IV Lesson B. Curve Sketching

1.1: The bisection method. September 2017

CHAPTER 10 Zeros of Functions

by Martin Mendez, UASLP Copyright 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

Caculus 221. Possible questions for Exam II. March 19, 2002

Zeros of Functions. Chapter 10

Root Finding Convergence Analysis

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

Appendix 8 Numerical Methods for Solving Nonlinear Equations 1

AP CALCULUS (AB) Outline Chapter 4 Overview. 2) Recovering a function from its derivatives and a single point;

Unit 2: Solving Scalar Equations. Notes prepared by: Amos Ron, Yunpeng Li, Mark Cowlishaw, Steve Wright Instructor: Steve Wright

Chapter 3: The Derivative in Graphing and Applications

CS 450 Numerical Analysis. Chapter 5: Nonlinear Equations

Non-linear Equations. Chapter Particle in a Box Potential. h2 d 2 u. dx 2. 0 x>a. d 2 u(x) + 2m h 2 (V 0+ E)u(x)=0 x<a, (4.

Example - Newton-Raphson Method

Root finding. Root finding problem. Root finding problem. Root finding problem. Notes. Eugeniy E. Mikhailov. Lecture 05. Notes

Comparative Analysis of Convergence of Various Numerical Methods

Comments on An Improvement to the Brent s Method

Numerical mathematics with GeoGebra in high school

MATH 2053 Calculus I Review for the Final Exam

Transcription:

Solving Non-Linear Equations (Root Finding)

Root finding Methods What are root finding methods? Methods for determining a solution of an equation. Essentially finding a root of a function, that is, a zero of the function.

Root finding Methods Where are they used? Some applications for root finding are: systems of equilibrium, elliptical orbits, the van der Waals equation, and natural frequencies of spring systems. The problem of solving non-linear equations or sets of non-linear equations is a common problem in science, applied mathematics.

Cont... The problem of solving non-linear equations or sets of non-linear equations is a common problem in science, applied mathematics. The goal is to solve f(x) = 0, for the function f(x). The values of x which make f(x) = 0 are the roots of the equation.

Cont... f(x) a,b are roots of the function f(x) x f(a)=0 f(b)=0

There are many methods for solving non-linear equations. The methods, which will be highlighted have the following properties: 1. the function f(x) is expected to be continuous. If not the method may fail. 2. the use of the algorithm requires that the solution be bounded. 3. once the solution is bounded, it is refined to specified tolerance.

Cont... Four such methods are: Interval Halving (Bisection method) Regula Falsi (False position) Secant method Fixed point iteration Newton s method

Bisection Method

Bisection Method It is the simplest rootfinding algorithm. requires previous knowledge of two initial guesses, a and b, so that f(a) and f(b) have opposite signs. a d c root d initial pt a b initial pt b

Bisection Method Two estimates are chosen so that the solution is bracketed. ie f(a) and f(b) have opposite signs. In the diagram this f(a) < 0 and f(b) > 0. The root d lies between a and b! a d c root d initial pt a b initial pt b

Bisection Method The root d must always be bracketed (be between a and b)! Iterative method. initial pt b a d c b initial pt a root d

Bisection Method The interval between a and b is halved by calculating the average of a and b. The new point c = (a+b)/2. This produces are two possible intervals: a < x < c andc<x<b < b. a d c root d initial pt a b initial pt b

Bisection Method This produces are two possible intervals: a < x < c and c < x < b. If f(c ) > 0, then x = d must be to the left of c :interval a < x < c. If f(c ) < 0, then x = d must be to the right of c :interval c<x<b < b. a d c root d initial pt a b initial pt b

Bisection Method If f(c ) > 0, let a new = a and b new = c and repeat process. If f(c ) < 0, let a new = c and b new = b and repeat process. This reassignment ensures the root is always bracketed!! a d c root d initial pt a b initial pt b

Bisection Method This produces are two possible intervals: a < x < c and c < x < b. If f(c ) > 0, then x = d must be to the left of c :interval a < x < c. If f(c ) < 0, then x = d must be to the right of c :interval c<x<b < b. a d c root d initial pt a b initial pt b

Bisection Method c i = (a i + b i )/2 if f(c i )>0;a i+1 = aandb and i+1 = c if f(c i ) < 0; a i+1 = c and b i+1 = b

Bisection Method Bisection is an iterative process, where the initial interval is halved until the size of the interval decreases until it is below some predefined tolerance ε: a-b εor f(x) falls below a tolerance δ: f(c ) f(c-1) δ. δ ε

Bisection Method Advantages 1. Is guaranteed to work if f(x) is continuous and the root is bracketed. 2. The number of iterations to get the root to specified tolerance is known in advance

Bisection Method Disadvantages 1. Slow convergence. 2. Not applicable when here are multiple roots. Will only find one root at a time.

Secant Method

Secant Method

Overview of Secant Method Again to initial guesses are chosen. However there is not requirement that the root is bracketed! The method proceeds by drawing a line through the points to get a new point closer to the root. This is repeated until the root is found.

Secant Method First we find two points(x 0,x 1 ), which are hopefully near the root (we may use the bisection method). A line is then drawn through the two points and we find where the line intercepts the x-axis, x 2.

Secant Method If f(x) were truly linear, the straight line would intercept the x-axis at the root. However since it is not linear, the intercept is not at the root but it should be close to it.

Secant Method From similar triangles we can write that, ( x1 x2 ) f ( x ) 1 = f ( x0 x1 ) ( x ) f ( x ) 0 1 f ( x ) x 1 f ( x 0 ) x 2 x x 1 0

Secant Method From similar triangles we can write that, ( x1 x2 ) f ( x ) 1 = f ( x0 x1 ) ( x ) f ( x ) Solving for x 2 we get: x 2 = x 1 f ( x ) 1 f 0 1 ( x 0 x 1 ) ( x ) f ( x ) 0 1

Secant Method Iteratively this is written as: x n+ 1 = x n f ( x ) n f ( xn 1 xn ) ( x ) f ( x ) n 1 n

Algorithm Given two guesses x 0, x 1 near the root, If f ( x 0 ) < f ( x 1) then Swap x 0 and x 1. Repeat x0 x1 Set x2 = x1 f x1 * Set x 0 x 1 Set x 0 = x 1 ( ) f ( x ) f ( x ) Set x 1 = x 2 Until f ( x ) < tolerance value. x 2 0 1

Cont... Because the new point should be closer the root after the 2 nd iteration we usually choose the last two points. After the first iteration there is only one new point. However x 1 is chosen so that it is closer to root that x 0. This is not a hard and fast rule!

False Position

False Position

False Position The method of false position is seen as an improvement on the secant method. The method of false position avoids the problems of the secant method by ensuring that the root is bracketed between the two starting points and remains bracketing between successive pairs.

False Position This technique is similar to the bisection method except that the next iterate is taken as the line of interception between the pair of x-values and the x-axis rather than at the midpoint.

False Position

Algorithm Given two guesses x 0, x 1 that bracket the root, Repeat x0 x1 Setx2 = x1 f ( x1 )* f ( x0 ) f ( x1 ) If f ( x ) is of opposite sign to f ( x ) then 2 0 Set x 1 = x 2 Else Set x 0 = x 1 End If Until f ( x 2 ) < tolerance value.

Discussion of False Position Method This method achieves better convergence but a more complicated algorithm. May fail if the function is not continuous.

Newton s Method

Newton s Method The bisection method is useful up to a point. In order to get a good accuracy a large number of iterations must be carried out. A second inadequacy occurs when there are multiple roots to be found.

Newton s Method The bisection method is useful up to a point. In order to get a good accuracy a large number of iterations must be carried out. A second inadequacy occurs when there are multiple roots to be found. Newton s method is a much better algorithm.

Newton s Method Newton s method relies on calculus and uses linear approximation to the function by finding the tangent to the curve.

Newton s Method Algorithm requires an initial guess, x 0, which is close to the root. The point where the tangent line to the function (f (x)) meets the x-axis is the next approximation, x 1. This procedure is repeated until the value of x is sufficiently close to zero.

Newton s Method The equation for Newton s Method can be determined graphically!

Newton s Method The equation for Newton s Method can be determined graphically! From the diagram tan Ө = ƒ'(x 0 ) = ƒ(x 0 )/(x 0 x 1 )

Newton s Method The equation for Newton s Method can be determined graphically! From the diagram tan Ө = ƒ'(x 0 ) = ƒ(x 0 )/(x 0 x 1 ) Thus, x 1 =x 0 -ƒ(x 0 )/ƒ'(x 0 ).

Newton s Method The general form of Newton s Method is: x n+1 = x n f(x n )/ƒ'(x n )

Newton s Method The general form of Newton s Method is: x n+1 = x n f(x n )/ƒ'(x n ) Algorithm Pick a starting value for x Repeat x:= x f(x)/ƒ'(x) Return x