You are on page 1of 10

Journal of Computational and Applied Mathematics 275 (2015) 228237

Contents lists available at ScienceDirect

Journal of Computational and Applied


Mathematics
journal homepage: www.elsevier.com/locate/cam

The application of Newtons method in vector form for


solving nonlinear scalar equations where the classical
Newton method fails
Higinio Ramos a,b, , J. Vigo-Aguiar a
a

Scientific Computing Group, University of Salamanca, Spain

Escuela Politcnica Superior de Zamora, University of Salamanca, Spain

article

info

Article history:
Received 9 July 2014
Received in revised form 31 July 2014
MSC:
65H05
65H10
Keywords:
Nonlinear equations
Newton method
Cycles of period two
Approximate solutions
Iteration function

abstract
In this paper we propose a strategy to obtain the solutions of a scalar equation f (x) = 0
through solving an associated system of two equations. In this way, the solutions of the
associated system lying on the identity line provide solutions of the given equation. In most
cases, the associated system cannot be solved exactly. Solving this system with the Newton
method for systems may result more efficient than the application of the scalar Newton
method to the simpler equation. In some pathological cases in which the scalar Newton
method does not provide solution, this strategy works appropriately. Some examples are
given to illustrate the performance of the proposed strategy.
2014 Elsevier B.V. All rights reserved.

1. Introduction
Finding the roots of a nonlinear equation f (x) = 0 with f (x) : X X , X R, is a classical and important problem in
science and engineering. There are very few functions for which the roots can be expressed explicitly in closed form. Thus,
the solutions must be obtained approximately, relying on numerical techniques based on iterative processes [1]. Given an
initial guess for the root, x0 , successive approximations are obtained by means of an iteration function (IF) : X X
xn+1 = (xn ),

n = 0, 1, 2 . . .

which will often converge to a root of the equation, provided that some convergence criterion is satisfied.
If there exists a real number p 1 and a nonzero constant A > 0 such that

| (xn ) |
=A
n |xn |p
lim

then p is called the order of convergence, and A is the asymptotic error constant of the method defined by . For such a
method, the error |en+1 | = |xn+1 | is proportional to |en |p = |xn |p as n . In practice, the order of convergence is often determined by using SchrderTraubs theorem [2] which states that being an IF with (r ) continuous in
a neighborhood of , then is of order r if and only if

() = ,

() = = (r 1) () = 0,

(r ) () = 0.

Corresponding author at: Scientific Computing Group, University of Salamanca, Spain. Tel.: +34 980545000; fax: +34 980545002.
E-mail addresses: higra@usal.es (H. Ramos), jvigo@usal.es (J. Vigo-Aguiar).

http://dx.doi.org/10.1016/j.cam.2014.07.028
0377-0427/ 2014 Elsevier B.V. All rights reserved.

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

229

Given an IF , the orbit of x0 X under is defined as the set given by the sequence of points
orb(x0 ) = x0 , (x0 ), . . . , k (x0 ), . . .

