The secant–homotopy continuation method

Chaos, Solitons and Fractals 32 (2007) 888–892 www.elsevier.com/locate/chaos

The secant–homotopy continuation method Tzong-Mou Wu Department of Mechanical Engineering, Far East College, Tainan 744, Taiwan, ROC Accepted 15 November 2005

Communicated by Prof. Ji-Huan He

Abstract A new secant–homotopy continuation formula is presented. In this paper, the traditional Newton–Raphson method is modified by the secant theory, and the homotopy continuation technique is applied to a new secant–homotopy continuation formula. By means of adjusting the auxiliary function, we can solve the nonlinear equations and guarantee the solutions exactly without divergence rather than the traditional numerical methods such as the Newton–Raphson method. Ó 2005 Elsevier Ltd. All rights reserved.

1. Introduction The homotopy continuation method was known as early as in the 1930s. This method was used by Kinematician in the 1960s at US for solving mechanism synthesis problems. The latest development was done by Morgan [1,2] at GM. We also have two important references: [3,4]. The continuation method gives a set of certain answers and a simple iteration process to obtain solutions more exactly. He [5–10] and El-Shahed [11] were devoted to the studies of the homotopy perturbation technique. Wu [12] applied the homotopy continuation method to search for all of the roots of the inverse kinematics problems of robots and obtained more, but not all, convergent answers than the Newton–Raphson method. Also, Wu [13–15] presented some techniques by combining Newton’s and homotopy methods to avoid divergence in solving nonlinear equations. As we know, once the derivative of the original function is not available, the Newton–Raphson method cannot be used. This paper combines both the secant theory and the homotopy continuation technique into a new secant–homotopy continuation formula to deal with nonlinear equations and provides a new concept of ‘‘adjustable auxiliary homotopy function’’ for the new secant–homotopy continuation formula to avoid the divergence and to guarantee the solutions.

2. The secant–homotopy continuation method As we know, there are two kinds of nonlinear equations: they are nonlinear equations and simultaneous nonlinear equations, shown as Eqs. (1) and (2), respectively:

E-mail address: [email protected] 0960-0779/$ - see front matter Ó 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.chaos.2005.11.041

T.-M. Wu / Chaos, Solitons and Fractals 32 (2007) 888–892

f ðxÞ ¼ 0

889

ð1Þ

and

FðXÞ ¼ 0;

i.e.,

8 f ðx; y; . . . ; zÞ ¼ 0 > > > > < gðx; y; . . . ; zÞ ¼ 0 .. > > . > > : hðx; y; . . . ; zÞ ¼ 0

ð2Þ

The Newton–Raphson iteration forms of these equations are xnþ1 ¼ xn 

f ðxn Þ f 0 ðxn Þ

ð3Þ

and 2

3 of ðxn ; y n ; . . .Þ of ðxn ; y n ; . . .Þ 3 2 3 2    6 7 xnþ1  xn f ðxn ; y n ; . . .Þ ox oy 6 7 6 ogðx ; y ; . . .Þ ogðx ; y ; . . .Þ 76 y  y 7 6 gðx ; y ; . . .Þ 7 7 6 76 n n n n n n n7 ¼ 6    74 nþ1 5 5 4 6 6 7 ox oy . . . .. 4 5 . .. .. .. . . . If the derivative f 0 ðxÞ or secant theory f 0 ðxn Þ ¼ lim

x!xn

of ox

ð4Þ

is difficult or not available, these iteration forms will be not used. Then we can apply the

f ðxÞ  f ðxn Þ f ðxn1 Þ  f ðxn Þ  x  xn xn1  xn

ð5Þ

and of ðxn ; y n ; . . .Þ f ðx; y n ; . . .Þ  f ðxn ; y n ; . . .Þ f ðxn1 ; y n ; . . .Þ  f ðxn ; y n ; . . .Þ ¼ lim  x!x ox x  xn xn1  xn n

ð6Þ

Substituting Eqs. (5) and (6) into Eqs. (3) and (4) to yield xnþ1 ¼ xn 

f ðxn Þðxn1  xn Þ f ðxn1 Þ  f ðxn Þ

ð7Þ

and 2

3 f ðxn1 ; y n ; . . .Þ  f ðxn ; y n ; . . .Þ f ðxn ; y n1 ; . . .Þ  f ðxn ; y n ; . . .Þ 3 2 3 2    6 7 xnþ1  xn f ðxn ; y n ; . . .Þ xn1  xn y n1  y n 6 7 6 gðx ; y ; . . .Þ  gðx ; y ; . . .Þ gðx ; y ; . . .Þ  gðx ; y ; . . .Þ 76 y  y 7 6 gðx ; y ; . . .Þ 7 6 7 76 n1 n n n n n1 n n n n n7 ¼ 6    74 nþ1 6 5 5 4 6 7 xn1  xn y n1  y n .. . . 4 5 . . .. .. .. . . .

ð8Þ

