Bracketing Methods Chapter 5 The Islamic University of Gaza

Slides:



Advertisements
Similar presentations
Chapter 6: Roots: Open Methods
Advertisements

Lecture 5 Newton-Raphson Method
Roundoff and truncation errors
CSE 330: Numerical Methods
Roots: Bracketing Methods
Roots of Equations Our first real numerical method – Root finding
Civil Engineering Majors Author(s): Autar Kaw, Jai Paul
Open Methods Chapter 6 The Islamic University of Gaza
ROOTS OF EQUATIONS Student Notes ENGR 351 Numerical Methods for Engineers Southern Illinois University Carbondale College of Engineering Dr. L.R. Chevalier.
Open Methods Chapter 6 The Islamic University of Gaza
Open Methods Chapter 6 The Islamic University of Gaza
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 7 Roots of Equations Bracketing Methods.
Chapter 4 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.
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.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Solution of Nonlinear Equations: Lecture (I)
Open Methods Chapter 6 The Islamic University of Gaza
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.
NUMERICAL METHODS WITH C++ PROGRAMMING
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 8 Roots of Equations Open Methods.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 1 Mathematical Modeling.
Fin500J: Mathematical Foundations in Finance Topic 3: Numerical Methods for Solving Non-linear Equations Philip H. Dybvig Reference: Numerical Methods.
- + 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)
Solving Non-Linear Equations (Root Finding)
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 2 Roots of Equations Why? But.
Chapter 6 Finding the Roots of Equations
Lecture Notes Dr. Rakhmad Arief Siregar Universiti Malaysia Perlis
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.
Lecture 3 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
Lecture 6 Numerical Analysis. Solution of Non-Linear Equations Chapter 2.
1 Solution of Nonlinear Equation Dr. Asaf Varol
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.
CHAPTER 3 NUMERICAL METHODS
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 ~ Roots of Equations ~ Bracketing Methods Chapter 5.
Newton’s Method, Root Finding with MATLAB and Excel
Numerical Methods and Computational Techniques Solution of Transcendental and Polynomial Equations.
MECN 3500 Inter - Bayamon Lecture 6 Numerical Methods for Engineering MECN 3500 Professor: Dr. Omar E. Meza Castillo
4 Numerical Methods Root Finding Secant Method Modified Secant
Lecture 5 - Single Variable Problems CVEN 302 June 12, 2002.
ME 142 Engineering Computation I Root Finding & Iterative Solutions.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 7 Roots of Polynomials.
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)
Solution of Nonlinear Equations Topic: Bisection method
Numerical Methods Solution of Equation.
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
4 Numerical Methods Root Finding Secant Method Modified Secant
1/29/ Bisection Method Computer Engineering Majors Authors: Autar Kaw, Jai Paul
SOLVING NONLINEAR EQUATIONS. SECANT METHOD MATH-415 Numerical Analysis 1.
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.
Numerical Methods and Optimization C o u r s e 1 By Bharat R Chaudhari.
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
Bracketing Methods (Bisection Method)
Read Chapters 5 and 6 of the textbook
Part 2 / Chapter 5.
Roots: Bracketing Methods
Roots: Bracketing Methods
Roots of Polynomials Chapter 7 The Islamic University of Gaza
Presentation transcript:

Bracketing Methods Chapter 5 The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 5 Bracketing Methods

PART II ROOTS OF EQUATIONS Bracketing Methods Bisection method False Position Method Open Methods Simple fixed point iteration Newton Raphson Secant Modified Newton Raphson System of Nonlinear Equations Roots of polynomials Muller Method

Study Objectives for Part Two

ROOTS OF EQUATIONS Root of an equation: is the value of the equation variable which make the equations = 0.0 But

ROOTS OF EQUATIONS Non-computer methods: - Closed form solution (not always available) - Graphical solution (inaccurate) Numerical systematic methods suitable for computers

The roots exist where f(x) crosses the x-axis. Graphical Solution Plot the function f(x) f(x) roots The roots exist where f(x) crosses the x-axis. x f(x)=0 f(x)=0

Graphical Solution: Example The parachutist velocity is What is the drag coefficient c needed to reach a velocity of 40 m/s if m=68.1 kg, t =10 s, g= 9.8 m/s2 c f(c) c=14.75 Check: F (14.75) = 0.059 ~ 0.0 v (c=14.75) = 40.06 ~ 40 m/s

Numerical Systematic Methods I. Bracketing Methods f(x) f(x) No roots or even number of roots Odd number of roots f(xl)=+ve f(xl)=+ve roots roots f(xu)=+ve x x xl xu f(xu)=-ve xl xu

Bracketing Methods (cont.) Two initial guesses (xl and xu) are required for the root which bracket the root (s). If one root of a real and continuous function, f(x)=0, is bounded by values xl , xu then f(xl).f(xu) <0. (The function changes sign on opposite sides of the root)

Bracketing Methods 1. Bisection Method Generally, if f(x) is real and continuous in the interval xl to xu and f (xl).f(xu)<0, then there is at least one real root between xl and xu to this function. The interval at which the function changes sign is located. Then the interval is divided in half with the root lies in the midpoint of the subinterval. This process is repeated to obtained refined estimates.