where k (x) denotes the k-fold composition of with itself applied to x0 , that is, k (x0 ) = ( (. . . (x0 ) . . .)) where
is applied k times. The point x0 is called the seed of the orbit. A point x0 is a fixed or equilibrium point of if (x0 ) = x0 .
Note that the orbit of a fixed point x0 consists on the constant sequence {x0 }.
If n (x0 ) = x0 and j (x0 ) = x0 for 0 < j < n then x0 is called a point with period n. In this case the corresponding
orbit is said to be a periodic orbit of period n, or a n-cycle. All points on the orbit of x0 have the same period. Note that if x0
is a periodic point of period n 1 then x0 is a fixed point of n , and the corresponding orbit has only n different points.
Similarly, if x0 is a periodic point of period n 1 then x0 is also fixed by kn for any positive integer k.
A point x0 is called eventually fixed or eventually periodic if x0 itself is not fixed or periodic, but some point on orb(x0 ) is
fixed or periodic.
A fixed point x0 of is attracting if | (x0 )| < 1, is repelling if | (x0 )| > 1, and is indifferent or neutral if | (x0 )| = 1.
Readers interested in the above concepts, belonging to the topic of dynamical systems, may see Refs. [35].
2. The NewtonRaphson method
We will consider that the function f (x) whose root need to be calculated is a scalar real one, f : R R. Among the
iteration methods, the Newton method is probably the best known and most reliable and most used algorithm [6,7]. There
are many ways to obtain Newton method. We will offer a brief outline of the geometric approach. The basic idea behind
Newtons method relies in approximating f (x) with the best linear approximation passing for an initial guess x0 which is
near the root . This best linear approximation is the tangent line to the graph of f (x) at (x0 , f (x0 )). Provided f (x0 ) = 0, the
intersection of this line with the horizontal axis results in
f (x0 )
.
x1 = x0
f ( x0 )
This process can be continued with a new approximation x1 to get x2 , and so on. In this way, the Newton iteration function
is given by
f (x)
.
Nf (x) = x
f (x)
It converges quadratically to simple zeros and linearly to multiple zeros, provided a good approximation is at hand. There
exist different results about semilocal convergence of Newtons method in which precise bounds are given for balls of
convergence and uniqueness. Nevertheless, the dynamics of the Newton IF Nf may be very complicated, even for apparently
simple functions. We expect that the sequence obtained through the IF will converge to the desired root of f (x). Nevertheless,
depending on the function under consideration and the initial point selected, the orbit of this point may not always converge
successfully. Some pathological situations in the application of Newtons method follow:
1. Newtons method may fail if at any stage of computation the derivative of the function f (x) is either zero or very small.
For low values of the derivative, the Newton iteration offshoots away from the current point of iteration and may possibly
converge to a root far away from the desired one.
2. It may fail also to converge to the desired root in case the initial point is far from this root.

3. For certain forms of equations, Newton method diverges. A typical example of this situation is the function f (x) = 3 x,
for which the iteration function is Nf (x) = 2x, which results in a divergent sequence whatever the initial guess x0 = 0 is.
4. In some cases, the iterations oscillate. For example, this is the situation if the initial guess is in an orbit of period n or is
eventually periodic of period n.
5. The convergence of Newtons method may be very slow near roots of multiplicity greater than one. In fact, for multiple
roots the Newton method looses its quadratic convergence.
6. Finally, the most dramatic situation occurs when the iteration function Nf exhibits chaotic behavior, in which there are
orbits that wander from here to there aimlessly.
An important result to be considered here is the following theorem whose proof may be found in [3, p. 167].
Theorem 1 (Newtons Fixed Point Theorem). is a root of f (x) of multiplicity k if and only if is a fixed point of the IF Nf .
Moreover, such a fixed point is always attracting.
The importance of this result resides in the fact that the iteration function Nf does not have extraneous fixed points
(which are not solutions of f (x) = 0). These extraneous fixed points appear in other iteration functions of well-known
methods such as the Halley method or the Chebyshev method.
3. The associated system to the scalar equation
Let us consider a particularization of a result in [8].
Proposition 1. Let be f (x) : R R a differentiable function, and letO = {x1 , x2 } R withx1 = x2 . Then O is a 2-cycle of the
Newton IF Nf if and only if x = x1 , y = x2 is a solution of the system Nf (x) = y, Nf (y) = x .

230

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

From the above proposition and Theorem 1 it is easy to get the following main result, in which is based the proposed
strategy for obtaining the roots of the equation f (x) = 0.
Proposition
2. Let be f(x) : R R a differentiable function and Nf (x) the corresponding Newton IF. Any solution of the system

Nf (x) = y, Nf (y) = x is of one of the following types

x = x1 , y = x2 with x1 = x2 , which means that the set {x1 , x2 } is a 2-cycle


