You are on page 1of 25

UNIT 3 CHORD METHODS FOR FINDING ROOTS

Structure
3.1 3.2 3.3 3.4
3.5
Introduction Objectives Regula-Falsi Method Newton-Raphson Method

Convergence Criterion Summary

3.1 INTRODUCTION
In the last unit we introduced you to two iteration methods for finding roots of an equation . f(x) = 0.There we have shown that a root of the equation f(x) = 0 can be obtained by writing the equation in the form x = g(x). Using this form we generate a sequence of approximations x, = g(xi) for i = 0 1,2, . . . We had also mentioned there that the success of the iteration . methods depends upon the form of g(x) and the initial approximation xo. In this unit, we
+

shall discuss two iteration methods : regula-falsi and Newton-Raphson methods. These methods produce results faster than bisection method. The first two sections of this unit deal with derivations and the use of these two methods. You will be able to appreciate these iteration methods better if you can compare the efficiency of these methods. With this In view we introduce fhe concept of convergence criterion which helps us to check the efficiency of each method. Sec 3.4 is devoted to the study of rate of convergence of different iterative methods.

Objectives After studying the unit you should be able to :


apply regula-falsi and secant methods for finding roots apply Newton-Raphson method for finding roots define 'order of convergence' of an iterative scheme 'obtain the order of convergence of the following four methods : i) bisection method

ii)

fixed point iteration mettiod secant method Newton-Raphson method

iii)
iv)

32 REGULA-FALSI METHOD (OR METHOD OF . FALSE POSITION)


In this section we shaH discuss the 'regula-falsi metbod'. The Latin word 'Regula Falsi' means rule of falsehood. It does not mean that the nlie is a false statement. But it conveys that the'roots that we get according to the rule are approximate roots and nor necessarily exact roots. The method is also known as the method of false position. This method is similar to the bisection method you have learnt in Unit 3.

