You are on page 1of 19

Bisection Method

of Solving a
Nonlinear Equation

Engr. Gemma P. Ramos


UBLC Faculty
Finding roots of a nonlinear equation

• Bracketing methods
• Open Methods
Bracketing methods

• These methods start with guesses that bracket, or


contain, the root and then systematically reduce the width
of the bracket.
• Two specific methods are covered: bisection and false
position.
• Graphical methods are used to provide visual insight into
the techniques. Error formulations are developed to help
you determine how much computational effort is required
to estimate the root to a prespecified level of precision.
Open methods

• open methods. These methods also involve systematic


trial-anderror iterations but do not require that the initial
guesses bracket the root.
• One-point iteration, Newton-Raphson, and secant
methods
• Incremental search methods capitalize on this
observation by locating an interval where the function
changes sign. Then the location of the sign change (and
consequently, the root) is identified more precisely by
dividing the interval into a number of subintervals. Each of
these subintervals is searched to locate the sign change.
The process is repeated and the root estimate refined by
dividing the subintervals into finer increments.
• The bisection method, which is alternatively called binary
chopping, interval halving, or Bolzano’s method, is one
type of 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 at the midpoint
of the subinterval within which the sign change occurs. The
process is repeated to obtain refined estimates.
OBJECTIVES

1. follow the algorithm of the bisection method of solving a


nonlinear equation,
2. use the bisection method to solve examples of finding
roots of a nonlinear equation, and
3. enumerate the advantages and disadvantages of the
bisection method.
What is the bisection method and what is it based on?

• One of the first numerical methods developed to find the


root of a nonlinear equation f (x) = 0 was the bisection
method (also called binary-search method). The method is
based on the following theorem.

Theorem
An equation f (x) = 0 , where f (x) is a real continuous function,
has at least one root between xl and xu if
f(xl ) f(xu) < 0
At least one root
exists between
the points if the
function is real,
continuous and
changes signs.
Algorithm
Step 1: Choose lower xl and upper xu guesses for the root such that the
function changes sign over the interval. This can be checked by
ensuring that f(xl)f(xu) < 0.
Step 2: An estimate of the root xr is determined by
Step 3: Make the following evaluations to determine in which subinterval
the root lies:
(a) If f(xl)f(xr) < 0, the root lies in the lower subinterval. Therefore,
set xu = xr and return to step 2.
(b) If f(xl)f(xr) > 0, the root lies in the upper subinterval. Therefore,
set xl = xr and return to step 2.
(c) If f(xl)f(xr) = 0, the root equals xr; terminate the computation.
Step 4: Find the absolute relative approximate error. Since

and

http://numericalmethods.eng.usf.edu
Step 5:
Compare the absolute relative approximate error a with the pre-
specified error tolerance s.

Go to Step 2 using new upper


Yes and lower guesses.
Is a s?

No Stop the algorithm

Note one should also check whether the number of iterations is more than the maximum number of
iterations allowed. If so, one needs to terminate the algorithm and notify the user about it.

http://numericalmethods.eng.usf.edu
Example
Solve for x using bisection method e –x – x = 0
Advantages

• Always convergent
• The root bracket gets halved with each iteration -
guaranteed.

http://numericalmethods.eng.usf.edu
Drawbacks

 Slow convergence
 If one of the initial guesses is close to the root, the
convergence is slower

http://numericalmethods.eng.usf.edu
Exercise#1

Determine the real roots of f(x) = -0.5x2 + 2.5x + 4.5


using three iterations of the bisection method to determine
the highest root. Employ initial guesses of xl = 5 and xu = 10.
Exercise#2

• Determine the real root of f(x) = 5x3 - 5x2 + 6x – 2 using


bisection to locate the root. Employ initial guesses of
xl = 0 and xu = 1 and iterate until the estimated error ea
falls below a level of es = 10%.
Exercise#3

Determine the real root of f(x) = -25 + 82x - 90x2 + 44x3 -


8x4 + 0.7x5:
(a) Graphically.
(b) Using bisection to determine the root to es = 10%.
Employ initial guesses of xl = 0.5 and xu = 1.0.

You might also like