x = y = , which means that is a root of f (x) = 0.
Thus, for solving the
equation f (x) = 0, we may consider to solve what we call the associated system given by
Nf (x) = y, Nf (y) = x . If we may ensure by some means that the IF Nf has no periodic orbits of period 2, then to get a
solution of the system will be equivalent to get a solution of the scalar equation f (x) = 0.
The associated system may be solved by different procedures, in some cases in algebraic way, but in general we will
consider the Newton method, which also may be used for solving systems of equations [7,9]. For solving a system of
the form {f1 (x, y) = 0, f2 (x, y) = 0} using Newton method, the strategy is the same as that used by Newtons method for
solving a single nonlinear equation: to linearize each of the equations. Using the notation F(x, y) = (f1 (x, y), f2 (x, y))T with
X = (x, y)T , the solution of the above system using the Newton method is given by
X(k+1) = X(k) F (X(k) )

F(X(k) )

where F (X(k) ) is the Jacobian matrix. To obtain the computational solution an initial approximation vector X(0) = (x(0) , y(0) )
must be provided. Although at first glance it might seem that solving a system could be more difficult than solving a scalar
equation (and usually it is so), we will show different examples where the opposite occurs.
3.0.1. A local convergence result
The following result shows that under local conditions, solving the associated system leads to the solution of the equation
f (x) = 0.
Proposition 3. Let the function f (x) be defined and twice continuously differentiable on the closed finite interval [a, b] R. If
the following conditions are satisfied
1.
2.
3.

f (a)f (b) < 0


f (x) = 0, x [a, b]
f (x) is either 0 or 0 for all x [a, b]

then there is a unique solution of the system Nf (x) = y, Nf (y) = x


f () = 0.

where Nf is the Newton IF of f (x), being x = y = with

Proof. Condition (1) merely states that f (a) and f (b) have different signs, and hence that the equation f (x) = 0 has at least
one root in (a, b). By virtue of condition (2) there is only one solution, which we will call . Condition (3) states that the
graph of f (x) is either concave from above or concave from below.
There are four different situations covered by the theorem:
(I)
(II)
(III)
(IV)

f (a)
f (a)
f (a)
f (a)

< 0,
< 0,
> 0,
> 0,

f ( b)
f ( b)
f ( b)
f ( b)

> 0,
< 0,
> 0,
< 0,

f (x)
f (x)
f (x)
f (x)

0
0
0
0

but all cases may be reduced to one of them by using appropriate transformations (see [10, p. 79]). Thus, it suffices to prove
the theorem in the case (I). In this case the graph of f(x) looks as given in Fig.
1.
It is obvious that the set of solutions of the system Nf (x) = y, Nf (y) = x in [a, b] is not empty as x = y = is a solution.
Let us see that this is the unique solution. If there is a solution different of that given by x = y = , say x = xk , y = yk , we
may assume without loss of generality that xk yk . We assert that either xk = or yk = . In other case we would have
three possibilities:
(i) xk yk <
(ii) xk < < yk
(iii) < xk yk .
Let us see that these cases result in contradictions. For cases (i) and (ii) we have that f (xk ) < 0. Expanding f (x) in Taylor
series about yk and taking x = it results that
0 = f () = f (yk ) + f (yk )( yk ) +
or
0 f (yk ) + f (yk )( yk )

1
f (k )( yk )2 f (yk ) + f (yk )( yk )
2

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

231

Fig. 1. Graph of a function f (x) verifying conditions (I) in Proposition 3.


Table 1
List of functions and the corresponding roots to be approximated.
Function
f1 (x) =

Root
2

x ex

6
f2 (x) = ex +7x30 1

0
1.627818561918557849123154131

20

f3 (x) = ex + x 20

1.704885352466915992721311334

f4 (x) = x3 + log(x) + 0.15 cos(50x)

0.717519716444759257246717966


f5 (x) = 2x sin x

1.657400240258006123793738672

from which we have that

yk

f (yk )
f (yk )

= xk

