China
China
_________________________________________________________________________________
ABSTRACT— In this paper, we describe a new method for solving nonlinear equations by using nonlinear
regression. The method is verified on a number of test examples and numerical results obtained show that the
proposed method is faster than Bisection method and Regula Falsi method and equal modified Regula Falsi method.
1. INTRODUCTION
We now consider that most basic problems in scientific and engineering work is to locate a real root, , of a
nonlinear equation
f ( x ) 0, (1)
where f denote a continuously differentiable on [ a, b] and has a least one root, , in [ a, b] . Generally algorithms
for solving (1) can be divided into main groups which are direct methods and iterative methods. Direct methods can be
completed in exact root but often it will not be possible to solve some the equations. Iterative methods are methods which
converge to the root over time. These algorithms run until some convergence criterion is met. When choosing this
method to use one important consideration is how quickly the algorithm converges to the root or solution that we call
method’s convergence rate.
Some of the more classical numerical methods for solving nonlinear equations without using derivatives include
bisection, secant and regula falsi (see [4]). Many of these methods, such as the regula falsi method, are fast in general but
can be extremely slow for certain classes of functions and are likely to fail if the initial starting value is not sufficiently
close to . On the other hand, bisection is a safe method always convergence but its rate of convergence is slow. A
successful algorithm developed by Neamvonk [3] has been modified the regula falsi method to improved its order of
convergence.
The regula falsi method, it can be well known that the idea is to defined [ a, b] and find a linear function on
( a, f ( a )) and (b, f (b)) to estimate the root of (1). Due to the nonlinear equation, f , if we can find a nonlinear
function on 3 initial value which are ( a, f ( a )) , (b, f (b)) and (c, f (c )) where c a 2 b then this procedure may lead to
the root quicker and more accurate logarithm function is widely used in
yˆ i C A ln xi . (2)
The function (2) can be applied where A 0 and A 0 .
2. NEW METHOD
In fitting nonlinear function we define initial point a, b, c and their function f ( a ), f (b) and f (c) . The general form
of logarithm function [1] is
yi ln( xi ) ei , (3)
where and are the unknown constants. The function (3) can be rewritten as
yi (ln ln xi ) ei , (4)
and
yi ln xi ei , (5)
where ln is a constant. The constants in (5) can be estimated using least square method [2] i.e. the sum of
square error is minimum. Therefore, the estimated logarithm function is
yˆ i C A ln xi , (6)
where A and C are the least square estimated values of and respectively.
Let e is different between the true value, yi , and the estimated value, yˆ i . Therefore,
eˆi yi yˆ i . (7)
The sum of square error,
n n
eˆi2 ( yi yˆ i ) 2 (8)
i 1 i 1
and substitute (6) in (8) will get
eˆi2 ( yi C A ln xi ) 2 . (9)
We will find A and C that minimize this function. The derivative with respect to A and C are applied and set to 0. So,
eˆi2
2 ( yi C A ln xi ) 0, (10)
C
eˆi2
2 ( yi C A ln xi ) ln xi 0. (11)
A
From (10) and (11), we have
yi nC A ln xi , (12)
n
yi ln xi nC ln xi , A (ln xi )2 . (13)
Then, multiply ln xi in both side of (12) and n in both side of (13). We have
i 1
y ln xi nC ln xi A ln xi ,
2
(14)
n y ln xi nC ln xi nA ln xi .
2
(15)
Subtract (15) by (14), we have
A
yi ln xi 1n yi ln xi , (16)
(ln xi )2 1n ln xi
2
and
C 1n yi nA ln xi . (17)
The intercept x-axis of the equation (6) at point x which can be estimated by
C
x exp{ } (18)
A
This method is applied to find root of nonlinear equation by defining the y as f ( x ) and range of a, b and
c where c a 2 b . In this research, the points of ( a, f ( a )) , (b, f (b)) , and (c, f (c )) are applied in (16) and (17) as
shown in Figure 1.
(b, f (b))
y y ( a, f ( a ))
case 1: A 0 case 2: A 0
y f ( x) y f ( x)
yˆ C A ln x
a c b a c b
(c, f (c )) x x x
x
(c, f (c ))
yˆ C A ln x
( a, f ( a )) (b, f (b))
Figure 1: graph of y f ( x ) with initial point a, b and c . Dotted line represents approximate
function yˆ C A ln x in case 1 A 0 and case 2 A 0 .
3. ALGORITHM
The new method have four steps:
(i) Set [ a, b] is an initial interval which has at least a root in the interval,
ab
(ii) compute c ,
2
A
f (a) ln(a) f (b) ln(b) f (c) ln(c) - ( f ( a) f (b) f (c) ln( a) ln(b) ln(c) / 3
,
(ln(a))2 (ln(b))2 (ln(c)) 2 - ln(a) ln(b) ln(c) 2 / 3
f (a) f (b) f (c) ln(a ) ln(b) ln(c)
C A ,
3 3
C
and xe A
,
(iii) replace the interval [ a, b] with [ x, b] if f (a ) f ( x) 0 or with [ a, x ] if f ( a ) f ( x ) 0 ,
4. RESULTS
Table 1 presents comparison of iteration numbers and running time between Bisection (BS), Regula Falsi (RF),
modified Regula Falsi (MRF), and present work (NEW) with 1 10
10
and initial interval [0.1,1] in four equations.
The results show that the BS method presents the biggest number of iterations and time in all cases. The RF methods
provides more than 10 iterations. However, the MRF and New methods have fairly similar results. The MRF have the
smallest number of iterations whereas the NEW method have the smallest time in most cases.
Table 1: The number of iteration and running time of BS, RF, MRF and NEW methods for specifics precision
BS 33 1.062
RF 20 0.843
f1 ( x) x (1 x) 0
2 5
0.345954815842023
MRF 5 0.578
NEW 6 0.375
BS 34 1.118
RF 12 0.531
f2 ( x) cos( x) x 0 3
0.8654740331016205
MRF 5 0.594
NEW 6 0.391
BS 33 1.094
RF 20 0.906
f3 ( x) xe 1 0
x
0.5671432904097837
MRF 5 0.516
NEW 6 0.547
BS 29 0.953
RF 8 0.344
e x
f 4 ( x) e x0 0.5671432904012503
MRF 6 0.609
NEW 7 0.453
Figure 2 shows the absolute error, absolute error, f ( x) , of the four methods for the first 6 iterations. It can be
seen that the error of the Bisection method are frustrated along the iteration. While the errors of the RF, MRF and NEW
method decrease when the number of iteration increases.
0.35 0.7
Bisection Bisection
Regula Falsi Regula Falsi
0.3 0.6
modified Regula Falsi modified Regula Falsi
New New
0.25 0.5
absolute error
absolute error
0.2 0.4
0.15 0.3
0.1 0.2
0.05 0.1
0 0
1 2 3 4 5 6 1 2 3 4 5 6
no. iter. no. iter.
0.7 0.16
Bisection Bisection
Regula Falsi 0.14 Regula Falsi
0.6
modified Regula Falsi modified Regula Falsi
New New
0.12
0.5
0.1
absolute error
absolute error
0.4
0.08
0.3
0.06
0.2
0.04
0.1 0.02
0 0
1 2 3 4 5 6 1 2 3 4 5 6
no. iter. no. iter.
Figure 2: Rate of convergence of Bisection, Regula Falsi, modified Regula Falsi and new method of
f1 (top left), f 2 (top right), f 3 (bottom left) and f 4 (bottom right) on the first 6 iteration
5. CONCLUSION
The new algorithm for solving nonlinear equations has been presented. The algorithm feature is applied using
nonlinear regression. Numerical comparisons indicate that this algorithm is much faster than BS and RF on both number
of iteration and running time for the four examples. And the results are quite similar with MRF.
6. ACKNOWLEDGEMENT
We would like to thank the Faculty of Science, Burapha University support through funds for research.
7. REFERENCES
[1] Monk, P.,and Munro J. L.,“Maths for Chemistry: A chemist’s toolkit for calculations”, Oxford University Press,
New York, 2010
[2] Montgomery C. D., Peek A. E., and Vining G. G., “Introduction to Linear Regression Analysis”, Fourth Edition.
John Wiley & Sons Inc., New Jersey, 2006.
[3] Neamvonk A., “A Modified Regula Falsi Method for Solving Root of Nonlinear Equations”, Asian Journal of
Applied Sciences, vol. 3, no. 4, pp. 776-778, 2015.
[4] Traub, J.F. “Iterative Methods for the Solution of Equations”, Prentice Hall, Englewood Cliffs, N.J., 1964.