Numerical Methods Lecture 3

Size: px
Start display at page:

Download "Numerical Methods Lecture 3"

Transcription

1 Numerical Methods Lecture 3 Nonlinear Equations by Pavel Ludvík

2 Introduction Definition (Root or zero of a function) A root (or a zero) of a function f is a solution of an equation f (x) = 0. We learn several root-finding methods: the bisection method, false position, the secant method, the Newton Raphson method. Numerical Methods Lecture 3 by Pavel Ludvík 2 / 24

3 Introduction Definition (Root or zero of a function) A root (or a zero) of a function f is a solution of an equation f (x) = 0. We learn several root-finding methods: the bisection method, false position, the secant method, the Newton Raphson method. Numerical Methods Lecture 3 by Pavel Ludvík 2 / 24

4 Introduction General Root-Finding Strategy 1. Bracket the roots, i.e. find the disjoint intervals containing the individual roots. 2. Set the initial approximation(s). 3. Repeat applying the iterative formula until the stopping criterion is met. Numerical Methods Lecture 3 by Pavel Ludvík 3 / 24

5 Introduction General Root-Finding Strategy 1. Bracket the roots, i.e. find the disjoint intervals containing the individual roots. 2. Set the initial approximation(s). 3. Repeat applying the iterative formula until the stopping criterion is met. Differences Between Methods the number of starting values, the guarantee, or otherwise, of convergence, the speed of convergence, the cost, in terms of the work to be done per iteration. Numerical Methods Lecture 3 by Pavel Ludvík 3 / 24

6 Bisection Method - Description The bisection method is the simplest of all the methods for finding a root of a nonlinear equation. We start with an interval containing a root and divide it into a left and a right half.we decide which of the two halves contains a root and proceed with a further division of that half. We do this repeatedly until the interval containing a root is sufficiently narrowed down to meet the level of accuracy required. If we take the mid-point of the latest interval to be an approximation to a root, we can say that this is accurate to within ± half the width of the interval. Numerical Methods Lecture 3 by Pavel Ludvík 4 / 24

7 Bisection Method - Algorithm Theorem Let f be a continuous function on an interval [a, b] and f (a)f (b) < 0. Then there exists a number c (a, b) that f (c) = 0. Algorithm for solving f (x) = 0 by Bisection Method 1. Find an interval [a, b] in which f (x) = Set x to a+b Test for convergence: Find out if b a 2 ε. 4. Calculate f (x ). 5. If f (x ) and f (b) have opposite sign set a to x, otherwise set b to x. 6. Repeat from step 2. Numerical Methods Lecture 3 by Pavel Ludvík 5 / 24

8 Example Find a root of the equation 8 4.5(x sin x) = 0 with a tolerance less than ε = Solution 1. We define a function f (x) = 8 4.5(x sin x), plot its graph and find out the solution is between x = 2 and x = 3. Hence we choose a 0 = 2 and b 0 = We compute the midpoint c 0 = a 0+b 0 2 = 2.5 and the current error value Error 0 = b 0 a 0 2 = 0.5 which is bigger than the tolerance We have to carry out a next step. We need to answer the question: "Is the root in the interval [a 0, c 0 ] = [2, 2.5] or [c 0, b 0 ] = [2.5, 3]?"If f (2)f (2.5) < 0 then the root is in [2, 2.5], if f (2.5)f (3) < 0 then in [2.5, 3], if none of it is truth then necessarily 2.5 is a root itself. We compute that f (2)f (2.5) < 0 and hence we set a 1 = 2, b 1 = 2.5. Numerical Methods Lecture 3 by Pavel Ludvík 6 / 24

9 Solution 4. We repeat the algorithm until the error is smaller or equal to ε. 5. See the results in a table: n a n c n b n Error > > > > > > The conclusion is: Root = ± 0.01 Numerical Methods Lecture 3 by Pavel Ludvík 7 / 24

10 Bisection Method - Matlab Exercise A Write an M-File for one step of the Bisection Method. Input: Function f and limitpoints of an interval [a n, b n ]. Output: Limitpoints of an interval [a n+1, b n+1 ]. Exercise B Create an M-File for the Bisection Method. The program should stop before doing 24 iterations. Numerical Methods Lecture 3 by Pavel Ludvík 8 / 24

11 Answers Answer A p = (a+b)/2; if f(a)*f(p)<0 b=p; elseif f(p)*f(b)<0 a=p else break end Numerical Methods Lecture 3 by Pavel Ludvík 9 / 24

12 Answer B f = ; % the function formula epsilon = ; % the precision maxn = ; % limitation on the number of steps a(1) = ; b(1) = ; % initial approximation for n = 1 : maxn p(n) = (a(n)+b(n))/2; if (b(n)-a(n))/2 <= epsilon, break elseif f(a(n))*f(p(n))<0 a(n+1) = a(n); b(n+1) = p(n); elseif f(p(n))*f(b(n))<0 a(n+1) = p(n); b(n+1) = b(n); else break end end disp( a(n) p(n) b(n) ) disp([a p b ]) Numerical Methods Lecture 3 by Pavel Ludvík 10 / 24