The bisection method for finding approximate roots has a drawback that it makes use of only the signs of f(a) and f(b). It does not use the values f(a), f(b) in the computations. For example. if f(a) = 700 and f(b) = 4 . 1 , then by the bisection method the first approximate value of a root of f(x) is the mid value xo of the interval la, b[. But at xo. f(xo) is nowhere

near 0. Therefore,in this case it makes more sense to take a value near to 4.I than the middle value as the approximation to the root. This drawback is to some extent overcome by the regula-falsi method. We shall first describe the method geometrically. Suppose we want to find a root of the equation f(x) = 0 where f(x) is a continuous function. As in the bisection method, we first find an interval ]a. b[ such that f(a) f(b) < 0. Let us look at the graph of f(x) given in Fig. I.
(a. f(a) )

C h d Methods for Finding Roots

Fig. 1 :Reguia-Falsi Method The condition f(a) f(b) < 0 means that the points (a, f(a)) and (b, f(b)) lie on the opposite sides of the x-axis. Let us consider the line joining (a, f(a)) and (b, f(b)). This line crosses the x-axis at some point (c, 0) [see Fig. I]. Then we take the x-coordinate of that point as the first approximation. If f(c) = 0, then x = c is the required root. If f(a) f(c) < 0, then the r a t lies in ]a. c[ (see Fig. 1 (a)). In this case the graph of y = f(x) is concave near the root r). Otherwise, if f(a) f(c) > 0, the root lies in lc, b[ (see Fig. 1 (b)). In this case the graph of y = f(x) is convex near the root. Having fixed the interval in which the root lies. we repeat the above procedure. k t us now wjite the above procedure in the mathematical form. Recall the fonnula for the line joining two points in the Cartesian plane [see MTE-051. The line joining (a. f(a))and (b, f(b)) is given by f(b) y - f(a) = - - f(a) (X- a) b-a We can rewrite this in the form y-f(a) x-a f(b) - f(a) - b - a
'

...

Since the straight line intersects the x-axis at (c, O), the point (c, 0) lies on the straight line. Putting x = c, y = 0 in Eqn. (I), we get -f(a) f(b) - f(a)

- b -a

c-a

This expression for c gives an approximate value of a root of f(x). Simplifying (2). we can a b w r i t e it as
C=

a f(b) - b f(a) f(b?- f(a)

Now, examine the sign of f(c) and decide in which interval ]a, c[ or Ic, b[, the root lies. We thus obtain a new interval such that f(x) is of opposite signs at the end points of this interval. By repeating this process, we get a sequence of intervals ]a, b[, ]a, al[, ]a, %[, . . . as shown in Fig. 2.

Solutions of Nun-linear Equations in one Variable

Fig. 2

We stop the process when either of the following holds. i) The interval containing the zero of f(x) is of sufficiently small length or ii) The diffbrince between two successive approximations is negligible.

In the iteration format, the method is usually written as

where ]x0, x1[ is the interval in which the root lies. We now summarise this method in the algorithm form. This will enable you to solve problems easily. Step 1 : Find numbers xo and xl such that fGO)f(.x,) < 0, using the tabulation method. xo f(xJ - x1 f(xo) . This gives the first approximation. Step2:Setx2=f(xl) - f(xO) Step 3 :If f(x2) = 0 then x2 is the required root. If f(x2) f 0 and f(x& f(x2) < 0, then the next approximation lies in ]x0, x2[. Otherwise it lies in ]x2, xl[. Step 4 :Repeat the process till the magnitude of the difference between two successive iterated values xi and xi is less than the accuracy required. (Note that I xi I - xi I gives the error after ith iteration).
+

Let us now understand these steps through an example.

. ...

Example 1:It is known that the equation x?.+ 7x2 + 9 = 0 has a root between -8 and -7. Use the regula-falsi method to obtain the root roundedoff to 3 decimal places. Stop the iteration when 1 xi I - xi I < lo4.
+

Solution :For convenience we rewrite the given function f(x) as

Since we are given that xo = -8 and xl = -7, we do not have to use step 1. Now to get the first approximation, we apply the formula in Step 2.

Since, f(xo) = f(-8) = -55 and f(xl) = f(-7) = 9 we obtain


2

Chord Metliads for Finding Roots

(-8) 9 - (-7) (-5) = 9 + 55

Therefore our first approximation is -7.1406. To find the next approximation we calculaie f(x2). We have

= 1.862856

Now we compare the sign of f(x2) with the signs of f(xo) and f(xl). We can see that f(xo) and f(x2) are of opposite signs. Therefore a root lies in the interval 1-8, -7.1406[. We apply the formula again by renaming the end points of the interval as xl = -8, x2 = -7.1406. Then we get the hecond approximalion as -8 f(-7.1406)

+ 7.1406 f(-8)

._ - . .

'We repeat this process using steps 2 and 3 given above. The iterated values are given in the
:ollow~ng table.

Number of iterations
-

L-

1
I

Table
Interval

Iterated Values x i

1 The function value f(xi) 1

From the table, we see that the absolute value of the difference between the 5th and 6th iterated values is 1 7.1748226 - 7.1747855 1 = .0000371. Therefore we stop the iteration here. Further, the values of f(x) at 6th iterated value is .00046978 = 4.6978 x lo4 which is close to zero. Hence we conclude that -7.175 is an approximate root of x3 + 7x2 + 9 = 0 rounded off to three decimal places. Here is an exercise for you.
- - - - - -- -- - - -

E 1) Obtain an approximate root for the following equations rounded off to three decimal places, using regula-falsi method

b)

xsinx- I = O

I
I

You note that in regula-falsi method, at each stage we find an interval ] xo, x, [ which contains a root and then apply iteration formula (3). This procedure has a disadvantage. To overcome this, regula-falsi method is modified. The modified method is known as secant method. In this method we choose xo and x, as any two approximations of the root. The Interval ] xo, x I [ need not contain the root. Then we apply formula (3) with xo, xl, f(xO)and f(x,). The iterations are now defined as :
Y

- xo f(xl) - X I f(xo)

Sdutions of kon-linear Equations in one Varlable

Note :Geometrically, in secant Method, we replace the graph ef f(x) in the interval ]x,, x,, ,[ by a straight line joining two points (x,, f(x, ,), (x, ,), f(xn+J)on the curve and take the point of intersection with x-axis as the approximate value of the root. Any line joining two points on the curve is called a secant line. That is why this mehod is known as secant method. (see Fig. 3).
+ +

I
Fig. 3

Let us solve an example.


Example 2 :Determine an approximate root of the equation

using
i)

secant method starting with the two initial approximations as xo = 1 and x I = 1

and
ii) regula-falsi method. (This example was considered in the book 'Numerical methods for scientific and engineering computation' by M.K. Jain, S.R.K. Iyengar and R.K. Jain).

Solution :. Let f(x) = cos x - x ex.


Then f(0) = 1 and f( I ) = cos 1 - e = -2.177979523. Now we apply formula (4) with xo=Oand xl = 1. Then

Therefore the first iterated value is 0.3 146653378.To get the 2nd iterated value, we, apply Formula (4) with x, = 1, x2 = 0.3146653378. Now f(1) = -2.177979523 and f(0.3146653378)= 0.5 1987I 175.

Therefore

We contime this process. The iterated values are tabulated in the following table.
Table 2 :Secant Method

Number of iterations

Iterated values xi

f(xi)

From the table we find that the iterated values for 7th and 8th iterations are the same. Also the value of the function at the 8th iteration is close to zero. Therefore we conclude that 0.5 177573637 is an approximate root of the equation.
ii)