The above two equations will become infinite when f(xn1) = f(xn) or f(x) is an even function or the determinate of coefficient in Eq. (8) becomes or approaches zero. So, we have to apply the homotopy continuation technique to improve this defect. Given a set of equations in n variables x1, x2, . . . , xn. We modify the equations by omitting some of the terms and adding new ones until we have a new system of equations, the solutions to which may be easily known. We then deform the coefficients of the new system into the coefficients of the original system by a series of small increments to obtain the solutions. This is called the homotopy continuation technique. If we wish to find the solutions of Eqs. (1) and (2), we can choose a new simple start system called an auxiliary homotopy function GðXÞ ¼ 0

ð9Þ

The auxiliary homotopy function G(X) must be known or controllable and easy to solve. Then, we define the homotopy continuation function as HðX; tÞ  tFðXÞ þ ð1  tÞGðXÞ ¼ 0

ð10Þ

890

T.-M. Wu / Chaos, Solitons and Fractals 32 (2007) 888–892

where t is an arbitrary parameter and varies from 0 to 1, i.e., t 2 [0, 1]. Therefore, we have the following two boundary conditions: HðX; 0Þ ¼ GðXÞ HðX; 1Þ ¼ FðXÞ

ð11Þ

This is the famous homotopy continuation method. It is also called the Bootstrap method or the Parameter-Perturbation method, but these names did not become popular. Our goal in this study is to solve the H(X, t) = 0 instead of F(X) = 0 by varying the parameter t from 0 to 1 and thus avoid divergence. Hence, we rewrite Eqs. (7) and (8) as xnþ1 ¼ xn 

H ðxn ; tÞðxn1  xn Þ H ðxn1 ; tÞ  Hðxn ; tÞ

ð12Þ

and 2

3 H 1 ðxn1 ; y n ; . . .Þ  H 1 ðxn ; y n ; . . .Þ H 1 ðxn ; y n1 ; . . .Þ  H 1 ðxn ; y n ; . . .Þ 2 3 2 3    6 7 xnþ1  xn H 1 ðxn ; y n ; . . .Þ xn1  xn y n1  y n 6 7 6 H ðx ; y ; . . .Þ  H ðx ; y ; . . .Þ H ðx ; y ; . . .Þ  H ðx ; y ; . . .Þ 76 y  y 7 6 H ðx ; y ; . . .Þ 7 6 2 n1 n 76 7 2 n n 2 n n1 2 n n 2 n n n7 ¼ 6    74 nþ1 6 5 4 5 6 7 xn1  xn y n1  y n . . .. .. 4 5 .. .. .. . . . ð13Þ where the divergence occurs at H ðxn1 ; tÞ  H ðxn ; tÞ ¼ 0

or ! 0

ð14Þ

and 2

3 H 1 ðxn1 ; y n ; . . .Þ  H 1 ðxn ; y n ; . . .Þ H 1 ðxn ; y n1 ; . . .Þ  H 1 ðxn ; y n ; . . .Þ    6 7 xn1  xn y n1  y n 6 7 6 H ðx ; y ; . . .Þ  H ðx ; y ; . . .Þ H ðx ; y ; . . .Þ  H ðx ; y ; . . .Þ 7 7 ¼ 0 or ! 0 2 n1 n 2 n n 2 n n1 2 n n Det6    6 7 6 7 xn1  xn y n1  y n 4 5 .. .. .. . . .

ð15Þ

To avoid divergence, Wu [13,14] provided some useful choices about the auxiliary homotopy function. They are polynomial, triangle, exponential or have various combinations. By appropriately adjusting the auxiliary homotopy function, we can obtain the solutions of Eqs. (1) and (2). See the following examples. Example 1. Consider the following nonlinear algebraic equation: pffiffiffi f ðxÞ ¼ ex þ x þ 2 cos x  6 ¼ 0

ð16Þ

Its derivative is 1 f 0 ðxÞ ¼ ex þ pffiffiffi  2 sin x 2 x

ð17Þ

We find that the initial guess x0 = 0 will yield infinite by the Newton–Raphson method. If we choose the auxiliary homotopy function gðxÞ ¼ e~x  1 or ~x  1, respectively, to run the secant–homotopy iteration formula (12). The results therefore are obtained in Table 1.

Table 1 The results of traditional Newton–Raphson and the new secant–homotopy continuation method in Example 1 (x0, x1) (0, 0.1) (0.1, 0.2) (0.1, 0.2)

g(x) ~x

e 1 e~x  1 ~x  1

Newton–Raphson

Secant–homotopy

1 ffiffi p 2 0

88.8443300619566° 88.8443300619566° 88.8443300619594°

!1 88.8443300503586° 88.8443300503586°

T.-M. Wu / Chaos, Solitons and Fractals 32 (2007) 888–892

891

Table 2 The results of traditional Newton–Raphson and the new secant–homotopy continuation method in Example 2 (h10, h20) ^ (h11, h21)

(f 0 , g 0 )

Newton–Raphson

Secant–homotopy

(0°, 0°) ^ (0°+e, 0°+e)

ðf~  f0 ; g~  g0 Þ (sin h1, cos h2) ðf~  f0 ; g~  g0 Þ (sin h1, cos h2) ðf~  f0 ; g~  g0 Þ

