Computers and Mathematics with Applications 57 (2009) 1226–1231
Contents lists available at ScienceDirect
Computers and Mathematics with Applications journal homepage: www.elsevier.com/locate/camwa
Numerical method for the wave and nonlinear diffusion equations with the homotopy perturbation method Changbum Chun a,∗ , Hossein Jafari b , Yong-Il Kim c a
Department of Mathematics, Sungkyunkwan University, Suwon 440-746, Republic of Korea
b
Department of Mathematics and Computer Science, University of Mazandaran, P. O. Box 47416-1467, Babolsar, Iran
c
School of Liberal Arts, Korea University of Technology and Education, Cheonan, Chungnam 330-708, Republic of Korea
article
info
Article history: Received 4 June 2008 Received in revised form 1 October 2008 Accepted 12 January 2009 Keywords: Homotopy perturbation method He’s polynomials Wave equation D’Alembert formula Nonlinear diffusion equations Approximate analytical solution Exact solutions
a b s t r a c t In this paper, the homotopy perturbation method and a modified homotopy perturbation method are used for analytical treatment of the wave equation and some nonlinear diffusion equations, respectively. Some examples are given to illustrate that a suitable choice of an initial solution can lead to the exact solution, this revealing the reliability and effectiveness of the method. © 2009 Elsevier Ltd. All rights reserved.
1. Introduction Nonlinear partial differential equations are useful in describing the various phenomena in disciplines. Apart of a limited number of these problems, most of them do not have a precise analytical solution, so these nonlinear equations should be solved using approximate methods. The homotopy perturbation method (HPM), first proposed by He in 1998, was developed and improved by He [1–3]. Very recently, the new interpretation and new development of the homotopy perturbation method have been given and well addressed in [4–7]. The homotopy perturbation method [1–7] is a novel and effective method, and can solve various nonlinear equations. This method has been successfully applied to solve many types of nonlinear problems, for example, to nonlinear oscillators with discontinuities [8], nonlinear wave equations [9], limit cycle and bifurcations [10–13], non-linear boundary value problems [14], asymptotology [15], to Volterra’s integro–differential equation by El-Shahed [16], some fluid problems [17,18] and many other subjects [19,20]. The HPM offers certain advantages over routine numerical methods. Numerical methods use discretization which gives rise to rounding off errors causing loss of accuracy, and requires large computer power and time. The HPM method is better since it does not involve discretization of the variables, hence is free from rounding off errors and does not require large computer memory or time. In this paper, the homotopy perturbation method is used to solve the wave equation, where the domain of the space variable is unbounded, and a modified homotopy perturbation method to some nonlinear diffusion equations to obtain exact solutions without any restrictive assumptions that may change the physical behavior of the solutions. It is worth mentioning
∗
Corresponding author. Tel.: +82 31 299 4923; fax: +82 31 290 7033. E-mail address:
[email protected] (C. Chun).
0898-1221/$ – see front matter © 2009 Elsevier Ltd. All rights reserved. doi:10.1016/j.camwa.2009.01.013
C. Chun et al. / Computers and Mathematics with Applications 57 (2009) 1226–1231
1227
that in order to make the HPM more effective, He’s polynomials are used in the modified homotopy perturbation method. The idea of He’s polynomials was first suggested by Ghorbani to deal with nonlinear terms when using the HPM [24,25], and was then also used in the variational iteration method to deal with nonlinear terms in the correction functional [26]. In this paper, several examples are given to reveal the efficiency and reliability of the modified homotopy perturbation method. 2. He’s homotopy perturbation method To illustrate the homotopy perturbation method (HPM) for solving nonlinear differential equations, He [1–7] considered the following nonlinear differential equation: A(u) = f (r ),
r ∈ Ω,
(1)
subject to the boundary condition
∂u B u, ∂n
= 0,
r ∈ Γ,
(2)
where A is a general differential operator, B is a boundary operator, f (r ) is a known analytic function, Γ is the boundary of the domain Ω and ∂∂n denotes differentiation along the normal vector drawn outwards from Ω . The operator A can generally be divided into two parts M and N. Therefore, (1) can be rewritten as follows: M (u) + N (u) = f (r ),
r ∈ Ω.
(3)
He [1,2] constructed a homotopy v(r , p) : Ω × [0, 1] → R which satisfies H (v, p) = (1 − p)[M (v) − M (u0 )] + p[A(v) − f (r )] = 0,
(4)
which is equivalent to H (v, p) = M (v) − M (u0 ) + pM (u0 ) + p[N (v) − f (r )] = 0,
(5)
where p ∈ [0, 1] is an embedding parameter, and u0 is an initial approximation of (3). Obviously, we have: H (v, 0) = M (v) − M (u0 ) = 0,
H (v, 1) = A(v) − f (r ) = 0.
(6)
The changing process of p from zero to unity is just that of H (v, p) from M (v) − M (u0 ) to A(v) − f (r ). In topology, this is called deformation and M (v) − M (u0 ) and A(v) − f (r ) are called homotopic. According to the homotopy perturbation method, the parameter p is used as a small parameter, and the solution of Eq. (4) can be expressed as a series in p in the form
v = v0 + pv1 + p2 v2 + p3 v3 + · · · (7) When p → 1, Eq. (4) corresponds to the original one, Eqs. (1) and (7) becomes the approximate solution of Eq. (1), i.e., u = lim v = v0 + v1 + v2 + v3 + · · · (8) p→1
If Eq. (1) admits a unique solution, then this method produces the unique solution. If Eq. (1) does not possess unique solution, the HPM will give a solution among many other possible solutions. The convergence of the series in Eq. (8) is discussed by He in [1,2]. 3. Wave equations with the homotopy perturbation method 3.1. One-dimensional wave equation We consider the wave equation utt = c 2 uxx ,
−∞ < x < ∞, t > 0
(9)
with the initial conditions u(x, 0) = f (x)
(10)
ut (x, 0) = g (x).
(11)
As is well known, the method of the separation of variables [21] has been used by D’Alembert and others to derive the solution u(x, t ) of the wave equation (9) of the form u(x, t ) =
f (x + ct ) + f (x − ct ) 2
+
1 2c
Z
x+ct
g (s)ds.
(12)
x−ct
It should be noted that the D’Alembert formula (12) is not easy to apply if g (x) is not easily integrable, this giving rise to some cumbersome work, and thus the applicability of the formula is severely restricted and its utility becomes problematic. However, this difficulty can be easily overcome by the homotopy perturbation method like Adomian’s method [22] and the variational iteration method [23], this is our main motivation of this work. He’s method is an effective tool to handle Eq. (9). We construct the following homotopy with M (u) = utt and N (u) = −c 2 uxx M (v) − M (u0 ) + pM (u0 ) + p[N (v)] = 0.
(13)
1228
C. Chun et al. / Computers and Mathematics with Applications 57 (2009) 1226–1231
Substituting (7) into (13), and equating coefficients of like powers of p, we obtain p0 :
M (v0 ) − M (u0 ) = 0,
(14)
1
M (v1 ) + M (u0 ) + N (v0 ) = 0
(15)
2
M (v2 ) + N (v1 ) = 0,
(16)
p : p : p3 :
M (v3 ) + N (v2 ) = 0,
(17)
.. . pn+1 :
M (vn+1 ) + N (vn ) = 0,
which forms the basis of a complete determination of the components v0 , v1 , v2 , . . .. We let u0 (x, t ) = 0 for convenience. We, therefore, obtain the following linear equations for the components:
(v0 )tt = 0,
v0 (x, 0) = f (x),
(v0 )t (x, 0) = g (x),
(18)
(v1 )tt − c (v0 )xx = 0,
v1 (x, 0) = 0,
(v1 )t (x, 0) = 0,
(19)
(v2 )tt − c (v1 )xx = 0,
v2 (x, 0) = 0,
(v2 )t (x, 0) = 0,
(20)
(v3 )tt − c (v2 )xx = 0,
v3 (x, 0) = 0,
(v3 )t (x, 0) = 0,
(21)
2 2 2
and so on. We easily find
v0 (x, t ) = g (x)t + f (x), v1 (x, t ) = c 2 g 00 (x)
t3 3!
v2 (x, t ) = c 4 g (4) (x) v3 (x, t ) = c 6 g (6) (x)
(22)
+ c 2 f 00 (x)
t5 5! t7
t2 2!
+ c 4 f (4) (x) + c 6 f (6) (x)
, t4 4! t6
(23)
,
(24)
.
(25)
7! 6! By continuing the calculation, we thus have the solution given by u = v0 + v1 + v2 + · · ·
t2 t4 t6 = f (x) + c 2 f 00 (x) + c 4 f (4) (x) + c 6 f (6) (x) + · · · 2! 4! 6! 5 3 t t7 t 4 (4) 6 (6) 2 00 + g (x)t + c g (x) + c g (x) + c f (x) + · · · . 3! 5! 7!
(26)
This is the same as obtained by Adomian’s decomposition method and the variational iteration method [22,23]. Example 1. We consider the wave equation [22] utt = uxx ,
−∞ < x < ∞, t > 0
(27)
subject to the initial conditions u(x, 0) = sin (x)
(28)
ut (x, 0) = cos(x).
(29)
With f (x) = sin (x) and g (x) = cos (x), we find f (2n) (x) = (−1)n sin (x),
n = 0, 1, 2, . . .
(30)
g (2n) (x) = (−1)n cos (x),
n = 0, 1, 2, . . .
(31)
and
Substituting Eqs. (30) and (31) into (26) produces
u(x, t ) = sin (x) 1 −
t2 2!
+
t4
t3 t5 − · · · + cos (x) t − + − · · · , 4! 3! 5!
(32)
and in a closed form by u(x, t ) = sin (x + t ).
(33)
C. Chun et al. / Computers and Mathematics with Applications 57 (2009) 1226–1231
1229
3.2. Two-dimensional wave equation Example 2. For illustration, we consider the wave equation [22] utt = 2(uxx + uyy ),
−∞ < x, y < ∞, t > 0
(34)
subject to the initial conditions u(x, y, 0) = sin (x) sin(y)
(35)
ut ( x , y , 0 ) = 0 .
(36)
Conducted in exactly the same way as in the one-dimensional wave equation for the homotopy (13) with M (u) = utt , N (u) = −2(uxx + uyy ) and with u0 (x, y, 0) = 0 as initial approximation, we obtain the following linear equations for the components v0 , v1 , v2 , . . .:
(v0 )tt = 0, v0 (x, y, 0) = sin(x) sin(y), (v0 )t (x, y, 0) = 0, (v1 )tt − 2[(v0 )xx + (v0 )yy ] = 0, v1 (x, y, 0) = 0, (v1 )t (x, y, 0) = 0,
(37)
(v2 )tt − 2[(v1 )xx + (v1 )yy ] = 0,
v2 (x, y, 0) = 0,
(v2 )t (x, y, 0) = 0,
(39)
(v3 )tt − 2[(v2 )xx + (v2 )yy ] = 0,
v3 (x, y, 0) = 0,
(v3 )t (x, y, 0) = 0,
(40)
(38)
and so on. We easily find
v0 (x, y, t ) = sin(x) sin(y),
(41)
v1 (x, y, t ) = −2 sin(x) sin(y) t , 2
v2 (x, y, t ) =
2 3
v3 (x, y, t ) = −
(42)
sin(x) sin(y)t 4 , 4 45
(43)
sin(x) sin(y)t 6 .
(44)
By continuing the calculation, we thus have the solution given by u = v0 + v1 + v2 + · · ·
(2t )2 (2t )4 (2t )6 = sin(x) sin(y) 1 − + − + ··· , 2! 4! 6!
(45)
and in a closed form u = sin(x) sin(y) cos(2t ).
(46)
This is the same as obtained by Adomian’s decomposition method and the variational iteration method [22,23]. 4. Nonlinear diffusion equations with a modified homotopy perturbation method We consider the nonlinear diffusion equation ut = (um ux )x
(47)
with initial condition u(x, 0) = f (x)
(48)
where u = u(x, t ). To solve (47) and (48), we construct the following homotopy with M (u) = ut and N (u) = −(um ux )x M (v) − M (u0 ) + pM (u0 ) + p[N (v)] = 0.
(49)
To deal with the nonlinear term, we will employ He’s polynomials considered in [24,25] which is given by N (u) = N (v0 ) + N (v0 , v1 )px + N (v0 , v1 , v2 )p2 + · · · + N (v0 , v1 , . . . , vn )pn + · · · ,
(50)
where N (v0 , v1 , . . . , vn ) =
1 ∂n n! ∂ p n
N
n X k=0
! pk vk
,
n = 1, 2, . . . ,
p=0
Substituting (50) into (49), and equating coefficients of like powers of p, we obtain
(51)
1230
C. Chun et al. / Computers and Mathematics with Applications 57 (2009) 1226–1231
M (v0 ) − M (u0 ) = 0,
p0 :
(52)
1
M (v1 ) + M (u0 ) + N (v0 ) = 0
(53)
2
M (v2 ) + N (v0 , v1 ) = 0,
(54)
3
M (v3 ) + N (v0 , v1 , v2 ) = 0,
(55)
p : p : p :
.. . pn+1 :
M (vn+1 ) + N (v0 , v1 , . . . , vn ) = 0,
and so on, which forms the basis of a complete determination of the components v0 , v1 , v2 , . . .. We let u0 (x, t ) = 0 for convenience. We therefore obtain the following linear equations for the components:
(v0 )t = 0,
v0 (x, 0) = f (x),
(v1 )t − (v v ) = 0, X ∂ N p k vk ∂p k=0 1
(v2 )t + (v3 )t +
1 ∂2 2 ! ∂ p2
N
2 X
(56)
v1 (x, 0) = 0,
m 0 0x x
(57)
! = 0,
v2 (x, 0) = 0,
(58)
p=0
! p vk
= 0,
k
k=0
v3 (x, 0) = 0,
(59)
p=0
and so on. Example 3. Consider the diffusion equation (47) with m = 2, ut =
∂ ∂u u2 ∂x ∂x
(60)
with initial condition x+h
u(x, 0) =
(61)
√
2 c
where c , c > 0 and h are arbitrary constants. Here, we have f (x) = With the help of Maple, it follows from (56)–(59) that
x+ √h . 2 c
x+h
v0 (x, t ) =
√ ,
(62)
2 c
(x + h)t
v1 (x, t ) =
4c 3/2
,
(x + h)t 2
v2 (x, t ) =
16c 5/2
(63)
,
(64)
(x + h)t 3
v3 (x, t ) =
(65)
32c 7/2
and so on. By continuing the calculation, we have the solution given by u = v0 + v1 + v2 + · · ·
= f (x) 1 +
t 2c
+
3t 2 8c 2
+
5t 3 16c 3
+
13t 4 64c 4
+ ··· +
t 13 6815 744c 13
+ ··· .
(66)
This gives the exact solution of (60) and (61) in a closed form by u(x, t ) =
x+h , √ 2 c−t
which is the same as obtained by Adomian’s decomposition method and the variational iteration method [22,23]. Example 4. Consider the diffusion equation (47) with m = 1, ut =
∂ ∂u u ∂x ∂x
(67)
C. Chun et al. / Computers and Mathematics with Applications 57 (2009) 1226–1231
1231
with initial condition u(x, 0) =
x2
(68)
c
where c , c > 0 is an arbitrary constant. Noting that f (x) = we easily obtain the solution given by u(x, t ) = x
2
1 c
+
6 c2
t+
36 c3
2
t +
216 c4
t + ··· 3
x2 , c
and substituting it into Eqs. (56)–(59), by the help of Maple,
(69)
and in a closed form u(x, t ) =
x2 c − 6t
.
(70)
5. Conclusion In this work, we apply He’s homotopy perturbation method and a modified homotopy perturbation method to solve wave equations and nonlinear diffusion equations. The methods yield their exact solutions with a few iterations and comparisons were made between the D’Alembert formula, Adomian’s decomposition method, the variational iteration method and the homotopy perturbation method. These results have proven that the homotopy perturbation method is reliable and efficient in handling nonlinear problems. References [1] J.H. He, Homotopy perturbation technique, Comput. Methods. Appl. Mech. Engrg. 178 (1999) 257–262. [2] J.H. He, A coupling method of a homotopy technique and a perturbation technique for non-linear problems, Internat. J. Non-Linear Mech. 35 (1) (2000) 37–43. [3] J.H. He, Homotopy perturbation method: A new nonlinear analytical technique, Appl. Math. Comput. 135 (1) (2003) 73–79. [4] J.H. He, New interpretation of homotopy perturbation method, Internat. J. Modern Phys. B 20 (2006) 2561–2568. [5] J.H. He, Recent development of the homotopy perturbation method, The full text is available at: http://works.bepress.com/ji_huan_he/37. [6] J.H. He, Some asymptotic methods for strongly nonlinear equation, Internat. J. Modern Phys. B 20 (10) (2006) 1144–1199. [7] J.H. He, An elementary introduction to recently developed asymptotic methods and nanomechanics intextile engineering, The full paper can be downloaded from: http://www.worldscinet.com/cgi-bin/details.cgi?id=jsname:ijmpb&type=current. [8] J.H. He, The homotopy perturbation method for nonlinear oscillators with discontinuities, Appl. Math. Comput. 151 (1) (2004) 287–292. [9] J.H. He, Application of homotopy perturbation method to nonlinear wave equations, Chaos Solitons Fractals 26 (3) (2005) 695–700. [10] J.H. He, Homotopy perturbation method for bifurcation of nonlinear problems, Int. J. Nonlinear Sci. Numer. Simul. 6 (2) (2005) 207–208. [11] J.H. He, Periodic solutions and bifurcations of delay-differential equations, Phys. Lett. A 347 (4–6) (2005) 228–230. [12] J.H. He, Limit cycle and bifurcation of nonlinear problems, Chaos Solitons Fractals 26 (3) (2005) 827–833. [13] J.H. He, Determination of limit cycles for strongly nonlinear oscillators, Phys. Rev. Lett. 90 (17) (2003) Art. No. 174301. [14] J.H. He, Homotopy perturbation method for solving boundary value problems, Phys. Lett. A 350 (1–2) (2006) 87–88. [15] J.H. He, Asymptotology by homotopy perturbation method, Appl. Math. Comput. 156 (3) (2004) 591–596. [16] M. El-Shahed, Application of He’s homotopy perturbation method to Volterra’s integro-differential equation, Int. J. Nonlinear Sci. Numer. Simul. 6 (2) (2005) 163–168. [17] A.M. Siddiqui, R. Mahmood, Q.K. Ghori, Thin film flow of a third grade fluid on a moving belt by He’s homotopy perturbation method, Int. J. Nonlinear Sci. Numer. Simul. 7 (1) (2006) 7–14. [18] A.M. Siddiqui, R. Mahmood, Q.K. Ghori, Couette and Poiseuille flows for non-Newtonian fluids, Int. J. Nonlinear Sci. Numer. Simul. 7 (1) (2006) 15–26. [19] L. Cveticanin, Homotopy perturbation method for pure nonlinear differential equation, Chaos Solitons Fractals 30 (5) (2006) 1221–1230. [20] X.C. Cai, W.Y. Wu, M.S. Li, Approximate period solution for a kind of nonlinear oscillator by He’s perturbation method, Int. J. Nonlinear Sci. Numer. Simul. 7 (1) (2006) 109–112. [21] W. Boyce, R. DiPrima, Elementary Differential Equations, Wiley, New York, 1991. [22] A. Wazwaz, A reliable technique for solving the wave equation in an infinite one-dimensional medium, Appl. Math. Comput. 92 (1998) 1–7. [23] S. Abbasbandy, Numerical method for non-linear wave and diffusion equations by the variational iteration method, Int. J. Numer. Mech. Engrg. 73 (12) (2008) 1836–1843. [24] A. Ghorbani, J.S. Nadjfi, He’s homotopy perturbation method for calculating Adomian polynomialsl, Int. J. Nonlinear Sci. Numer. Simul. 8 (2) (2007) 229–332. [25] A. Ghorbani, Beyond Adomian polynomials: He polynomial, Chaos Solitons Fractals (2007) doi:10.1016/j.chaos.2007.06.034. [26] M.A. Noor, S.T. Mohyud-Din, Variational iteration method for solving higher-order nonlinear boundary value problems using He’s polynomials, Int. J. Nonlinear Sci. Numer. Simul. 9 (2) (2008) 141–156.