To apply regula-falsi method. let us first note that f(0) f(l) < 0. Therefore a root lies in the interval 10, 1[. Now we apply Formula (3) with xg = 0 and x, = 1. Then the first approximation is

You may have noticed that we have already calculated the expression on the right hand side of the above equation in pan (il. Now f(x2)=0.51987 > 0. This shows that the root lies in the interval 10.3146653378. 11. To get the second approximation, we compute

which is same as x3 obtained in (i). We find f(x2)= 0.203545 > 0. Hence the root lies in 10.4467281446. I[. To get the third approximation. we calculate

The above expression on the right hand side is different from the expression for x4 in part (i). This is because when we use regula-falsi method. at each stage, we have to check the condition f(xi) f(xi . I)< 0. .

Solutions of Non-linear Equations in one Variable

The computed values of the rest of the approximations are given in Table 3.

Table 3 :Regula-Falsi Method


No. 1
2 3 4 5 lo,] [ 1.04467281446.1[ 10.4940153366.1[ 10.5099461404, 1 [ 10.5 1520 10099, 1[

Interval

Iterated value xi -:
0.3146653378 0.4467281446 0.4940153366 0.5099461404 0.5 152010099

f(xi)
0.5 19871 0.203545 0.708023 x lo-' 0.236077 x lo-' 0.776011 x

From the table, we observe that we have to perform 20 iterations using regula-falsi method to get the approximate value of the root 0.5 177573637 which we obtained by secant method after 8 iterations. Note that the end point 1 is fixed in all iteractions given in the table. Here are some exercises for you. Use secant method to find an approximate root of the equation x2 - 2x + 1 = 0, rounded off to 5 decimal places, starting with xo = 2.6 and x, = 2.5. Compare the result with the exact root I +.\IT. Find an approximate root of the cubic equation x3 + x2 - 3x - 3 = 0 using a) i) regula-falsi method, correct to three decimal places. ii) secant method starting with a = 1, b = 2, rounded-off to three decimal plaJces. b) compare the results obtained by (i) and (ii) in part (a).

E2)

E3)

Next we shall discuss another iteration method.


-

3.3 NEWTON-RAPHSON

METHOD

This method is one of the most useful methods for finding roots of an algebraic equation. Suppose that we want to find an 'approximate root of the equation f(x) = 0. If f(x) is continuous. then we can apply either bisection method or regula-falsi method ta find approximate roots. Now if f(x) and f (x) are continuous, then we can use a new iteratioh method called Newton-Raphson method. You will learn that this method gives the result h o r e faster than the bikction or regula-falsi methods. The underlying idea of the method is due to mathematician Isac Newton. But the method as now used is due to the mathematician Raphson. Let us begin with an equation f(x) = 0 where f(x) and f ( x ) and are continuous. Let xo be an initial approximation and assume that xo is'close to the exact root a and f(xo) z 0. Let a = xO+ h where h is a small quantity in magnitude. Hence f ( a ) = f(xo + h) = 0 ,Now we expand f(xo + h) using Taylor's theorem, Note that f(x) satisfies all the requirements of Taylor's theorem. Therefote, wAget f(xo + h)

; + h f (xo) +. . . = 0 f(xd)

Neglecting the terms containink' and higher powers we get . f(xo) + h f (x,) = 0.

.This gives a new approximation to a as f(xO) x l = x O + h = x -0 f (xd' Now the iteration can be defined by

Chord Methods for Finding Rwts

x = x -I f(xl)

Eqn. (5) is called the Newton-Raphson formula.. Before solving some examples we $hall explain this me&d geometsically.

Geometrical Interpretation df Newton-Raphson Method Let the graph of the function y F f(x) be as shown in Fig. 4.

e.

Fig. 4 :Newton-Raphson M t h o d

If xOis an initial approlimatian to the root, then the corresponding point on the graph is P(xv f(xO)).We draw a tangent to the curve at P. Let it intersect the x-axis at T (see Fig. 4 ) . Let x, b~the x-coordinate of T.Let S(a,0) denote the point on the x-axis where the curve cuts the x-axis. We know that is a mot of the equation f(x) = 0. We take x, as the new approximation which may be closer to a than xg' Now let us find-the tangent at P(x,. f(x,,)). The slope of the tangent at P(xo, f(xo)) is given by f(xo). Therefox by the point-slope form of the expression for a tangent to a curve (recall the expression from MTE-OS), we can write
Y - fC%) = f(xo) (x, - xo)

This tangent passes through the point T(x,, 0) (see Fig. 4). Therefore,we get

This ik the first iterated value. To get the s e c ~ n d iterated value we again consider a tangent i. at the point P(xl, f(xl)) on the curve(see F g 4) and repeat the process. Then we get a point

Sdutiom of Non-Hmclr huntions

k aw Variable

TI(%, 0) on the x-axis. From the figure. we observe that T,is more closer to S ( a . 0 ) than T. Therefore after each iteration the approximation i s coming closer and closer to the actual root. I n practice we do not know the actual root of a given function. Let us now take up some examples.

Example 3 :Find the smallest positive root of


2x-tanx=O by Newt-Raphson

method, correct to 5 decimal places.

Sdution :Let f(x) = 2x -tan x. Then f(x) i s a continuous function and f(x) = 2 sec2x i s also a continuous function. Recall that the given equation has already appeared in an exercise in Unit 2 (see E2 in Unit 2). From that exercise we know that an initial approximation to the positive root of the equation i s x = I.Now we apply the Newton-Raphson iterated formula.
Xi=X.f(xi)' I- 1

--

mi)

1=l,2,3

....

