0% found this document useful (0 votes)
199 views6 pages

Module 5: Roots: Bracketing Method I. II. Diagnostic Assessment Iii. Intended Learning Outcomes IV. Theories and Concepts

This document discusses numerical methods for finding the root, or value when a function equals zero, of equations that cannot be solved explicitly. It introduces the bracketing method, which uses two initial guesses on either side of the root to iteratively hone in on the solution. Graphical methods can provide rough estimates of roots by finding where a function crosses the x-axis, though they are imprecise. Bracketing methods guarantee finding a root but converge slowly, while open methods may fail to find roots but converge faster when successful.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
199 views6 pages

Module 5: Roots: Bracketing Method I. II. Diagnostic Assessment Iii. Intended Learning Outcomes IV. Theories and Concepts

This document discusses numerical methods for finding the root, or value when a function equals zero, of equations that cannot be solved explicitly. It introduces the bracketing method, which uses two initial guesses on either side of the root to iteratively hone in on the solution. Graphical methods can provide rough estimates of roots by finding where a function crosses the x-axis, though they are imprecise. Bracketing methods guarantee finding a root but converge slowly, while open methods may fail to find roots but converge faster when successful.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MODULE 5: ROOTS: BRACKETING METHOD

I. INTRODUCTION An example of such a model is the equation for the


bungee jumper’s velocity. If the parameters are known,
II. DIAGNOSTIC ASSESSMENT Eq. (5.1) can be used to predict the jumper’s velocity.
Such computations can be performed directly because vis
III. INTENDED LEARNING OUTCOMES
expressed explicitly as a function of the model
IV. THEORIES AND CONCEPTS parameters. That is, it is isolated on one side of the equal
sign.
ROOTS IN ENGINEERING
However, as posed at the start of the chapter,
Medical studies have established that a bungee suppose that it had to determine the mass for a jumper
jumper’s chances of sustaining a significant vertebrae with a given drag coefficient to attain a prescribed velocity
injury increase significantly if the free-fall velocity in a set time period. Although Eq. (5.1) provides a
exceeds36 m/s after 4 s of free fall. The boss at the mathematical representation of the interrelationship
bungee-jumping company wants to determine the mass among the model variables and parameters, it cannot be
at which this criterion is exceeded given a drag coefficient solved explicitly for mass. In such cases, m is said to be
of 0.25 kg/m. implicit.

From the previous studies, the following analytical This represents a real dilemma, because many
solution can be used to predict fall velocity as a function design problems involve specifying the properties or
of time: composition of a system to ensure that it performs in a
desired manner.

The solution to the dilemma is provided by numerical


methods for roots of equations. To solve the problem
Try as much, but it cannot be manipulated by this
using numerical methods, it is conventional to reexpress
equation to explicitly solve for m – that is, it cannot isolate
Eq. (5.1) by subtracting the dependent variable v from
the mass on the left side of the equation.
both sides of the equation to give Eq. (5.2). The value of
An alternative way of looking at the problem m that makes f(m)=0is, therefore, the root of the equation.
involves subtracting v(t)from both sides to give a new This value also rep-resents the mass that solves the
function: design problem.

GRAPHICAL METHODS

A simple method for obtaining an estimate of the root


Now it is visible that the answer to the problem is of the equation f(x)=0is to make a plot of the function and
the value of m that makes the function equal to zero. observe where it crosses the x axis. This point, which
Hence, it is called “roots” problem. represents the x value for which f(x)=0, provides a rough
approximation of the root.

Example 5.1: Use the graphical approach to


determine the mass of the bungee jumper with a drag
coefficient of 0.25 kg/m to have a velocity of 36 m/s after
4 s of freefall. Note: The acceleration of gravity is 9.81
m/s2.

SOLUTION:

Although it arises in other problem contexts, roots of The following MATLAB session sets up a plot of Eq.
equations frequently occur in the area of design. Table 5.1 (5.2) versus mass:
lists a number of fundamental principles that are routinely
used in design work. As introduced in Chap. 1,
mathematical equations or models derived from these
principles are employed to predict dependent variables as
a function of independent variables, forcing functions, and
parameters. Note that in each case, the dependent
variables reflect the state or performance of the system,
whereas the parameters represent its properties or
composition.
MODULE 5: ROOTS: BRACKETING METHOD
approaches require an initial “guess” to get started. Then
they systematically home in on the root in an iterative
fashion.

