Unit 3 Chord Methods for Finding Roots
Total Page:16
File Type:pdf, Size:1020Kb
UNIT 3 CHORD METHODS FOR FINDING ROOTS Structure 3.1 Introduction Objectives 3.2 Regula-Falsi Method 3.3 Newton-Raphson Method 3.4 Convergence Criterion 3.5 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 iii) secant method iv) Newton-Raphson method 3.2 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 ChdMethods for Finding Roots 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) ) 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 rat 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. ktus 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) f(a) y - 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) c-a f(b) - f(a) - b - a This expression for c gives an approximate value of a root of f(x). Simplifying (2). we can abwrite it as a f(b) - b f(a) C = 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) Step2:Setx2=- . This gives the first approximation. 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 Chord Metliads for Finding Roots (-8) 9 - (-7) (-5) = =- 2 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. Table I , Number of iterations 1 Interval I Iterated Values xi 1 The function value f(xi) 1 L- - - I k 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 You note that in regula-falsi method, at each stage we find an interval ] xo, x, [ which contains a I 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 I not contain the root. Then we apply formula (3) with xo, xl, f(xO)and f(x,). The iterations are now defined as : xo f(xl) - XI f(xo) Y - 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.