13 Exercises 1. Solve the equation e 0.2x e 0.8x 2 = 0 with an accuracy Show that a function f (x) = x sin x cos x has just one root in the interval [0, π/2] and find it to an accuracy of four decimal places. 3. Derive a formula for an error upper bound after n steps. 4. Try to use the Bisection Method with starting interval [ 2, 1] to find a root of the function f (x) = 1 x. What did happen? Explain why. 5. Can you tell the number of steps needed for Bisection Method to find the root to a given accuracy without carrying it out? How? Numerical Methods Lecture 3 by Pavel Ludvík 11 / 24

14 The Secant Method Description The Secant Method is a version of the bisection method that takes a more informed approach to reducing the interval containing a root. It is likely therefore to require a smaller number of iterations. The idea is to approximate the function by its secant and instead of looking for the root of the original function to use the root of the secant line as an approximation. A formula for a secant line of the function f connecting two points [a, f (a)] and [b, f (b)] is y = f (a) + f (b) f (a) (x a). b a Numerical Methods Lecture 3 by Pavel Ludvík 12 / 24

15 The Secant Method Algorithm Mathematical Formula x 0, x 1 = initial guesses, x x n = x n 1 f (x n 1 ) n 1 x n 2 f (x n 1 ) f (x n 2 ). Numerical Methods Lecture 3 by Pavel Ludvík 13 / 24

16 The Secant Method Algorithm Algorithm for solving f (x) = 0 by the Secant Method 1. Find an interval containing x such that f (x) = Set x to b f (b) b a f (b) f (a). 3. Test for convergence: Find out if b x ε. 4. Set a to b and b to x. 5. Repeat from step 2. Numerical Methods Lecture 3 by Pavel Ludvík 13 / 24

17 Example Find a root of the equation 8 4.5(x sin x) = 0 with a tolerance less than ε = = Solution 1. We define a function f (x) = 8 4.5(x sin x). 2. From a graph of f we set the first two initial approximations, i.e. x 0 = 2 and x 1 = 3. The error is x 1 x 0 = 1 > ε. 3. The next approximation is x x 2 = x 1 f (x 1 ) 1 x 0 f (x 1 ) f (x 0 ) = 3 f (3) 3 2 f (3) f (2) = We evaluate the error which is x 3 x 2 = and the value is bigger then Numerical Methods Lecture 3 by Pavel Ludvík 14 / 24

18 Solution x 2 x 1 5. We compute x 3 = x 2 f (x 2 ) f (x 2 ) f (x 1 ) = , Error = x 3 x 2 = and continue in this manner until error is sufficiently small. 6. See the results in a table: 7. The conclusion is: n x n Error > ε > ε > ε > ε ε Root = ± 10 4 Numerical Methods Lecture 3 by Pavel Ludvík 15 / 24

19 The Secant Method Matlab f = ; % the function formula epsilon = ; % the precision maxn = ; % limitation on the number of steps x(1) = ; x(2) = ; % initial approximation for n = 3 : maxn x(n) = x(n-1) - f(x(n-1))*(x(n-1)-x(n-2))/(f(x( n-1))-f(x(n-2))); if abs(x(n)-x(n-1)) <= epsilon, break, end disp( x(n-2) x(n-1) x(n) Error ) disp([x(1:n-2) x(2:n-1) x(3:n) (x(3:n)-x(2:n-1)) ]) Numerical Methods Lecture 3 by Pavel Ludvík 16 / 24

20 Exercises 1. Solve the problems from the section about Bisection Method. 2. Use the Secant Method to calculate the 4 2 to an accuracy of six decimal places. 3. Think about the stopping criterion. Is it precise? If the consider error is small, does it necessarily mean we have a good approximation? Try to find an counterexample. 4. Look up the commands fzero and roots in the help of Matlab. Numerical Methods Lecture 3 by Pavel Ludvík 17 / 24

21 Newton-Raphson Method Description A feature of the secant method is its attempt to follow the graph of the function using a straight line. The Newton method pursues the idea by allowing the two points of the secant method to merge into one. In so doing it uses a single point and the tangent to the function at that point to construct a new estimate to the root. A formula for a zero point of a tangent line of the function f constructed at point a is x = a f (a) f (a). Numerical Methods Lecture 3 by Pavel Ludvík 18 / 24

22 Newton-Raphson Method Algorithm Mathematical Formula x 0 = initial guess, x n+1 = x n f (x n) f (x n ). Numerical Methods Lecture 3 by Pavel Ludvík 19 / 24

23 Newton-Raphson Method Algorithm Algorithm for solving f (x) = 0 by the Newton-Raphson Method 1. Find an interval containing x such that f (x) = Choose a starting point a. 3. If f (a) 0 replace a by x = a f f (a), otherwise restart using a different starting point a. 4. Test for convergence: Find out if x a ε. 5. Repeat from step 2. Numerical Methods Lecture 3 by Pavel Ludvík 19 / 24

24 Newton-Raphson Method Convergence Theorem (Convergence Theorem) Let e n denote the error after step n of the N-R Method. Furthermore, let f be twice continuously differentiable and f (p) = 0. If f (p) 0, then N-R Method is locally convergent to p and e lim n+1 n e 2 n = M (i. e., method is quadratically convergent), where Local Convergence M = f (p) 2f (p). A method is locally convergent if there exists an interval containing a root such that the sequence generated by this method converge to the root. Numerical Methods Lecture 3 by Pavel Ludvík 20 / 24

