36
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
fa
()
fb
()
a
x
2
y f x
=()
x
3
x
1
b
X
Y
FIG. 2.1
Then, we bisect the interval and continue the process till the root is found to be desired
accuracy. In the above figure, f(x
1
) is positive; therefore, the root lies in between a and x
1
. The
second approximation to the root now is x
2
=
1
2
(a + x
1
2
(a + b) and also evaluate
f(x
1
).
Step 3: If f(a) . f(x
1
) < 0, then set b = x
1
else set a = x
1
. Then apply the formula of step 2.
Step 4: Stop evaluation when the difference of two successive values of x
1
obtained from
step 2, is numerically less than the prescribed accuracy.
2.4.2 Order of Convergence of Bisection Method
In Bisection Method, the original interval is divided into half interval in each iteration. If we take
mid points of successive intervals to be the approximations of the root, one half of the current
interval is the upper bound to the error.
In Bisection Method, e
i + 1
= 0.5e
i
or
1
0.5
i
i
Example 1. Find the root of the equation x
3
– x – 1 = 0 lying between 1 and 2 by bisection method.
Sol. Let f(x)= x
3
– x – 1 = 0
Since f(1) = 1
3
– 1 – 1 = – 1, which is negative
and f (2) = 2
3
– 2 – 1 = 5, which is positive
Therefore, f(1) is negative and f(2) is positive, so at least one real root will lie between
1 and 2.
First iteration: Now using Bisection Method, we can take first approximation
1
12
3
1.5
22
x
+
===
Then, f(1.5) = (1.5)
3
– 1.5 – 1
= 3. 375 – 1.5 – 1 = 0.875
∴
f (1.5) > 0 that is, positive
Now f(1.375) = (1.375)
3
– 1.375 – 1
f(1.375) = 0.2246
∴
f(1.375) is positive.
∴
The required root lies between 1.25 and 1.375.
Fourth iteration: The fourth approximation is given by
4
1.25 1.375
1.313
2
x
+
==
Now f(1.313) = (1.313)
3
– 1.313 – 1
f(1.313) = – 0.0494
38
COMPUTER BASED NUMERICAL AND STATISTICAL TECHNIQUES
Therefore, f(1.313) is negative and f(1.375) is positive. Thus root lies between 1.313 and
1.375.
Fifth iteration: The fifth approximation is given by
5
1.313 1.375
1.344
Seventh iteration: The seventh approximation is given by
7
1.313 1.329
1.321
2
x
+
==
∴
f(1.321) = (1.321)
3
– 1.321 – 1 = – 0.0158
∴
f(1.321) < 0
∴
f(1.321) is negative and f(1.329) is positive, so that the required root lies between 1.321 and
1.329.
Eighth iteration: The eighth approximation is given by
8
1.321 1.329
1.325
2
x
+
==
From above iterations, the root of
3
() 1 0
⇒
3
1
()(2) 24
2
fx =−−=
positive
This implies that root lies between 1 and 2.
First iteration: Here,
+
== ===
01 2
12 3
1, 2, 1.5
22
xx x
Now, =− =
01
() 4,()2
fx fx
. Then,
=−−=−
3
2
( ) (1.5) 1.5 4 2.125
fx
.
ALGEBRAIC AND TRANSCENDENTAL EQUATION
39
Since f(1.5) is negative and f(2) is positive.
Also, =− =
01
( ) 0.39062, ( ) 2
fx fx
then,
=−−=
3
2
( ) (1.875) 1.875 4 0.71679
fx
Since f(1.75) is negative and f(1.875) is positive, therefore the root lies between 1.75 and
1.875.
Fourth iteration: Here,
01 2
1.75 1.875
1.75, 1.875, 1.8125
2
xx x
+
== = =
Also, =− =
01
( ) 0.39062, ( ) 0.71679
fx fx
then,
=−−=
3
2
( ) (1.8125) 1.8125 4 0.14184
fx
9
= 1.79491, x
10
= 1.79589, x
11
= 1.79638, x
12
= 1.79613
From the above discussion, the value of the root to three decimal places is 1.796.
Example 3. Using Bisection Method determine a real root of the equation
3
() 8 2 1 0.
fx x x=−−=
Sol. It is given that
3
() 8 2 1 0
fx x x=−−=
.
Then
3
(0) 8(0) 2(0) 1 1
f =−−=−
and
3
(1) 8(1) 2(1) 1 5
f =−−=
Therefore, f(0) is negative and f(1) is positive so that the root lies between 0 and 1.
First approximation: First approximation to the root is given by
1
3
0.5 0.75
0.625
2
x
+
==
∴
3
(0.625) 8(0.625) 2(0.625) 1
f =−−
=1.935 – 2.25 = – 0.297, which is negative.
Therefore f(0.75) is positive, while f(0.625) is obtained negative. Therefore, the root lies
between 0.625 and 0.75.
Fourth approximation: The fourth approximation to the root is given by
+
==
4
0.625 0.75
0.688
2
x
∴
3
(0.688) 8(0.688) 2(0.688) 1
f =−−
= 2.605 – 2.376 = 0.229, which is positive
Therefore f(0.688) is obtained positive, while f(0.625) is negative. Therefore, the root lies
which is positive.
Therefore f (0.673) is positive and f(0.657) is negative so the root lies between 0.657 and
0.673.
ALGEBRAIC AND TRANSCENDENTAL EQUATION
41
Seventh approximation: The seventh approximation to the root is given by
7
0.657 0.673
0.665
2
x
+
==
∴
=−−
3
(0.665) 8(0.665) 2(0.665) 1
f
= 2.353 – 2.33 = 0.023, which is positive.
Therefore f(0.665) is positive and f(0.657) is negative so that the root lies between 0.657
and 0.665.
Eighth approximation: The eighth approximation to the root is given by
8
0.657 0.665
0.661
2
x
+
+
==
Now,
(2.125) vef =−
Therefore the root lies between 2.215 and 2.15.
Second approximation to the root is
2
2.125 2.15
2.1375
2
x
+
==
Now,
(2.1375) vef =+
Therefore the root lies between 2.125 and 2.1375.
Third approximation to the root is
3
2.125 2.1375
2.13125
2
x
+
==
Now,
(2.13125) vef =+
Therefore the root lies between 2.125 and 2.13125.
Fourth approximation to the root is
10
() log 1.2 0
fx x x
So that
=−=−<
10
(1) 1 log 1 1.2 1.2 0
f
and =−=−
10
(2) 2log 2 1.2 0.602 1.2
f
=− <0.598 0
and =−
10
(3) 3log 3 1.2
f
=−=>3(0.4771) 1.2 0.2313 0
Thus f (2) is negative and f (3) is positive, therefore, the root will lie between 2 and 3.
First approximation: The first approximation to the root is
1
23
2.5
2
x
+
==
Again,
10
( 2.625) 2.625log 2.625 1
.2
f =−
=−=−=−<2.625(0.4191) 1.2 1.1001 1.2 0.0999 0
Thus, f(2.625) is found to be negative and f(2.75) is positive, therefore, the root lies between
2.625 and 2.75.
Fourth approximation: The fourth approximation to the root is
4
2.625 2.75
2.6875
2
x
+
==
Again, f(2.6875) = 2.6875 log
10
2.6875 – 1.2
= 2.6875(0.4293) – 1.2 = 1.1537 – 1.2 = – 0.0463 < 0
ALGEBRAIC AND TRANSCENDENTAL EQUATION
43
Thus, f(2.6875) is negative and f(2.75) is positive, therefore, the root lies between 2.6875 and
2.75.
Fifth approximation: The fifth approximation to the root is
5
2.6875 2.75
2.742
2
x
+
==
Again, f(2.742) = 2.742 log
10
2.742 – 1.2
= 2.742 (0.4381) – 1.2 = 1.2012 – 1.2 = 0.0012 > 0
Thus, f(2.742) is positive and f(2.734) is negative, therefore, the root lies between 2.734 and
2.742.
Eighth approximation: The eighth approximation to the root is
8
2.734 2.742
2.738
2
x
+
==
Hence, from the approximate value of the roots x
7
and x
8
, we observed that, up to two
places of decimal, the root is 2.74 approximately.
Example 6. Using Bisection Method, find the real root of the equation f(x) = 3x –
1sinx 0+=
Sol. The given equation
f(x)= 3x –
= 1.5 –
1.4794
= 1.5 – 1.2163 = 0.2837 > 0
Thus, f(0.5) is positive, while f(0) is negative, therefore, a root lies between 0 and 0.5.
Second approximation: The second approximation to the root is given by
2
00.5
0.25
2
x
+
==
Again, f(0.25) = 3(0.25) –
()
1 sin 0.25
+
= 0.75 –
1.2474
= 0.75 – 1.1169 = – 0.3669 < 0
Thus, f(0.25) is obtained to be negative and f (0.5) is positive; therefore, a root lies between
0.25 and 0.5.
Third approximation: The third approximation to the root is given by
3
0.25 0.5
0.375
2
x
+
0.375 0.4375
0.4063
2
x
+
==
Again, f(0.4063) = 3(0.4063) –
()
1 sin 0.4063
+
= 1.2189 –
1.3952
= 1.2189 – 1.1812 – 0.0377 > 0
Thus, f(0.4063) is positive, while f(0.375) is negative, therefore, a root lies between 0.375 and
0.4063.
ALGEBRAIC AND TRANSCENDENTAL EQUATION
45
Sixth approximation: The sixth approximation to the root is given by
6
0.375 0.4063
0.39
07
2
x
+
==
Again, f(0.3907) = 3(0.3907) –
()
1 sin 0.390
Then f(2) = 2
3
– 4(2) – 9 = – 9
and f(3) = (3)
3
– 4 (3) – 9 = 6
Therefore, the root lies between 2 and 3.
First approximation: First approximation to the root is given by
1
23
2.5
2
x
+
==
Thus f(2.5) = (2.5)
3
– 4(2.5) – 9
= 15.625 – 19 = – 3.375
Therefore, the root lies between 2.5 and 3.
Second approximation: Second approximation to the root is given by
2
2.5 3
2.75
2
x
+
==