Here ,, = I.Then f(xd = f( I) 2 - tan 1 = 0.4425922 x = f ( x d = f ( l ) = 2 - ~ e c * 1= 2 - ( 1 +tan21) =I-tan21

= -1.425519
Therefore x, = I0.4425922 1.4255 19

= 1.3 1048
For i = 2, we get
X ,

= 1.31048 -

2 - tan(1.31048) I- tan2(1.3 1048)

= 1.22393
Similarly we get x = 1.17605 , x4 = 1.165926 x = 1.165562 , xn= 1.165561 , Now x and xn are correct to five decimal places. Haice we \top the iteration process here. The root correct to 5 decimal places i s 1.16556. Next we shall consider an applicationof Newton-Raphson formula. We know that finding the square mot of a number i s not easy unless we use a calculator. Calculators use some algorithm to obtain this value. Now we shall illuhtrate how Newton-Raphson method enables us to obtain such an algorithm for calculating square roots. Let's consider an example.

Example 4 :Find an approximate value of fiusing the Newton-Raphson formula.


Solution :Let x = 6. we have x2 = 2 i.e. x2 - 2 = 0. Hence we need to find the Then positive root of the equation x2 2 =O. Let

f(x) = x2 2. Then f(x) satisfies ail the conditions for applying Newton-Raphson method. We choose xo= I as the initial approximation to the root. This i s because we know that lies between

fiand

and therefore we can assume that h e root will be close to 1.

Now we compute the iterated values. The iteration' fo??ula is

Chord McUloQ tor Fiading Rmts

Putting i = 1.2.3,.

. . .we get

Similarly

Thus the value o f d ? l c o ~ c to seven decimal places i s 1.4 1.42 136. Now you can clicck this t value with the calculator.

Note I :The method used in the above example is applicable for finding square rm)t ol'i~ny positive dial number. For example suppose we want to find an approximate value of \'A where A i s a positive real number. Then we consider the equation x2 - A = 0. The itrri~tcd formula in this case is

This formula involves only the basic'arithmetic operations +.

-. x and +.

Note 2 :From examples (3) and (4). we find that Newton-Raphson method gives the rcwt very fast. One reason for this is that the derivative I f ( x ) I is large compared to If(x)l for any
x = xi. The quantity - which is the difference between two iterated values is rmall in
l this case. I n general we can say that if I f(xi) I is large compared to I f(xi) I, then w. can

1% I

obtain the desired root very fast by this method. The Newton-Raphson method has some limitations. In the following remarks we mention some o f the difficulties..

Remark 1 :Suppose f(xi) is zero in a neighbouthood o f the root, then it g a y happen that
f(xi) = 0 for some xi. I n this case we cannot apply Newton-Raphson formula, since division by zero is not allowed.

Remark 2 :Another difficulty is that i t may happen that f(*) zero only at the roots. This is happens i n either o f the situations.

i)

f(x) has multiple root at a R e d l that a polynomial function f(x) has a multipk root . a of order N if we can write

, where h(x) is a function such that h(a) # 0. For a general function f(x), this means f(a) = 0 = f(a) = . ..= fY-'(a) and ?(a) # 0.
i ) f(x).)las a stationary point (point o f maximum o f minimum) point at the root [recall i fram your c d ~ l u course (MTE-01) that i f f(x) = 0 at some point x then x is called a s
I

stationary poinj).

Solutions of Non-linear Equations in one Variable

In such cases some modifications to the Newton-Raphson method are necessary to get an accurate result. We shall not discuss the modificatiolls here as they are beyond the scop: of this course. You can try some exercises now. Wherever needed, you should c.-e a calpulator for computation. E4) Starting with xo = 0 find an approximate root of the equation x3 - 4x + 1 = 0, rounded off to five decimal places using Newton-Raphson method. E5) The motion of a planet in the orbit is governed by an equatidh of the form 1 y = x - e sin x where e stands for the eccentricity. Let y = 1 and e = - Then fiird : 2 approximate root of 2x - 2 -sin x = 0 in the interval [O, n] with error less than Start with xo = 1.5. re E6) Using ~ e w t o n - ~ a ~ h s o n s ~ u aroot algorithm, find the following roots within an accuracy of 1oP4.
i)
ii)
gl/',

starting with xo = 3

91 I/', starting with xo = 10


= O? Give

E7) Can Newton-Raphson iteration method be used to solve the equation reasons for your answer.

In the next section we shall discuss a criterion using which we can check the efficiency of an iteration process.

3.4 CONVERGENCE CRITERION --In this section we shall introduce a new concept called 'convergence criterion' related to an iteration process. This criterion gives us an idea of how many successive iterations have to be carried out to obtain the root to the desired accuracy. We begin with a definition.

Definition 1 : Let xu, x I . . . . x,.

. . . be the successive approximations of an iteration

process. We denote the sequence of these approximations as x 1 "In=o


I

We say that

, xll, n = O converges to a root a with order p 2 1 if


lm

for some number h > 0. p is called the order of convergence and h is called the asymptotic error constant. For each i. we denote by
= xi -a.

Then the above inequality be written as

This inequality shows the relationship between the error in successive approximations. For example. suppose p = 2 and 1 E~ 1 lo-' for some i, then we can expect that