25 Example Find a root of the equation 8 4.5(x sin x) = 0 with a tolerance less than ε = = Solution 1. We define a function f (x) = 8 4.5(x sin x) and compute its derivative f (x) = 4.5(1 cos x). 2. From a graph of f we set the initial approximation. We try x 0 = The first approximation will be x 1 = x 0 f (x 0) 8 4.5(2 sin(2)) f = 2 = (x 0 ) 4.5(1 cos(2)) 4. We evaluate the error which is x 1 x 0 = and the value is bigger then Numerical Methods Lecture 3 by Pavel Ludvík 21 / 24

26 Solution 5. We compute x 2 = x 1 f (x 1) f (x 1 ), Error = x 2 x 1. and continue in this manner until error is sufficiently small. 6. See the results in a table: 7. The conclusion is: n x n Error > ε > ε > ε ε Root = ± 10 6 Numerical Methods Lecture 3 by Pavel Ludvík 22 / 24

27 The Newton-Raphson Method Matlab f ; % the function formula %%%%%%%%%%%%% SYMBOLIC TOOLBOX REQUIRED syms x ; % creating the symbolic variable x symdf = diff(f(x)); % the derivative df = matlabfunction(symdf); % conversion %%%%%%%%%%%%%OTHERWISE COMPUTE DERIVATIVE MANUALLY epsilon = ; % the precision maxn = ; % limitation on the number of steps clear x; x(1) = ; % clearing x as a symbolic variable; setting initial approximation for n = 2 : maxn x(n) = x(n-1) - f(x(n-1))/df(x(n-1)); if abs(x(n)-x(n-1)) <= epsilon, break, end end disp( x(n-1) x(n) Error ) disp([x(1:n-1) x(2:n) (x(1:n-1)-x(2:n)) ]) Numerical Methods Lecture 3 by Pavel Ludvík 23 / 24

28 Exercises 1. Solve the problems from the section about Bisection Method. 2. Use the Newton Method to calculate the 4 2 to an accuracy of six decimal places. 3. Think about the stopping criterion. Is it precise? If the consider error is small, does it necessarily mean we have a good approximation? Try to find an counterexample. 4. Prove that Newton Method applied to f (x) = ax + b converges in one step. 5. A 10-cm-high cone contains 60 cm 3 of ice cream, including a hemispherical scoop on top. Find the radius of the scoop to four correct decimal places. Numerical Methods Lecture 3 by Pavel Ludvík 24 / 24

1.1: The bisection method. September 2017

1.1: The bisection method. September 2017 (1/11) 1.1: The bisection method Solving nonlinear equations MA385/530 Numerical Analysis September 2017 3 2 f(x)= x 2 2 x axis 1 0 1 x [0] =a x [2] =1 x [3] =1.5 x [1] =b 2 0.5 0 0.5 1 1.5 2 2.5 1 Solving

More information

Chapter 3: Root Finding. September 26, 2005

Chapter 3: Root Finding. September 26, 2005 Chapter 3: Root Finding September 26, 2005 Outline 1 Root Finding 2 3.1 The Bisection Method 3 3.2 Newton s Method: Derivation and Examples 4 3.3 How To Stop Newton s Method 5 3.4 Application: Division

More information

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

Figure 1: Graph of y = x cos(x) Chapter The Solution of Nonlinear Equations f(x) = 0 In this chapter we will study methods for find the solutions of functions of single variables, ie values of x such that f(x) = 0 For example, f(x) =

More information

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

Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane. Queens College, CUNY, Department of Computer Science Numerical Methods CSCI 361 / 761 Spring 2018 Instructor: Dr. Sateesh Mane c Sateesh R. Mane 2018 3 Lecture 3 3.1 General remarks March 4, 2018 This

More information

Solving Non-Linear Equations (Root Finding)

Solving Non-Linear Equations (Root Finding) 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

More information

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations.

MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. MATH 3795 Lecture 12. Numerical Solution of Nonlinear Equations. Dmitriy Leykekhman Fall 2008 Goals Learn about different methods for the solution of f(x) = 0, their advantages and disadvantages. Convergence

More information

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

PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 PART I Lecture Notes on Numerical Solution of Root Finding Problems MATH 435 Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu

More information

Solution of Algebric & Transcendental Equations

Solution of Algebric & Transcendental Equations Page15 Solution of Algebric & Transcendental Equations Contents: o Introduction o Evaluation of Polynomials by Horner s Method o Methods of solving non linear equations o Bracketing Methods o Bisection

More information

Numerical Methods. Roots of Equations

Numerical Methods. Roots of Equations Roots of Equations by Norhayati Rosli & Nadirah Mohd Nasir Faculty of Industrial Sciences & Technology norhayati@ump.edu.my, nadirah@ump.edu.my Description AIMS This chapter is aimed to compute the root(s)

More information

Goals for This Lecture:

Goals for This Lecture: Goals for This Lecture: Learn the Newton-Raphson method for finding real roots of real functions Learn the Bisection method for finding real roots of a real function Look at efficient implementations of

More information

Nonlinear Equations. Chapter The Bisection Method

Nonlinear Equations. Chapter The Bisection Method Chapter 6 Nonlinear Equations Given a nonlinear function f(), a value r such that f(r) = 0, is called a root or a zero of f() For eample, for f() = e 016064, Fig?? gives the set of points satisfying y

More information

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

