Sie sind auf Seite 1von 9

BISECTION METHOD

1.Find the cube root of 7 using the Bisection method. Find the answer correct
to 2 decimal places and work to 3 decimal places throughout.

Solution
We need to solve for x. Let f ( xx) 3==x73 - 7
then we need to find x where
f(x) = 0.

If x = 2, f(2) = 23 7 = 8 7 = +1
f(x) = 0 for some x value between 1
and 2.
If x = 1, f(1) = 13 7 = 1 7 = -6

[1, 2] is our starting interval. \

Iterations are best laid out in a Table

a mid b f(a) f(mid) f(b)


Step 1
1 1.5 2 -6 -3.625 +1
Step 2
1.5 1.75 2 -3.625 -1.641 +1
Step 3
1.75 1.875 2 -1.641 -0.408 +1
Step 4
1.875 1.938 2 -0.408 -0.279 +1
Step 5
1.875 1.907 1.938 -0.408 -0.065 +0.279
Step 6
1.907 1.923 1.938 -0.065 +0.111 +0.279
Step 7
1.907 1.915 1.923 -0.065 +0.023 +0.111
Step 8
1.907 1.911 1.915 -0.065 -0.021 +0.023

The last row tells us that the root lies between 1.911 and 1.915 but is not 1.915
exactly. This means that the root must be 1.91 to 2 decimal places.

i.e. Cube root of 7 is 1.91 to 2 d.p.


2.Find the solution of the x3 + x - 1 = 0
equation in the interval from 0
to 1. Work to 3 decimal places throughout and give your answer correct to 2
decimal places.

x3 + x - 1 = 0 f ( x) = x 3 + x - 1

Table

a mid b f(a) f(mid) f(b)


Step 1
0 0.5 1 -1 -0.375 +1
Step 2
0.5 0.75 1 -0.375 +0.172 +1
Step 3
0.5 0.625 0.75 -0.375 -0.131 +0.172
Step 4
0.625 0.688 0.75 -0.131 +0.014 +0.172
Step 5
0.625 0.657 0.688 -0.131 -0.059 +0.014
Step 6
0.657 0.673 0.688 -0.059 -0.022 +0.014
Step 7
0.673 0.681 0.688 -0.022 -0.003 +0.014
Step 8
0.681 0.685 0.688 -0.003 +0.006 +0.014

The last row shows the solution must be between 0.681 and 0.685 but does not
equal 0.685, so that to 2 decimal places,

x = 0.68.

Check:
x3 + x 1 = 0.683 + 0.68 1 = 0 -0.006, which is as required.
3.The equation x3 3x 8 = 0 has a root between 2 and 3. Find the root accurate to 2 decimal places.

Our function is f(x) = x3 3x 8.


x0 = 2 f(x0) = 23 - 32 8 x1 = 3 f(x1) = 33 - 33 8
= -6 = 10
<0 >0

x0, where f(x0)<0 x1, where f(x1)>0 x 0 + x1 f(x2)


x2 =
2
2 3 2.5 f(2.5)=0.125 >0, so replace x1
2 2.5 2.25 f(2.25)=-3.359 <0, so replace x0
2.25 2.5 2.375 f(2.375)=-1.728 <0, so replace x0
2.375 2.5 2.4375 f(2.4375)<0, so replace x0
2.4375 2.5 2.46875 f(2.46875)<0, so replace x0
2.46875 2.5 2.484375 f(2.484375)<0, so replace x0
2.484375 2.5 2.4921875 f(2.4921875)>0, so replace x1
2.484375 2.4921875 2.48828125 f(2.48828185)<0, so replace x0
2.48828125 2.4921875

We can stop now, because both estimates are the same value when rounded to 2
decimal places, which is our required level of accuracy.

Hence the root of x3 3x 8 = 0 between 2 and 3 is 2.49 (2dp).


APPLICATIONS:
h3 oil. The tank has a diameter of 6 ft. You are
1.You have a spherical storage tank containing ft
asked to calculate the height to which a dipstick 8 ft long would be wet with oil when
immersed in the tank when it contains 4 of oil.

Figure 5 Spherical storage tank problem.

The equation that gives the height, , of the h liquid in the spherical tank for the given
volume and radius is given by

f ( h ) = h 3 - 9h 2 + 3.8197 = 0

Use the bisection method of finding roots of h equations to find the height, , to which the
dipstick is wet with oil. Conduct three iterations to estimate the root of the above
equation.
Find the absolute relative approximate error at the end of each iteration and the number of
significant digits at least correct at the end of each iteration.