1 &i

s h lo4. Thus if p is large, the iteration converges rapidly. When p takes the

integer values 1. 2 . 3 then we say that the convergence i.s linear, quadratic and cubic respectively. In the case of linear convergence (i.e. p = I ). then we require that h < 1. In this case we can write (6) as

If this condition is satisfied for an ireratio; '!\ rocess then we say that the iteration process converges linearly.

jetting n = 0 in the inequality (8), we get

Chord Methods for FindingRoots

x , - a 1 1I x o - a 1

Forn =.I, we get I ~ ~ - a l < h l x , - a l s 1 x -al 2h Similarly for n = 2, we get

1 x j - a 1 1x1
1 xn-a I IP 1
to the root.

x2-a) Ih21 x , - a I 2 h

3l

x -a

l
. . . (9)

Using induction on n, we get that xo-a

I for

n>O

If either of the inequalities (8) or (9) is satisfied, then we conclude that x 1-

"1.=0

converges

Now we shall find the order of convergence of the iteration methods which you have studied so far. Let us first consider bisection method. .
.

Convergence of bisection method Suppose that we apply the bisection method on the interval [ao, bo] for the equation f(x) = 0. In this method you have seen that we construct intervals [ao, bo] 2 [a,, b , ] 2 [aZ,b2] 2 . . . each of which contains the required root of the given equation.
Recall that in each step the interval width is reduced by - i.e. 2

and

b, - a,, = 2"

"0 - a.

We know that the equation f(x) = 0 has a root in [ao, b o ] Let a be the root of the equation. Then a lies in all the intervals [ai, bi], i = 0, 1,2, 2 middle point of the interval [a,,, b,]. Then coyc , , c2, . . . are taken as successive
m

. . . . For any n, let C,

an

bn

denote the

approximations to the root a. Let's check the inequality (8) for jc i nJn=o For each n, a lies in the interval [a,, b,]. Therefore we have

converges to the root a. Hence we can say that the bisection method always

converges.

Solutions of on-linear Equations in one Variable