Intro to Scientific Computing: How long does it take to find a needle in a haystack? Intro to Scientific Computing: How long does it take to find a needle in a haystack? Dr. David M. Goulet Intro Binary Sorting Suppose that you have a detector that can tell you if a needle is in a haystack,

More information

Numerical Methods. Root Finding

Numerical Methods. Root Finding Numerical Methods Solving Non Linear 1-Dimensional Equations Root Finding Given a real valued function f of one variable (say ), the idea is to find an such that: f() 0 1 Root Finding Eamples Find real

More information

Math Numerical Analysis

Math Numerical Analysis Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research Center

More information

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable

NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable NON-LINEAR ALGEBRAIC EQUATIONS Lec. 5.1: Nonlinear Equation in Single Variable Dr. Niket Kaisare Department of Chemical Engineering IIT Madras NPTEL Course: MATLAB Programming for Numerical Computations

More information

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD

SOLUTION OF ALGEBRAIC AND TRANSCENDENTAL EQUATIONS BISECTION METHOD BISECTION METHOD If a function f(x) is continuous between a and b, and f(a) and f(b) are of opposite signs, then there exists at least one root between a and b. It is shown graphically as, Let f a be negative

More information

INTRODUCTION TO NUMERICAL ANALYSIS

INTRODUCTION TO NUMERICAL ANALYSIS INTRODUCTION TO NUMERICAL ANALYSIS Cho, Hyoung Kyu Department of Nuclear Engineering Seoul National University 3. SOLVING NONLINEAR EQUATIONS 3.1 Background 3.2 Estimation of errors in numerical solutions

More information

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.

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. 3.1 Introduction Solve non-linear real equation f(x) = 0 for real root or zero x. E.g. x 3 +1.5x 1.5 =0, tan x x =0. Practical existence test for roots: by intermediate value theorem, f C[a, b] & f(a)f(b)

More information

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

Today s class. Numerical differentiation Roots of equation Bracketing methods. Numerical Methods, Fall 2011 Lecture 4. Prof. Jinbo Bi CSE, UConn Today s class Numerical differentiation Roots of equation Bracketing methods 1 Numerical Differentiation Finite divided difference First forward difference First backward difference Lecture 3 2 Numerical

More information

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

Math 471. Numerical methods Root-finding algorithms for nonlinear equations Math 471. Numerical methods Root-finding algorithms for nonlinear equations overlap Section.1.5 of Bradie Our goal in this chapter is to find the root(s) for f(x) = 0..1 Bisection Method Intermediate value

More information

Scientific Computing. Roots of Equations

Scientific Computing. Roots of Equations ECE257 Numerical Methods and Scientific Computing Roots of Equations Today s s class: Roots of Equations Bracketing Methods Roots of Equations Given a function f(x), the roots are those values of x that

More information

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR)

NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) NUMERICAL AND STATISTICAL COMPUTING (MCA-202-CR) Autumn Session UNIT 1 Numerical analysis is the study of algorithms that uses, creates and implements algorithms for obtaining numerical solutions to problems

More information

Numerical Analysis Fall. Roots: Open Methods

Numerical Analysis Fall. Roots: Open Methods Numerical Analysis 2015 Fall Roots: Open Methods Open Methods Open methods differ from bracketing methods, in that they require only a single starting value or two starting values that do not necessarily

More information

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

Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods Numerical Methods Dr. Sanjeev Kumar Department of Mathematics Indian Institute of Technology Roorkee Lecture No 7 Regula Falsi and Secant Methods So welcome to the next lecture of the 2 nd unit of this

More information

BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations

BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations BEKG 2452 NUMERICAL METHODS Solution of Nonlinear Equations Ser Lee Loh a, Wei Sen Loi a a Fakulti Kejuruteraan Elektrik Universiti Teknikal Malaysia Melaka Lesson Outcome Upon completion of this lesson,

More information

CHAPTER 4 ROOTS OF EQUATIONS

CHAPTER 4 ROOTS OF EQUATIONS CHAPTER 4 ROOTS OF EQUATIONS Chapter 3 : TOPIC COVERS (ROOTS OF EQUATIONS) Definition of Root of Equations Bracketing Method Graphical Method Bisection Method False Position Method Open Method One-Point

More information

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

THE SECANT METHOD. q(x) = a 0 + a 1 x. with THE SECANT METHOD Newton s method was based on using the line tangent to the curve of y = f (x), with the point of tangency (x 0, f (x 0 )). When x 0 α, the graph of the tangent line is approximately the

More information

Numerical mathematics with GeoGebra in high school

Numerical mathematics with GeoGebra in high school Herceg 2009/2/18 23:36 page 363 #1 6/2 (2008), 363 378 tmcs@inf.unideb.hu http://tmcs.math.klte.hu Numerical mathematics with GeoGebra in high school Dragoslav Herceg and Ðorđe Herceg Abstract. We have

More information

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

Zeroes of Transcendental and Polynomial Equations. Bisection method, Regula-falsi method and Newton-Raphson method Zeroes of Transcendental and Polynomial Equations Bisection method, Regula-falsi method and Newton-Raphson method PRELIMINARIES Solution of equation f (x) = 0 A number (real or complex) is a root of the

More information

Math Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, Due: Thursday, January 27,

Math Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, Due: Thursday, January 27, Math 371 - Introduction to Numerical Methods - Winter 2011 Homework 2 Assigned: Friday, January 14, 2011. Due: Thursday, January 27, 2011.. Include a cover page. You do not need to hand in a problem sheet.

