Contoh Biseksi
Contoh Biseksi
You have a spherical storage tank containing oil. The tank has a diameter of 6 ft. You are asked to calculate the height h to which a dipstick 8 ft long would be wet with oil when immersed in the tank when it contains 4 ft3 of oil.
Dipstick
Figure 5. Spherical storage tank problem. The equation that gives the height h of liquid in the spherical tank for the given volume and radius is given by: f(h) = h 3 9h 2 + 3.8197 = 0
96240889.doc
Page 1 of 10
Use the bisection method of finding roots of equations to find a) The height h to which the dipstick is wet with oil. Conduct three iterations to estimate the root of the above equation. b) Find the absolute relative approximate error at the end of each iteration, and c) The number of significant digits at least correct at the end of each iteration. Solution From the physics of the problem, the dipstick would be wet between h = 0 and h = 2 R , where R= radius of the tank, that is
0 h 2R 0 h 2 (3) 0 h 6
Lets us assume
h = 0, hu = 6
96240889.doc
Page 2 of 10
So there is at least one root between hl and hu that is between 0 and 6. Iteration 1 The estimate of the root is
hm = h + hu 2
0+6 = 2
=3
f ( hm ) = f ( 3) = ( 3) 9( 3) + 3.1897 = 50.18
3 2
Hence the root is bracketed between hm and hl, that is, between 0 and 3. So, the lower and upper limit of the new bracket are
96240889.doc Page 3 of 10
h = 0, hu = 3
At this point, the absolute relative approximate error cannot be calculated, as we do not have a previous approximation. Iteration 2 The estimate of the root is
a
hm =
=
h + hu 2
0+3 2
= 1.5
3 2
Hence, the root is bracketed between h and hm, that is, between 0 and 1.5. So the lower and upper limit of the new bracket is
h = 0, hu = 1.5
The absolute relative approximate error, end of iteration #2 is
a
at the
96240889.doc
Page 4 of 10
a =
100
= 100%
None of the significant digits are at least correct in the estimated root of
hm = 1.5
0 + 1.5 2 = 0.75
Hence, the root is bracketed between h and hm, that is, between 0 and 0.75. So the lower and upper limit of the new bracket is
96240889.doc Page 5 of 10
h = 0, hu = 0.75
at the
new m
100
= 100%
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 the table below. Table 1: Root of f(x)=0 as function of number of iterations for bisection method. Iter 1 2
96240889.doc
hl 0.00 0.00
hu 6 3
hm 3 1.5
-------100
Page 6 of 10
Iter
hl
hu
hm
3 0.00 1.5 0.75 4 0.00 0.75 0.375 5 0.375 0.75 0.5625 6 0.5625 0.75 0.6563 7 0.6563 0.75 0.7031 8 0.6563 0.7031 0.6797 9 0.6563 0.6797 0.6680 10 0.6680 0.6797 0.6738 At the end of 10th iteration,
a = 0.8696%
Hence the number of significant digits at least correct is given by the largest value of m for which
So
m =1
The number of significant digits at least correct in the estimated root of 0.6738 is 2. Advantages of Bisection Method a) The bisection method is always convergent. Since the method brackets the root, the method is guaranteed to converge. b) As an iteration is conducted, the interval gets halved. So one can guarantee the error in the solution of the equation. Drawbacks of Bisection Method a) The convergence of bisection method is slow as it is simply based on halving the interval. b) If one of the initial guesses is closer to the root, it will take larger number of iterations to reach the root. c) If a function f(x) is such that it just touches the x-axis (Figure 6) such as f(x) = x2 = 0
96240889.doc Page 8 of 10
it will be unable to find the lower and upper guesses such that f(x ) f(xu) < 0 d) For functions f(x) where there is a singularity1 and it reverses sign at the singularity, bisection method may converge on the singularity (Figure 7). An example include
f ( x) = 1 x
and x = -2, xu = 3 are valid initial guesses which satisfy f(x ) f(xu) < 0. However, the function is not continuous and the theorem that a root exists is also not applicable.
A singularity in a function is defined as a point where the function becomes infinite. For example, for a function such as 1/x, the point of singularity is x=0 as it becomes infinite.
96240889.doc
Page 9 of 10
f(x)
changes sign.
96240889.doc
Page 10 of 10