Professional Documents
Culture Documents
2.1 Introduction
In Applied Mathematics, the most frequent problem is to find the values of x to satisfy the
equation f ( x) = 0 . Such values are called the roots of the equation and also known as the
zeros of f (x) . Some equations are easy to solve. The linear equation such as 3 x − 2 = 0
can be solved easily. Quadratic equations can be solved by factorization or by the standard
formula. It is possible to solve polynomial equations of higher degree, if they are
factorisable, otherwise it is difficult to solve. Many equations involve sines, cosines,
exponential and other transcendental functions and it is difficult to solve them precisely. In
fact, majority of equations cannot be solved in any precise manner and so we have to solve
them by using iterative procedures. An iterative procedure is a repeative process that
produces a sequence of approximations to the equation. In this chapter, we shall consider
some of the important approximate methods in finding the roots of the equations in one
variable.
Thus the number of intersections of the two graphs will be the number of real roots of
f ( x) = 0 .
14 NUMERICAL METHODS WITH EXCEL
To locate the roots of f ( x) = 0 first study the graph of y = f (x) as shown below. If we
can find two values of x, one for which f (x) is positive, and one for which f (x) is
negative, then the curve must have crossed the x-axis and so must have passed through a
root of the equation f ( x) = 0 .
y
+
+
x
O − −
−
In general, if f (x) is continuous in [a, b] and f (a ) and f (b) are opposite in signs i.e.
f (a ) f (b) < 0 , then there exists odd number of real roots (at least one root) of f ( x) = 0 in
( a, b) .
But the only exception where it does not work is where the graph looks like one of the
following:
y
y
x
O Q
x
O P
Graph 1 Graph 2
In Graph 1, there is a root of f ( x) = 0 at P but f ( x) > 0 to the left and to the right of P.
In Graph 2, f ( x) < 0 to both sides of the root at Q. In both the cases, the tangents at the
root are the x-axis and hence f ′( x) = 0 For this case, the existence of a root can be
determined by studying the signs of f ′(x) in the interval (a, b) containing the root and it
will satisfy the condition f ′(a) f ′(b) < 0 .
To continue the process , relabel the new interval Fig. Bisection Method
[a, b] and repeat the process until the desired degree of accuracy is achieved.
The following notation is used to keep the tract in the process:
CHAPTER 2: Solutions of Equations in One Variable 15
a + b0
[a 0 , b0 ] is the starting interval and x 0 = 0 is the midpoint.
2
[a1 , b1 ] is the second interval which brackets the root and x1 is the midpoint.
At each step relabel the interval which brackets the root and find the midpoint by
using
a + bn
xn = n .
2
Thus for a simple root the convergence of the Newton-Raphson method is of order two.
For a multiple root, the order of convergence is reduced, but the order may be increased by
modifying the methods discussed. If the multiplicity m of the root is known in advance,
then some of the methods can be modified so that they have the same rate of convergence
as that for simple roots.
Example 2.1
The equation x 3 + 2 x − 5 = 0 has a root near x = 1.4. Using following iteration formulae,
perform few iterations and comment on the rerults.
2 xn 3 + 5
(b) xn +1 = (5 − 2 xn )1 / 3
1
(a) xn +1 = (5 − xn 3 ) (c) xn +1 =
2 3 xn 2 + 2
The equation can be rearranged as
2x = − x3 + 5
or 3x 3 + 2 x = 2 x 3 + 5
x(3 x 2 + 2) = 2 x 3 + 5
2x3 + 5
x=
3x 2 + 2
and this arrangement gives the iteration formula (c).
The calculation using the three iteration formulae are as follows:
Example 1.1
Solution
4
2
-2 2 4 6
-2
-4
The two curves intersect at three points and hence the number of real roots is 3.
g ′( x) = 1 − k − 4k sin 2 x
and g ′(3.6) = 1 − 4.175k
The iterative formula will converge to the root near 3.6 if
g ′(3.6) < 1 or 1 − 4.175k < 1
− 1 < 1 − 4.175k < 1
− 2 < −4.175k < 0 (adding − 1 to each expression)
2 > 4.175k > 0 (multiplying by − 1 )
0.4896 > k > 0 (dividing by 4.175)
which gives the range of values of k.
A suitable choice of k is
1
1 − 4.175k ≈ 0 which gives k = = 0.2395 ≈ 0.24 .
4.175
With k = 0.24 , the iteration formula becomes
x n +1 = 1 − 0.24) xn + 2(0.24)(1 + cos 2 x n ) = 0.76 x n + 0.48(1 + cos 2 x n )
With x0 = 3.6 , the successive iterates are given below:
n xn xn (to 4 d.p.)
0 3.6 3.6000
1 3.50801 3.5080
2 3.50286 3.5029
3 3.50224 3.5022
4 3.50216 3.5022
Example 1.2
. Equation x tan x = 4 has infinite number of roots. To find the root near x = 1.3, we
may use an iteration formula xn+1 = arctan (4/xn). Show that the process is linearly
convergent.
Starting with x0 = 1.3, estimate x 4 rounded to 3 decimal places.
Show that x 4 is correct to 3 decimal places.
Solution
In this case the iterative function g(x) is
(x )
g ( x) = tan −1 4
1 ⎛ 4 ⎞ 4
Differentiating g ′( x) = ⎜⎜ − ⎟⎟ = −
1 + (4 / x) 2 ⎝ x 2 ⎠ x 2 + 16
Therefore g ′( x) ≠ 0 for all real values of x and hence it is linearly convergent.
5 -3 -6.929947 7 10
6 -2 -2.913028 5 5
7 -1 3.782116 3 0
-8 -6 -4 -2 0 2 4 6 8
8 0 7 1 -5
9 1 3.782116 -1 -10
10 2 -2.913028 -3 -15
11 3 -6.929947 -5
12 4 -4.575505 -7
13 5 1.985635 -9 There are three intersections and hence
14 6 6.721192 -11 the number of real roots is three.
A B C D E F G
1 Solution of f(x) = 7 cos(x) - 1 + 2x = 0 by Bisection Method
2 n an xn bn f(an) f(xn) f(bn)
3 0 -1.5 -1.25 -1 -3.5048396
4 1 -1.25 -1.25
5 2
= (B3 + D3)/2 = 7 * cos(B3)− 1 + 2 * B3
6
7 = IF(F3 * E3 < 0, B3,C3) = IF(F3 * G3 < 0, D3, C3)
8
A B C D E F G
1 Solution of f(x) = 7 cos(x) - 1 + 2x = 0 by Bisection Method
2 n an xn bn f(an) f(xn) f(bn)
3 0 -1.5 -1.25 -1 -3.5048396 -1.292743 0.782116
4 1 -1.25 -1.125 -1 -1.2927435 -0.231764 0.782116
5 2 -1.125 -1.0625 -1 -0.2317644 0.281828 0.782116
6 3 -1.125 -1.09375 -1.0625 -0.2317644 0.026601 0.281828
7 4 -1.125 -1.109375 -1.09375 -0.2317644 -0.102201 0.026601
8 5 -1.109375 -1.101563 -1.09375 -0.1022013 -0.037704 0.026601
9 6 -1.101563 -1.097656 -1.09375 -0.0377036 -0.005527 0.026601
10 7 -1.097656 -1.095703 -1.09375 -0.005527 0.010543 0.026601
11 8 -1.097656 -1.09668 -1.095703 -0.005527 0.00251 0.010543
12 9 -1.097656 -1.097168 -1.09668 -0.005527 -0.001508 0.00251
13 10 -1.097168 -1.096924 -1.09668 -0.0015084 0.000501 0.00251
26 NUMERICAL METHODS WITH EXCEL
A B C D E F G
1 Solution of f(x) = 7 cos(x) - 1 + 2x = 0 by False Position Method
2 n an xn bn f(an) f(xn) f(bn)
3 0 -1.5 -1.09122 -1 -3.5048396 0.04738 0.782116
4 1 -1.5 -1.096673 -1.09122 -3.5048396 0.002566 0.04738
5 2 -1.5 -1.096968 -1.096673 -3.5048396 0.000138 0.002566
6 3 -1.5 -1.096984 -1.096968 -3.5048396 7.43E-06 0.000138
7 4 -1.5 -1.096985 -1.096984 -3.5048396 3.99E-07 7.43E-06
8 5 -1.5 -1.096985 -1.096985 -3.5048396 2.15E-08 3.99E-07
Initialization of data:
x f(x) Here ⏐f(-1.5)⏐ > ⏐f(-1)⏐ and thus use
-1.5 -3.50484 x0 = -1.5
-1 0.782116 x1 = -1
A B C D E F G
1 Solution of f(x) = 7 cos(x) - 1 + 2x = 0 by Secant Method
2 n xn f(xn)
3 0 -1.5 -3.50484 In cell C3 enter the formula
4 1 -1 0.782116 =7*cos(B3) - 1 +2*B3
5 2 -1.09122 0.04738 and copy down the column.
6 3 -1.097103 -0.000972
7 4 -1.096985 1.09E-06 In cell B5 enter the formula
8 5 -1.096985 2.51E-11 =B4 - (B4 - B3)*C4/(C4 -C3)
9 6 -1.096985 0 and copy down the column.
CHAPTER 2: Solutions of Equations in One Variable 27
A B C D
1 Solution by Newton-Raphson Method
2 n xn f(xn) f'(xn)
3 0 -1.1 = −7 * sin(B3)+ 2
4 1 =B3-C3/D3
5 2 = 7 * cos(B3)− 1 + 2 * B3
A B C D
1 Solution by Newton-Raphson Method
2 n xn f(xn) f'(xn)
3 0 -1.1 -0.024827 8.238452
4 1 -1.096986 -1.44E-05 8.228855
5 2 -1.096985 -4.92E-12 8.228849
6 3 -1.096985 0 8.228849
7 4 -1.096985 0 8.228849
8 5 -1.096985 0 8.228849
28 NUMERICAL METHODS WITH EXCEL
Exercise 2
(a) Find the number of real roots and in each case find an interval where the root lies.
(b) Use Bisection method to find a root of the equation correct to 1 decimal place.
(c) Use the false position method (Regula Falsi) method to find a root, correct to 2
decimal places.
(d) Use Secant method to find a root of the equation correct to 2 decimal places.
(e) Use Newton-Raphson method to find a root of the equation correct to 3 decimal
places.
2. Given that f ( x) = e 2 x − e x − 10 = 0 .
(a) Find the number of real roots of the equation f ( x) = 0 and locate them with an
interval of width 1.
(b) Use the Bisection method thrice to find the new interval where the roots lie.
(c) Use the Secant method on the interval obtained in (b) to estimate the roots
correct to 3 decimal places.
7. The equation x 6 − 3x 4 + 4 = 0 has two double roots. One near x = −1.5 and another
near x = 1.5 . Find the roots correct to 5 decimal places using the Newton-Raphson
method.
8. The equation 27 x 4 − 450 x 2 + 1000 x − 625 = 0 has a multiple root of multiplicity three
near x = 2. Use Newton-Raphson method to find the root correct to 5 decimal
places.
10. The equation 2 cos x – x = 0 has a root near x = 1.1. Among others, the following
iteration formulae are suggested to estimate the root.
1 2
(i) x n +1 = 2 cos x n (ii) x n +1 = cos x n + xn (iii) x n +1 = (cos x n + x n )
2 3
Apply an appropriate test to determine, for each rearrangement, whether or not the
corresponding iteration converges to the root.
Using whichever of these iteration formulae you consider most appropriate, find the
root correct to 4 significant figures.
13. The following iterative formulae can be used to estimate the value of √ a . In each
case find the order of convergence of the sequence.
x n2 1 3a x n2
(i) x n +1 = 1 xn (1 + a2 ) (ii) x n+1 = 13 x n (4 − ) (iii) x n +1 = x n [6 + − ]
2 xn a 8 x n2 a
With an iterative formula above, estimate the value of 11 correct to 5 decimal
places.
14. Equation f(x) = 0 has a root x = α . Show that rewriting the equation as x = x + λ
f(x), where λ is a constant, yields a convergent iteration for α if λ = -1/f′ (x0) and x0
is sufficiently close to α.
Use this method to derive an iteration formula for the root of the equation
xe x = cos x .
Hence estimate the root near x = −1.8 correct to 2 decimal places.