More information

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

Outline. Math Numerical Analysis. Intermediate Value Theorem. Lecture Notes Zeros and Roots. Joseph M. Mahaffy, Outline Math 541 - Numerical Analysis Lecture Notes Zeros and Roots Joseph M. Mahaffy, jmahaffy@mail.sdsu.edu Department of Mathematics and Statistics Dynamical Systems Group Computational Sciences Research

More information

Solving nonlinear equations (See online notes and lecture notes for full details) 1.3: Newton s Method

Solving nonlinear equations (See online notes and lecture notes for full details) 1.3: Newton s Method Solving nonlinear equations (See online notes and lecture notes for full details) 1.3: Newton s Method MA385 Numerical Analysis September 2018 (1/16) Sir Isaac Newton, 1643-1727, England. Easily one of

More information

CHAPTER-II ROOTS OF EQUATIONS

CHAPTER-II ROOTS OF EQUATIONS CHAPTER-II ROOTS OF EQUATIONS 2.1 Introduction The roots or zeros of equations can be simply defined as the values of x that makes f(x) =0. There are many ways to solve for roots of equations. For some

More information

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.

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. The Bisection method or BOLZANO s method or Interval halving method: Find the positive root of x 3 x = 1 correct to four decimal places by bisection method Let f x = x 3 x 1 Here f 0 = 1 = ve, f 1 = ve,

More information

Lecture 7. Root finding I. 1 Introduction. 2 Graphical solution

Lecture 7. Root finding I. 1 Introduction. 2 Graphical solution 1 Introduction Lecture 7 Root finding I For our present purposes, root finding is the process of finding a real value of x which solves the equation f (x)=0. Since the equation g x =h x can be rewritten

More information

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

Bisection and False Position Dr. Marco A. Arocha Aug, 2014 Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Given function f, we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the function f Problem is known as root

More information

Analysis Methods in Atmospheric and Oceanic Science

Analysis Methods in Atmospheric and Oceanic Science Analysis Methods in Atmospheric and Oceanic Science AOSC 652 Week 7, Day 1 13 Oct 2014 1 Student projects: 20% of the final grade: you will receive a numerical score for the project and final grade will

More information

Numerical Solution of f(x) = 0

Numerical Solution of f(x) = 0 Numerical Solution of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@pdx.edu ME 350: Finding roots of f(x) = 0 Overview Topics covered in these slides

More information

PARALLEL NUMERICAL METHODS FOR SOLVING NONLINEAR EQUATIONS

PARALLEL NUMERICAL METHODS FOR SOLVING NONLINEAR EQUATIONS STUDIA UNIV. BABEŞ BOLYAI, MATHEMATICA, Volume XLVI, Number 4, December 2001 PARALLEL NUMERICAL METHODS FOR SOLVING NONLINEAR EQUATIONS IOANA CHIOREAN 1. Introduction The basis for constructing a parallel

More information

CHAPTER 10 Zeros of Functions

CHAPTER 10 Zeros of Functions CHAPTER 10 Zeros of Functions An important part of the maths syllabus in secondary school is equation solving. This is important for the simple reason that equations are important a wide range of problems

More information

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

Root Finding: Close Methods. Bisection and False Position Dr. Marco A. Arocha Aug, 2014 Root Finding: Close Methods Bisection and False Position Dr. Marco A. Arocha Aug, 2014 1 Roots Given function f(x), we seek x values for which f(x)=0 Solution x is the root of the equation or zero of the

More information

Zeros of Functions. Chapter 10

Zeros of Functions. Chapter 10 Chapter 10 Zeros of Functions An important part of the mathematics syllabus in secondary school is equation solving. This is important for the simple reason that equations are important a wide range of

More information

SOLVING EQUATIONS OF ONE VARIABLE

SOLVING EQUATIONS OF ONE VARIABLE 1 SOLVING EQUATIONS OF ONE VARIABLE ELM1222 Numerical Analysis Some of the contents are adopted from Laurene V. Fausett, Applied Numerical Analysis using MATLAB. Prentice Hall Inc., 1999 2 Today s lecture

More information

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

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems Nonlinear Systems CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Nonlinear Systems 1 / 24 Part III: Nonlinear Problems Not all numerical problems

More information

Math 551 Homework Assignment 3 Page 1 of 6

Math 551 Homework Assignment 3 Page 1 of 6 Math 551 Homework Assignment 3 Page 1 of 6 Name and section: ID number: E-mail: 1. Consider Newton s method for finding + α with α > 0 by finding the positive root of f(x) = x 2 α = 0. Assuming that x

More information

Root finding. Eugeniy E. Mikhailov. Lecture 06. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 06 1 / 10

Root finding. Eugeniy E. Mikhailov. Lecture 06. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 06 1 / 10 Root finding Eugeniy E. Mikhailov The College of William & Mary Lecture 06 Eugeniy Mikhailov (W&M) Practical Computing Lecture 06 1 / 10 Root finding problem Generally we want to solve the following canonical

More information

Determining the Roots of Non-Linear Equations Part I

Determining the Roots of Non-Linear Equations Part I Determining the Roots of Non-Linear Equations Part I Prof. Dr. Florian Rupp German University of Technology in Oman (GUtech) Introduction to Numerical Methods for ENG & CS (Mathematics IV) Spring Term