Singular

Singular

Singular

Singular (153.61°, 37.67°) (93.77°, 209.71°)

(30°, 30°) ^ (30°+e, 30°+e) (30°, 30.1°) ^ (30°+e, 30.1°+e)

(153.61°, 37.67°)

Example 2. Consider the robot manipulator defined by [12]  f ¼ L1 Ch1 þ L2 Ch2  Px ¼ 0 g ¼ L1 Sh1 þ L2 Sh2  Py ¼ 0

ð18Þ

Assume that the robotic links’ length are L1 = 2, L2 = 1 and if we would like to guide its gripper P passing through our desired location (Px, Py) = (1, 1.5). We have to determine the necessary links’ angle (h1, h2) in Eq. (18) by the homotopy technique. Firstly, we choose a new known and a controllable start system as [12]  0 f ¼ f  f0 ð19Þ g0 ¼ g  g0 where 

f0 ¼ L1 Ch10 þ L2 Ch20  Px ¼ 0 g0 ¼ L1 Sh10 þ L2 Sh20  Py ¼ 0

Secondly, we define the homotopy kinematic equations of this robot manipulator as  H 1 ¼ tf þ ð1  tÞf 0 ¼ f þ ð1  tÞðf0 Þ ¼ 0 H 2 ¼ tg þ ð1  tÞg0 ¼ g þ ð1  tÞðg0 Þ ¼ 0

ð20Þ

ð21Þ

Then, we run Eq. (21) by the Newton–Raphson method and change the links angle h1 and h2 from 0° to 360°, respectively, the homotopy parameter t from 0 to 1 (dt = 0.01). We obtain the results in Table 2 (e = 0.01). Some initial guesses will become singular without adjusting the auxiliary homotopy function (f 0 , g 0 ) in [12]. By appropriately adjusting the auxiliary homotopy function, we will obtain in total two sets of the roots of this problem without any divergence: ðh1 ; h2 Þ ¼ ð93:77 ; 209:71 Þ _ ð153:61 ; 37:67 Þ

ð22Þ

Clearly, we find the use of the traditional Newton–Raphson method will easily become divergent when the bad initial guesses were chosen or when the derivative was not available. However, this situation can be avoided in the new secant–homotopy continuation method no matter what the initial guesses were or if we propose the appropriate auxiliary homotopy function G(X) by the rules in [13,14].

3. Conclusion The well-known Newton–Raphson method is widely used to solve the nonlinear equations until recently. However, it cannot be operated well when the bad initial guesses were provided and its derivative was not available. The secant theory can be applied to improve these defects as well as the homotopy continuation technique can guarantee the solutions by some controllable paths. This paper combines these two methods to a new secant–homotopy continuation method to solve the nonlinear equations. We can obtain the outcome more efficiently by this new method.

References [1] Morgan AP. A method for computing all solutions to systems of polynomial equations. GM Research Publication, GMR 3651; 1981. [2] Morgan AP. Solving polynomial systems using continuation for engineering and scientific problems. Englewood Cliffs, NJ: Prentice-Hall Book Company; 1987.

892

T.-M. Wu / Chaos, Solitons and Fractals 32 (2007) 888–892

[3] Garcia CB, Zangwill WI. Pathways to solutions, fixed points, and equilibria. Englewood Cliffs, NJ: Prentice-Hall Book Company; 1981. [4] Allgower EL, Georg K. Numerical continuation methods: an introduction. New York: Springer-Verlag; 1990. [5] He JH. Homotopy perturbation technique. Comput Meth Appl Mech Eng 1999;178(3–4):257–62. [6] He JH. A coupling method of a homotopy technique and a perturbation technique for non-linear problems. Int J Non-Linear Mech 2000;35(1):37–43. [7] He JH. Homotopy perturbation method: a new nonlinear analytical technique. Appl Math Comput 2003;135(1):73–9. [8] He JH. The homotopy perturbation method for nonlinear oscillators with discontinuities. Appl Math Comput 2004;151(1):287–92. [9] He JH. Homotopy perturbation method for bifurcation of nonlinear problems. Int J Nonlinear Sci Numer Simul 2005;6(2):207–8. [10] He JH. Application of homotopy perturbation method to nonlinear wave equations. Chaos, Solitons & Fractals 2005;26:695–700. [11] El-Shahed M. Application of He’s homotopy perturbation method to Volterra’s Integro-differential equation. Int J Nonlinear Sci Numer Simul 2005;6(2):163–8. [12] Wu TM. Searching all the roots of inverse kinematics problem of robot by homotopy continuation method. J Appl Sci 2005;5(4):666–73. [13] Wu TM. A study of convergence on the Newton-homotopy continuation method. Appl Math Comput 2005;168(2):1169–74. [14] Wu TM. A modified formula of ancient Chinese algorithm by the homotopy continuation technique. Appl Math Comput 2005;165(1):31–5. [15] Wu TM. Solving the nonlinear equations by the Newton-homotopy continuation method with adjustable auxiliary homotopy function. Appl Math Comput; in press.