For practical purposes, we should be able to decide at what stage we can stop the iteration to have an acceptably good approximate value of a. The nufnber of iterations required to achieve a given accuracy for the bisection method can be obtained. Suppose that we want an approximate sobtion within an error bound of (Recall that you have studied error bounds in Unit 1, Sec 3.4). Taking logarithms on both sides of Eqn. (lo), we find that the number of iterations required, say n, is approximately given by [ln(bo 1a;, n = int

In lo-"

where the symbol 'int' stands for the integral part of the number in the bracket and ]ao, bo[ is the initial interval in which a root lies. Let us work out an example.

Example 5 : Suppose that the bisection method is used to find a zero of f(x) in the interval [O, I]. How many times this interval be bisected to guarantee that we have an approximate root with absolute error less than or equal to 10-5 Solution : Let n denote the required number. To calculate n, we apply the formula in Eqn. (II)withbo= 1,ao=OandM=5.
Then

Using a calculator, we find

= int [ 16.609640471 = 17

Similarly you can try the following exercise. E8) For the problem given in Example 5. Unit 2. find the number n of bisections required to have an approximate root with absolute error less than or equal to lo-'. The following table gives the minimum number of iterations required to find an approximate root in the interval 10, I [ for various acceptable errors.

This table shows that for getting an approximate value with an absolute error bounded by lo-'. we have to perform 17 iterations. Thus even though the bisection method is simple to use. it requ~res large number of iterations to obtain a reasonably good approximate root. a This is one of the disadvantages of the bisection method.

Note : The formula given in Eqn. ( 1 I ) shows that. given an acceptable error, the number of iterations depends upon the initial interval and thereby depends upon the initial approximation of the root and not directly on the values of f(x) at these approximations.
Next we shall obtain the convergence criteria for the secant method.

Convergence criteria for Secant Method Let f(x) = 0 be the given equation. Let a denote a simple root of the equation f(x) = 0. Then we have f ( a ) # 0. The iteration scheme for the secant method is

For each i, set E~ = xi - a. Then xi = E~ + a . Substituting in Eqn. (12) we get

Chord Methods for Finding Roots

Now we expand f ( + a ~and f ( -~a) using Taylor's theorem about the point x = a . ~ ) ~ W e get

f ( +~a)= f(a)+ ~

tv(a)
-

E~

+ ff(a)E~ + . 2
-

since f ( a ) = 0. Similarly,

Therefore f ( ~+ a) - f ( -~ + a)= ff(a) ! ~

Substituting Eqn. ( 1 4 ) and Eqn.(l6) in Eqn. (13). we get

By neglecting the terms involving E~

+ E:

E ' ~ I the -

above expression, we get

This relationship between the errors is called the error equation. Note that this relationship holds only if a is a simple root. Now using Eqn. ( 1 7 ) we will find a numbers p and h such that

Setting i = j - 1, we obtain
E.= J

A EP .

J-1

Taking pth root on both sides, we get

Combining Eqns. ( 1 7 ) and (18), we get

f'(a) h&P=&.E. I 1 - 1 2tv(a)

Solutions of Nan-linear Equations in one Variable

Substituting the expression for ei - from Eqn: (19) in the above expression we get

hep-- f f ( a ) Ei h-l/p
1

&,;/P

2f(a)

1.e.

h e P =i
2f (a)

h-vp

&I

+ l/p

...

Equating the powers of ei on both sides of Eqn. (20) we get

This is a quadratic equation in p. The roots are given by

Sir?cep cannot be negative we ignore the negative value. Hence we have,

Now, to get the number h, we equate the constant terms on both sides of Eqn. (20). Then we get

Hence the order of convergence of the secant method is p = 1.62 and the asymptotic error
-

Example 6 :The following are the five successive iterations obtained by secant method to find the root a = -2 of the equation x3 - 3x + 2 = 0.
x l =-2.6, x,=-2.4, x3=-2.106598985,
L

x4 = - 2.022641412. and x5 =- 2.000022537.


Compute the asymptotic error constant and show that e5= - E 3 -1'
3

Solution : Let f(x) = x3 - 3x + : !


Then

tv(x) = 3x2 - 3. tV(-2) = 9 tv'(x) = 6x. tv'(-2) = -12


Therefore 1 = .

[Now
E~ =

i r l r= - 0.77835 1205

x5 - a 1 =

and

E ~ = I - 2 . 0 2 2 6 4 1 4 1 2 + 2 1=0.022641412.

constant is

[;;;I'1

I - 2.000021537 + 2

= 0.000071537

Hence we get that h E4 ,- E5

Chord Methods tor Findipg Roots

Convergence criterion for fixed point iteration method


Recall that in this method we write the equation in the form x = g(x) Let a denote a root of the equation. Let xo be an initial approximation to the root. The iteration formula is x i + , =g(xi),i=O, 1 , 2 , . . .

. . . (21)

We assume that gf(x) exists and is continuous and I gf(x) I < 1 in an intwal containing the root a . We also assume that xo, xl, . . . lie in this interval. Since gf(x) is continuous near the root and I gf(x) I < 1, there exists an interval ] a - h, a + h[, where h > 0, such that I gf(x) 1 I k for some k, where 0 < k < 1.

1
I

Since a is a root of the equation, we have

a = g(a).
Subtracting (22) from (2 1) we get xi + - a = g(xi) - g(a)

. . . (22)

Now the function g(x) is continuous in the interval ]xi, a [ and gf(x) exists in this interval. Hence g(x) satisfies all the conditions of the mean value theorem [see unit 11. Then, by the mean value theorem there exists a 5 between xi and a such that

Note that 5 lies in ] a - h, a + h[ and therefore I g'(5)

I < k and hence

I II

xi-a

Setting i = 0, 1,2, . . .,n we get Ixl-al<klxo-a1

This shows that the sequence of approximations {xi) converges to a provided that the initial approximation is close to the root. We summarise the result obtained for this iteration process in the following Theorem.

Theorem :If g(x) and '(x) are continllous in an interval about a root a of the equation x = g(x), and if 1 g'(x) < 1 for all x in the interval, then the successive approximations
xl, x2, . . . given by

converges to the root a provided that the initial approximation xo is chosen in the above interval. We shall now discuss the order of convergence of this method. From the previous discussions we have the result.

I xi ,- a I I g'(5) I
+

(xi - a )

Solutions of Non-linear Equations in one Variable

Note that 6 is dependent on each xi. Now we wish to determine the constants X and p independent of xi such that

xi+]-a

I ~c I

(xi-a)

IP
,

Note that as the approximations xi get closer to the root a , g!(c) approaches a constant value g'(a). Therefore, in the limiting case, as i + m, the approximations satisfy the relation

xi+]-al

<I

gt(a)

l I

xi-a

Therefore, we conclude that if g'(a) If g'(a) = 0, then we have i+l-a=g(xi)-a

# 0,

then the convergence of the method is linear.

=g[(xi - a ) + a ] - a
By applying Taylor's theorem to the function g(x) about a and neglecting higher powers.

= g(a)

+ (xi - a)g'(a) + 7-a g"(6) -

(xi - a12

since g(a) = a and g'(a) = 0 and 6 lies between xi and a. Therefore, in the limiting case we have,
1 2 I x i + , - a 1 I - IgM(a)l l x i - a 1 2

Hence, if g'(a) = 0 and g"(a)

0, then this iteration method is of order 2.

Example 7 :Suppose a and P are the roots of the equation x2 +- ax + b = 0. Consider a rearrangement of this equation as
x=-- (ax + b)
X

Show that the iteration xi

(axi + b) - - converge near x = a when I a 1 > 1 will X.

pI

Solution :The iterations are given by


(axi + b) xi
+

= g(x.) = - -

i=O, 1 , 2,...

By Theorem 1, these iterations converge to a if -

gt(x) -

< 1 near a i.e. if I gt(x) 1 = -

c 1. Note that gt(x) is continuous near a. If the iterations converge to x = a , then we require

1 X'I

Now you recall from your elementary algebra course (MTE-04) that if a and P are the roots, then a+p=-aandap=b Therefore 1 b 1 = 1 a

1 I P 1. Substituting in Eqn. (23), we get


~ > I

,
'Hence

l~p l I

1 a l > l Dl.

Similarlyyou can solve the following exercise.

Chord Methods for Finding Roots

~ 9 ;For the equation given in Example 7, show that the iteration xi converge to the root x = a , when

, = xi + a will
----

I a I < 1 p 1.
method.

Finally we siall discuss the convergence of the Newton-Raphson

Convergence of Newton-Raphson Method Newton-Raphson iteration formula is given by

To obtain the order of the method we proceed as'in the secant method. We assume that a is a simple root of f(x) = 0. Let

Then we have

~ and + Now we expand f ( + a )~ f ( E ~ a ) , using Taylor's theorem. about the point a . We have
2

f ( a ) + E~ f '(a)

+ - f"(a) + . . . 2

'i

'i+l-

f ( a ) + E~f"(a)

+ ~f f"(a) + . . .

But f ( a ) = 0 and f ( a ) # 0. Therefore

Hence, by neglecting higher powers of Ei, W get e

This shows that the errors satisfy Eqn. (6) with p = 2 and h = '(a) Hence 2ff(a)' Newton-Raphson method is of order 2. That is at each step. the error is proportional to the square of the previous error.
-

Now, we shall discuss an alternate method for showing that the order is 2. Note that we can write (24) in the form x = g(x) where

Sululions of Nun-linear Equations inone Variable

Then

- f(x) f'(x) [f(x)12 Now,

, f(a) f( a ) g (a) == 0, since f(a) = 0 and f ( a ) # 0. ff(a)12


Hence by the conclusion drawn just above Example 7, the method is of order 2. Note that = this is true only if a is a simple root. If a is a multiple root i.e. i f f (a) 0, then the convergence is not quadratic, but only linear. We shall not prove this result, but we shall illustrate this with an example. Let us consider an example.
Example 8 :Let f(x) = (x - 2)4 = 0. Starting with the initial approximation xo = 2.1,

compute the iterations x,, x2, x3 and x4 using Newton-Raphson converging quadratically or linearly?

method. Is the sequence

Solution :The given function hasinultiple roots at x = 2 and is of order 4.


Newton-Raphson iteration formula for the given equation is

1 4(3xi - 2)

Starting with xo = 2.1, the iterations are given by

Similarly x, = 2.05625 x3 = 2.042 1875 x4 = 2.03 1640625 N o w ~ ~ = ~ ~ - 2 = 0E., l ,x l -2=0.075, = c4 = 0.03 1640625. Then ~,=0.05625, ~~=0.0421875,

and

3 Thus the convergence is linear in this case. The error is reduced by a factor of - with each 4 iteration. This result can also be obtained directly from Eqn. (25).
You can try this exercise now :
E 10) The quadratic equation x4 - 4x2 + 4 = 0 has a double root at x = 6. Starting with x, = 1.5, compute three successive approximations to the root by Newton-Raphson me [hod. Does the result converge quadratically or linearly ?
We now end this unit by giving a summary of it.
-

Chord IWehds for Finding Roog

3.5 SUMMARY
In this unit we have
described the following methods for finding a root of an equation f(x) = 0 i) Regula-falsi method : The formula is

where la, b[ is an interval such that f(a) f(b) < 0.


ii)
Secant method :

The iteration formula is

where xo and x , are any two given approximations of the root.


iii)
Newton-Raphson method :

The iteration formula is

where xo is an initial approximation to the root. introduced the concept called convergence criterion of an iteration process discussed the convergence of the following iterative methods i) Bisection method
ii)

Fixed point iteration method

iii) Secant method iv) Newton-Raphson method.