The two major classes of methods available are


distinguished by the type of initial guess.

 Bracketing methods. As the name implies,


these are based on two initial guesses that
“bracket” the root-that is, are on either side of
the root.
 Open methods. These methods can involve
one or more initial guesses, but there is no
need for them to bracket the root.

For well-posed problems, the bracketing methods


always work but converge slowly. In contrast, the open
methods do not always work, but when they do they
The function crosses the maxis between 140 and 150 usually con-verge quicker.
kg. Visual inspection of the plot provides a rough estimate
of the root of 145 kg (about 320 lb). The validity of the Incremental Search
graphical estimate can be checked by substituting it into
Eq. (5.2) to yield When applying the graphical technique in Example
5.1, it is stated that f(x) changed sign on opposite sides of
the root. In general, if f(x)is real and continuous in the
interval from xl to xu and f(xl)and f(xu) have opposite signs,
that is,

which is close to zero. It can also be checked by


substituting it into Eq. (5.1) along with the parameter
then there is at least one real root between xl and xu.
values from this example to give
Incremental search methods capitalize on this
observation by locating an interval where the function
changes sign. A potential problem with an incremental
search is the choice of the increment length. If the length
is too small, the search can be very time consuming. On
which is close to the desired fall velocity of 36 m/s.
the other hand, if the length is too great, there is a
Graphical techniques are of limited practical value possibility that closely spaced roots might be missed (Fig.
because they are not very precise. However, graphical 5.3). The problem is compounded by the possible
methods can be utilized to obtain rough estimates of existence of multiple roots.
roots. Aside from providing rough estimates of the root,
graphical interpretations are useful for understanding the
properties of the functions and anticipating the pitfalls of
the numerical methods.

BRACKETING METHODS AND INITIAL GUESSES

If it had roots problem in the days before computing,


using “trial and error” often to come up with the root. That
is, it is repeatedly make guesses until the function was
sufficiently close to zero. The process was greatly
facilitated by the advent of software tools such as
spreadsheets. By allowing it to make many guesses
rapidly, such tools can actually make the trial-and-error Example 5.2: Use the M-file incsearch (Fig. 5.4) to
approach attractive for some problems. identify brackets within the interval [3, 6] for the function:
But, for many other problems, it is preferable to have
methods that come up with the correct answer
automatically. Interestingly, as with trial and error, these
MODULE 5: ROOTS: BRACKETING METHOD
Although five sign changes are detected, because the
subintervals are too wide, the function misses possible
roots at x≅4.25 and 5.2. These possible roots look like
they might be double roots. However, by using the zoom
in tool, it is clear that each represents two real roots that
are very close together. The function can be run again
with more subintervals with the result that all nine sign
changes are located

SOLUTION:

The MATLAB session using the default number of


intervals (50) is

The foregoing example illustrates that brute-force


A plot of Eq. (5.4) along with the root locations is shown methods such as incremental search is not foolproof. It
here. would be wise to supplement such automatic techniques
with any other information that provides insight into the
location of the roots. Such information can be found by
plotting the function and through understanding the
physical problem from which the equation originated.

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
subinterval then becomes the interval for the next
iteration. The process is repeated until the root is known
MODULE 5: ROOTS: BRACKETING METHOD
to the required precision. A graphical depiction of the interval between 125 and200. Therefore, we create a new
method is provided in Fig. 5.5. The following example interval by redefining the lower bound as 125.
goes through the actual computations involved in the
method. At this point, the new interval extends from xl=125to
xu=200. A revised root estimate can then be calculated as

which represents a true percent error of |εt|=13.85%. The


process can be repeated to obtain refined estimates. For
example,

Therefore, the root is now in the lower interval


between 125 and 162.5. The upper bound is redefined as
162.5, and the root estimate for the third iteration is
calculated as

