0% found this document useful (0 votes)
12 views16 pages

NM Chapter 2

Chapter Two discusses the roots of equations, defining them as values of x that satisfy f(x) = 0. It outlines various methods for finding these roots, including analytical methods for simple cases and numerical methods such as the Bisection and False-Position methods for more complex cases. The chapter also provides examples illustrating the application of these methods to estimate roots and calculate errors.

Uploaded by

abmoh1122a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views16 pages

NM Chapter 2

Chapter Two discusses the roots of equations, defining them as values of x that satisfy f(x) = 0. It outlines various methods for finding these roots, including analytical methods for simple cases and numerical methods such as the Bisection and False-Position methods for more complex cases. The chapter also provides examples illustrating the application of these methods to estimate roots and calculate errors.

Uploaded by

abmoh1122a
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

CHAPTER-TWO

ROOTS OF EQUATIONS

2.1 Introduction
The roots or zeros of equations can be simply defined as the value(s) of x that makes f(x) = 0. There are
many ways to solve for roots of equations. For some cases, the roots can be found easily by solving the
equation directly (Analytical Method). However, there are also other cases where solving the equation
directly or analytically is not so possible. In such instances, the only alternatives will be approximate
solution techniques. There are several techniques of such type. One alternative is to use Numerical
method. There are various techniques under this method. Some of them are; Bisection method, False-
Position method, Fixed point iteration method, Newton-Raphson method and Secant method. Another
alternative to obtain an approximate solution is to plot the function and determine where it crosses the
x-axis. This point, which represents the x-value for which f(x) = 0 is the root. When a solution (a root)
is obtained using this technique, it is called Graphical method. Graphical techniques are of limited
practical value because they are not precise. However, graphical methods can be utilized to obtain
rough estimates of the roots. These estimates can be employed as starting guesses for numerical
methods which will be discussed in the next section.

2.2 The Bisection method

If a function f is real and continuous in an interval from xl to xu and f ( xl ) and f ( xu ) have opposite

signs then there exists at least one real root xr between xl and xu such that f ( x)  0 .

Procedure for Bisection method:


 Choose lower xl and upper xu guesses for the root such that the function changes sign over the

interval. This can be done by evaluating the function at xl and xu or by plotting the graph of the
function………………………(i)
xl  xu
 Estimate the root xr from; xr  …………………………(ii)
2
 Make the following evaluations to determine the interval in which the root lies
 If f ( xl )  f ( xr )  0 , the root lies in the lower subinterval. Therefore, set xu  xr and
return to step ii
 If f ( xr )  f ( xu )  0 , the root lies in the upper subinterval. Therefore, set xl  xr and
return to step ii
 If f ( xr )  0 , the root equals xr ; then terminate the computation.
2.2.1 Termination criteria and Error Estimate
We must now develop an objective criterion for deciding when to terminate the method. An initial
suggestion might be to end the calculation when the errors falls below some pre-specified level,  s .

Therefore, we require an approximate relative error,  a , given by the following equation, to be less than

or equal to  s .

xr new  xr old
a  *100%
xr new

E.g. 2.1 Using Bisection Method, find the root of the function f  x   5x3  5x 2  6 x  2 in the interval
0,1 . Calculate the percentage error at the end of each iteration. Use 5 iterations.
Solution:
f  0   5(0)3  5(0)2  6(0)  2  2

f 1  5(1)3  5(1)2  6(1)  2  4


f  0 * f 1  2  4   8  0  at least one root exists b/n 0 and 1.
1st Iteration;
0 1
xr   0.5
2
f  0.5  5(0.5)3  5(0.5)2  6(0.5)  2  0.375

f  0  * f  0.5  0  at least one root exists b/n 0 and 0.5.


2nd Iteration;
0  0.5
xr   0.25
2
f  0.25  5(0.25)3  5(0.25)2  6(0.25)  2  0.7344

f  0.25 * f  0.5  0  at least one root exists b/n 0.25 and 0.5.
0.25  0.5
a  *100%  100%
0.25
3rd Iteration;
0.25  0.5
xr   0.375
2
f  0.375  5(0.375)3  5(0.375)2  6(0.375)  2  0.1895