More information

Lecture 8. Root finding II

Lecture 8. Root finding II 1 Introduction Lecture 8 Root finding II In the previous lecture we considered the bisection root-bracketing algorithm. It requires only that the function be continuous and that we have a root bracketed

More information

Chapter 2 Solutions of Equations of One Variable

Chapter 2 Solutions of Equations of One Variable Chapter 2 Solutions of Equations of One Variable 2.1 Bisection Method In this chapter we consider one of the most basic problems of numerical approximation, the root-finding problem. This process involves

More information

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

Finding the Roots of f(x) = 0. Gerald W. Recktenwald Department of Mechanical Engineering Portland State University Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:

More information

Finding the Roots of f(x) = 0

Finding the Roots of f(x) = 0 Finding the Roots of f(x) = 0 Gerald W. Recktenwald Department of Mechanical Engineering Portland State University gerry@me.pdx.edu These slides are a supplement to the book Numerical Methods with Matlab:

More information

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

CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018 CLASS NOTES Models, Algorithms and Data: Introduction to computing 2018 Petros Koumoutsakos, Jens Honore Walther (Last update: April 16, 2018) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers

Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers Lecture 5: Random numbers and Monte Carlo (Numerical Recipes, Chapter 7) Motivations for generating random numbers To sample a function in a statistically controlled manner (i.e. for Monte Carlo integration)

More information

Numerical Methods in Informatics

Numerical Methods in Informatics Numerical Methods in Informatics Lecture 2, 30.09.2016: Nonlinear Equations in One Variable http://www.math.uzh.ch/binf4232 Tulin Kaman Institute of Mathematics, University of Zurich E-mail: tulin.kaman@math.uzh.ch

More information

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

Computational Methods CMSC/AMSC/MAPL 460. Solving nonlinear equations and zero finding. Finding zeroes of functions Computational Methods CMSC/AMSC/MAPL 460 Solving nonlinear equations and zero finding Ramani Duraiswami, Dept. of Computer Science Where does it arise? Finding zeroes of functions Solving functional equations

More information

Zeros of functions with Matlab: Bisection method and fixed point iteration

Zeros of functions with Matlab: Bisection method and fixed point iteration Zeros of functions with Matlab: Bisection method and fixed point iteration Emma Perracchione Corso di Calcolo Numerico per Ingegneria Meccanica - Matr. PARI (Univ. PD) A.A. 2017/2018, secondo semestre

More information

Analysis Methods in Atmospheric and Oceanic Science

Analysis Methods in Atmospheric and Oceanic Science Analysis Methods in Atmospheric and Oceanic Science 1 AOSC 652 Week 7, Day 1 10 Oct 2016 Student projects: 20% of the final grade: you will receive a numerical score for the project and final grade will

More information

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

Numerical Analysis. EE, NCKU Tien-Hao Chang (Darby Chang) Numerical Analysis EE, NCKU Tien-Hao Chang (Darby Chang) 1 In the previous slide Error (motivation) Floating point number system difference to real number system problem of roundoff Introduced/propagated

More information

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

Nonlinear Equations. Not guaranteed to have any real solutions, but generally do for astrophysical problems. Nonlinear Equations Often (most of the time??) the relevant system of equations is not linear in the unknowns. Then, cannot decompose as Ax = b. Oh well. Instead write as: (1) f(x) = 0 function of one

More information

Root Finding (and Optimisation)

Root Finding (and Optimisation) Root Finding (and Optimisation) M.Sc. in Mathematical Modelling & Scientific Computing, Practical Numerical Analysis Michaelmas Term 2018, Lecture 4 Root Finding The idea of root finding is simple we want

More information

Student Study Session. Theorems

Student Study Session. Theorems Students should be able to apply and have a geometric understanding of the following: Intermediate Value Theorem Mean Value Theorem for derivatives Extreme Value Theorem Name Formal Statement Restatement

More information

Root finding. Eugeniy E. Mikhailov. Lecture 05. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10

Root finding. Eugeniy E. Mikhailov. Lecture 05. The College of William & Mary. Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10 Root finding Eugeniy E. Mikhailov The College of William & Mary Lecture 05 Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10 Root finding problem Generally we want to solve the following canonical

More information

Finding Roots of Equations

Finding Roots of Equations Finding Roots of Equations Solution Methods Overview Bisection/Half-interval Search Method of false position/regula Falsi Secant Method Newton Raphson Iteration Method Many more. Open Methods Bracketing

More information

CS 221 Lecture 9. Tuesday, 1 November 2011

CS 221 Lecture 9. Tuesday, 1 November 2011 CS 221 Lecture 9 Tuesday, 1 November 2011 Some slides in this lecture are from the publisher s slides for Engineering Computation: An Introduction Using MATLAB and Excel 2009 McGraw-Hill Today s Agenda

More information

Chapter 2 Linear Equations and Inequalities in One Variable

Chapter 2 Linear Equations and Inequalities in One Variable Chapter 2 Linear Equations and Inequalities in One Variable Section 2.1: Linear Equations in One Variable Section 2.3: Solving Formulas Section 2.5: Linear Inequalities in One Variable Section 2.6: Compound

More information

Solutions of Equations in One Variable. Newton s Method

Solutions of Equations in One Variable. Newton s Method Solutions of Equations in One Variable Newton s Method Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University c 2011 Brooks/Cole,