which is a contradiction with the hypothesis that xk < . Thus, cases (i) and (ii) are not possible.
For case (iii) we have that f (xk ) > 0, f (xk ) > 0, and thus it results that
f ( xk )
y k = xk
< xk
f (xk )
which contradicts the hypothesis xk yk .
Hence, either xk = or yk = . If xk = then it follows that
f ()
f ( xk )
=
= ,
y k = xk
f (xk )
f ()
and xk = yk = as stated. Similarly, if yk = then we have
f (yk )
f ()
xk = yk
=
= ,
f (yk )
f ()
which results in xk = yk = . Thus the proof of the proposition is complete.
4. Application examples
In order to test the efficiency of the strategy proposed here we are going to evaluate the number of iterations required
to reach a specified level of convergence for different problems. We have considered the command FindRoot in the
Mathematica program, taking the options Method->"Newton" and WorkingPrecision->30, which specifies how
many digits of precision should be maintained in internal computations. The stopping criterion is given by xN xN 1 <
1015 and f (xN ) < 1015 .
In Table 1 appear the functions considered, together with the roots we want to approximate.

232

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

1.0
0.5

0.5
1.0
Fig. 2. Plot of the function f1 (x).

2
2

Fig. 3. Plot of the function Nf1 (x) with some iterations taking x0 = 0.002.

4.1. Example 1
The function f1 (x) has only the root = 0 as can be seen in Fig. 2.
2(3x3 +x)

For x = 0 the Newton IF results in Nf1 (x) = 6x2 1 . For any initial guess x0 = 0 the iteration with this function results
in a divergent sequence, and the Newton method is not capable to get an approximation to the solution. The cobweb plot in
Fig. 3 shows the dynamical behavior of the IF Nf1 (x) where we observe that even for an initial guess very close to the solution
we obtain a divergence sequence.

On the other hand, the associated system Nf1 (x) = y, Nf1 (y) = x reads

2 3x3 + x

6x2 1

= y,

2 3y3 + y
6y2 1

=x .

Solving this system using the command Solve in the Mathematica program we obtain that the unique real solution is
x = y = 0, which is the root of f1 (x) = 0. This proves that the IF Nf1 (x) does not have any 2-cycle. Solving the above system
using the Newton method with initial guess (x0 , y0 )T = (2, 2)T we obtain after 9 iterations the approximate solution with
the required precision.
4.2. Example 2
The function f2 (x) has two roots, as may be seen in Fig. 4. We are interested in the positive root, 1 , while the negative
one could be approximated similarly. The Newton IF is
Nf2 (x) = x +

6
ex 7x+30 1

6x5 + 7

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

233

Fig. 4. Graphs of the functions f2 (x) (left) and Nf2 (x) (right).
Table 2
Data corresponding to the function f2 (x).
x0 /(x0 , y0 )

Time

Iterations

Scalar Newton

4
2
1.6
1.5

1.016
0.015
0.015

4104
56
15
Overflow

Vector Newton

(1.0, 2.0)
(1.0, 4.0)
(0.5, 6.0)
(0.0, 10.0)

0.046
0.046
0.016
0.062

31
30
36
38

and is located under the diagonal line y = x and for x tends asymptotically to this diagonal. Thus, from any initial
guess x0 1 the convergence of the iterative sequence produced by Nf2 (x) will be very slow. Looking at the graph of the
function f2 (x) in Fig. 4 we see that if x0 < 1 the tangent line is almost horizontal and the next iteration will be far away
from the root, and if x0 > 1 the tangent line is very steep and the Newton sequence will approach very slowly towards the
root. The scalar Newton method works acceptably only if the initial guess is very close to the root.
In Table 2 appear the data corresponding to the approximation of the root by using the scalar Newton method applied to
f2 (x) and the Newton method applied to the associated system: initial guesses, computational time (in seconds) and number
of iterations.
It can also be seen from Table 2 that a less number of iterations is required to reach the root with the proposed method
than that required with Newtons method, except if the initial guess is very close to the root.
We note that in this case there are no cycles of period 2 either. With the help of the program Mathematica we have plot
the graphs of the implicit curves in the associated system

6
ex 7x+30 1

6x5 + 7

6
ey 7y+30 1

+ x = y,

6y5 + 7

+y=x