f  0.375 * f  0.5  0  at least one root exists b/n 0.375 and 0.5.
0.375  0.25
a  *100%  33.33%
0.375
4th Iteration;
0.375  0.5
xr   0.4375
2
f  0.4375  5(0.4375)3  5(0.4375)2  6(0.4375)  2  0.0867

f  0.375 * f  0.4375  0  at least one root exists b/n 0.375 and 0.4375.
0.4375  0.375
a  *100%  14.29%
0.4375
5th Iteration;
0.375  0.4375
xr   0.4063
2
f  0.4063  5(0.4063)3  5(0.4063)2  6(0.4063)  2  0.0525

f  0.4063 * f  0.4375  0  at least one root exists b/n 0.4063 and 0.4375.
0.4063  0.4375
a  *100%  7.69%
0.4063
Since, only 5-iterations are required, the root is x = 0.4063.

E.g. 2.2 Use the Bisection method to estimate x . Take an initial guess of [2.2, 4.7] and compute the
absolute relative percentage error at the end of each iteration. The pre-specified error tolerance is,
 s  2% . x4 – 5x3 + 5 x2 +5x -6 = 0

Solution: - 1st iteration


Check whether f(x) have opposite sign on the given initial guess with
f (xl)* f(xu) < 0
f (2.2) = (2.2)4 – 5(2.2)3 + 5(2.2)2 + 5(2.2) – 6 = -0.6144
f (4.7) = (4.7)4 – 5(4.7)3 + 5(4.7)2 + 5(4.7) – 6 = 96.8031
f (2.2) * f (4.7) < 0
Therefore, the initial estimate of the root xr lies at the midpoint of the interval
2.2  4.7
xr   3.45
2
2nd iteration
f (3.45) = (3.45)4 – 5(3.45)3 + 5(3.45)2 + 5(3.45) – 6 = 7.114
f (2.2) * f (3.45) < 0
The next guess is [2.2, 3.45]
2.2  3.45 2.825  3.45
xr   2.825 a  *100  22.12%
2 2.825
3rd iteration
f (2.825) = (2.825)4 – 5(2.825)3 + 5(2.825)2 + 5(2.825) – 6 = -1.008
f (2.825) * f (3.45) < 0
The next guess is [2.825, 3.45]
2.825  3.45 3.1375  2.825
xr   3.1375 a  *100  9.96%
2 3.1375
4th iteration
f (3.1375) = (3.1375)4 – 5(3.1375)3 + 5(3.1375)2 + 5(3.1375) – 6 = 1.383
f (2.825) * f (3.1375) < 0
The next guess is [2.825, 3.1375]
2.825  3.1375 2.98125  3.1375
xr   2.98125 a  *100  5.24%
2 2.98125
5th iteration
f (2.98125) = (2.98125)4 – 5(2.98125)3 + 5(2.98125)2 + 5(2.98125) – 6 = -0.1451
f (2.98125) * f (3.1375) < 0
The next guess is [2.98125, 3.1375]
2.98125  3.1375 3.059375  2.98125
xr   3.059375 a  *100  2.55%
2 2.98125
6th iteration
f (3.059375) = (3.059375)4 – 5(3.059375)3 + 5(3.059375)2 + 5(3.059375) – 6 = 0.5258
f (2.98125) * f (3.059375) < 0
The next guess is [2.98125, 3.059375]
2.98125  3.059375 3.0203125  3.059375
xr   3.0203125  a  *100  1.293%   s  2%
2 3.0203125
Answer xr  3.0203125

2.3 False-Position method

A shortcoming of the bisection method is that, in dividing the interval from xl to xu into equal halves,

no account is taken of the magnitude of f ( xl ) and f ( xu ) . For example, if f ( xl ) is much closer to zero

than f ( xu ) , it is likely that the root is closer to xl than to xu . An alternative method that exploits this

graphical insight is to join f ( xl ) and f ( xu ) by a straight line. The intersection of this line with the x
axis represents an improved estimate of the root. The fact that the replacement of the curve by a straight
line gives a “false position” of the root is the origin of the name, method of false position, or in Latin,
regula falsi. It is also called the linear interpolation method.

