Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
2.1 INTRODUCTION
are called polynomials and we discuss some special methods for determining
their roots. A non-algebraic function is called a transcendental function,
e.g., f (x) = ln x3 0.7 f (x) = e0.5x 5x, y (x) = sin2x x2 2, etc. The roots
of Eq. (2.1) may be either real or complex. We discuss methods of finding a
real root of algebraic or transcendental equations and also methods of
determining all real and complex roots of polynomials. Solution of systems of
nonlinear equations will be considered at the end of the chapter.
22
SECTION 2.2: Bisection Method 23
If f (x) is a polynomial of the form Eq. (2.2), the following results, from
the theory of equations would be useful in locating its roots.
(i) Every polynomial equation of the nth degree has n and only n roots.
(ii) If n is odd, the polynomial equation has atleast one real root whose
sign is opposite to that of the last term.
(iii) If n is even and the constant term is negative, then the equation has
atleast one positive root and atleast one negative root.
(iv) If the polynomial equation has (a) real coefficients, then imaginary
roots occur in pairs and (b) rational coefficients, then irrational roots
occur in pairs.
(v) Descartes Rule of Signs
(a) A polynomial equation f (x) = 0 cannot have more number of
positive real roots than the number of changes of sign in the
coefficients of f (x).
(b) In (a) above, f (x) = 0 cannot have more number of negative
real roots than the number of changes of sign in the coefficients
of f (x).
This method is based on Theorem 1.1 which states that if a function f (x) is
continuous between a and b, and f (a) and f (b) are of opposite signs, then there
exists at least one root between a and b. For definiteness, let f (a) be negative
and f (b) be positive. Then the root lies between a and b and let its approximate
value be given by x0 = (a + b)/2. If f (x0) = 0, we conclude that x0 is a root of
the equation f (x) = 0. Otherwise, the root lies either between x0 and b, or
between x0 and a depending on whether f (x0) is negative or positive. We
designate this new interval as [a1, b1] whose length is |b a|/2. As before, this
is bisected at x1 and the new interval will be exactly half the length of the
previous one. We repeat this process until the latest interval (which contains
the root) is as small as desired, say e. It is clear that the interval width is
reduced by a factor of one-half at each step and at the end of the nth step, the
new interval will be [an, bn] of length |b a|/2n. We then have
|b −a|
≤ F,
2n
which gives on simplification
log e (| b − a |/F )
n≥ (2.3)
log e 2
Equation (2.3) gives the number of iterations required to achieve an accuracy
e. For example, if | b a | = 1 and e = 0.001, then it can be seen that
n ³ 10 (2.4)
24 CHAPTER 2: Solution of Algebraic and Transcendental Equations
x2 x0 a
x1 x
0 b
[a, f (a)]
−2 − 2.5
x2 = = − 2.25
2
Now f (x2) = 1.5781, and, therefore, the root lies between 2 and 2.25.
It follows that
– 4.25
x3 – 2.125
2
Successive approximations are given by
x4 = 2.0625, x5 = 2.0938, x6 = 2.1094,
x7 = 2.1016, x8 = 2.1055, x9 = 2.1035,
x10 = 2.1045, x11 = 2.1050,
The difference between x10 and x11 is 0.0005. Hence, we conclude that the root
is given by x = 2.105, correct to three decimal places.
Example 2.4 Find the positive root, between 0 and 1, of the equation
x = ex to a tolerance of 0.05%.
Let
f (x) = xex 1 = 0
We have, f (0) = 1 and f (1) = e 1, which is positive. Hence, a root exists
between 0 and 1, and
0 +1
x1 = = 0.5
2
Because, f (x1) = 0.1756, the root lies between 0.5 and 1.0.
Then
0.5 + 1.0
x2 = = 0.75
2
SECTION 2.2: Bisection Method 27
x2 x1
F1 t 100
x2
0.25
t 100 33.33%
0.75
since f (x2) = 0.5878, the root lies between 0.5 and 0.75.
Therefore,
0.5 0.75
x3 0.625
2
also,
0.625 – 0.75
F2 t 100 20%.
0.625
Proceeding in this way, successive approximations and tolerances are obtained:
x4 = 0.5625, e3 = 11.11%; x5 = 0.5938, e4 = 5.26%;
x6 = 0.5781, e5 = 2.71%; x7 = 0.5703, e6 = 1.37%;
x8 = 0.5664, e7 = 0.69%; x9 = 0.5684, e8 = 0.35%;
x10 = 0.5674, e9 = 0.18%; x11 = 0.5669, e10 = 0.09%;
x12 = 0.5671, e11 = 0.035%
Since e11 = 0.035% < 0.05%, the required root is 0.567, correct to three
decimal places.
Example 2.5 Find a root, correct to three decimal places and lying between
0 and 0.5, of the equation
4ex sin x 1 = 0
Let
f (x) = 4ex sin x 1
We have f (0) = 1 and f (0.5) = 0.163145
Therefore,
x1 = 0.25
Since f (0.25) = 0.22929, it follows that the root lies between 0.25 and 0.5.
Therefore,
0.75
x2 = = 0.375
2
The successive approximations are given by
x3 = 0.3125, x4 = 0.3438, x5 = 0.3594,
x6 = 0.3672, x7 = 0.3711, x8 = 0.3692,
x9 = 0.3702, x10 = 0.3706, x11 = 0.3704
x12 = 0.3705,
Hence the required root is 0.371, correct to three decimal places.
28 CHAPTER 2: Solution of Algebraic and Transcendental Equations
This is the oldest method for finding the real root of a nonlinear equation
f (x) = 0 and closely resembles the bisection method. In this method, also
known as regulafalsi or the method of chords, we choose two points a and
b such that f (a) and f (b) are of opposite signs. Hence, a root must lie in
between these points. Now, the equation of the chord joining the two points
[a, f (a)] and [b, f (b)] is given by
y − f (a) f (b) − f (a )
= . (2.6)
x−a b−a
The method consists in replacing the part of the curve between the points
[a, f (a)] and [b, f (b)] by means of the chord joining these points, and taking
the point of intersection of the chord with the x-axis as an approximation to
the root. The point of intersection in the present case is obtained by putting
y = 0 in Eq. (2.6). Thus, we obtain
f (a) af (b) − bf (a)
x1 = a − (b − a ) = , (2.7)
f (b) − f (a) f (b) − f ( a)
which is the first approximation to the root of f (x) = 0. If now f (x1) and
f (a) are of opposite signs, then the root lies between a and x1, and we
replace b by x1 in Eq. (2.7), and obtain the next approximation. Otherwise, we
replace a by x1 and generate the next approximation. The procedure is repeated
till the root is obtained to the desired accuracy. Figure 2.2 gives
a graphical representation of the method. The error criterion Eq. (2.5) can be
used in this case also.
Y
y = f (x)
* B [b, f (b)]
O x1 Y
x2 X
*
A [a, f (a)]
Figure 2.2 Method of false position.
f (x) = x3 2x 5 = 0.
2(16) − 3(−1) 35
x1 = = = 2.058823529.
16 − (−1) 17
Now, f (x1) = 0.390799917 and hence the root lies between 2.058823529 and
3.0. Using formula (2.7), we obtain
2.058823529(16) − 3(−0.390799917)
x2 = = 2.08126366.
16.390799917
Since f (x2) = 0.147204057, it follows that the root lies between 2.08126366
and 3.0. Hence, we have
2.08126366(16) − 3(−0.147204057)
x3 = = 2.089639211.
16.147204057
Proceeding in this way, we obtain successively:
x4 = 2.092739575, x5 = 2.09388371,
x6 = 2.094305452, x7 = 2.094460846,
The correct value is 2.0945
, so that x7 is correct to five significant figures.
Example 2.7 Given that the equation x2.2 = 69 has a root between 5 and 8.
Use the method of regulafalsi to determine it.
Let f (x) = x2.2 69. We find
Now, f (x1) = 4.275625415 and therefore, the root lies between 6.655990062
and 8.0. We obtain
x2 = 6.83400179, x3 = 6.850669653.
The correct root is 6.8523651
, so that x3 is correct to three significant
figures.
Example 2.8 The equation 2x = log10 x + 7 has a root between 3 and 4. Find
this root, correct to three decimal places, by regulafalsi method.
Let
f (x) = 2x log10 x 7, a = 3 and b = 4.
Then we find
f (3) = 1.4771 and f (4) = 0.3979.
30 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Hence
af (b) − bf (a)
x1 =
f (b) − f (a)
3(0.3979) − 4(−1.4771)
=
0.3979 + 1.4771
7.1021
= = 3.7878.
1.8750
Therefore, the root lies between 3 and 3.7878. Now, we take a = 3 and b = 3.7878
Then,
f (b) = 2(3.7878) log10 3.7878 7 = 0.002787
Hence,
3( 0.002787) 3.7878(–1.4771)
x2
– 0.002787 1.4771
3.7893,
and
f ( x2 ) = 2(3.7893) − log10 (3.7893) − 7
= 0.000041,
which shows that x = 3.789 is the root correct to three decimal places.
Hence
0(0.038919) 0.39636( 1)
x3
1.038919
0.381512,
and
f (x3) = 0.016934
Taking a = 0 and b = 0.381512, we obtain
0(0.016934) − 0.381512(–1)
x4 =
1.016934
= 0.375159,
and
f (x4) = 0.0071873
Proceeding as above, we obtain
x5 = 0.37248, x6 = 0.37136,
x7 = 0.37089, x8 = 0.370697
It follows that the required root is 0.371, correct to three decimal places.
The preceding sequence may not converge to a definite number. But if the
sequence converges to a definite number x, then x will be a root of the equation
x = f (x). To show this, let
xn+1 = f (xn) (2.9)
be the relation between the nth and (n + 1)th approximations. As n increases,
xn+1 ® x and if f (x) is a continuous function, then f (xn) ® f (x). Hence, in
the limit, we obtain
x = f (x), (2.10)
which shows that x is a root of the equation x = f (x).
To establish the condition of convergence of Eq. (2.8), we proceed in the
following way:
From Eq. (2.9), we have
x1 = f (x0) (2.11)
From Eqs. (2.10) and (2.11), we get
Y x1 G (Y ) G ( x0 )
(2.12)
(Y x0 ) G b(Y0 ), x0 Y0 Y ,
on using Theorem 1.5. Similarly, we obtain
x x2 = (x x1) f ¢(x1), x1 < x1 < x (2.13)
x x3 = (x x2) f ¢(x2), x2 < x2 < x (2.14)
M M M
x xn+1 = (x xn) f ¢(xn), xn < xn < x (2.15)
If we assume
|f ¢ (xi)| £ k (for all i), (2.16)
then Eqs. (2.12) to (2.15) give
|x x1| £ k |x x0|
1442443
|x x2| £ k |x x1|
|x x3| £ k |x x2| (2.17)
M M
|x xn+1| £ k |x xn|
Multiplying the corresponding sides of the above equations, we obtain
|x xn+1| £ kn+1 |x x0| (2.18)
If k < 1, i.e., if |f ¢(xi)| < 1, then the right side of Eq. (2.18) tends to zero
and the sequence of approximations x0, x1, x2,
converges to the root x. Thus,
when we express the equation f (x) = 0 in the form x = f (x), then f (x) must
be such that
| f ¢(x) | < 1
in an immediate neighbourhood of the root. It follows that if the initial
approximation x0 is chosen in an interval containing the root x, then the
sequence of approximations converges to the root x.
SECTION 2.4: Iteration Method 33
Now, we show that the root so obtained is unique. To prove this, let x1 and
x2 be two roots of the equation x = f (x). Then, we must have
x1 = f (x1) and x2 = f (x2).
Therefore,
| Y1 − Y 2 | = | G (Y1 ) − G (Y 2 ) |
= | Y1 − Y 2 | G ′(I ), I ∈ (Y1, Y 2 )
Hence,
|x1 x2| [1 f¢(h)] = 0 (2.19)
Since |f¢(h)| < 1, it follows that x1 = x2, which proves that the root obtained
is unique.
Finally, we shall find the error in the root obtained. We have
| Y xn | c k | Y xn 1 |
k | Y xn xn xn 1 |
c k <| Y xn | | xn xn 1 |>
k k
Þ | Y xn | c | xn xn 1 | k n 1 | x1 x0 |
1 k 1 k
kn
c
| x1 x0 |, (2.20)
1 k
which shows that the convergence would be faster for smaller values of k.
Now, let e be the specified accuracy so that
| x xn | £ e
Then, Eq. (2.20) gives
1− k
| xn − xn −1 | ≤
F, (2.21)
k
which can be used to find the difference between two successive approxima-
tions (or iterations) to achieve a prescribed accuracy.
Example 2.10 Find a real root of the equation x3 = 1 x2 on the interval [0, 1]
with an accuracy of 104.
We rewrite the equation as
1
x= (i)
x +1
Here
1
G ( x) ( x 1) 1/ 2
x 1
Therefore,
1 1
G ′( x) = − ( x + 1)−3/ 2 = − < 1in [0, 1].
2 2 ( x + 1)3
Also,
1 1
max | G ′( x) | = = = k < 0.2
2 8 4 2
34 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Example 2.11 Find a real root, correct to three decimal places, of the equation
2x 3 = cos x
©3 Q¸
lying in the interval ª2
, .
« 2 ¹º
We rewrite the given equation as
1
x = (cos x + 3)
2
Here
1 ©3 Q ¸
|G b ( x)|
|sin x | 1, in ª , ¹ .
2 «2 2 º
Choosing x0 = 1.5, we obtain successively:
1
x1 (cos 1.5 3) 1.5354,
2
1
x2 (cos 1.5354 3) 1.5177,
2
1
x3 (cos 1.5177 3) 1.5265,
2
1
x4 (cos 1.5265 3) 1.5221,
2
1
x5 (cos 1.5221 3) 1.5243,
2
SECTION 2.4: Iteration Method 35
1
x6 (cos 1.5243 3) 1.5232,
2
1
x7 (cos 1.5232 3) 1.5238.
2
Now, | x7 x6 | = 0.0006 < 0.001. Hence, the root, correct to three decimal
places is 1.524.
Example 2.12 Use the method of iteration to find a positive root of the
equation xex = 1, given that a root lies between 0 and 1.
Writing the equation in the form
x = ex,
we find that
1
G b ( x) e x for x 1
e
Therefore,
| f¢(x) | < 1.
Choosing x0 = 0.5, we find
x1 = e0.5 = 0.60653, x2 = 0.54524,
x3 = 0.57970, x4 = 0.56007,
x5 = 0.57117, x6 = 0.56486,
x7 = 0.56844, x8 = 0.56641,
x9 = 0.56756, x10 = 0.56691,
x11 = 0.56728, x12 = 0.56706,
x13 = 0.56719, x14 = 0.56712,
x15 = 0.56716, x16 = 0.56713,
x17 = 0.56715, x18 = 0.56714,
x19 = 0.56714.
It follows that the root, correct to four decimal places, is 0.5671.
Example 2.13 Use the iterative method to find a real root of the equation
sin x = 10(x 1). Give your answer correct to three decimal places.
Let
f (x) = sin x 10x + 10
We find, from graph, that a root lies between 1 and p (The student is
advised to draw the graphs). Rewriting the equation as
sin x
x =1+ ,
10
we have
sin x
G ( x) = 1 + ,
10
and
cos x
|G b( x)| 1in 1 c x c Q .
10
36 CHAPTER 2: Solution of Algebraic and Transcendental Equations
( xi +1 − xi )2 (2.22)
Y = xi +1 − .
xi +1 − 2 xi + xi −1
If we now define Dxi and D2xi by the relations
( 'xi )2 (2.23)
Y = xi +1 − 2
.
' xi −1
2
which explains the term D -process.
In any numerical application, the values of the following underlined
quantities must be obtained.
xi –1
%xi –1
xi % 2 xi –1
%xi
xi 1
( −0.017)2
x4 = 1.518 − = 1.524,
−0.052
which corresponds to six normal iterations.
This method is generally used to improve the result obtained by one of the
previous methods. Let x0 be an approximate root of f (x) = 0 and let
x1 = x0 + h be the correct root so that f (x1) = 0. Expanding f (x0 + h) by
Taylors series, we obtain
h2
f ( x0 ) + hf ′( x0 ) + f ′′( x0 ) + " = 0.
2!
38 CHAPTER 2: Solution of Algebraic and Transcendental Equations
P (x0, y0)
x
0 x1 x0
Example 2.15 Use the NewtonRaphson method to find a root of the equation
x3 2x 5 = 0.
Here f (x) = x3 2x 5 and f ¢(x) = 3x2 2. Hence Eq. (2.24b) gives:
x n3 − 2 xn − 5
xn +1 = xn − (i)
3x n2 − 2
40 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Example 2.17 Find a real root of the equation x = ex, using the Newton
Raphson method.
We write the equation in the form
f ( x) = xe x − 1 = 0 (i)
Let x0 = 1. Then
e −1 1 ⎛ 1 ⎞
x1 = 1 − = ⎜ 1 + ⎟ = 0.6839397
2e 2 ⎝ e⎠
SECTION 2.5: NewtonRaphson Method 41
Now
f (x1) = 0.3553424, and f ¢(x1) = 3.337012,
so that
0.3553424
x2 = 0.6839397 − = 0.5774545
3.337012
Proceeding in this way, we obtain
x3 = 0.5672297 and x4 = 0.5671433.
Example 2.19 Given the equation 4ex sin x 1 = 0, find the root between
0 and 0.5 correct to three decimal places.
Let f (x) = 4ex sin x 1 and x0 = 0.2.
Then
f (x0) = 0.349373236,
and
f ¢(x0) = 2.559015826.
Therefore,
0.349373236
x1 0.2
2.559015826
0.336526406 0.33653.
42 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Now,
f (x1) = 0.056587
and
f ¢(x1) = 1.753305735
= 1.75330
Therefore,
0.056587
x2 0.33653 0.36880
1.75330
For the next approximation, we find f (x2) = 0.00277514755 and
f ¢(x2) = 1.583028705. This gives
x3 = 0.36880 0.00175 = 0.37055
since f (x3) = 0.00001274, it follows that the required root is given by
x = 0.370.
Generalized Newton’s method
If x is a root of f (x) = 0 with multiplicity p, then the iteration formula
corresponding to Eq. (2.24) is taken as
f ( xn ) (2.31)
xn +1 = xn − p ,
f ′( xn )
which means that (1/p) f ¢(xn) is the slope of the straight line passing through
(xn, yn) and intersecting the x-axis at the point (xn+1, 0).
Equation (2.31) is called the generalized Newtons formula and reduces
to Eq. (2.24) for p = 1. Since x is a root of f (x) = 0 with multiplicity p,
it follows that x is also a root of f ¢(x) = 0 with multiplicity (p 1), of
f ¢¢(x) = 0 with multiplicity (p 2), and so on. Hence the expressions
f ( x0 ) f ′( x0 ) f ′′( x0 )
x0 − p , x0 − ( p − 1) , x0 − ( p − 2)
f ′( x0 ) f ′′( x0 ) f ′′′( x0 )
must have the same value if there is a root with multiplicity p, provided that
the initial approximation x0 is chosen sufficiently close to the root.
Example 2.20 Find a double root of the equation f (x) = x3 x2 x + 1 = 0.
Choosing x0 = 0.8, we have
f ¢(x) = 3x3 2x 1, and f ¢¢(x) = 6x 2.
With x0 = 0.8, we obtain
f ( x0 ) 0.072
x0 − 2 = 0.8 − 2 = 1.012,
f ′( x0 ) −(0.68)
and
f ′( x0 ) (−0.68)
x0 − = 0.8 − = 1.043.
f ′′( x0 ) 2.8
SECTION 2.6: Ramanujans Method 43
The closeness of these values indicates that there is a double root near to
unity. For the next approximation, we choose x1 = 1.01 and obtain
f ( x1 )
x1 − 2 = 1.01 − 0.0099 = 1.0001,
f ′( x1 )
and
f ′( x1 )
x1 − = 1.01 − 0.0099 = 1.0001.
f ′′( x1 )
We conclude, therefore, that there is a double root at x = 1.0001 which is
sufficiently close to the actual root unity.
On the other hand, if we apply NewtonRaphson method with x0 = 0.8,
we obtain
x1 = 0.8 + 0.106 » 0.91, and x2 = 0.91 + 0.046 » 0.96.
It is clear that the generalized Newtons method converges more rapidly than
the NewtonRaphson procedure.
1 1 1 1
will have roots and such that > .
x1 x2 | x1 | | x2 |
Now,
1
1 ¦ a1 a µ
1
§
x 2 x2 ¶
G ( x) ¨ a0 a0 ·
can be written as
−1
⎛ a1 a ⎞ k1 k2
⎜1 + x + 2 x2 ⎟ = +
⎝ a0 a0 ⎠ 1 1
x− x−
x1 x2
− k1 x1 −k2 x2
= +
1 − xx1 1 − xx2
= − k1 x1 (1 − xx1 ) −1 − k2 x2 (1 − xx2 ) −1
e
¥ ¥ k x
2
bi xi , where bi i 1
r r
i 0 r 1
Then,
i
k1 ¦ x1 µ
1
bi 1 k1 x1i i
k 2 x2 k 2 §¨ x2 ¶· 1
bi k1 x1i 1 k2 x2i 1 k1 ¦ x1 µ
i 1 x2
1
k 2 §¨ x2 ¶·
x1
Since < 1, it follows that
x2
bi − 1 1
lim = ,
i →∞ bi x2
which is the smallest root. This is the basis of Ramanujans method
which is outlined below.
To find the smallest root of f (x) = 0, we consider f (x) in the form
f (x) = 1 (a1x + a2x2 + a3x3 + L),
and then write
1
©1
«
( a1 x a2 x 2 a3 x 3 ") ¸
º
b1 b2 x b3 x 2 " (2.33)
b2 = a1 = a1b1, since b1 = 1
b3 = a2 + a12 = a2b1 + a1b2, since b2 = a1
(2.35)
M M M M
bk = a1bk1 + a2bk + L + ak1b1
= ak1b1 + ak2b2 + L + a1bk1
SECTION 2.6: Ramanujans Method 45
bi 1
The ratios , called the convergents, approach, in the limit, the smallest
bi
root of f (x) = 0. The method is demonstrated in the following examples.
⎛ 3⎞ 1
= 1.0833 (0.7986) + ⎜ − ⎟ (1.0833) + (1)
⎝ 8⎠ 24
= 0.5007
Therefore,
b3
= 1.595
b4
b5 a1b4 a2b3 a3b2
¦ 3µ 1
1.0833(0.5007) § ¶ (0.7986) (1.0833)
¨ 8· 24
0.2880
46 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Therefore,
b4 0.5007
= = 1.7382.
b5 0.2880
b6 = a1b5 + a2 b4 + a3b3
= 0.1575
Therefore,
b5
= 1.8286.
b6
b7 = 0.0835
Therefore,
b6
= 1.8862.
b7
b8 = 0.0434
Therefore,
b7
= 1.9240.
b8
b9 = 0.0223
Therefore,
b8
= 1.9462.
b9
The roots of the given equation are 2, 3 and 4 and it can be seen that the
successive convergents approach the value 2.
Example 2.23 Find the smallest root, correct to 4 decimal places, of the
equation
f (x) = 3x cos x 1 = 0.
We have
f (x) = 1 − 3x + cos x
x2 x4 x6
= 1 − 3x + 1 − + − +"
2! 4! 6!
x2 x4 x6
2 3x "
2! 4! 6!
⎡ 3 x2 x4 x6 x8 ⎤
= 2 ⎢1 − x − + − + − "⎥
⎣⎢ 2 4 48 1440 80640 ⎦⎥
Now, let
1
¦3 x2 x4 x6 x8 µ
2
1 § x ¶ b1 b2 x b3 x "
¨2 4 48 1440 80640 ·
Here
3 1 1
a1 = , a2 = , a3 = 0, a4 = − ,
2 4 48
1 1
a5 0, a6 , a7 0, a8 ,!
1440 80640
48 CHAPTER 2: Solution of Algebraic and Transcendental Equations
we then obtain,
b1 = 1, b2 = 1.5,
b3 = 2.5, b4 = 4.125,
b5 = 6.79167, b6 = 11.18750,
b7 = 18.42778, b8 = 30.35365
The successive convergents are
b1 b2
= 0.66667; = 0.60000,
b2 b3
b3 b4
= 0.60606; = 0.60736,
b4 b5
b5 b6
= 0.60708; = 0.60710,
b6 b7
b7
0.607102
b8
Hence the required root, correct to four decimal places, is 0.6071.
Example 2.24 Using Ramanujans method, find a real root of the equation
x2 x3 x4
1− x + − + −" = 0
(2!) 2 (3!) 2 (4!) 2
Let
⎡ x2 x3 x4 ⎤
1 − ⎢x − + − + "⎥=0 (i)
⎢⎣ (2!)2 (3!) 2 (4!) 2 ⎥⎦
we have
1 1
a1 = 1, a2 , a3 ,
(2!) 2 (3!)2
1 1 1
a4 = − , a5 = , a6 ,!
(4!) 2 (5!) 2 (6!)2
Then we obtain
b1 = 1; b2 = a1 = 1;
1 3
b3 = a1b2 + a2b1 = 1 − = ;2
(2!) 4
b4 = a1b3 + a2b2 + a3b1
3 1 1 19
= − + = ;
4 4 36 36
211
b5 ,!
576
SECTION 2.7: Secant Method 49
b4
= 1.4408,
b5
where the last result is correct to three significant figures.
2 (16) − 3(−1) 35
x1 = = = 2.058823529.
17 17
50 CHAPTER 2: Solution of Algebraic and Transcendental Equations
Also,
f (x1) = f1 = 0.390799923.
Putting i = 1 in Eq. (2.37), we obtain
x0 f1 − x1 f0 3(−0.390799923) − 2.058823529(16)
x2 = = = 2.08126366.
f1 − f0 −16.390799923
Again
f (x2) = f2 = 0.147204057.
Hence
x3 f 4 – x4 f3
x5 = = 0.56653.
f 4 – f3
and
f5 = 0.00169
Therefore,
x4 f5 – x5 f 4
x6 0.56714.
f5 f 4
We also find
f (x6) = 0.0001196.
It follows that the required root is 0.5671, correct to four decimal places.
( x – xi –2 )( x – xi –1 )
+ yi (2.38)
( xi – xi –2 )( xi – xi –1 )
Let
hi = xi xi1, hi1 = xi1 xi2 (2.39)
Then
x xi1 = x xi + xi xi1 = (x xi) + hi,
1442443
( x – xi + hi + hi –1 )( x – xi + hi )
+ yi (2.41)
hi ( hi –1 + hi )
52 CHAPTER 2: Solution of Algebraic and Transcendental Equations
1442443
1 ¦ 'i 'i –1 µ
A –
(hi –1 hi ) §¨ hi hi –1 ¶· (2.42)
'
and B i Ahi
hi
With these values of A and B, the quadratic Eq. (2.38) gives the next
approximation xi+1
– B q B 2 – 4 Ayi
xi 1 xi (2.43)
2A
Since Eq. (2.43) leads to inaccurate results, we take the equivalent form
2 yi
xi +1 = xi –
(2.44)
B ± B 2 − 4 Ayi
In Eq. (2.44), the sign in the denominator should be chosen so that the
denominator will be largest in magnitude. With this choice, Eq. (2.44) gives
the next approximation to the root.
Example 2.27 Using Mullers method, find the root of the equation
f (x) = x3 x 1 = 0,
with the initial approximations
xi2 = 0, xi1 = 1, xi = 2.
We have
yi2 = 1, yi1 = 1, yi = 5.
Also,
hi = 1, hi1 = 1,
Di = 6, Di1 = 0.
Hence, Eq. (2.42) gives A = 3 and B = 9.
Then
B 2 4 Ayi 21
therefore, Eq. (2.44) gives
2(5)
xi +1 = 2 – , since the sign of B is positive
9 + 21
= 1.26376.
1.26376 – 2
Error in the above result = 100 = 58%.
1.26376
SECTION 2.9: Graeffes Root-Squaring Method 53
A1
14444244443
Y1 + Y 2 + Y 3 = −
A0
A2
Y1Y 2 + Y 2Y3 + Y 3Y1 = (2.46)
A0
A3
and Y1Y 2Y3 = –
A0
Y 2 Y3
Since , are negligible, the above relations give
Y1 Y 2
A A A
Y1 = – 1 , Y 2 = – 2 and Y 3 = – 3 (2.47)
A0 A1 A2
Thus, the magnitudes of the roots will be known when once the roots are
widely separated. Now, we shall show the way, the roots are separated by
considering the cubic equation
p(x) = (x 1)(x 2)(x 3) (2.48)
then
p(x) = (x 1)(x 2)(x 3)
= (1)3(x + 1)(x + 2)(x + 3) (2.49)
therefore,
p(x)p(x) = (1)3(x2 1)(x2 4)(x2 9) (2.50)
letting
q(z) = (z 1)(z 4)(z 9), (2.51)
2
where z = x , we find that the roots of Eq. (2.51) are the squares of the roots
of Eq. (2.48). By transforming Eq. (2.51) in the same way as above, we get
another equation whose roots are the squares of the roots of Eq. (2.51). This
is the principle underlying this method and due to this reason, this method
is called root-squaring method.
Now, let the given cubic be
f (x) = a0x3 + a1x2 + a2x + a3 = 0 (2.52)
with roots a1, a2 and a3 such that
|a1| > |a2| > |a3|.
Suppose that Eq. (2.52) is transformed m times by the root-squaring process
described above, and that the transformed equation is
ui B im , i 1, 2, 3. (2.54)
SECTION 2.9: Graeffes Root-Squaring Method 55
But ui are given by the coefficients in Eq. (2.53). Hence we have the following
formulae for the roots of Eq. (2.52)
1/ m
¦ ai µ
B i § ¶
, i 1, 2, 3. (2.55)
¨ ai –1 ·
Example 2.28 Using Graeffes method, find the real roots of the equation
x3 6x2 + 11x 6 = 0
Let
f (x) = x3 6x2 + 11x 6 = 0 (i)
then
f (x) = x3 6x2 11x 6 = 0
therefore,
f (x) f (x) = (1)3 (x6 14x4 + 49x2 36)
let
f (x) = z3 14z2 + 49z 36, where z = x2.
Hence, roots of f (x) = 0 are given by
36 49
= 0.857, = 1.871 and 14 = 3.742
49 14
Now,
f (z) = z3 14z2 49z 36
Therefore,
f (z) f (z) = (1)3(z6 98z4 + 1393z2 1296)
Setting f (u) = u3 98u2 + 1393u 1296, we obtain the next approximation
to the roots of f (x) = 0 as
1/ 4 1/ 4
⎛ 1296 ⎞ ⎛ 1393 ⎞ 1/ 4
⎜ ⎟ = 0.9822, ⎜ ⎟ = 1.942 and (98) = 3.147.
⎝ 1393 ⎠ ⎝ 98 ⎠
It is seen that the approximations are converging to the actual roots 1, 2
and 3, respectively.
56 CHAPTER 2: Solution of Algebraic and Transcendental Equations
b2 = a2 rb3,
(2.58)
b1 = a1 rb2 sb3,
b0 = a0 sb2
From Eq. (2.58), we see that the bi are functions of both r and s. If the
factor x2 + rx + s is exact, i.e., if x2 + rx + s divides exactly the function f (x),
then we must have
b0 = b1 = 0
i.e.,
b0(r, s) = 0 and b1(r, s) = 0 (2.59)
Now, by Taylors theorem,
vb0 vb
b0 (r , s ) b0 ( r0 , s0 ) 'r0 0 's0 0 (2.60)
vr vs
and
vb1 vb
b1 (r , s ) b1 (r0 , s0 ) 'r0 1 's0 0, (2.61)
vr vs
where the higher order partial derivatives are neglected and the first order
partial derivatives are calculated at the point (r0, s0).
If the initial approximation (r 0, s 0) is assumed, then a correction
(Dr0, Ds0) can be computed from Eqs. (2.60) and (2.61), so that we have the
next approximation as
SECTION 2.10: LinBairstows Method 57
123
(2.62)
and s1 = s0 + Ds0
For the next approximation, we take r0 = r1 and s0 = s1, and proceed as
above.
Example 2.29 Find a quadratic factor of the polynomial
f (x) = x3 x 1.
We have
a3 = 1, a2 = 0, a1 = 1, a0 = 1
Let
r0 = s0 = 1.0.
Then,
b3 = a3,
b2 = a2 rb3 = a2 ra3,
b1 = a1 rb2 sb3 = a1 r(a2 ra3) sa3
= a1 ra2 + r2a3 sa3
b0 = a0 sb2 = a0 s(a2 ra3)
= a0 sa2 + sra3
Therefore,
∂b0 ∂b0
= sa3 , = − a2 + ra3
∂r ∂s
∂b1 ∂b
= – a2 + 2ra3 , 1 = – a3 .
∂r ∂s
Then, Eqs. (2.60) and (2.61) give
Dr0 + Ds0 = 0
and
2Dr0 Ds0 = 1.
Hence,
1
Dr0 = = 0.3333
3
and
1
Ds0 = = 0.3333.
3
It follows that
1
r1 = r0 + Dr0 = 1 + = 1.3333,
3
and
1
s1 = s0 + Ds0 = 1 = 0.6667.
3
58 CHAPTER 2: Solution of Algebraic and Transcendental Equations
¥
3
kr (2.65)
bi
r 1 xri 1
SECTION 2.11: QuotientDifference Method 59
D0 Q1 D1 Q2 D2 Q3 D3
(1)
Q1 0 0
(1) (0)
0 D1 D2 0
(2) (1) (0)
Q1 Q2 Q3
(2) (1)
0 D1 D2 0
(3) (2) (1)
Q1 Q2 Q3
When the first two rows are known, the other rows can be constructed by
using Eqs. (2.69) and (2.70) alternately. The quantities Q1(i ) , Q2(i ) and Q3(i )
tend to the reciprocals of the roots of f (x) = 0. Hence, instead of Eq. (2.63),
if we consider the transformed equation
a3x3 + a2x2 + a1x + a0 = 0 (2.71)
60 CHAPTER 2: Solution of Algebraic and Transcendental Equations
and proceed as above, we obtain directly the roots of Eq. (2.63). This procedure
is illustrated in the following example.
Example 2.30 Using the QD method, find the roots of the cubic equation
f (x) = x3 9x2 + 26x 24 = 0.
To compute the roots directly, we consider the transformed equation
24x3 + 26x2 9x + 1 = 0.
We then have
( 24x3 + 26x2 9x + 1)(b0 + b1x + b2x2 + b3x3 + L) = 1.
Comparing the coefficients of like powers of x on both sides of the above
equation, we obtain
b0 = 1; 9b0 + b1 = 0;
b2 9b1 + 26b0 = 0;
b3 9b2 + 26b1 24b0 = 0
The above relations give
b0 = 1, b1 = 9, b2 = 55 and b3 = 285,
so that
b1
9 Q1(1)
b0
b2 55
= = 6.1111 = Q1(2)
b1 9
and
b3 285
5.1818 Q1(3) .
b2 55
We obtain the differences
D1(1) = Q1(2) − Q1(1) = – 2.8889,
and
D1(2) Q1(3) Q1(2) – 0.9293.
We have thus computed all the elements in the first two rows of Table 2.1.
This enables us to use Eqs. (2.69) and (2.70) alternately to generate the
quotients and differences row by row.
To compute D1(2) , we use the elements
D1(1)
Q1(2) Q2(1)
D1(2)
where
D1(2) Q1(2) D1(1) Q2(1)
Hence
– 0.9293 t 2.4616
D1(2) – 0.4415.
5.1818
Similarly,
(0.9231)2
D2(1) – – 0.4355.
1.9658
Next row is a row of quotients. We have Q1(3) = 5.1818.
Also,
Q2(2) = 1.9658 − 0.4335 + 0.9293
= 2.4616,
and
Q3(1) = 0.9231 − 0.4335
= 1.3566.
Proceeding in this way, the following table of quotients and differences
is formed (Table 2.2).
Table 2.2 Solution of Example 2.30
D0 Q1 D1 Q2 D2 Q3 D3
9 0 0
0 –2.8889 –0.9231
6.1111 1.9658 0.9231
0 –0.9293 –0.4335 0
5.1818 2.4616 1.3566
0 –0.4415 –0.2389 0
4.7403 2.6642 1.5955
0 –0.2481 –0.1431 0
4.4922 2.7692 1.7386
0 –0.1529 –0.0898 0
4.3393 2.8323 1.8284
–0.0998 –0.0580 0
4.2395 2.8741 1.8864
62 CHAPTER 2: Solution of Algebraic and Transcendental Equations
It can be seen that Q1, Q2 and Q3 are converging to the actual values 4, 3 and
2, respectively.
123
(2.72)
and g(x, y) = 0
As in the case of a single equation, we assume that Eq. (2.72) may be written
in the form
x = F(x, y), y = G(x, y), (2.73)
where the functions F and G satisfy the following conditions in a closed
neighbourhood R of the root (a, b):
(i) F and G and their first partial derivatives are continuous in R, and
vF vF vG vG
(ii) 1 and 1, (2.74)
vx vy vx vy
for all (x, y) in R.
If (x0, y0) is an initial approximation to the root (a, b ), then Eq. (2.73) give
the sequence
1442443
1 ∂G ∂G 2 y
G ( x, y ) = ( y 2 + 4), = 0, = .
5 ∂x ∂y 5
Let (0.5, 0.5) be an approximate root. Then
vF vF 6 xy 3x 2
vx vy 10 (0.5, 0.5) 10
(0.5, 0.5)
0.15 0.075 1
and
vG vG 2y
0.2 1.
vx vy 5 0.5
Hence the conditions for convergence are satisfied and the approximations
are given by
1 ⎡ 1
xn +1 = 3 yn xn2 + 7 ⎤ and yn +1 = ⎡ yn2 + 4 ⎤ .
10 ⎣ ⎦ 5⎣ ⎦
We obtain successively with x0 = 0.5 and y0 = 0.5
1 ⎡3 ⎤ 1 ©1 ¸
x1 = ⎢ + 7 ⎥ = 0.7375; y1 4¹ 0.85
10 ⎣ 8 ⎦ 5 ª« 4 º
1© 1
x2 3(0.85)(0.7375)2 7¸ y2 = ⎡ (0.85) 2 + 4 ⎤ = 0.9445
10 « º 5⎣ ⎦
0.8387;
1 © 1
x3 3(0.8387)2 (0.9445) 7¸º y3 = ⎡ (0.9445) 2 + 4 ⎤ = 0.9784.
10 « 5⎣ ⎦
0.8993;
x5 = 0.9613, y5 = 0.9966
x6 = 0.9763, y6 = 0.9986
x7 = 0.9855, y7 = 0.9994.
Convergence to the root (1, 1) is obvious.
2.12.2 Newton–Raphson Method
Let (x 0, y0) be an initial approximation to the root of Eq. (2.72). If
(x0 + h, y0 + k) is the root of the system, then we must have
f (x0 + h, y0 + k) = 0, g(x0 + h, y0 + k) = 0 (2.77)
Assuming that f and g are sufficiently differentiable, we expand both the
functions in Eq. (2.77) by Taylors series to obtain
∂f ∂f
1442443
f0 + h +k +" = 0
∂x0 ∂y0
(2.78)
vg vg
g0 h k " 0,
vx0 v y0
where
∂f ⎡ ∂f ⎤
= , f 0 = f ( x0 , y0 ), etc.
∂x0 ⎢⎣ ∂x ⎥⎦ x = x0
Neglecting the second and higher-order derivative terms, we obtain the following
system of linear equations:
∂f ∂f
1442443
h +k = – f0
∂x0 ∂y0
(2.79)
∂g ∂g
and h +k = – g0
∂x0 ∂y0
Equation (2.79) possesses a unique solution if
∂f ∂f
∂x0 ∂y0
D= ≠ 0. (2.80)
∂g ∂g
∂x0 ∂y0
By Cramers rule, the solution of Eq. (2.79) is given by
∂f ∂f
– f0 – f0
1 ∂y0 1 ∂x0
h= and k = (2.81)
D ∂g D ∂g
– g0 – g0
∂y0 ∂x0
SECTION 2.12: Solution to Systems of Nonlinear Equations 65
Therefore,
–5.3988 2.0074
D= = 16.8712.
0 –3.125
Hence,
1 – 0.7019 2.0074
h 0.1528,
16.8712 – 0.1914 –3.125
and
1 –5.3918 – 0.7019
k 0.0612.
16.8712 0 – 0.1914
It follows that
x2 = 0.8180 + 0.1528 = 0.9708
and
y2 = 0.9375 + 0.0612 = 0.9987
It follows, therefore,
x1 = 0.7071 + 0.0858 = 0.7858,
and
y1 = 0.7071 0.0858 = 0.6213.
The process can be repeated to obtain a better approximation.
Eliminating x between the two given equations, we obtain the quadratic
for y
y2 + y 1 = 0,
which gives y = 0.6180 for the first quadrant solution.
Then x = 0.7861. These values may be compared with the solution
(x1, y1) obtained above.
EXERCISES
2.1 Explain the bisection method for finding a real root of the equation
f (x) = 0 and write an algorithm for its implementation with a test for
relative accuracy of the approximation.
Obtain a root, correct to three decimal places, of each of the following
equations using the bisection method (Problems 2.22.5):
2.2 x3 4x 9 = 0
2.3 x3 + x2 1 = 0
2.4 5x log10 x 6 = 0
2.5 x2 + x cos x = 0
2.6 Give the sequence of steps in the regulafalsi method for determining
a real root of the equation f (x) = 0.
Use the method of false position to find a real root, correct to three decimal
places, of the following equations (Problems 2.72.10):
2.7 x3 + x2 + x + 7 = 0
2.8 x3 x 4 = 0
2.9 x = 3ex
2.10 x tan x + 1 = 0
2.11 Find the real root, which lies between 2 and 3, of the equation
x log10 x 1.2 = 0
using the methods of bisection and falseposition to a tolerance of
0.5%.
2.12 Explain briefly the method of iteration to compute a real root of the
equation f (x) = 0, stating the condition of convergence of the sequence
of approximations. Give a graphical representation of the method.
Use the method of iteration to find, correct to four significant figures, a real
root of each of the following equations (Problems 2.132.16):
2.13 ex = 3x
1
2.14 x =
( x + 1)2
2.15 1 + x2 = x3
1
2.16 x sin x =
2
2.17 Establish an iteration formula to find the reciprocal of a positive number
N by NewtonRaphson method. Hence find the reciprocal of 154 to
four significant figures.
EXERCISES 69
Find the real roots of the following equations using Graeffes root-squaring
method (Problems 2.352.36):
2.35 x3 4x2 + 5x 2 = 0
2.36 x3 2x2 5x + 6 = 0
2.37 Find a quadratic factor of the polynomial
f (x) = x3 2x2 + x 2
by Bairstows method with two approximations starting with r0 = 0.5
and s0 = 1.
2.38 Determine a quadratic factor, nearer to x2 1.5x + 1.5, of the polynomial
f (x) = x4 8x3 + 39x2 62x + 50
by Bairstows method. Give the computational steps of this method.
2.39 Using the Q-D method, find the real roots of the equation
f (x) = x3 6x2 + 11x 6 = 0
2.40 In the notation of Section 2.11, prove the following results:
b 1
i(a) lim i =
i →∞ bi −1 x1
1
Q1(i )
x1 1 k2 ¦ x µ
i(b) lim 1 1¶
i ne ¦ x1 µ
i §
x1 k1 ¨ x2 ·
§¨ x ¶·
2
1
Q1(i 1)
x1 1 k2 ¦ x µ
(c) lim § 1 1¶.
i ne ¦ x1 µ
i x2 k1 ¨ x2 ·
§¨ x ¶·
2
f ′( x) f ′′( x) f ( x) f ′′( x)
(a) <1 (b) <1
[ f ( x) ]
2
[ f ′( x)]2
f ( x) f ′( x)
(c) <1 (d) None of these.
[ f ′′( x)]2
2.47 Which one of the following is not correct?
(a) NewtonRaphson method has quadratic convergence.
(b) The bisection method converges slowly.
(c) To solve f (x) = 0 by iteration method, the given equation is written in
the form x = f (x) where | f ¢(x)| < 1 in an interval containing the root.
(d) The method of regulafalsi converges faster than the secant method.
2.48 Which one of the following is correct?
(a) The bisection method has quadratic convergence.
(b) The iteration method is a self-correction method.
(c) The equation x3 2x 5 = 0 has two positive roots.
(d) The equation x = cos x can be solved by Graeffes method.
Answers to Exercises
2.21 0.3574
2.22 With x0 = 0.5, x1 = 0.6470, x2 = 0.65656,
2.23 With x0 = 0.5, x1 = 0.5180, x2 = 0.5180,
2.24 x0 = 1.047, x1 = 0.6224, x2 = 0.6071, x3 = 0.6071.
2.25 2.798
2.27 1.8437; 1.8438
b1 b2
2.28 = 0.54546, = 0.77647,
b2 b3
b3
b4
= 0.88696,
b4
b5
0.94237, |
Smallest root is 1.
2.29 Convergents are:
1.0, 0.5, 0.66666, 0.75, 0.66666, 0.66666, 0.69231, 0.68421,
2.30 Convergents are:
0.5, 0.5, 0.51064, 0.51087, 0.51097,
Required root is 0.5110.
2.31 Root = 6.85236.
2.32 Fifth iteration value = 0.567143
2.33 Regulafalsi: 2.0945 in 7 iterations.
Secant method: 2.0946.
2.34 (a) 2.09462409 (b) 0.51752
2.35 Third approximation to the roots: 0.9168, 1.0897, 2.0019
2.36 Third approximation: 3.014443, 1.991425, 0.999494.
2.37 x2 0.0165x + 0.9394 (Exact factor is x2 + 1).
2.38 x2 1.9485x + 1.942982 (Exact factor is x2 2x + 2).
2.39 Q1 » 3.13145, Q2 » 1.898, Q3 » 0.9706.
2.42 x1 = 0.8261, y1 = 0.5636.
2.43 x0 = 3, y0 = 2, x1 = 3.1667, y1 = 2.5
2.44 x = 3.584, y = 1.848
2.45 (b)
2.46 (b)
2.47 (d)
2.48 (a)