near the roots, which appear in Fig. 5. We see that there are only two intersection points between the curves, which are on
the diagonal y = x, meaning that these are the two roots of the equation f2 (x) = 0

(1 = 1.627818561918557849123154131, 2 = 1.872516561317824507097057829).
4.3. Example 3
The function f3 (x) has two roots, being f3 (x) > 0 out of these roots. We are interested in the positive one. The negative
zero could be approximated similarly. The Newton iteration function is
2

Nf3 (x) = x

ex + x 20

20 2ex x + 1

which tends asymptotically to the graph of y = x for x . The behavior of the iterations is similar to that of the
above problem. In Table 3 appear the data corresponding to the approximation of the root by using the scalar Newton
method applied to f3 (x) and the vector Newton method applied to the associated system. As can be shown in Fig. 6, for this

234

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237
Table 3
Data corresponding to the function f3 (x).
x0 /(x0 , y0 )

Time

Iterations

Scalar Newton

10
4
2
1

0.828
0.312
0.218
0.234

2517
836
588
570

Vector Newton

(1.0, 2.0)
(1.0, 4.0)
(0.5, 6.0)
(0.0, 10.0)

0.015
0.015
0.015
0.015

9
9
11
11

1.80

1.80

1.75
1.85
1.70
1.65

1.90

1.60
1.95
1.55
2.00
2.00

1.95

1.90

1.85

1.50
1.50

1.80

1.55

1.60

1.65

1.70

1.75

1.80

Fig. 5. Detailed graphs of the implicit curves in the associated system to f2 (x), near the roots. The roots are the intersections over the diagonal line y = x.

2
2

Fig. 6. Graphs of the implicit curves in the associated system to f3 (x). The two roots are the intersections over the diagonal line y = x.

problem there are no 2-cycles, and the graphs of the implicit curves in the associated system intersect only on the two roots
(1 = 1.704885352466915992721311334, 2 = 1.754947637178101198447348684).

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

235

0.80

0.75

0.70

0.65

0.60
0.60

0.65

0.70

0.75

0.80

Fig. 7. Plot showing the intersections of the graphs of the implicit curves in the associated system to f4 (x), near the root. The root corresponds to the
intersection point over y = x, the other intersection points correspond to 2-cycles.

We observe that the proposed strategy is more efficient than solving f (x) = 0 with Newtons method. Although the
Newton method for systems needs to consider the Jacobians, there are so few iterations, even in a wide interval, that the
computational time is much less than the time needed for the scalar Newton method.
4.4. Example 4
This example corresponds to a function that has only one real root. Due to the oscillatory character of the function, there
are a lot of 2-cycles of the Newton IF Nf4 (x). In Fig. 7 we can see the intersections of the graphs of the two implicit curves of
the associated system to f4 (x) on the rectangle [0.6, 0.8] [0.6, 0.8]. There is only one intersection over the diagonal which
corresponds to the unique root = 0.717519716444759257246717966, the other intersections correspond to different
2-cycles. Some of the 2-cycles are shown in Fig. 8. These 2-cycles have been obtained solving the associated systems taking
appropriate initial guesses. The orbits are
orb1 = {0.692198885685395552, 0.748996030431394228}
orb2 = {0.634597589403757766, 0.755453007690175635}
orb3 = {0.687693676287228638, 0.812103547553422787} .
For this problem there are no significant differences between the performance of both approaches, scalar or vector Newton
procedures, but we must note that the initial guesses in both cases must be chosen near the root in order to get good
performances. We note that the two intersections in the curves of the associated system closer to a root determine an
interval where the scalar Newton method converges. Thus, for any initial guess, x0 , in the interval (0.692198885685395552,
0.748996030431394228) determined by the two points in the orbit orb1 there is convergence of the Newton iteration to the
intended root.
4.5. Example 5
This last example
to a curious example appeared in [11,12] for which taking the initial guess x0 = 1/2 the
corresponds