Using similar triangles (Fig. 2.1), the intersection of the straight line with the x axis, can be estimated as

f ( xl ) f ( xu )

xr  xl xr  xu
which can besolved for
f ( xu )( xl  xu )
xr  xu 
f ( xl )  f ( xu )

E.g. 2.3 Find the square root of Twenty nine  


29 using the method of False Position. Take an initial

guess of 5, 6 .The pre-specified error tolerance is,  s  0.1 0 0 .

Solution:
Let x  29  x 2  29  x 2  29  0  f  x   x 2  29

f  xu   xl  xu 
xr  xu 
f  xl   f  xu 

1st Iteration;
xl  5, xu  6  f  xl   52  29  4, f  xu   62  29  7

f  5 * f  6   4*7  28  0  at least one root exists b/n 5 and 6.

7 5  6
xr  6   5.3636
4  7

f  xr   f  5.3636   5.3636  29  0.2318


2

f  5.3636 * f  6   0  at least one root exists b/n 5.3636 and 6.

2nd Iteration;
xl  5.3636, xu  6

7  5.3636  6 
xr  6   5.3840
0.2318  7
5.3840  5.3636
a  *100%  0.38%
5.3840

f  xr   f  5.3840   5.3840   29  0.0125


2

f  5.3840 * f  6   0  at least one root exists b/n 5.3840 and 6.

3rd Iteration;
xl  5.3840, xu  6

7  5.3840  6 
xr  6   5.3851
0.0125  7

5.3851  5.3840
a  *100%  0.02%   s  0.1%
5.3851

Hence, x= 29 =5.3851 with  s  0.1%

E.g. 2.4 Using the False-Position method, find the root or solution of the expression e x  3x 2 in the
interval [0.5, 1]. The pre-specified error tolerance is 0.002%.
Solution: - Solving by using a table;
n xl xu f ( xl ) f ( xu ) xr f ( xr ) %a

1 0.5 1 0.89872 -0.28172 0.88067 0.08577 -

2 0.88067 1 0.08577 -0.28172 0.90852 0.00442 3.065

3 0.90852 1 0.00442 -0.28172 0.90993 0.00023 0.155

4 0.90993 1 0.00023 -0.28172 0.91000 0.00002 0.0077

5 0.91000 1 0.00002 -0.28172 0.91001 -0.00001 0.0011

Since  a  0.0011%   s  0.002% stop the iteration. Thus the root of the given expression is xr  0.91001
E.g. 2.5 Use the False-Position method to estimate x correct to 3 decimal places. Take an initial guess
of [1, 3.2] and compute the absolute relative percentage error at the end of each iteration.
x3  7 x2  14 x  6  0
Solution: - First Iteration
xl  1 f ( xl )  2
xu  3.2 f ( xu )  0.11200
f ( xu )( xl  xu ) (0.11200)(1  3.2)
xr  xu   3.2   3.08333
f ( xl )  f ( xu ) 2  (0.112)
Second Iteration
f ( xr )  f (3.0833)  0.06886
f ( xl )  f ( xr )  0, then xu  xr  3.08333

f ( xu )( xl  xu ) (0.06886)(1  3.08333)
xr  xu   3.08333   3.01399
f ( xl )  f ( xu ) 2  (0.06886)

3.01399  3.08333
a  *100  2.30%
3.01399
Third Iteration
f ( xr )  f (3.01399)  0.01360

f ( xl )  f ( xr )  0, then xu  xr  3.01399

f ( xu )( xl  xu ) (0.01360)(1  3.01399)
xr  xu   3.01399   3.00039
f ( xl )  f ( xu ) 2  (0.01360)

3.00039  3.01399
a  *100  0.45%
3.00039
Forth Iteration
f ( xr )  f (3.00039)  0.00039

f ( xl )  f ( xr )  0, then xu  xr  3.00039

f ( xu )( xl  xu ) (0.00039)(1  3.00039)
xr  xu   3.00039   3.00000
f ( xl )  f ( xu ) 2  (0.00039)