More information

Root Finding For NonLinear Equations Bisection Method

Root Finding For NonLinear Equations Bisection Method Root Finding For NonLinear Equations Bisection Method P. Sam Johnson November 17, 2014 P. Sam Johnson (NITK) Root Finding For NonLinear Equations Bisection MethodNovember 17, 2014 1 / 26 Introduction The

More information

Instructor: Marios M. Fyrillas HOMEWORK ASSIGNMENT ON NUMERICAL SOLUTION OF NONLINEAR EQUATIONS

Instructor: Marios M. Fyrillas HOMEWORK ASSIGNMENT ON NUMERICAL SOLUTION OF NONLINEAR EQUATIONS AMAT 34 Numerical Methods Instructor: Marios M. Fyrillas Email: m.fyrillas@fit.ac.cy Office Tel.: 34559/60 Ext. 3 HOMEWORK ASSIGNMENT ON NUMERICAL SOLUTION OF NONLINEAR EQUATIONS Question You are required

More information

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

More information

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

Variable. Peter W. White Fall 2018 / Numerical Analysis. Department of Mathematics Tarleton State University Newton s Iterative s Peter W. White white@tarleton.edu Department of Mathematics Tarleton State University Fall 2018 / Numerical Analysis Overview Newton s Iterative s Newton s Iterative s Newton s Iterative

More information

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

Root finding. Root finding problem. Root finding problem. Root finding problem. Notes. Eugeniy E. Mikhailov. Lecture 05. Notes Root finding Eugeniy E. Mikhailov The College of William & Mary Lecture 05 Eugeniy Mikhailov (W&M) Practical Computing Lecture 05 1 / 10 2 sin(x) 1 = 0 2 sin(x) 1 = 0 Often we have a problem which looks

More information

Computational Methods. Solving Equations

Computational Methods. Solving Equations Computational Methods Solving Equations Manfred Huber 2010 1 Solving Equations Solving scalar equations is an elemental task that arises in a wide range of applications Corresponds to finding parameters

More information

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015

CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 CLASS NOTES Computational Methods for Engineering Applications I Spring 2015 Petros Koumoutsakos Gerardo Tauriello (Last update: July 2, 2015) IMPORTANT DISCLAIMERS 1. REFERENCES: Much of the material

More information

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

Math 4329: Numerical Analysis Chapter 03: Newton s Method. Natasha S. Sharma, PhD Mathematical question we are interested in numerically answering How to find the x-intercepts of a function f (x)? These x-intercepts are called the roots of the equation f (x) = 0. Notation: denote the

More information

15 Nonlinear Equations and Zero-Finders

15 Nonlinear Equations and Zero-Finders 15 Nonlinear Equations and Zero-Finders This lecture describes several methods for the solution of nonlinear equations. In particular, we will discuss the computation of zeros of nonlinear functions f(x).

More information

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

Nonlinearity Root-finding Bisection Fixed Point Iteration Newton s Method Secant Method Conclusion. Nonlinear Systems Nonlinear Systems CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James (and Justin Solomon) CS 205A: Mathematical Methods Nonlinear Systems 1 / 27 Part III: Nonlinear Problems Not

More information

Scientific Computing. Roots of Equations

Scientific Computing. Roots of Equations ECE257 Numerical Methods and Scientific Computing Roots of Equations Today s s class: Roots of Equations Polynomials Polynomials A polynomial is of the form: ( x) = a 0 + a 1 x + a 2 x 2 +L+ a n x n f

More information

TWO METHODS FOR OF EQUATIONS

TWO METHODS FOR OF EQUATIONS TWO METHODS FOR FINDING ROOTS OF EQUATIONS Closed (Bracketing) Methods Open Methods Motivation: i In engineering applications, it is often necessary to determine the rootofan of equation when a formula

More information

We saw in Section 5.1 that a limit of the form. arises when we compute an area.

We saw in Section 5.1 that a limit of the form. arises when we compute an area. INTEGRALS 5 INTEGRALS Equation 1 We saw in Section 5.1 that a limit of the form n lim f ( x *) x n i 1 i lim[ f ( x *) x f ( x *) x... f ( x *) x] n 1 2 arises when we compute an area. n We also saw that

More information

MA 8019: Numerical Analysis I Solution of Nonlinear Equations

MA 8019: Numerical Analysis I Solution of Nonlinear Equations MA 8019: Numerical Analysis I Solution of Nonlinear Equations Suh-Yuh Yang ( 楊肅煜 ) Department of Mathematics, National Central University Jhongli District, Taoyuan City 32001, Taiwan syyang@math.ncu.edu.tw

More information

A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions

A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions Applied Mathematical Sciences, Vol 1, 018, no 3, 137-146 HIKARI Ltd, wwwm-hikaricom https://doiorg/101988/ams018811 A Review of Bracketing Methods for Finding Zeros of Nonlinear Functions Somkid Intep

More information

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.

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. Maria Cameron 1. Fixed point methods for solving nonlinear equations We address the problem of solving an equation of the form (1) r(x) = 0, where F (x) : R n R n is a vector-function. Eq. (1) can be written

More information

Optimization and Calculus

Optimization and Calculus Optimization and Calculus To begin, there is a close relationship between finding the roots to a function and optimizing a function. In the former case, we solve for x. In the latter, we solve: g(x) =

