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

Slides:



Advertisements
Similar presentations
Lecture 5 Newton-Raphson Method
Advertisements

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.
Roots of Equations Open Methods (Part 2).
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.
The Islamic University of Gaza Faculty of Engineering Civil Engineering Department Numerical Analysis ECIV 3306 Chapter 3 Approximations and Errors.
ECIV 301 Programming & Graphics Numerical Methods for Engineers Lecture 9 Roots of Equations Open Methods.
Copyright © 2006 The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Martin Mendez UASLP Chapter 61 Unit II.
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.
Bracketing Methods Chapter 5 The Islamic University of Gaza
Roots of Equations Open Methods Second Term 05/06.
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.
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.
Today’s class Roots of equation Finish up incremental search
4 Numerical Methods Root Finding Secant Method Modified Secant
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 7 Roots of Polynomials.
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.
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.
7/11/ Bisection Method Major: All Engineering Majors Authors: Autar Kaw, Jai Paul
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)
~ Roots of Equations ~ Bracketing Methods Chapter 5
Read Chapters 5 and 6 of the textbook
MATH 2140 Numerical Methods
Part 2 / Chapter 5.
Computers in Civil Engineering 53:081 Spring 2003
Roots: Bracketing Methods
Roots: Bracketing Methods
Roots of Polynomials Chapter 7 The Islamic University of Gaza
Presentation transcript:

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

PART II ROOTS OF EQUATIONS Roots of Equations Bracketing Methods Bisection methodFalse Position Method Open Methods Simple fixed point iterationNewton RaphsonSecantModified 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

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

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/s 2 Check: F (14.75) = ~ 0.0 v (c=14.75) = ~ 40 m/s

Numerical Systematic Methods I. Bracketing Methods f(x) x roots f(x l )=+ve f(x u )=+ve xlxl xuxu No roots or even number of roots f(x) x roots f(x l )=+ve f(x u )=-ve xlxl xuxu Odd number of roots

Bracketing Methods (cont.) Two initial guesses (x l and x u ) 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 x l, x u then f(x l ).f(x u ) <0. (The function changes sign on opposite sides of the root)

Special Cases

Effect of computer scale resolution

Bracketing Methods 1. Bisection Method Generally, if f(x) is real and continuous in the interval x l to x u and f (x l ).f(x u )<0, then there is at least one real root between x l and x u 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.

f(x) x xuxu xlxl f(x u ) x r1 f(x) x xuxu xlxl f(x u ) x r2 x r = ( x l + x u )/2 f(x u ) f(x r1 ) f(x r2 ) (f(x l ).f(x r )<0): x u = x r x r = ( x l + x u )/2 Step 1: Choose lower x l and upper x u guesses for the root such that: f(x l ).f(x u )<0 Step 2: The root estimate is: x r = ( x l + x u )/2 Step 3: Subdivide the interval according to: – If (f(x l ).f(x r )<0) the root lies in the lower subinterval; x u = x r and go to step 2. – If (f(x l ).f(x r )>0) the root lies in the upper subinterval; x l = x r and go to step 2. – If (f(x l ).f(x r )=0) the root is x r and stop

Bisection Method - Termination Criteria For the Bisection Method  a >  t The computation is terminated when  a becomes less than a certain criterion (  a <  s )

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/s 2 f(c) c

f(x) x f(x) x (f(12).f(14)>0): x l = 14 1.Assume x l =12 and x u =16 f(x l )=6.067 and f(x u )= The root: x r =(x l +x u )/2= 14 3.Check f(12).f(14) = =9.517 >0; the root lies between 14 and Set x l = 14 and x u =16, thus the new root x r =(14+ 16)/2= 15 5.Check f(14).f(15) = = <0; the root lies bet. 14 and Set x l = 14 and x u =15, thus the new root x r =(14+ 15)/2= 14.5 and so on…... 15

Iter. X l X u X r  a %  t % In the previous example, if the stopping criterion is  t = 0.5%; what is the root? Bisection method: Example

Bisection method

Flow Chart –Bisection Start Input: x l, x u,  s, maxi f(x l ). f(x u )<0 i=0  a =1.1  s False while  a >  s & i <maxi False Stop Print: x r, f(x r ),  a, i

x u +x l =0 True Test=f(x l ). f(x r )  a =0.0 Test=0 x u =x r Test<0 x l =x r True False

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

f(x) x xuxu xlxl f(x u ) f(x l ) xrxr f(x r ) False-position Method -Procedure

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

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/s 2 f(c) c

f(x) x False position method: Example 1.Assume x l = 12 and x u =16 f(x l )= and f(x u )= The root: x r = f(12). f( ) = < 0; 3.The root lies bet. 12 and Assume x l = 12 and x u = , f(x l )=6.067 and f(x u )= The new root x r = This has an approximate error of 0.79%

False position method: Example

Flow Chart –False Position Start Input: x l, x 0,  s, maxi f(x l ). f(x u )<0 i=0  a =1.1  s False while  a >  s & i <maxi False Stop Print: x r, f(x r ),  a, i

i=1 or x r =0 True Test=f(x l ). f(x r )  a =0.0 Test=0 x u =x r x r0 =x r Test<0 x l =x r x r0 =x r True False

False Position Method-Example 2

Pitfalls of the False Position Method Although a method such as false position is often superior to bisection, there are some cases (when function has significant curvature that violate this general conclusion. In such cases, the approximate error might be misleading and the results should always be checked by substituting the root estimate into the original equation and determining whether the result is close to zero. major weakness of the false-position method: its one sidedness That is, as iterations are proceeding, one of the bracketing points will tend stay fixed which lead to poor convergence.

Modified Fixed Position One way to mitigate the "one-sided" nature of false position is to make the algorithm detect when one of the bounds is stuck. If this occur, the function value at the stagnant bound is divided in half. This is thought to fasten the convergence.