Newton sequence Nf (xn ) 0 but f (0) = 0 and Nf (0) = 0. This function is a symmetric one with respect to the vertical
axis that has two roots, as can be seen in Fig. 9.
In Fig. 10 we observe that there are two intersection points with the diagonal line, which correspond to the zeros of the function, and that there are a number of infinite 2-cycles. The 2-cycle closer to the root determines an interval where the scalar Newton method converges to the positive root, and is given by (0.7461032276136741263663,
2.68369772675810300822294). Out of this interval we cannot say nothing about the convergence to the intended root,

236

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

0.3

0.3

0.3

0.2

0.2

0.2

0.1

0.1

0.1

0.6

0.7

0.8

0.9

0.6

0.7

0.8

0.9

0.6

0.1

0.1

0.1

0.2

0.2

0.2

0.3

0.3

0.3

0.7

0.8

0.9

Fig. 8. Graphical representation of different 2-cycles of the iteration function Nf4 (x) near the root.

Fig. 9. Graph of the function f5 (x).

although it may have other guesses that produce convergence to this root. Nevertheless, taking the initial guess (x0 , y0 ) =
(0.1, 4) for solving the associated Newton system with the vector Newton method we obtain after 18 iterations the desired
root within the required tolerance.
5. Conclusions
It is well-known that in certain cases the Newton method does not work satisfactory for solving the scalar equation
f (x) = 0. We have presented a strategy for obtaining the solutions of this equation through solving an associated system
of two equations related with the Newton iteration function. The solutions of this system provide not only the roots of the
scalar equation, but also the orbits of period two of the Newton iteration. In most cases the associated system cannot be
solved exactly. In this situation we must use an iterative procedure for solving the system, among which we may use the
Newton method for systems, assuming an appropriate initial guess is provided.
Some numerical examples are shown to see the performance of the proposed strategy. Some of them are not capable of
being solved by the scalar Newton method. The strategy may be extended to obtain orbits of any periods.

H. Ramos, J. Vigo-Aguiar / Journal of Computational and Applied Mathematics 275 (2015) 228237

237

4
4

Fig. 10. Plot showing the intersections of the graphs of the implicit curves in the associated system to f5 (x), near the roots. The roots correspond to the
intersection points over y = x, the other intersection points correspond to 2-cycles.

The closest orbit to the intended root provides an interval of convergence for the scalar Newton method. An open question
is how to get the regions in the plane for which we obtain convergence of the vector Newton method to the zeros of f (x) or
to the 2-cycles points of Nf (x).
Acknowledgments
We thank the referees and the principal editor for their relevant and useful comments which provided insights that
helped to improve the paper.
References
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
[10]
[11]
[12]

J.M. Ortega, W.C. Rheinboldt, Iterative Solution of Nonlinear Equations in Banach Spaces, Academic Press, New York, 1970.
J.F. Traub, Iterative Methods for the Solution of Equations, Chelsea Publishing Company, New York, 1997.
R. Devaney, A First Course in Chaotic Dynamical Systems, Addison-Wesley, Boston, 1992.
R.A. Holmgren, A First Course in Discrete Dynamical Systems, Springer-Verlag, New York, 1994.
M. Martelli, Introduction to Discrete Dynamical Systems and Chaos, John Wiley & Sons, New York, 1999.
C.T. Kelley, Solving Nonlinear Equations with Newtons Method, SIAM, Philadelphia, 2003.
P. Deuflhard, Newton Methods for Nonlinear Problems. Affine Invariance and Adaptive Algorithms, Springer, Berlin, 2011.
S. Plaza, V. Vergara, Existence of attracting periodic orbits for the Newtons method, Sci. Ser. A: Math. Sci. 7 (2001) 3136.
I.K. Argyros, Convergence and Applications of Newton-Type Iterations, Springer, New York, 2008.
P. Henrici, Elements of Numerical Analysis, John Wiley and Sons, New York, 1964.
P. Horton, No fooling! Newtons method can be fooled, Math. Mag. 80 (2007) 383387.
J. Merikoski, T. Tossavainen, Fooling Newtons method as much as one can, Math. Mag. 80 (2009) 134135.

You might also like