CSCE 206 1 Finding Roots of Equations This is a fundamental computational problem Several methods exist. We will look at the bisection method and at Newton’s.

Slides:



Advertisements
Similar presentations
Numerical Computation Lecture 4: Root Finding Methods - II United International College.
Advertisements

Roundoff and truncation errors
CSE 330: Numerical Methods
Newton’s Method finds Zeros Efficiently finds Zeros of an equation: –Solves f(x)=0 Why do we care?
Roots: Bracketing Methods
Civil Engineering Majors Author(s): Autar Kaw, Jai Paul
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Regula-Falsi Method. Type of Algorithm (Equation Solver) The Regula-Falsi Method (sometimes called the False Position Method) is a method used to find.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 7 Roots of Equations Bracketing Methods.
PHYS2020 NUMERICAL ALGORITHM NOTES ROOTS OF EQUATIONS.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 51.
Roots of Equations Open Methods (Part 2).
CSCE Review—Fortran. CSCE Review—I/O Patterns: Read until a sentinel value is found Read n, then read n things Read until EOF encountered.
Second Term 05/061 Roots of Equations Bracketing Methods.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 6 Roots of Equations Bracketing Methods.
Roots of Equations Bracketing Methods.
Lecture 1: Numerical Solution of Non-linear equations.
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.
Bracketing Methods Chapter 5 The Islamic University of Gaza
- + Suppose f(x) is a continuous function of x within interval [a, b]. f(a) = - ive and f(b) = + ive There exist at least a number p in [a, b] with f(p)
Numerical Analysis 1 EE, NCKU Tien-Hao Chang (Darby Chang)
Roots of Equations Chapter 3. Roots of Equations Also called “zeroes” of the equation –A value x such that f(x) = 0 Extremely important in applications.
Solving Non-Linear Equations (Root Finding)
CMPSC 200 Spring 2013 Lecture 38 November 18 or 20, 2013 (depending on section)
Bisection Plus Algorithms Presented by Namir Shammas 1.
Introduction This chapter gives you several methods which can be used to solve complicated equations to given levels of accuracy These are similar to.
Numerical Methods Applications of Loops: The power of MATLAB Mathematics + Coding 1.
7 January 2011 Algebra 2. Solving Quadratics by Graphing 1/7 Using a Graph To solve a quadratic equation with a graph, look for the points where the graph.
10/21/ Bisection Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
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.
Graphics Graphics Korea University kucg.korea.ac.kr 2. Solving Equations of One Variable Korea University Computer Graphics Lab. Lee Seung Ho / Shin.
Extreme Values of Functions Sec. 4.1 Notes. The textbook gives the following example at the start of chapter 4: The mileage of a certain car can be approximated.
Newton’s Method Other Recursive Methods Modified Fixed Point Method.
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.
Newton’s Method, Root Finding with MATLAB and Excel
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
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 5 Bracketing Methods.
Applications of Loops: The power of MATLAB Mathematics + Coding
Solution of Nonlinear Equations Topic: Bisection method
Numerical Methods Solution of Equation.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
1/29/ Bisection Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
Linearization, Newton’s Method
Recursive Methods for Finding Roots of Functions Bisection & Newton’s Method.
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
Warm Up Write an equation of the tangent line to the curve at the given point. 1)f(x)= x 3 – x + 1 where x = -1 2)g(x) = 3sin(x/2) where x = π/2 3)h(x)
3/7/ Bisection Method Electrical Engineering Majors Authors: Autar Kaw, Jai Paul
CSE 330: Numerical Methods. What is true error? True error is the difference between the true value (also called the exact value) and the approximate.
Lecture 4 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
7/11/ Bisection Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
MATH342: Numerical Analysis Sunjae Kim.
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.
Absolute Values and Radicals
Bracketing Methods (Bisection Method)
Solution of Nonlinear Equations (Root finding Problems
Roots of equations Class IX.
SOLUTION OF NONLINEAR EQUATIONS
Sec:5.2 The Bisection Method.
Copyright © Cengage Learning. All rights reserved.
MATH 1910 Chapter 3 Section 8 Newton’s Method.
Solutions for Nonlinear Equations
Presentation transcript:

CSCE Finding Roots of Equations This is a fundamental computational problem Several methods exist. We will look at the bisection method and at Newton’s method

CSCE Roots of Equations by Bisection If f(x1) and f(x2) are of opposite signs, and if f(x) is a continuous function, then there must be a root of f(x) somewhere between x1 and x2

CSCE Roots of Equations by Bisection (2) if f(x_lower)*f(x_upper) < 0 x_middle = (x_lower + x_upper)/2 if(f(x_lower)*f(x_middle) < 0) x_upper = x_middle (use lower and middle) else x_lower = x_middle (use middle and upper) endif (Repeat until (x_middle – x_lower) < tolerance

CSCE Roots of Equations by Bisection (3) We stop on an absolute condition on the root itself— since the root lies between lower and upper, the error in the root if we choose the middle as the approx root is lessequal the distance from the middle to either endpoint. Reasonably fast, reasonably foolproof, and trivial to program.

CSCE Roots of Equations by Bisection (4) What if we don’t have x-values for which f(x) is of opposite signs? Then we will have to search for values that do. This isn’t necessarily easy…

CSCE The End

CSCE Roots by Newton’s Method Given any value x0, then f’(x0) is the slope of the tangent line If x1 is the point at which the tangent line crosses the x-axis, then we have (f(x0) – f(x1))/(x0 – x1) = f’(x0) Since f(x1) = 0, we solve to get x1 = x0 – f(x0)/f’(x0)

CSCE Roots by Newton’s Method (2) If we have any point x0 and we can compute f(x) and f’(x), then iterate x n+1 = x n – f(x n )/f’(x n ) Unlike the bisection method, we do not have an absolute stopping criterion We stop when ABS(f(x n )/f’(x n )) gets small, because then our approximation to a root is no longer changing very much

CSCE Roots by Newton’s Method (3) Newton’s method, when it works, converges very quickly (5-6 iterations instead of 20 for simple, student-exercise-like functions) Newton’s method also does not require that we have bracketed the location of a root, as in bisection But it doesn’t always work. On a function with no root, it may run forever. There are functions for which it won’t work at all.

CSCE Square Roots by Newton’s Method (4) One function on which Newton works brilliantly is x**2 – a that is, square roots For square roots, Newton can be shown to be the best possible method given the accuracy of the intermediate values used.

CSCE The End