More information

Justify all your answers and write down all important steps. Unsupported answers will be disregarded.

Justify all your answers and write down all important steps. Unsupported answers will be disregarded. Numerical Analysis FMN011 10058 The exam lasts 4 hours and has 13 questions. A minimum of 35 points out of the total 70 are required to get a passing grade. These points will be added to those you obtained

More information

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

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 5. Nonlinear Equations Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T Heath Chapter 5 Nonlinear Equations Copyright c 2001 Reproduction permitted only for noncommercial, educational

More information

SECTION A. f(x) = ln(x). Sketch the graph of y = f(x), indicating the coordinates of any points where the graph crosses the axes.

SECTION A. f(x) = ln(x). Sketch the graph of y = f(x), indicating the coordinates of any points where the graph crosses the axes. SECTION A 1. State the maximal domain and range of the function f(x) = ln(x). Sketch the graph of y = f(x), indicating the coordinates of any points where the graph crosses the axes. 2. By evaluating f(0),

More information

Solution of Nonlinear Equations

Solution of Nonlinear Equations Solution of Nonlinear Equations (Com S 477/577 Notes) Yan-Bin Jia Sep 14, 017 One of the most frequently occurring problems in scientific work is to find the roots of equations of the form f(x) = 0. (1)

More information

Lecture 10: Powers of Matrices, Difference Equations

Lecture 10: Powers of Matrices, Difference Equations Lecture 10: Powers of Matrices, Difference Equations Difference Equations A difference equation, also sometimes called a recurrence equation is an equation that defines a sequence recursively, i.e. each

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 5 Nonlinear Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign Copyright c 2002. Reproduction

More information

R x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n

R x n. 2 R We simplify this algebraically, obtaining 2x n x n 1 x n x n Math 42 Homework 4. page 3, #9 This is a modification of the bisection method. Write a MATLAB function similar to bisect.m. Here, given the points P a a,f a and P b b,f b with f a f b,we compute the point

More information

PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9.

PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9. PHYS 410/555 Computational Physics Solution of Non Linear Equations (a.k.a. Root Finding) (Reference Numerical Recipes, 9.0, 9.1, 9.4) We will consider two cases 1. f(x) = 0 1-dimensional 2. f(x) = 0 d-dimensional

More information

Lecture 10: Finite Differences for ODEs & Nonlinear Equations

Lecture 10: Finite Differences for ODEs & Nonlinear Equations Lecture 10: Finite Differences for ODEs & Nonlinear Equations J.K. Ryan@tudelft.nl WI3097TU Delft Institute of Applied Mathematics Delft University of Technology 21 November 2012 () Finite Differences

More information

Finding roots. Lecture 4

Finding roots. Lecture 4 Finding roots Lecture 4 Finding roots: Find such that 0 or given. Bisection method: The intermediate value theorem states the obvious: i a continuous unction changes sign within a given interval, it has

More information

5.1 Increasing and Decreasing Functions. A function f is decreasing on an interval I if and only if: for all x 1, x 2 I, x 1 < x 2 = f(x 1 ) > f(x 2 )

5.1 Increasing and Decreasing Functions. A function f is decreasing on an interval I if and only if: for all x 1, x 2 I, x 1 < x 2 = f(x 1 ) > f(x 2 ) 5.1 Increasing and Decreasing Functions increasing and decreasing functions; roughly DEFINITION increasing and decreasing functions Roughly, a function f is increasing if its graph moves UP, traveling

More information

Math 117: Calculus & Functions II

Math 117: Calculus & Functions II Drexel University Department of Mathematics Jason Aran Math 117: Calculus & Functions II Contents 0 Calculus Review from Math 116 4 0.1 Limits............................................... 4 0.1.1 Defining

More information

Investigating Limits in MATLAB

Investigating Limits in MATLAB MTH229 Investigating Limits in MATLAB Project 5 Exercises NAME: SECTION: INSTRUCTOR: Exercise 1: Use the graphical approach to find the following right limit of f(x) = x x, x > 0 lim x 0 + xx What is the

More information

Applied Mathematics Letters. Combined bracketing methods for solving nonlinear equations

Applied Mathematics Letters. Combined bracketing methods for solving nonlinear equations Applied Mathematics Letters 5 (01) 1755 1760 Contents lists available at SciVerse ScienceDirect Applied Mathematics Letters journal homepage: www.elsevier.com/locate/aml Combined bracketing methods for

More information

Chapter 4. Solution of a Single Nonlinear Algebraic Equation

Chapter 4. Solution of a Single Nonlinear Algebraic Equation Single Nonlinear Algebraic Equation - 56 Chapter 4. Solution of a Single Nonlinear Algebraic Equation 4.1. Introduction Life, my fris, is nonlinear. As such, in our roles as problem-solvers, we will be

More information

Lecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from

Lecture 44. Better and successive approximations x2, x3,, xn to the root are obtained from Lecture 44 Solution of Non-Linear Equations Regula-Falsi Method Method of iteration Newton - Raphson Method Muller s Method Graeffe s Root Squaring Method Newton -Raphson Method An approximation to the

More information

Solution of nonlinear equations

Solution of nonlinear equations Chapter 1 Solution of nonlinear equations This chapter is devoted the problem of locating roots of equations (or zeros functions). The problem occurs frequently in scientific work. In this chapter we are

More information