36 .
El)

SOLUTIONSIANSWERS
i)
Letf(x)=xloglox-1.2~0 We have to first find two numbeis a and b such that f(a) f(b) c0. Since the function loglox is defined only for positive values of x, we consider on& positive numbers x. Let us take x = 1.2.3, . . .Then, using a calculator, f(l)= 1 (log1(,1)- 1 . 2 = - 1 . 2 ~ 0

C .

Solutions of Non-linear Equations in one Variable

This shows that f(2) f(3) c 0 and therefore a root lies in 12,3[. NO; and b = 3. Then the first approximation of the root is

pui a = 2

'

Now f(2.72102) = 2.72102 (loglo2.72102) - 1.2 = 1.18291 - 1.2 < 0. Since f(2.72102) f(3) < 0, a root lies in the interval ]2.72102,3(. Hence the second approximation is

We find f(x2) = - 0.0004 < 0. Therefore the root lies in the interval ]2.7402,3[. The third approximation is obtained as

Since x2 and x3 rounded off to three decimal places are the same, we stop the process here. Hence the desired approximate value of the root rounded off to three decimal places is 2.740. ii) Let f(x) = x sin x - I Since f(0) = - 1 and f(2) = 0.8 18594854,a root lies in the interval 10, 2[. The firs) approximation is

and f(x ,) = -0:0200 1921 Since f(x < 0 and f(2) > 0, the root lies in ]-0.0200192 1,2[. The second approximation is obtained as x2 = 1.2 124074 and f(x2)= -0.00983461. The root now lies in ] 1.2124074,2[. Similarly we can calculate the third and fourth approximations as

and

x 4 = 1.1 1415714
Since x3 and x4 rounded off to three decimal places are the same, we stop the process here. Hence the desired root is 1.1 14.

E2) Let f(x) = x2 - 2x - 1. Starting with-%= 2.6 and x, = 2.5 the successive approximations are,

= 2.4 1935484

Chord Methods for Finding Roots

and f(x2) = 0.0 145682. To find the next approximation we compute

~ i m i l a ryou can calculate that l~ x4 = 2.4 1421384 and x5 = 2.41421356

I
I

Since x4 and x5 rounded off to 5 decimal places are the same, we stop the process here. Therefore the required root rounded off to 5 decimal places is 2.4 1421. Now we compare this root with the exact root 1 + fi. Using a calculator we 1 + 6= 2.4 142 1. ro~nded to five decimal places. Hence the computed root and exact root off are the same when we round off to five decimal places. E3) Let f(x) = x3 + x2 - 3x - 3 = 0 We first note that f(1) < 0 and f(2) > 0. Therefore a root lies in [I, 21. The first i) approximation x, is