3.00000  3.00039
a  *100  0.013%
3.00000
Therefore the solution is xr  3.000 correct to 3 decimal places.
2.4 Fixed Point Iteration
Iterative techniques are used to find roots of equations, solutions of linear and nonlinear systems of
equations and solutions of differential equations. A rule or function g(x) for computing successive
terms is needed and it can be found by rearranging the function f(x) = 0 so that x is on the left side of
the equation. x = g(x). This transformation can be accomplished either by algebraic manipulation or by
simply adding x to both sides of the original equation. For example,
x2  2 x  3  0 can be simply manipulated to yield
x2  3
x
2
Whereas sin x = 0 could be put by adding x to both sides to yield
x  sin x  x
Thus, given an initial guess of the root xi, the above equation can be used to compute a new estimate
xi 1 as expressed by the iterative formula xi1  g ( xi )
The approximate error for this equation can be determined using the error estimator

xi1  xi
a  *100%
xi1

E.g. 2.6 Find a real root of cos x  3x  5  0 correct to 4 decimal places. Take an initial guess of x0  0 .
Use the fixed-point iteration method.

Solution: - Rewrite the given expression in the form of x  g ( x) .


1 1
x  (5  cos x)  g ( x)  (5  cos x)
3 3
xi 1  g ( xi ) Iteration function

1
x1  g ( x0 )  (5  cos 0)  2
3
1
x2  g ( x1 )  (5  cos 2)  1.52795
3
1
x3  g ( x2 )  (5  cos1.52795)  1.68094
3
1
x4  g ( x3 )  (5  cos1.68094)  1.63002
3
1
x5  g ( x4 )  (5  cos1.63002)  1.64694
3
1
x6  g ( x5 )  (5  cos1.64694)  1.64131
3
1
x7  g ( x6 )  (5  cos1.64131)  1.64318
3
1
x7  g ( x6 )  (5  cos1.64318)  1.64256
3
1
x8  g ( x7 )  (5  cos1.64256)  1.64277
3
1
x9  g ( x8 )  (5  cos1.64277)  1.64270
3

Therefore the root is x  1.6427 correct to 4 decimal places.


E.g. 2.7 Use the fixed-point iteration method to estimate x. Take an initial guess of x0= 0 and compute
the absolute relative percentage error at the end of each iteration. Use five decimal places.
f ( x)  12  21x  18x2  2.4 x3

Solution: - the function can be separated directly and expressed in the form of x  g ( x)
1st option
12  18 x 2  2.4 x3
Use x  use initial guess of x0  0
21
12  18 x0 2  2.4 x03 12  18(0)2  2.4(0)3
1st iteration x1    0.57143
21 21
12  18 x12  2.4 x13 12  18(0.57143)2  2.4(0.57143)3
2nd iteration x2    0.27022
21 21
12  18 x2 2  2.4 x23 12  18(0.27022)2  2.4(0.27022)3
3 iteration x3 
rd
  0.50659
21 21
12  18 x32  2.4 x33 12  18(0.50659)2  2.4(0.50659)3
4th iteration x4    0.336603
21 21
.
.
12  18 x77 2  2.4 x773 12  18(0.41536)2  2.4(0.41536)3
78th iteration x78    0.41536
21 21
Therefore xr  0.41536
2nd option
12  21x  2.4 x3
Use x  use initial guess of x0  0
18
12  21x0  2.4 x03 12  21(0)2  2.4(0)3
1st iteration x1    0.816497
18 18
12  21x1  2.4 x13 12  21(0.816497)2  2.4(0.816497)3
2 iteration x2 
nd
  1.300701
18 18
12  21x2  2.4 x23 12  21(1.300701)2  2.4(1.300701)3
3rd iteration x3    1.57403
18 18
12  21x3  2.4 x33 12  21(1.300701)2  2.4(1.300701)3
4 iteration x3 
th
  1.57403
