Roots of Equations - Bisection Method
Roots of Equations - Bisection Method
Roots of Equations - Bisection Method
Roots of Equations
- Bisection Method
Roots of Equations
The
root
Bracketing Methods
This
Bisection Method
If f (x)
f (x)
f ( xu )
xl
f ( xl )
xu
root
f (x)
f ( xu )
Bisection Method
The
xl
f ( xl )
xu
root
Bisection Method
Algorithm for the Bisection Method:
Step 1: Choose lower xl and upperxu
guesses for the root such that the
function changes sign over the interval.
This can be checked by ensuring the
f ( xl ) f ( xu ) 0
is
Bisection Method
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
xu set
xr
lower subinterval, therefore,
and return to step f2.
( xu ) ve
f (x)
f ( xr ) ve
xl
f ( xl ) ve
xr
xu
root
Bisection Method
b)
If f ( xl ) f ( xr ) 0
, the root lies in the
xl xrset
upper subinterval. Therefore,
and return to step 2.
f (x)
f ( xu ) ve
f ( xr ) ve
f ( xl ) ve
xl
xr
xu
root
Bisection Method
c)
xr
If f ( xl ) f ( xr ) 0
, the root equals
terminate the computation.
f (x)
f ( xu ) ve
f ( xr ) 0
f ( xl ) ve
xl
xr
xu
root
xr
new
where
is the root for the current iteration and
old
xr
is the root from the previous iteration. The
absolute value is used because we are
a usually
concerned with the magnitude of
rather than
a
with its sign. When
becomes
s less than the pre
specified stopping criterion
, the computation is
terminated.
Example 1
Determine
f ( x) 5 x 3 5 x 2 6 x 2
Solution
pre specified error criterion s 10%
The initial guesses are
xl 0
xu 1
and
First iteration:
The
xl xu 0 1
0 .5
2
2
f ( xl ) f ( xr ) f (0) f (0.5) 2(0.375) 0.75 0
xr
and
xu 0.5
Solution
Second
iteration:
xl xu 0 0.5
xr
0.25
2
2
0.25 0.5
a
100% 100% s
0.25
f ( xl ) f ( xr ) f (0) f (0.25) 2( 0.734375) 1.46875 0
andxu 0.5
Solution
Third
iteration:
0.25 0.5
0.375
2
0.375 0.25
a
100% 33.33% s
0.375
f ( xl ) f ( xr ) f (0.25) f (0.375) (0.734375)( 0.189453125)
xr
0.139129638 0
andxu 0.5
Solution
Fourth
iteration:
0.375 0.5
0.4375
2
0.4375 0.375
a
100% 14.29% s
0.4375
f ( xl ) f ( xr ) f (0.375) f (0.4375) (0.189453125)(0.086669921)
xr
0.016419887 0
xu 0.4375
and
Solution
Fifth
iteration:
0.375 0.4375
xr
0.40625
2
0.40625 0.4375
a
100% 7.6923% s
0.40625
Example 2
3
sin
x
x
the first nontrivial root of
where x is in radians. Use bisection
method with the initial interval from 0.5
a
to 1. Perform the computation until
s than
2%
is less
. Also, perform an
error check by substituting your final
answer into the original equation.
Locate
Solution
stopping error criterion s 2%
The initial guesses are x 0.5 and x 1
l
u
Let
f ( x) sin x x 3
First iteration:
The
xl xu 0.5 1
0.75
2
2
f ( xl ) f ( xr ) f (0.5) f (0.75) (0.354426)( 0.2597638) 0.092067 0
xr
xl 0.75and
xu 1
Solution
Second
iteration:
xl xu 0.75 1
xr
0.875
2
2
0.875 0.75
a
100% 14.29% s
0.875
f ( xl ) f ( xr ) f (0.75) f (0.875) (0.259764)( 0.0976216) 0.025359 0
xu 1
and
Solution
Iteratio
n
xu
xr
f ( xl ) f ( xu ) f ( xl ) f ( xu )
0.5
0.75
0.75
0.875
14.29
0.875
0.9375
6.67
0.875
0.937
5
0.90625
3.45
Solution
The