Step 1: Choose lower xl and upper xu guesses for the root such that: f(x) Step 1: Choose lower xl and upper xu guesses for the root such that: f(xl).f(xu)<0 Step 2: The root estimate is: xr = ( xl + xu )/2 Step 3: Subdivide the interval according to: If (f(xl).f(xr)<0) the root lies in the lower subinterval; xu = xr and go to step 2. If (f(xl).f(xr)>0) the root lies in the upper subinterval; xl = xr and go to step 2. If (f(xl).f(xr)=0) the root is xr and stop xr = ( xl + xu )/2 f(xu) xl xr1 xu x f(xu) f(xr1) f(x) (f(xl).f(xr)<0): xu = xr xr = ( xl + xu )/2 f(xu) f(xr2) xl xu x xr2 f(xu)

Bisection Method - Termination Criteria For the Bisection Method ea > et The computation is terminated when ea becomes less than a certain criterion (ea < es)

Bisection method: Example The parachutist velocity is What is the drag coefficient c needed to reach a velocity of 40 m/s if m = 68.1 kg, t = 10 s, g= 9.8 m/s2 f(c) c

and so on…... f(x) Assume xl =12 and xu=16 f(xl)=6.067 and f(xu)=-2.269 The root: xr=(xl+xu)/2= 14 Check f(12).f(14) = 6.067•1.569=9.517 >0; the root lies between 14 and 16. Set xl = 14 and xu=16, thus the new root xr=(14+ 16)/2= 15 Check f(14).f(15) = 1.569•-0.425= -0.666 <0; the root lies bet. 14 and 15. Set xl = 14 and xu=15, thus the new root xr=(14+ 15)/2= 14.5 and so on…... 6.067 1.569 x 12 14 16 -2.269 f(x) (f(12).f(14)>0): xl = 14 1.569 15 x 14 16 -0.425 -2.269

Bisection method: Example In the previous example, if the stopping criterion is et = 0.5%; what is the root? Iter. Xl Xu Xr ea% et% 1 12 16 14 5.279 -- 2 14 16 15 6.667 1.487 3 14 15 14.5 3.448 1.896 4 14.5 15 14.75 1.695 1.204 5 14.75 15 14.875 0.84 0.641 6 14.74 14.875 14.813 0.422 0.291

Bisection method

Flow Chart –Bisection Start False Stop Input: xl , xu , s, maxi f(xl). f(xu)<0 i=0 a=1.1s False while a> s & i <maxi Stop Print: xr , f(xr ) ,a , i

True Test=0 Test<0 False xu+xl =0 Test=f(xl). f(xr) a=0.0 xu=xr xl=xr False

Bracketing Methods 2. False-position Method The bisection method divides the interval xl to xu in half not accounting for the magnitudes of f(xl) and f(xu). For example if f(xl) is closer to zero than f(xu), then it is more likely that the root will be closer to f(xl). False position method is an alternative approach where f(xl) and f(xu) are joined by a straight line; the intersection of which with the x-axis represents and improved estimate of the root.

2. False-position Method False position method is an alternative approach where f(xl) and f(xu) are joined by a straight line; the intersection of which with the x-axis represents and improved estimate of the root.

False-position Method -Procedure f(x) f(xu) xl xr xu x f(xl) f(xr)

False-position Method -Procedure Step 1: Choose lower xl and upper xu guesses for the root such that: f(xl).f(xu)<0 Step 2: The root estimate is: Step 3: Subdivide the interval according to: If (f(xl).f(xr)<0) the root lies in the lower subinterval; xu = xr and go to step 2. If (f(xl).f(xr)>0) the root lies in the upper subinterval; xl = xr and go to step 2. If (f(xl).f(xr)=0) the root is xr and stop

False position method: Example The parachutist velocity is What is the drag coefficient c needed to reach a velocity of 40 m/s if m =68.1 kg, t =10 s, g= 9.8 m/s2 f(c) c

False position method: Example Assume xl = 12 and xu=16 f(xl)= 6.067 and f(xu)= -2.269 The root: xr=14.9113 f(12) . f(14.9113) = -1.5426 < 0; The root lies bet. 12 and 14.9113. Assume xl = 12 and xu=14.9113, f(xl)=6.067 and f(xu)=-0.2543 The new root xr= 14.7942 This has an approximate error of 0.79% f(x) 6.067 14.91 x 12 16 -2.269

False position method: Example

Flow Chart –False Position Start Input: xl , x0 , s, maxi f(xl). f(xu)<0 i=0 a=1.1s False while a> s & i <maxi Stop Print: xr , f(xr ) ,a , i

True Test=0 Test<0 False i=1 or xr=0 Test=f(xl). f(xr) a=0.0 xu=xr xr0=xr Test<0 xl=xr False

False Position Method-Example 2

False Position Method - Example 2

Roots of Polynomials: Using Software Packages MS Excel:Goal seek f(x)=x-cos x

MS Excel: Solver u(x,y)= x2+xy-10 =0 v(x,y)=y+3xy2-57=0