which represents a percent relative error of εt=0.709%.


Example 5.3: Use bisection to solve the same The method can be repeated until the result is accurate
problem approached graphically in Example 5.1. enough to satisfy your needs.

SOLUTION: MATLAB M-file: bisect

The first step in bisection is to guess two values of the An M-file to implement bisection is displayed in Fig.
unknown (in the present problem, m) that give values for 5.7. It is passed the function (func) along with lower (xl)
f(m) with different signs. From the graphical solution in and upper (xu) guesses. In addition, an optional stopping
Example 5.1, it is visible that the function changes sign criterion (es) and maximum iterations (maxit) can be
between values of 50 and 200. The plot obviously entered. The function first checks whether thereare
suggests better initial guesses, say 140 and 150, but for sufficient arguments and if the initial guesses bracket
illustrative purposes let’s assume we don’t have the a sign change. If not, an errormessage is displayed
benefit of the plot and have made conservative guesses. and the function is terminated. It also assigns default
Therefore, the initial estimate of the root xr lies at the values if maxitand esare not supplied. Then a
midpoint of the interval while...breakloop is employed to implement
thebisection algorithm until the approximate error falls
below esor the iterations exceedmaxit.

Note that the exact value of the root is 142.7376. This


means that the value of 125 calculated here has a true
percent relative error of

Next we compute the product of the function value at


the lower bound and at the midpoint:

which is greater than zero, and hence no sign change


occurs between the lower bound and the midpoint.
Consequently, the root must be located in the upper
MODULE 5: ROOTS: BRACKETING METHOD
different strategy to come up with its new root estimate.
Rather than bisecting the interval, it locates the root by
joining f(xl)and f(xu)with a straight line (Fig. 5.8). The
intersection of this line with the x axis represents an
improved estimate of the root. Thus, the shape of the
function influences the new root estimate. Using similar
triangles, the intersection of the straight line with the x axis
can be estimated. This is the false-position formula.

It can employ this function to solve the problem posed


at the beginning of the chapter. Recall that it is needed to
determine the mass at which a bungee jumper’s free-fall
velocity exceeds 36 m/s after 4 s of free fall given a drag
coefficient of 0.25 kg/m. Thus, you have to find the root of
Example 5.4: Use false position to solve the same
problem approached graphically and with bisection in
Examples 5.1 and 5.3.

SOLUTION:
In Example 5.1 we generated a plot of this function
versus mass and estimated that the root fell between 140 As in Example 5.3, initiate the computation with
and 150 kg. The bisect function from Fig. 5.7 can be used guesses of xl=50 and xu=200.
to determine the root as
First iteration:

which has a true relative error of 23.5%.

Thus, a result of m=142.74 kg is obtained after 21 Second iteration:


iterations with an approximate relative error of
εa=0.00005345%, and a function value close to zero.

FALSE POSITION Therefore, the root lies in the first subinterval, and x r
becomes the upper limit for the next iteration,
False position (also called the linear interpolation xu=176.2773.
method) is another well-known bracketing method. It is
very similar to bisection with the exception that it uses a
MODULE 5: ROOTS: BRACKETING METHOD

which has true and approximate relative errors of 13.76%


and 8.56%, respectively. Additional iterations can be
performed to refine the estimates of the root.

Although false position often performs better than


bisection, there are other cases where it does not. As in
the following example, there are certain cases where
bisection yields superior results.

A Case Where Bisection Is Preferable to False


Position

Example 5.5: Use bisection and false position to


locate the root of f(x)=x10−1between x=0and 1.3.

SOLUTION:

Using bisection, the results can be summarized as


After five iterations, the true error has only been
reduced to about 59%. Insight into these results can be
gained by examining a plot of the function. As in Fig. 5.9,
the curve violates the premise on which false position was
based-that is, if f(xl)is much closer to zero than f(xu), then
the root should be much closer to x l than to xu (recall Fig.
Thus, after five iterations, the true error is reduced to 5.8). Because of the shape of the present function, the
less than 2%. For false position, a very different outcome opposite is true.
is obtained:
V. ASSESSMENT
VI. REFERENCES

You might also like