Solution
From the physics of the problem, the hh==20r dipstick would be wet between and , where
radius of the tank, r=
that is
0 h 2r
Let us assume 0 h 2(3)
h0 = h0,hu6 = 6
Check if the function changes sign hu
between and .
f (h ) = f ( 0 ) = ( 0 ) - 9( 0 ) + 3.8197 = 3.8197
3 2

f(hu ) = f (6) = (6) - 9(6) + 3.8197 = -104.18


3 2

Hence
f ( h ) f ( hu ) = f ( 0 ) f ( 6 ) = ( 3.8197)( - 104.18) 0
So there is at least one hu
root between and that is between 0 and 6.

Iteration 1
The estimate of the root is
h + hu
hm = 0 +
= 26
=2 3
f ( hm ) = f ( 3) = ( 3) - 9( 3) + 3.1897 = -50.180
3 2

f ( h ) f ( hm ) = f ( 0) f ( 3) = ( 3.1897)( - 50.180) 0
Hence the root is h
hm
bracketed between and , that is, between 0 and 3. So, the lower and upper limits of the
new bracket are
h = 0, hu = 3
At this point, the absolute relative a
approximate error cannot be calculated, as we do not have a previous approximation.

Iteration 2
The estimate of the root is
h +h
hm = 0 + 3 u
= 2
= 12.5
f ( hm ) = f (1.5) = (1.5) - 9(1.5) + 3.8197 = -13.055
3 2

f ( h ) f ( hm ) = f ( 0 ) f (1.5) = ( 3.8197)( - 13.055) 0


Hence, the root is h
hm
bracketed between and , that is, between 0 and 1.5. So the lower and upper limits of the
new bracket are
h = 0, hu = 1.5
The absolute relative approximate error a
at the end of Iteration 2 is
hmnew - hmold
a = 1.5 -3 100
= hmnew 100
1=.100
5 %
None of the significant digits are at
least correct in the estimated root
hm = 1.5
as the absolute relative approximate error is 5%
greater that .

Iteration 3
The estimate of the root is
h +h
hm =0 + 1.5u
= 2
= 0.275
f ( hm ) = f ( 0.75) = ( 0.75) - 9( 0.75) + 3.8197 = -0.82093
3 2

f ( h ) f ( hm ) = f ( 0) f ( 0.75) = ( 3.8197)( - 0.82093) 0


Hence, the root is hhm
bracketed between and , that is, between 0 and 0.75. So the lower and upper limits of the new
bracket are
h = 0, hu = 0.75
The absolute relative approximate a
error at the end of Iteration 3 is
hmnew - hmold
a =0.75 -new
1.5 100
= hm 100
0=.75
100%
Still none of the significant digits are 5%
at least correct in the estimated root of the equation as the absolute relative approximate
error is greater than .
The height of the liquid is estimated as 0.75 ft at the end of the third iteration.
Seven more iterations were conducted and these iterations are shown in Table 1.

Table 1 Root of as a function of the number f ( x) = 0


of iterations for bisection method.
h hu hm a % f ( hm )
Iteration
1 0.00 6 3 ---------- 50.180
2 0.00 3 1.5 100 13.055
3 0.00 1.5 0.75 100 0.82093
4 0.00 0.75 0.375 100 2.6068
5 0.375 0.75 0.5625 33.333 1.1500
6 0.5625 0.75 0.65625 14.286 0.22635
7 0.65625 0.75 0.70313 6.6667 0.28215
8 0.65625 0.70313 0.67969 3.4483 0.024077
9 0.65625 0.67969 0.66797 1.7544 0.10210
10 0.66797 0.67969 0.67383 0.86957 0.039249

At the end of the iteration, 10 th


a = 0.86957%
Hence the number of significant digits m
at least correct is given by the largest value of for which
a 0.5 10 2 - m
0.86957 0.5 10 2 - m
1.7391 10 2 - m
log(1.7391) 2 - m
m 2 - log(1.7391) = 1.759
So
m =1
The number of significant digits at least correct in the estimated root 0.67383 is 2.

2.You are working for DOWN THE TOILET COMPANY that makes floats for ABC
commodes. The floating ball has a specific gravity of 0.6 and has a radius of 5.5 cm. You are
asked to find the depth to which the ball is submerged when floating in water.
The equation that gives the depth to which the x ball is submerged under water is given by
x 3 - 0.165 x 2 + 3.993 10 -4 = 0
Use the bisection method of x
finding roots of equations to find the depth to which the ball is submerged under water.
Conduct three iterations to estimate the root of the above equation. Find the absolute relative
approximate error at the end of each iteration, and the number of significant digits at least correct at
the end of each iteration.

