You are on page 1of 15

Solving Roots of

Equation-Bisection
Method
Incremental Search
Method

Is a method of finding zeroes or


roots of a function based on the
change of sign of f(x)
The figures below illustrates two possible
cases.
𝑓 ( 𝑏 ) >0
 

𝑓 ( 𝑎 ) >0
 

𝑏
 
𝑎
 

𝑎
 
𝑏
 

𝑓 ( 𝑏 ) <0  𝑓 ( 𝑎 ) <0
 
root
root

We can see that as the sign of f(x) changes from + to – and vice versa in an
interval of [a, b], we can see that the root is in that interval
Example:

Find the interval of step size=


0.5 containing a root of
equation f(x)=x2-1-e0.1x from
x=0 to x=1.5
Solution:
x 0 0.5 1 1.5
f(x) -2 -1.80127 -1.10517 0.08816

We can see at x=1 to


x=1.5, the sign of f(x)
changes. So we can
conclude that there is a
root in the interval [1,
What if we make the
step size even smaller
to 0.1?

Find the interval again of


the same f(x) containing
another zero starting from
x=1 to x=1.5
Solution:
x 1 1.1 1.2 1.3 1.4 1.5
f(x) -1.1 -0.9 -0.7 -0.4 -0.2 0.09
We can see that as we
further decrease the step
size, the interval [1.4,
1.5] that contains the root
is much more accurate
compared with [1, 1.5]
Seatwork:

For the equation f(x)=x-sin(x)-


2cos(x), find an interval
containing the root of the
function with step size 0.2
Suppose that we know
the interval [a,b] has the
root of f(x). Now, we
want to determine that
root to any desire of
accuracy.
Bisection Method
Get the root of previous equation
f(x)=x2-1-e0.1x at interval [1.4, 1.5]
with an A.E<0.01. Use 4th decimal
Steps: place in all values.
1. Write the following in a column format
xn f(xn) xp f(xp) xnew f(xnew) A.E.

Where: xn is the value of x when f(x)<0


xp is the value of x when f(x)>0
xnew=(xn+xp)/2 (Iterative formula)
In the previous example, the interval
[1.4, 1.5], since f(1.4)<0, so we will put
1.4 on the column xn. Since f(1.5)>0, we
will put it on column xp

xn f(xn) xp f(xp) xnew f(xnew) A.E.


1.4 -0.1903 1.5 0.0882
2. Evaluate Xnew, Xnew=(xn+xp)/2,
xn f(xn) xp f(xp) xnew f(xnew) A.E.
1.4 -0.1903 1.5 0.0882 1.45 -0.0535

3. If f(xnew)>0, put xnew to xp, if f(xnew)<0,


put xnew to xn then the other previous value
except xnew and f(xnew) will remain the
same in the next iteration

xn f(xn) xp f(xp) xnew f(xnew) A.E.


1.4 -0.1903 1.5 0.0882 1.45 -0.0535
1.45 -0.0535 1.5 0.0882
4. Then repeat the process until the
desired accuracy is met. A.E.=|Present
Value of Xnew-Previous Value of Xnew|
or at f(xnew)=0
xn f(xn) xp f(xp) xnew f(xnew) A.E.
1.4 -0.1903 1.5 0.0882 1.45 -0.0535 -

1.45 -0.0535 1.5 0.0882 1.475 0.0167 0.025

1.45 -0.0535 1.475 0.0167 1.4625 -0.0186 0.0125

1.4625 -0.0186 1.475 0.0167 1.4688 -0.0008 0.0063

At this iteration, we will stop because A.E. is met


Seatwork:

Get the root of the equation


f(x)=sin(x)+cos(x)-x2 at the range
of [1, 1.5] with an A.E.<0.001
using Bisection Method. Use 4th
decimal place in all values
Assignment:

Get the root of the equation


sqrt(2x+1)=x at the range of
4

[1, 1.5] with an A.E.<0.001


using Bisection Method. Use
3 decimal place in all values
rd

You might also like