1 / 13

Chapter 5: Roots: Bracketing Methods

Chapter 5: Roots: Bracketing Methods. Uchechukwu Ofoegbu Temple University. Roots. “Roots” problems occur when some function f can be written in terms of one or more dependent variables x , where the solutions to f(x)=0 yields the solution to the problem.

Download Presentation

Chapter 5: Roots: Bracketing Methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 5: Roots: Bracketing Methods Uchechukwu Ofoegbu Temple University

  2. Roots • “Roots” problems occur when some function f can be written in terms of one or more dependent variables x, where the solutions to f(x)=0 yields the solution to the problem. • These problems often occur when a design problem presents an implicit equation for a required parameter. • For instance, for the bungee jumper problem, • we could never solve for m directly (getting m to the left side). In order to obtain a solution, we could write: • The solution for m would then be the value of m for which the function is 0.

  3. Graphical Methods • Simple method estimating roots, f(x)=0 : • Graph the function • Select an interval with lower bound xl and upper bound xu. • Observe where it crosses the x-axis within the interval. • Graphing the function can also indicate where roots may be and where some root-finding methods may fail: • Same sign, no roots • Different sign, one root (or odd roots) • Same sign, two roots (or even roots) • Different sign, three roots

  4. Graphing Example • In MATLAB, graphically estimate the roots of the following functions within the interval [-10,10]: • X2 + 5 • (X-2)2

  5. Bracketing Methods • Bracketing methods are based on making two initial guesses that “bracket” the root (that are on either side of the root). • Brackets are formed by finding two guesses xl and xu where the sign of the function changes; that is, where • f(xl ) f(xu ) < 0 • If f(x) is real and continuous in the interval (xl ,xu), and f(xl ) f(xu ) < 0, then there is at least one real root within the interval. • The incremental search method tests the value of the function at evenly spaced intervals and finds brackets by identifying function sign changes between neighboring points.

  6. Incremental Search Hazards • If the spacing between the points of an incremental search are too far apart, brackets may be missed due to closely spaced roots. • Incremental searches cannot find brackets containing multiple roots regardless of spacing.

  7. Incremental Search –Example • Use the incsearch function to estimate the locations of the roots of the following functions within the interval [-10,10]: • X2 + 5 • (X-2)2 • Plot and observe

  8. Bisection • The bisection method is a variation of the incremental search method in which the interval is always divided in half. • If a function changes sign over an interval, the function value at the midpoint is evaluated. • The location of the root is then determined as lying within the subinterval where the sign change occurs. • The absolute error is reduced by a factor of 2 for each iteration.

  9. Bisection Example • Using the brackets determined from the previous example, use the bisection method to find the roots of the problem (step by step in Matlab)

  10. False Position • The false position method is another bracketing method. • It determines the next guess not by splitting the bracket in half but by connecting the endpoints with a straight line and determining the location of the intercept of the straight line (xr). • The value of xr then replaces whichever of the two initial guesses yields a function value with the same sign as f(xr).

  11. False Position Illustration

  12. Bisection vs. False Position • Bisection does not take into account the shape of the function; this can be good or bad depending on the function! • Bad:

  13. False Position - Lab • Use the false position method (step-by-step in Matlab) to determine the roots of the following functions: • X2 + 5 • (X-2)2 • Determine the brackets using the incsearch function • Plot the function and the roots on the same graph

More Related