and f(xl) =-1.36449 c O Therefore the root lies in ] 1.57142,2[. Proceeding similarly, we get the values as given in the following Table.

The table shows that x5 and x4 are correct to three decimal places. Therefore we stop the process here. Hence the root correct to three decimal places is 1.731. ii) In secant method we start with two approximatiops a = 1 and b = 2. Then the first approximation is the same as in part (i), namely
XI

= 1.57142

To calculate the next approximation x2 we take b and x,. Here also we &getting the same value as in part (i), namely

Then we take x, = 1.57142 and x2 = 1.70540 to get the third approximation xj. We have

. w u t h d N -m1

F y u h

T e rest of the values are given by h


and

xs = 1.73205
Since x4 and x5 rounded off to three decimal places are the same,we stop here. Hence the root is 1.732. rounded off to three decimal places.

the Let us now compa~ two methods. We first note that 1 % + I error after ith iteration.
In regula-falsi method, the e r m after 5th iteration is

- xi 1 gives the

I x5 - x4 I = 1

1.73194 - 1.73140 1

whereas in secant method, the error after 5th iteration is

x,-x,

I = 1 1.73205-

1.73199 I

This shows that the error in the case of want method is smaller than that in regula-falsi method for the same number of iterations.

m) The given function f(x) = x3 - 4x + 1 and its derivative f(x) = 3x2- 4 are continuous
everywhere. The initial approximation is xo = 0.

T e iteration formula is h

The first approximation is

and f(x ,) = (0.25)3 - 4 (0.25) + 1 = 0.015625

T e second approximation is given by h

'

Similarly we get
x3 = 0.254101

Since x2 and x3 rounded off to four decimal places are the same. we slop the iteration here. Hence the root is 0.2541. E5) Let f(x) = 2x 2 - sin x. T e f(x) and f (x) are continuous everywhere. Starting with h xo = 1.5, we compute the iterated values by the Newton-Raphson formula. The first iteration is
+
I

= 1.5

- sin (1.5) - 21-cos(1.5)

Chad Mctbob for FWhgRoots

Similarly,
x2 = 1.498701

wefind I x2-x,
i)

I= 1

1.498701 - 1,498702

1<

Therefore the required mot i s 1.498701

E6)

Newton-Raphm iterated formula for computing the 6 i s

Starting with % = 3 we obtain the iterated values a , , s

= 2.82843 1
and xj = 2.828427
Since 1 x3 is 2.8284. ii)

- x2 1 < lo4,

we stop the iteration. Therefore the approximate mot

Here the Newton-Raphson formula is x i = + [ x i - l xi- I i = ~ , 1.2... +~]

and xo = 10. The iterated values are


XI X, X,

= 9.55
= 9.539398 = 9.539392

Since 1 x3 x2 I < 3xu3

we get the approximate value as 9.5393.

E7) No, because f(x) = -is not continuous at the root x = 0.


E8) n = int

In(O.0l) 2 .

- In l(r7]int [I1.5 129251= =


0.693 147

E9) Here g(x) = - .The iteration x+a

converges to a if I g'(x)
we q u i r e

1=

< I in an internal containing cr in particular

i.e.(a+aY<

1 b 1.
b. Therefon we get

But we havea+f5=-aand&=
p>lbl=lal i.e.

1st.

l a1 < 1 D l .

Solutions of Nun-linear equations in one Variable

E10) The iterated formula is xf - 2


XI+,

=xi-

4xi

The three successive iterations are

x, = 1.458333333
X,

= 1.436667 143

x3 = 1.425497619
Then we get E~ = - E, and e2 = - E,. This shows that the sequence is not quadratically 2 2 convergent, it is linearly convergent.
1

You might also like