Solution
From the physics of the problem, the ball xx==20R would be submerged between and,
where
R = radius of the ball,
that is
0 x 2R
0 0 x x 2
(0.11
055)

Figure 5 Floating ball problem.


Lets us assume
x = 0, xu = 0.11
Check if the function changes sign xu
between and .
f ( x ) = f (0) = (0) 3 - 0.165(0) 2 + 3.993 10 -4 = 3.993 10 -4
f ( xu ) = f (0.11) = (0.11) 3 - 0.165(0.11) 2 + 3.993 10 -4 = -2.662 10 -4
Hence
f ( x ) f ( xu ) = f (0) f (0.11) = (3.993 10 -4 )(-2.662 10 -4 ) 0
So there is at xu
least one root between and , that is between 0 and 0.11.
Iteration 1
The estimate of the root is
x +x
xm 0= + 0.11u
= 2
= 0.055
2

f ( x m ) = f ( 0.055) = ( 0.055) - 0.165( 0.055) + 3.993 10 -4


3 2

f ( x ) f ( xm ) = f (0) f (0.055) = ( 3.993 10 -4 )( 6.655 10 -4 ) 0


Hence the xm
u
root is bracketed between and , that is, between 0.055 and 0.11. So, the lower and
upper limit of the new bracket is
x = 0.055, xu = 0.11
At this point, the absolute relative a
approximate error cannot be calculated as we do not have a previous approximation.
Iteration 2
The estimate of the root is
x +x
= + 0.u11
x0m.055
= 2
= 0.0825
2
f ( xm ) = f (0.0825) = (0.0825) 3 - 0.165(0.0825) 2 + 3.993 10 -4 = -1.622 10 -4

Hence,
( ) ( )
f ( x ) f ( x m ) = f ( 0.055) f ( 0.0825) = 6.655 10 -5 - 1.622 10 -4 0
x
xm
the root is bracketed between and , that is, between 0.055 and 0.0825. So the lower and
upper limit of the new bracket is
x = 0.055, xu = 0.0825
The absolute relative approximate a
error at the end of Iteration 2 is
x new - xmold
0a .0825
= m -new 0.055 100
= x 100
0=.0825
33.33%
m

None of the significant digits are x m = 0.0825


at least correct in the estimated root of
because the absolute relative approximate error is greater than 5%.
Iteration 3
x + xu
m = + 0.0825
0x.055
= 2
= 0.06875
2
f ( xm ) = f (0.06875) = (0.06875) 3 - 0.165(0.06875) 2 + 3.993 10 -4 = -5.563 10 -5

f ( x ) f ( xm ) = f (0.055) f (0.06875) = (6.655 10 5 ) ( -5.563 10 -5 ) 0


Hence, x
xm
the root is bracketed between and , that is, between 0.055 and 0.06875. So the lower and
upper limit of the new bracket is
x = 0.055, xu = 0.06875
The absolute relative approximate a
error at the ends of Iteration 3 is
xmnew - xmold
=
0.06875 -new
0.0825 100
= a xm 100
= 20
0.06875 %
Still none of the significant
digits are at least correct in the estimated root of the equation as the absolute relative approximate
error is greater than 5%.
Seven more iterations were conducted and these iterations are shown in Table 1.

Table 1 Root of as function of number f ( x) = 0


of iterations for bisection method.
x xu xm a f (xm )
Iteration
%
1 0.00000 0.11 0.055 ---------- 6.655 10-5

2 0.055 0.11 0.0825 33.33 - 1.622 10 -4

3 0.055 0.0825 0.06875 20.00 - 5.563 10 -5

4 0.055 0.06875 0.06188 11.11 4.484 10-6

5 0.06188 0.06875 0.06531 5.263 - 2.593 10-5

6 0.06188 0.06531 0.06359 2.702 - 1.0804 10-5

7 0.06188 0.06359 0.06273 1.370 - 3.176 10-6

8 0.06188 0.06273 0.0623 0.6897 6.497 10 -7

9 0.0623 0.06273 0.06252 0.3436 - 1.265 10 -6

10 0.0623 0.06252 0.06241 0.1721 - 3.0768 10-7

At the end of 10th iteration,


a = 0.1721%
Hence the number of significant digits at m
least correct is given by the largest value of for which
a 0.5 10 2 - m
0.1721 0.5 10 2 - m
0.3442 10 2 - m
log(0.3442) 2 - m
m 2 - log(0.3442) = 2.463
So
m=2
The number of significant digits at least 0.10
06241
th

correct in the estimated root of at the end


of the iteration is 2.

Das könnte Ihnen auch gefallen