Applied Mathematics and Computation 169 (2005) 355–365 www.elsevier.com/locate/amc
Solving the Klein–Gordon equation by means of the homotopy analysis method Qiang Sun School of Naval Architecture, Ocean and Engineering, Shanghai Jiao Tong University, Shanghai 200030, China
Abstract An analytic technique, namely the homotopy analysis method, is applied to solve the nonlinear travelling waves governed by the Klein–Gordon equation. The phase speed and the solution, which are dependent on the amplitude a, are given and valid in the whole region 0 6 a < + 1. Ó 2004 Elsevier Inc. All rights reserved. Keywords: Klein–Gordon equation; Travelling waves; Phase speed; Analytic solution; Homotopy analysis method
1. Introduction Consider the travelling waves governed by the Klein–Gordon equation [1–3] utt a2 uxx þ c2 u ¼ bu3 ;
ð1Þ
where a, b, and c are physical constants. If the nonlinear term bu3 is neglected, the above equation describes the travelling harmonic wave [1,2] E-mail address:
[email protected] 0096-3003/$ - see front matter Ó 2004 Elsevier Inc. All rights reserved. doi:10.1016/j.amc.2004.09.056
356
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
u ¼ a cosðkx xtÞ;
x2 ¼ a2 k 2 þ c2 ;
where k is wave-number, and x is frequency. The phase speed, x/k, is independent on the amplitude a. However, when the nonlinear term is considered, the phase speed is in general a function of the amplitude a. Many researchers have applied perturbation techniques [1,4,5] to solve the Klein–Gordon equation. However, nearly all of these perturbation results become invalid for large amplitude a. In this paper, the homotopy analysis method (HAM) [6–15] is applied to give the phase speed c valid for all possible amplitude a.
2. Mathematical formulation 2.1. Rule of the solution expression Obviously, the solution of the travelling waves of Eq. (1) can be expressed by um ðx; tÞ ¼
þ1 X
am cos mðkx xtÞ;
m P 1:
ð2Þ
m¼1
Setting n ¼ kx xt;
ð3Þ
it holds uðnÞ ¼
þ1 X
am cos mn;
m P 1;
ð4Þ
m¼1
and Eq. (1) becomes ðc2 a2 Þu00 þ
c2 b u ¼ 2 u3 ; k2 k
ð5Þ
where the prime denotes the differentiation with respect to n. Eq. (4) provides us with the Rule of Solution Expression. 2.2. Initial guess and auxiliary linear operator According to the Rule of Solution Expression denoted by (4), it is natural to choose u0 ¼ a cos n
ð6Þ
as the initial approximation of u(n), where a is the amplitude. Let c0 denote the initial guess of the phase speed c. Under the Rule of Solution Expression denoted by (4), it is obvious to choose the auxiliary linear operator
L½Uðn; qÞ ¼
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
357
o2 U þ Uðn; qÞ on2
ð7Þ
with the property L½C 1 sinðnÞ þ C 2 cosðnÞ ¼ 0;
ð8Þ
where C1 and C2 are coefficients. 2.3. Zero-order deformation equation The homotopy analysis method is based on such continuous variations U(n; q) and X(q) that, as the embedding parameter q increases from 0 to 1, U(n; q) and X(q) vary from the initial guess u0(n) and c0 to the exact solution u(n) and c, respectively. To ensure this, let h 5 0 denote an auxiliary parameter, H(n) an auxiliary function, q 2 [0, 1] an embedding parameter. From Eq. (1), we define the nonlinear operator N½Uðn; qÞ; XðqÞ ¼ ½X2 ðqÞ a2
o2 U c 2 b þ Uðn; qÞ 2 U3 ðn; qÞ; k on2 k 2
ð9Þ
and then construct such a homotopy H½Uðn; qÞ; XðqÞ ¼ ð1 qÞL½Uðn; qÞ u0 hqH ðnÞN½Uðn; qÞ; XðqÞ :
ð10Þ
Setting H½Uðn; qÞ; XðqÞ ¼ 0: We have the zero-order deformation equation hqH ðnÞN½Uðn; qÞ; XðqÞ : ð1 qÞL½Uðn; qÞ u0 ¼
ð11Þ
When q = 0 and 1, we have from Eq. (11) that Uðn; 0Þ ¼ u0 ðnÞ; Xð0Þ ¼ c0 ;
Uðn; 1Þ ¼ uðnÞ;
Xð1Þ ¼ c;
ð12Þ ð13Þ
respectively. Thus, U(n; q) and X(q) can be expanded in the Maclaurin series with respect to q in the form Uðn; qÞ ¼ Uðn; 0Þ þ
þ1 X
um ðnÞqm ;
ð14Þ
m¼1
XðqÞ ¼ Xð0Þ þ
þ1 X m¼1
c m qm ;
ð15Þ
358
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
where
1 om Uðn; qÞ um ðnÞ ¼ ; m! oqm q¼0
ð16Þ
1 om XðqÞ : m! oqm q¼0
ð17Þ
cm ¼
Note that the zero-order deformation equation (11) contains the auxiliary parameter ⁄ and the auxiliary function H(n) so that u(n; q) is dependent upon h and H(n). Assuming that both ⁄ and H(n) are so properly chosen that the series (16) and (17) are convergent at q = 1, we have from (14) and (15) that uðnÞ ¼ u0 þ
þ1 X
ð18Þ
um ;
m¼1
c ¼ c0 þ
þ1 X
ð19Þ
cm :
m¼1
50
40
c
30
20
10
0
0
10
20
30
40
50
60
a Fig. 1. Analytic approximations by the homotopy analysis method with different h when k = 1, a = 1, b = 1, and c = 1. Solid line with circle symbols: 19th-order approximation when h = 1/10; dash-dotted line: 24th-order approximation when h = 1/100; dash-dot-dotted line: 31st-order approximation when h = 1/1000; solid line: 40th-order approximation when h = 1/10,000.
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
359
2.4. High-order deformation equation Differentiating the zero-order deformation equation (11) m times with respect to q, then setting q = 0, and finally dividing it by m!, we have the so-called mth-order deformation equation L½um ðnÞ vm um1 ðnÞ ¼ hH ðnÞRm ðnÞ;
ð20Þ
where Rm ðnÞ ¼
m¼1 X
u00m1i
i¼0
i X
cj cij a2 u00m1 þ
j¼0
m1 i X c2 b X u u uj uij m1 m1i k2 k 2 i¼0 j¼0
ð21Þ and vm ¼
0; m 6 1; 1; m > 1:
ð22Þ
10 9 k=1/5
8 7
c
6 k=1/2
5 4
k=1
3
k=2
2
k=5
1 0
0
1
2
3
4
5
a Fig. 2. Comparison of perturbation results with homotopy analysis approximations when h ¼ 1=c20 , a = 1, b = 1, and c = 1. Solid line with square symbols: perturbation solutions O(a12); solid line: 29th-order approximations by the homotopy analysis method.
360
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
2.5. Rule of coefficient-ergodicity Under the Rule of Solution Expression denoted by (4), the auxiliary function H(n) can be chosen as H(n) = 1. Note that we have freedom to choose the value of the auxiliary parameter ⁄, which provides us with a convenient way to adjust the convergence region of solution series, as shown in the following section.
3. Results 3.1. Solution expression According to the Rule of the Solution denoted by (4), the term Rm(n) can be rewritten as Rm ðnÞ ¼
WðmÞ X
ð23Þ
bm;n cosðnnÞ;
n¼1
30
k=1/5
25
c
20
15
k=1/2
10 k=1
5
k=2 k=5
0
0
1
2
3
4
5
a Fig. 3. Comparison of perturbation results with homotopy analysis approximations when h ¼ 1=c20 , a = 2, b = 5, and c = 3. Solid line with square symbols: perturbation solutions O(a12); solid line: 29th-order approximations by the homotopy analysis method.
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
361
where the integer W(m) is dependent on m and the nonlinear terms of the original Eq. (5), and the coefficient Z 2 p bm;n ¼ Rm ðnÞ cosðnnÞ dn ð24Þ p 0 becomes zero when n > W(m). Due to the definition of L denoted by (7), the solution of the mth-order deformation equation involves the secular terms n cosðnÞ if bm,1 5 0. However, this disobeys the Rule of Solution Expression denoted by (4). Thus, bm,1 must be enforced to zero, i.e. bm;1 ¼ 0:
ð25Þ
This provides us with an algebraic equation for cm1. Then, the solution of the mth-order deformation equation (20) is um ðnÞ ¼ vm um1 ðnÞ þ h
WðmÞ X n¼2
bm;n cosðnnÞ þ C 1 sinðnÞ þ C 2 cosðnÞ; ð1 n2 Þ ð26Þ
18 16 14 k=1/5
12
c
10 8 k=1/2
6 k=1
4
k=2
k=5
2 0
0
1
2
3
4
5
a Fig. 4. Comparison of perturbation results with analytic approximations when h ¼ 1=c20 , a = 3, b = 2/3, and c = 2. Solid line with square symbols: perturbation solutions O(a12); solid line: 29thorder approximations by the homotopy analysis method.
362
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
where C1 and C2 are two integral constants. Using the Rule of Solution Expression denoted by (4), we have C1 = 0. To ensure that the amplitude of the wave equals to a, it holds um ðpÞ um ð0Þ ¼ 0;
ð27Þ
which determines the value of C2. In this way, we obtain um(n) and cm1 successfully. The Mth-order approximation is given by uðnÞ ¼
M X
um ðnÞ;
ð28Þ
m¼0
c¼
M 1 X
ð29Þ
cm :
m¼0
Note that the mth-order deformation equations (20) are linear equations, and cm1 is only governed by algebraic equations (25). Thus um and cm1 can be easily solved, especially by means of symbolic software such as Mathematica, Maple, MathLab, and so on.
10
3
k=1/5 k=1/2
102
k=1
c
k=2
k=5
10
1
10
0
10
1
10
2
10
3
a Fig. 5. Comparison of numerical results with analytic approximations when h ¼ 1=c20 , a = 1, b = 1, and c = 1. Solid lines: numerical results; square symbols: first-order approximations by the homotopy analysis method.
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
363
When m = 1, we have pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 4k 2 a2 þ 4c2 3a2 b : c0 ¼ 2k
ð30Þ
If the above expression is expanded in the Maclaurin series of a, its first two terms are the same as the first two terms of the perturbation method result [1] qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 3a2 b 2 2 2 þ : ð31Þ c¼ a þc k 1 8ða2 k 2 þ c2 Þ However, it is obvious that there is great difference between the results (30) by the homotopy analysis method and the results (31) by the perturbation method. Only when a is small, the solutions by these two methods are the same, as shown in Figs. 2–4. 3.2. The effect of h As pointed by Liao [6], the auxiliary parameter h can be employed to adjust the convergence region of homotopy analysis solutions. It is found that the convergence regions of the series (28) and (29) are enlarged as h tends to zero
10
3
k=1/5 k=1/2
10
2
k=1
c
k=2 k=5
101
10
0
10
1
10
2
10
3
a Fig. 6. Comparison of numerical results with analytic approximations when h ¼ 1=c20 , a = 2, b = 5, and c = 3. Solid lines: numerical results; square symbols: first-order approximations by the homotopy analysis method.
364
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365 10
3
k=1/5
102
k=1/2
c
k=1 k=2 k=5
10
1
10
0
10
1
10
2
10
3
a Fig. 7. Comparison of numerical results with homotopy analysis approximations when h ¼ 1=c20 , a = 3, b = 2/3, and c = 2. Solid lines: numerical results; square symbols: first-order approximations by the homotopy analysis method.
from below, as shown in Fig. 1. Thus, one can adjust the convergence regions of the series (28) and (29) simply by choosing a proper value of the auxiliary parameter h. Obviously, h can be a function of a. It is found that, when h ¼ 1=c20 , even the first-order approximation pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi 4k 2 a2 þ 4c2 3a2 b 3ka4 b2 ð32Þ c c0 þ c1 ¼ 5=2 2k 8ð4k 2 a2 3a2 b þ 4c2 Þ agrees very well with numerical results in the whole region 0 6 a < + 1, as shown in Figs. 5–7.
4. Conclusions In this paper, the homotopy analysis method is applied to obtain the phase speed c, and the valid solution of the travelling waves governed by the Klein– Gordon equation. Different from the perturbation results [1], by homotopy analysis method, even the first-order approximation (32) of the phase speed agrees well with
Q. Sun / Appl. Math. Comput. 169 (2005) 355–365
365
numerical results for all possible wave amplitude 0 6 a < + 1. Therefore, unlike perturbation solution, solution given by the homotopy analysis method is valid for 0 6 a < + 1. This indicates that the homotopy analysis method is valid for travelling waves problems with strong nonlinearity.
References [1] A.H. Nayfeh, Perturbation Methods, Wiley Classics Library Edition, 2000. [2] E.Y. Deeba, S.A. Khuri, A decomposition method for solving the nonlinear Klein–Gordon equation, J. Comput. Phys. 124 (1996) 442–448. [3] K. Narita, New solution for difference-difference models of the U4 equation and nonlinear Klein–Gordon equation in 1 + 1, Chaos Solitons Fract. 7 (1996) 365–369. [4] A. Maccari, Nonresonant interacting waves for the nonlinear Klein–Gordon equation in threedimensional space, Physica D 135 (2000) 331–344. [5] A. Maccari, Solitons trapping for the nonlinear Klein–Gordon equation with an external excitation, Chaos Solitons Fract. 17 (2003) 145–154. [6] S.J. Liao, Beyond Perturbation: Introduction to the Homotopy Analysis Method, Chapman & Hall/CRC, Boca Raton, 2003. [7] S.J. Liao, A uniformly valid analytic solution of 2D viscous flow past a semi-infinite flat plate, J. Fluid Mech. 385 (1999) 101–128. [8] S.J. Liao, A. Campo, Analytic solutions of the temperature distribution in Blasius viscous flow problems, J. Fluid Mech. 453 (2002) 411–425. [9] S.J. Liao, On the homotopy analysis method for nonlinear problems, Appl. Math. Comput. 147 (2) (2004) 499–513. [10] S.J. Liao, On the analytic solution of magnetohydrodynamic flows of non-Newtonian fluids over a stretching sheet, J. Fluid Mech. 488 (2003) 189–212. [11] H. Xu, An explicit analytic solution for free convection about a vertical flat plate embedded in a porous medium by means of homotopy analysis method, Appl. Math. Comput. 158 (2004) 433–443. [12] M. Ayub, A. Rasheed, T. Hayat, Exact flow of a third grade fluid past a porous plate using homotopy analysis method, Int. J. Engng. Sci. 41 (2003). [13] C. Wang, Shijun, Liao, Jimao Zhu, An explicit solution for the combined heat and mass transfer by natural convection from a vertical wall in a non-Darcy porous medium, Int. J. Heat Mass Transfer 46 (2003) 4813–4822. [14] C. Wang, J.M. Zhu, S.J. Liao, On the explicit analytic solution of Cheng–Chang equation, Int. J. Heat Mass Transfer 46 (2003) 1855–1860. [15] C. Wang, S.J. Liao, J.M. Zhu, An explicit analytic solution for non-Darcy natural convection over horizontal plate with surface mass flux and thermal dispersion effects, Acta Mech. 165 (2003) 139–150.