Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Bracketing Methods Chapter 5.

Slides:



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

Part 2 Chapter 6 Roots: Open Methods
Roots: Bracketing Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 One-Dimensional Unconstrained Optimization Chapter.
Roots of Equations Our first real numerical method – Root finding
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 61.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Ordinary Differential Equations Equations which are.
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).
Chapter 6 Open Methods.
Second Term 05/061 Roots of Equations Bracketing Methods.
Open Methods (Part 1) Fixed Point Iteration & Newton-Raphson Methods
Roots of Equations Bracketing Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 181 Interpolation Chapter 18 Estimation of intermediate.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 181 Interpolation.
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
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Roots of Equations Open Methods Second Term 05/06.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 171 Least.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Part 31 Chapter.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Standing.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 2 Image Slides.
Chapter 8 Traffic-Analysis Techniques. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8-1.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Linear Algebraic Equations ~ Gauss Elimination Chapter.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Numerical Differentiation and Integration Part 6 Calculus.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 31.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
CMPSC 200 Spring 2013 Lecture 38 November 18 or 20, 2013 (depending on section)
Chapter 6 Finding the Roots of Equations
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 111.
Part 2 Chapter 5 Roots: Bracketing Methods PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright © The McGraw-Hill.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Open Methods Chapter 6 Credit:
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Numerical Differentiation and Integration ~ Integration.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 71.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. ~ Ordinary Differential Equations ~ Stiffness and Multistep.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 261 Stiffness.
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
Newton’s Method, Root Finding with MATLAB and Excel
Applied Numerical Methods
4 Numerical Methods Root Finding Secant Method Modified Secant
ROOTS OF EQUATIONS. Bracketing Methods The Bisection Method The False-Position Method Open Methods Simple Fixed-Point Iteration The Secant Method.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5 Bracketing Methods.
Solving Non-Linear Equations (Root Finding)
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Applied Numerical Methods With MATLAB ® for Engineers.
Today’s class Numerical differentiation Roots of equation Bracketing methods Numerical Methods, Lecture 4 1 Prof. Jinbo Bi CSE, UConn.
Roots: Bracketing Methods
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. by Lale Yurttas, Texas A&M University Chapter 271 Boundary-Value.
4 Numerical Methods Root Finding Secant Method Modified Secant
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 - Chapter 7 Optimization.
Chapter 13 Transportation Demand Analysis. Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display
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.
Solution of Nonlinear Equations ( Root Finding Problems ) Definitions Classification of Methods  Analytical Solutions  Graphical Methods  Numerical.
CSE 330: Numerical Methods. Introduction The bisection and false position method require bracketing of the root by two guesses Such methods are called.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 / Chapter 5.
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
4 Numerical Methods Root Finding Secant Method Modified Secant
Bracketing Methods (Bisection Method)
~ Roots of Equations ~ Bracketing Methods Chapter 5
Part 2 / Chapter 5.
Computers in Civil Engineering 53:081 Spring 2003
Roots: Bracketing Methods
Roots: Bracketing Methods
Presentation transcript:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Bracketing Methods Chapter 5 Credit: Prof. Lale Yurttas, Chemical Eng., Texas A&M University

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 2 Easy But, not easy How about these? Roots of Equations

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Graphical Approach Make a plot of the function f(x) and observe where it crosses the x-axis, i.e. f(x) = 0 Not very practical but can be used to obtain rough estimates for roots These estimates can be used as initial guesses for numerical methods that we’ll study here. Using MATLAB, plot f(x)=sin(10x)+cos(3x) Two distinct roots between x= 4.2 and 4.3 need to be careful

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 4 *hereA* Bracketing: Odd and even number of roots exceptions

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Bisection Method Termination criteria:  <  tol OR Max.Iteration is reached

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 6 % Bisection Method % function is available in another file e.g. func1.m % A sample call: -2, 4, 0.001, 500) function root = bisection(fx, xl, xu, es, imax); if fx(xl)*fx(xu) > 0 % if guesses do not bracket disp('no bracket') return end for i=1:1:imax xr=(xu+xl)/2 ea = abs((xu-xl)/xl); test= fx(xl)*fx(xr); if test < 0 xu=xr; end if test > 0 xl=xr; end if test == 0 ea=0; end if ea < es break; end MATLAB code Bisection Method Minimize function evaluations in the code. Why? Because they are costly (takes more time)

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 7 How Many Iterations will It Take? Length of the first IntervalL o = x u - x l After 1 iterationL 1 =L o /2 After 2 iterationsL 2 =L o /4 ….. After k iterationsL k =L o /2 k Then we can write:

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 8 Bisection Method Pros Easy Always finds a root Number of iterations required to attain an absolute error can be computed a priori. Cons Slow Need to find initial guesses for x l and x u No account is taken of the fact that if f(x l ) is closer to zero, it is likely that root is closer to x l.

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 9 The False-Position Method (Regula-Falsi) We can approximate the solution by doing a linear interpolation between f(x u ) and f(x l ) Find x r such that l(x r )=0, where l(x) is the linear approximation of f(x) between x l and x u Derive x r using similar triangles

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. The False-Position Method Works well, but not always!  Here is a pitfall  Modified False-Position One way to mitigate the “one-sided” nature of the false position (i.e. the pitfall case) is to have the algorithm pick the smallest bracket (between the Bisection Method & this one)

Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 11 How to find good initial guesses? Start at one end of the region of interest (x a ) and evaluate f(x a ), f(x a +  x), f(x a +2  x), f(x a +3  x), Continue until the sign of the result changes. If that happens between f(x a +k*  x) and f(x a +(k+1)*  x) then pick x l = x a +k*  x and x u = x a +(k+1)*  x Problem: if  x is too small  search is very time consuming if  x is too large  could jump over two closely spaced roots Suggestions: Generate random x values and evaluate f(x) each time until you find two values that satisfy f(x1)*f(x2) < 0 Know the application and plot the function to see the location of the roots, and pick x l and x u accordingly to start the iterations.