An InternationalJournal
computers & mathematics
Available online at www.sciencedirect.com
.¢,=.¢= C o,..cT. ELSEVIER
with applications
Computers and Mathematics with Applications 48 (2004) 709-714 www.elsevier.com/locate/camwa
A Family of Methods for Solving Nonlinear Equations Using Quadratic Interpolation J. R. SHARMA Department of Mathematics Sant Longowal Institute of Engineering and Technology Longowa] - 148 106, District Sangrur, India
(Received November 2003; revised and accepted May 2004)
A b s t r a c t - - A two-parameter derivative-free ramify of methods for finding the simple and real roots of nonlinear equations is presented. The approximation process is carried out by using interpolation on three successive points (xk, Yk) to determine the coefficients c, d, e in the general quadratic equation ax 2 + by 2 + cx + dy -t- e ----0 in the terms of the coefficients a, b. Different choices of a, b correspond to different quadratic forms. Muller and inverse parabolic interpolation methods are seen as special cases of the family. Geometrical relationships with other methods are established. It is shown that the order of convergence is 1.84. Some numerical examples are given. © 2004 Elsevier Ltd. All rights reserved. K e y w o r d s - - N o n l i n e a r equations, Iteration method, Root finding, Order of convergence.
1. I N T R O D U C T I O N T h e p r o b l e m of finding a real root of the nonlinear equation, f (x) = O,
(1)
is of m a j o r i m p o r t a n c e and has widespread applications in scientific a n d engineering work. T h e r e are n u m b e r of cases where such single equations depending u p o n one or more p a r a m e t e r s must be solved effectively. Being q u a d r a t i c a l l y convergent, N e w t o n ' s m e t h o d is p r o b a b l y the best known and most widely used algorithm, b u t it m a y fail to converge in case t h e initial point is far from t h e root, moreover, its d e p e n d e n c y on derivative of the function restrict its applications. In fact, c o m p u t i n g a r o o t of (1) w i t h o u t using derivatives has been derived a n d modified in a variety of ways. For example, secant m e t h o d [1] is o b t a i n e d by a linear i n t e r p o l a t i o n and can also be o b t a i n e d from N e w t o n ' s m e t h o d a p p r o x i m a t i n g the derivative by a finite divided difference. Muller's m e t h o d [1,2] is based on a p p r o x i m a t i n g the function by a q u a d r a t i c polynomial, e.g., parabola. M e t h o d of inverse p a r a b o l i c interpolation [3, p. 233] is based on t h e a p p r o x i m a t i o n by a p a r a b o l a w i t h axis parallel to x-axis. J a r r a t t and N u d d s [4] i n t r o d u c e d a m e t h o d a p p r o x i m a t i n g the function b y a linear fraction. Popovski [5] developed a m e t h o d of p a r a b o l i c a p p r o x i m a t i o n The author wishes to thank the referees for their valuable suggestions on the first version of this paper. 0898-1221/04/$ - see front matter (~) 2004 Elsevier Ltd. All rights reserved. doi:10.1016/j.camwa.2004.05.004
Typeset by ~4MS-TEX
710
J . R . SHARMA
with axis parallel to the line y x. He also introduced a method of tangential hyperbolic approximation [6]. All these methods require one function evaluation per step and have the order of convergence 1.84, except secant method, which has 1.62. In this paper, equation (1) is solved on the basis of quadratic interpolation by taking a general equation in x and y which includes circle, parabola, hyperbola, and ellipse. The method consists of deriving the coefficients of quadratic curve that goes through by three points. These coefficients, then, can be substituted into the equation to obtain the point where the curve intersects the x-axis, i.e., root estimate. Thus, a family of iteration formulae is obtained which includes Muller method and inverse parabolic interpolation method (IPI). :
2.
BASIC
DEFINITIONS
DEFINITION 1. Let us recall the definition of order (see [3]). Consider a sequence, {xi},
i : 0, 1, 2 , 3 . . . ,
converging to a. Let e i ~- x i --
(2)
o~.
I f there exist a real number p >_ 0 and a nonzero constant C, such that
C]e l v,
]ei+l[
(3)
then, p is called order of convergence of the sequence. 2. Suppose that xi+l, xi, and xi-1 are three successive iterations closer to the root of (1). Then, the computational order of convergence p (see [7]) is approximated by using (3) as
DEFINITION
In I(x +l -
DEFINITION
/ (x, -
(4)
3. The genera/quadratic equation in x and y has the form ax 2 + b y 2 + cx + dy + e = O.
(5)
Here, it is assumed that axes can be rotated to eliminate the cross product term, i.e., xy. Equation (5) represents the following, (i) a circle, if a = b ~ O, (ii) a parabola, f l i t is quadratic in one variable and linear in other, (iii) an ellipse, ff a # b and a and b are both positive or both negative, and (iv) a hyperbola, if a and b have opposite signs. Note that the five parameters in equation (5) can be reduced to four by scaling, which implies that only the value of the ratio a/b (or b/a) is re/evant. The difficulty is that either a or b could be zero, so it is not unreasonable to keep both explicitly in play. In the above discussion, exceptional cases in which there is no graph at all or the graph consists of two parallel lines are not taken into consideration. 3. D E R I V A T I O N
OF
THE
FORMULA
Suppose three approximations x~, x~-1, and xi-2 to the true root a of (1) are given. Writing the quadratic equation (5) in a more convenient form, Q (x, y) -- a (x - x~) 2 + b (y
--
yi)2 +
C (X - -
xi) + d (y - y~) + e = 0.
(6)
A Family of Methods
711
We now evaluate the coefficients c, d, and e in terms of the coefficients a, b by evaluating Q ( x , y ) at three successive points (xi, yi), ( x i - 1 , y i - 1 ) , and (xi-2, Yi-2). Thus, if we introduce
the notations hk = Xi
--
Xi-k,
5k = y~ - y ~ - k ,
(7)
Xi -- Xi-k
k = 1,2, and then, solving the system of equations Q(xj,yj)
=0,
(8)
j=i,i-l,i-2,
we get the coefficients c, d, and e in terms of a and b as given by a (h162 - h261) + b5152 (h151 - h262)
C-~-
52 - 51
(9)
d = a (h2 - h i ) + b (h25~ - h162) 52 - 51 e~O.
It is worth mentioning that the system of equations (8) has a unique solution, if and only if 62 - 51 ~ 0, which corresponds to successive points not being collinear. Substituting the coefficients obtained in (9) into (6) and then, solving the equation Q ( x , 0) = 0, we get the next approximation xi+l to the root as 2:i+ 1
2yl (byi - d) =
Xi
- -
c :]= x / c 2 - 4ayi (byi - d)'
i = 2, 3, 4 . . . ,
(10)
where c and d are given by (9). The sign in the denominator of (10) is chosen so as to give the largest value. Relation (10) defines a family of iterative formulae with parameters a and b for finding the root of equation (1).
4. C O N V E R G E N C E Let ei+l, ei, ei-1, and ei-2 be the errors at i + 1, i, i - 1, and i Then, we have xi+l = e~+l + a,
xi = ei + a,
x ~ - i = ei-1 + a,
-
2 th
iteration, respectively.
x i - 2 = ei-2 + a.
(11)
Using the Taylor's expansion of f (x), i.e.,
y (x) = f (e + ~) = ~ e~fJ (~)/j!,
(12)
j=0
we obtain from (10), the following error equation
[
(13)
The error equations (3) and (13) yield the initial equation p3 _ p 2 _ p _
1 = 0,
(14)
which has a unique positive real root 1.84. That means the order p of iteration scheme (10) is 1.84. Since only one function evaluation is required per iteration, the efficiency index [8] is also 1.84.
712
J . R . SHARMA
5. R E L A T I O N S H I P
WITH
OTHER
METHODS
We now select the methods, which m a y have direct or indirect relation with iteration formula (10). Muller's m e t h o d is obtained approximating y = f ( x ) by second degree curve, i.e., parabola y = A + B x + C x 2, (15) which is the case of (6) for b = 0. Hence, by substituting b = 0 in (10), we obtain Muller's iterative formula. Similarly, by substituting a = 0 in (10), we obtain m e t h o d of inverse parabolic interpolation (IPI). J a r r a t t - N u d d s m e t h o d uses the linear fraction approximation, X-A BX + C' or
BXY-X
+CY
+ A =O.
(16)
Eliminating the cross product term X Y by the transformation,
X=(x-y)/~,
Y=(x+y)/v%
(i.e., rotating the coordinate axes through an angle 45 °) in (16) and, as a consequence, we get A' (x 2 - y2) + C i x + D ' y + E ' = O,
(17)
which is a case of hyperbolic approximation, e.g., a = - b in (6) and, hence, in (10) for solving f ( x ) = O. T h e Popovski m e t h o d uses parabola A+B(Y-x)
+C(Y-x)
2 - (Y + x ) = 0,
(18)
as an approximation for solving x = F ( x ) . If we put y = Y - x in (18), we get A ~+ B l y
+ C l y 2 - - x = O.
Equation (19) is a case of parabohc approximation (IPI),i.e., a = 0
(19) in (10) for solving f ( x ) =
x-F(x)=O. 6. N U M E R I C A L
RESULTS
Three numerical examples are performed by considering the various cases depending upon the p a r a m e t e r s a and b viz. circle, parabola, ellipse, and hyperbola. In the first example, f ( x ) = x 4 - 6x 3 + 11x 2 - 6x = 0,
which has a root x = 3 is used. The starting values taken are [4, 4.5, 5]. T h e various iterates are given in Table 1. T h e last row in each table shows computational order of convergence (p). T h e second example is taken as f (x)
= xe ~ -
1 = 0,
which has a root 0.567143. Starting values used are [2, 3, 4]. T h e iteration process is shown in Table 2.
713
A Family of Methods Table 1. a-----1, b - - 1 Circle
a--0, b--1 Parabola (IPI)
3.568329
3.568346 3.375223
3.375198
a----1, b~-0 Parabola (Muller method)
a=l,b=2 Ellipse
a--1, b---1 Hyperbola
3.568337
3.568364
3.375211
3.375247
3.166838
3.166891
3.O45974
3.046131
3.166821
3.166856
3.045922
3.046026
3.006561
3.006618
3.006589
3.006675
3.000192 3.000000
3.000197
3.000194
3.000202
3.000000
3.000000
3.000000
p:1.8163
p=1.8127
p~1.8145
p=1.8088
Negative square root
Table 2.
a~-l,b=l Circle
a----0, b = l Parabola (IPI)
a=l,b=0 Parabola (Muller method)
a----1, b-----2 Ellipse
a--1, b---1 Hyperbola
1.634195
1.634229
1.634212
1.634264
1.398362
1.398419
0.981062
0.981190 0.693835
1.398390 0.981126
0.981318
0.692677
Negative square root
1.398475
0.693256
0.694996 0.589537 0.588068 0.567146
0.587923
0.588718
0.588317
0.567856
0.567955
0.567904
0.567145
0.567145
0.567145
0.567143
0:567143
0.567143
0.567143
p -- 1.8421
p -- 1.8270
p -- 1.8301
p = 1.8263
a=l,b-----1
Table 3. a - - 1 , b----1 Circle
a---O,b=l Parabola (IPI)
a----1, b----0 Parabola (Muller method)
a---1, b----2 Ellipse
Hyperbola
1.961028
1.982002
1.948595
1.966723
1.900801
1.898047
1.899218
1.897109
1.898391
1.895833
1.895500
1.895515
1.895495
1.895503
1.895494
1.895494
1.895494
1.895494
1.895494
p ----1.8798
p -- 1.6482
p = 2.2109
p -----1.8010
p -----2.64
In third example,
f (x) = sin x
- x/2
= O,
is taken which has a root 1.895494. Starting values used are [5, 4, 2]. Table 3 illustrates the iterates for the problem. 7. C O N C L U S I O N S In t h e foregoing study, a m u l t i p o i n t t w o - p a r a m e t e r f a m i l y of i t e r a t i v e f o r m u l a e is p r e s e n t e d . T h e r e is an initial p e n a l t y in t h a t , one m u s t e v a l u a t e t h e f u n c t i o n t h r e e t i m e s , b u t once this has b e e n done, t h e m e t h o d n e e d s o n l y one f u n c t i o n e v a l u a t i o n p e r step. I n f o r m u l a (10), t h e sign in t h e d e n o m i n a t o r is so chosen t o agree w i t h t h e sign of c. T h i s choice will r e s u l t in t h e largest d e n o m i n a t o r and, hence, will give t h e n e x t a p p r o x i m a t i o n closest t o t h e r o o t . T h e discussion here is c a r r i e d o u t e x c l u s i v e l y for real a n d s i m p l e r o o t s a n d for t h e real s o l u t i o n m e t h o d r e q u i r e s
714 c 2 - 4ayi(byi
J . a . SHARMA - d) >_ O.
However, the use of quadratic formula means complex roots can also be
located. Computational order of convergence (p) overwhelmingly supports the order of convergence (p), i.e., 1.84. It is seen that while Muller and IPI methods are special cases, Jarratt-Nudds and Popovski methods find useful relationship with the family. In search for real roots, Muller method frequently predicts complex approximation as is evident by the numerical results (Tables 1 and 2) that this case is failure in predicting the real roots, while other cases are converging to the root very effectively. REFERENCES 1. C.F. Gerald and P.O. Wheatley, Applied Numerical Analysis, Addison-Wesley, Reading, MA, (1994). 2. D.E. Muller, A method of solving algebraic equations using an automatic computer, Math Tables and Other Aids to Computation 10, 208-215, (1956). 3. J.F. Traub, Iterative Methods for Solution of Equations, Prentice-Hall, Englewood Cliffs, N J, (1964). 4. P. Jarratt and D. Nudds, The use of rational functions in the iterative solution of equations on a digital computer, The Computer J. 8, 62-65, (1965). 5. D.B. Popovski, Method of parabolic approximation for solving the equation x = f(x), Intern. J. Computer Maths 9, 243-248, (1981). 6. D.B. Popovski, Method of tangential hyperbolic approximation for solving equations, Proceedings of Third International Symposium Computers at the University, Cavtat, 311.1-311.6, (1981). 7. S. Weerakoon and T.G.I. Fernando, A variant of Newton's method with accelerated third-order convergence, Appl. Math. Lett 13 (8), 87-93, (2000). 8. A.M. Ostrowski, Solution of Equations and Systems of Equations, Academic Press, New York, (1960).