18 18
.
.
12  21x37  2.4 x373 12  21(2.053604)2  2.4(2.053604)3
38th iteration x3    2.053604
18 18
Therefore xr  2.053604
3rd option
12  21x  18 x 2
Use x  3 use initial guess of x0  0
2.4
12  21x0  18 x0 2 3 12  21(0)  18(0)2
1st iteration x1  3   1.70998
2.4 2.4
12  21x1  18 x12 3 12  21(1.70998)  18(1.70998)2
2 iteration x2 
nd 3   3.17124
2.4 2.4
12  21x2  18 x2 2 3 12  21(3.17124)  18(3.17124)2
3rd iteration x3  3   3.49461
2.4 2.4
12  21x3  18 x32 3 12  21(3.49461)  18(3.49461)2
4th iteration x4  3   3.82619
2.4 2.4
.
.
12  21x60  18 x60 2 3 12  21(5.861755)  18(5.861755)2
61st iteration x61  3   5.86176
2.4 2.4
Therefore xr  5.86176
2.5 Newton-Raphson Method

The Newton-Raphson (or simply Newton's) method is one of the most useful and best-known
algorithms that relies on the continuity of f(x) and f ’(x). The method is attributed to Sir Isaac Newton
(1643-1727) and Joseph Raphson (1648-1715).
If the initial guess of the root is xi , a tangent can be extended from the point  xi , f ( xi ) . The point where

this tangent cross the x-axis usually represents an improved estimate of the root and the Newton-
Raphson method can be derived based on the basis of this geometrical interpretation and is expressed
by the iteration

The first derivative at x is equivalent to the


slope:
f ( xi )  0
f '( xi ) 
xi  xi1
Which can be rearranged to yield
f ( xi )
xi1  xi 
f '( xi )

The approximate error for this equation can be determined using the error estimator

xi1  xi
a  *100%
xi1

E.g. 2.8 Use the Newton-Raphson method to estimate the real root near 2 of the
equation x4  11x  8  0 accurate to 4-decimal places.
Solution:
f  xi 
xi 1  xi  i  0,1, 2......
f '  xi 
x0  2 , f  x0   f  2  24  11 2   8  2
f '  x   4 x3  11 , f '  x0   f '  2   4  2   11  21
3

1st Iteration ( i  0 );
f  x0  2
x1  x0   2   1.9048
f '  x0  21
f  x1   f 1.9048  (1.9048)4  111.9048  8  0.2108
f '  x1   f ' 1.9048  4 1.9048  11  16.6427
3
2nd Iteration ( i  1 );
f  x1  0.2108
x2  x1   1.9048   1.8921
f '  x1  16.6427
f  x2   f 1.8921  (1.8921)4  111.8921  8  0.0034
f '  x2   f ' 1.8921  4 1.8921  11  16.0948
3

3rd Iteration ( i  2 );
f  x2  0.0034
x3  x2   1.8921   1.8919
f '  x2  16.0948
f  x3   f 1.8919  (1.8919)4  111.8919   8  0.0001
f '  x3   f ' 1.8919   4 1.8919   11  16.0857
3

4th Iteration ( i  3 );
f  x3  0.0001
x4  x3   1.8919   1.8919
f '  x3  16.0857
x3  x4  1.8919  The root is x=1.8919 correct to 4-decimal places.
E.g. 2.9 Determine the roots of f(x) = -2 + 6.2x – 4 x2 + 0.7 x3 using Newton-Raphson method with
initial guess of X0 = 1 with in Ɛs = 1%.
Solution: - first determine the derivatives of the function
f ' ( x)  6.2  8x  2.1x 2
Then evaluate the function and its derivatives with initial guess which can be substituted into
equation
f ( xi )
xi 1  xi 
f ' ( xi )
1st iteration (i=0) x0  1
f ( x0 ) f (1)  2  6.2(1)  4(1) 2  0.7(1) 3  0.9
x1  x0 
f ' ( x0 ) f ' (1)  6.2  8(1)  2.1(1) 2  0.3
0.9  2 1
x1  1   2 a  *100  150%   s  1%
0.3 2

Therefore, we have to continue the iteration

2nd iteration (i=1) x1  2

f ( x1 ) f (2)  2  6.2(2)  4(2) 2  0.7(2) 3  36


x2  x1 
f ' ( x1 ) f ' (2)  6.2  8(2)  2.1(2) 2  30.6

 36  0.8235  (2)
x2  2   0.8235  a  *100  142.86%   s  1%
30.6  0.8235

Therefore, we have to continue the iteration


3rd iteration (i=2) x2  0.8235

f ( x2 ) f (0.8235)  2  6.2(0.8235)  4(0.8235) 2  0.7(0.8235) 3  10.2092


x3  x2 
f ' ( x2 ) f ' (0.8235)  6.2  8(0.8235)  2.1(0.8235) 2  14.212

 10.2092  0.10516  (0.8235)


x3  0.8235   0.10516 a  *100  683.09%   s  1%
14.212  0.10516

Therefore, we have to continue the iteration

4th iteration (i=3) x3  0.10516

f ( x3 ) f (0.10516 )  2  6.2(0.10516)  4(0.10516)2  0.7(0.10516)3  2.69704


x4  x3 
f ' ( x3 ) f '(0.10516)  6.2  8(0.10516)  2.1(0.10516)2  7.0645

 2.69704 0.276613  (0.10516 )


x4  0.10516   0.276613  a  *100  138.018%   s  1%
7.0645 0.276613

Therefore, we have to continue the iteration

5th iteration (i=4) x4  0.276613

f ( x4 ) f (0.276613 )  2  6.2(0.276613)  4(0.276613)2  0.7(0.276613)3  0.57624


x5  x4 
f ' ( x4 ) f '(0.276613)  6.2  8(0.276613)  2.1(0.276613)2  4.14778

 0.57624 0.41554  0.276613


x5  0.276613   0.41554  a  *100  33.43%   s  1%
4.14778 0.41554

Therefore, we have to continue the iteration

6th iteration (i=5) x5  0.41554

f ( x5 ) f (0.41554 )  2  6.2(0.41554)  4(0.41554)2  0.7(0.41554)3  0.064118


x6  x5 
f ' ( x5 ) f '(0.41554)  6.2  8(0.41554)  2.1(0.41554)2  3.238294

 0.064118 0.43534  0.41554


x6  0.41554   0.43534 a  *100  4.55%   s  1%
3.238294 0.43534

Therefore, we have to continue the iteration

7th iteration (i=6) x6  0.43534

f ( x6 ) f (0.43534 )  2  6.2(0.43534)  4(0.43534)2  0.7(0.43534)3  0.0012214


x7  x6 
f ' ( x6 ) f '(0.43534)  6.2  8(0.43534)  2.1(0.43534)2  3.115274
 0.0012214 0.435732  0.43534
x7  0.43534   0.435732  a  *100  0.099%   s  1%
3.115274 0.435732

Now, we have to stop the iteration.

Answer xr  0.435732

2.6 Secant Method

The Newton-Raphson algorithm requires two functions evaluations per iteration, f(x) and f’(x).
However, many functions have derivatives which may be extremely difficult or inconvenient to
evaluate. Hence, it is desirable to have a method for finding a root that does not depend on the
computation of a derivative. The secant method does not need a formula for the derivative and it can be
coded so that only one new function evaluation is required per iteration. For these cases, the derivative
can be approximated by a backward finite divided difference, as in fig. 2.3.
f ( xi1 )  f ( xi )
f '( xi ) 
xi1  xi
This approximation can be substituted into the
above equation to yield the following iterative
equation
f ( xi )( xi1  xi )
xi1  xi 
f  xi1   f  xi 

The approximate error for this equation can be determined using the error estimator

xi1  xi
a  *100%
xi1

E.g. 2.10 Evaluate zero of the expression 2 x  9  log x , Accurate to 5 significant digits with an initial
guesses of x-1 = 4 and x0 = 5. Use Secant method.

Solution: - let f ( x)  2 x  log x  9

f ( xi )  xi1  xi 
xi1  xi 
f ( xi1 )  f ( xi )
1st iteration (i=0) x1  4 and x0  5
f ( x0 )  x1  x0  f ( x1 )  2(4)  log 4  9  1.60206
x1  x0  ;
f ( x1 )  f ( x0 ) f ( x0 )  2(5)  log 5  9  0.30103

0.30103(4  5)
x1  5   4.84182
0.30103  (0.60206)
2nd iteration (i=1) x0  5 and x1  4.84182
f ( x1 )  x0  x1 
x2  x1  ; f ( x1 )  2(4.84182)  log 4.84182  9  0.00137
f ( x0 )  f ( x1 )

0.00137(4.84182  5)
x2  4.84182   4.84253
0.00137  0.30103
3rd iteration (i=2) x1  4.84182 and x2  4.84253
f ( x2 )  x1  x2 
x3  x2  ; f ( x2 )  2(4.84253)  log 4.84253  9  1.23199(105 )
f ( x1 )  f ( x2 )
1.21399(105 )(4.84253  4.84182)
x3  4.84253   4.84256
1.21399(105 )  (0.00137)
Thus, x  4.8425 is the root accurate to 5 significant digits.

E.g. 2.5 Determine x by using Secant method with an initial guess of x-1 = 1 and x0 = 1.5. Perform the
computation until Ɛa is less than Ɛs=1%
x3  0.795973 x2  0.039023  0
Solution: -
f ( xi )  xi1  xi 
xi1  xi 
f ( xi1 )  f ( xi )

1st iteration (i=0) x1  1 and x0  1.5


f ( x0 )  x1  x0  f (1)  (1) 3  0.795973(1) 2  0.039023  0.24305
x1  x0 
f ( x1 )  f ( x0 ) f (1.5)  (1.5) 3  0.795973(1.5) 2  0.039023  1.62308375

1.62308375(1  1.5) 0.91194  1.5


x1  1.5   0.91194  a  *100  64.48%   s  1%
0.24305  1.62308375 0.91194

2nd iteration (i=1) x0  1.5 and x1  0.91194

f ( x1 )  x0  x1  f (1.5)  (1.5) 3  0.795973(1.5) 2  0.039023  1.62308375


x2  x1  ;
f ( x0 )  f ( x1 ) f (0.91194)  (0.91194) 3  0.795973(0.91194) 2  0.039023  0.1355

0.1355(1.5  0.91194)
x2  0.91194   0.858375
1.62308375  0.1355
0.858375  0.91194
a  *100  6.24%   s  1%
0.858375

3rd iteration (i=2) x1  0.91194 and x2  0.858375


f ( x2 )  x1  x2  f (0.91194)  (0.91194) 3  0.795973(0.91194) 2  0.039023  0.1355
x3  x2 
f ( x1 )  f ( x2 ) f (0.858375)  (0.858375) 3  0.795973(0.858375) 2  0.039023  0.085
0.085(0.91194  0.858375)
x3  0.858375   0.768212
0.1355  0.085
0.768212  0.858375
a  *100  11.74 %   s  1%
0.768212
4th iteration (i=3) x2  0.858375 and x3  0.768212
f ( x3 )  x2  x3  f (0.858375)  (0.858375)3  0.795973(0.858375 )2  0.039023  0.085
x4  x3 
f ( x2 )  f ( x3 ) f (0.768212)  (0.768212)3  0.795973(0.768212)2  0.039023  0.02264
0.02264(0.858375  0.768212)
x4  0.768212   0.73548
0.085  0.02264
0.73548  0.768212
a  *100  4.45 %   s  1%
0.73548

5th iteration (i=4) x3  0.768212 and x4  0.73548

f ( x4 )  x3  x4  f (0.768212)  (0.768212) 3  0.795973(0.768212) 2  0.039023  0.02264


x5  x4 
f ( x3 )  f ( x4 ) f (0.73548)  (0.73548) 3  0.795973(0.73548) 2  0.039023  0.0063005
0.0063005(0.768212  0.73548)
x5  0.73548   0.72286
0.02264  0.0063005
0.72286  0.73548
a  *100  1.75%   s  1%
0.72286
6th iteration (i= 5) x4  0.73548 and x5  0.72286

f ( x5 )  x4  x5  f (0.73548)  (0.73548) 3  0.795973(0.73548) 2  0.039023  0.0063005


x6  x5 
f ( x4 )  f ( x5 ) f (0.72286)  (0.72286) 3  0.795973(0.72286) 2  0.039023  0.0008195
0.0008195(0.73548  0.72286)
x6  0.72286   0.720973
0.0063005  0.0008195
0.720973  0.72286
a  *100  0.262 %   s  1%
0.720973
Answer xr  0.720973

You might also like