You are on page 1of 10

A New HPM for Ordinary Differential Equations

Hossein Aminikhah,1 Jafar Biazar2


1
Department of Mathematics, School of Mathematical Sciences, Shahrood University
of Technology, P.C. 3619995161, Shahrood, Iran
2
Department of Mathematics, Faculty of Sciences, University of Guilan, P.C. 41938,
Rasht, Iran

Received 9 September 2008; accepted 28 January 2009


Published online 19 March 2009 in Wiley InterScience (www.interscience.wiley.com).
DOI 10.1002/num.20413

In this paper, we introduce a new version of the homotopy perturbation method (NHPM) that effi-
ciently solves linear and non-linear ordinary differential equations. Several examples, including Euler-
Lagrange, Bernoulli and Ricatti differential equations, are given to demonstrate the efficiency of the new
method. © 2009 Wiley Periodicals, Inc. Numer Methods Partial Differential Eq 26: 480–489, 2010

Keywords: homotopy perturbation method; ordinary differential equations

I. INTRODUCTION

Ordinary differential equations frequently arise in modeling various real world physical and
engineering problems. These equations arise in many different contexts including geometry,
mechanics, astronomy, and population modeling. Many famous mathematicians have studied dif-
ferential equations and contributed to the field, including Newton, Leibniz, the Bernoulli family,
Riccati, Clairaut, Euler and Lagrange.
Numerical methods such as finite difference, finite element, and classical ones like Fourier
series, Fourier integral, and Laplace transformation commonly used for solving these methods,
either need a lot of computations and have less convergence speed and accuracy or solve only
certain types of problems. Therefore, science and engineering researchers attempt to propose new
methods for solving functional equations.
To solve functional equations, homotopy perturbation method has been proposed by He in
1998 [1–8]. It continuously deforms a difficult problem into another one, which is easy to solve.
In this method, the solution is considered as the summation of an infinite series which usually con-
verges rapidly to the exact solution. Considerable research works have been conducted recently
in applying this method to a class of linear and nonlinear equations [9–20].

Correspondence to: H. Aminikhah, Department of Mathematics, School of Mathematical Sciences, Shahrood University
of Technology, P.C. 3619995161, Shahrood, Iran (e-mail: hossein.aminikhah@gmail.com, aminikhah@shahroodut.ac.ir)
© 2009 Wiley Periodicals, Inc.
HPM FOR ORDINARY DIFFERENTIAL EQUATIONS 481

In this article, we propose a new homotopy perturbation method (NHPM) to obtain exact solu-
tions of some ordinary differential equations. Finally, three examples are given to illustrate the
proposed approach.

II. NEW HOMOTOPY PERTURBATION METHOD (NHPM)

To illustrate the basic ideas of this method, let us consider the following nonlinear differential
equation

A(u(x)) − f (r(x)) = 0, r(x) ∈ , (1)

with the boundary conditions


 
∂u(x)
B u(x), = 0, r(x) ∈ , (2)
∂n

where A is a general differential operator, B is a boundary operator, f (r(x)) is a known analytical


function, and  is the boundary of the domain .
The operator A can be divided into two parts, L and N , where L is a linear and N is a nonlinear
operator. Therefore, Eq. (1) can be rewritten as

L(u(x)) + N (u(x)) − f (r(x)) = 0. (3)

By the homotopy technique, we construct a homotopy U (r(x), p) :  × [0, 1] → R, which


satisfies

H (U (x), p) = (1−p)[L(U (x))−u0 (x)] + p[A(U (x))−f (r(x))] = 0, p ∈ [0, 1], r(x) ∈ ,
(4)

or equivalently,

H (U (x), p) = L(U (x)) − L(u0 (x)) + pL(u0 (x)) + p[N (U (x)) − f (r(x))] = 0, (5)

where p ∈ [0, 1] is an embedding parameter, u0 (x) is an initial approximation of solution of


equation (1). Obviously, from Eqs. (4) and (5) we have

H (U (x), 0) = L(U (x)) − L(u0 (x)) = 0, (6)


H (U (x), 1) = A(U (x)) − f (r(x)) = 0. (7)

According to the HPM, we can first use the embedding parameter p as a small parameter, and
assume that the solutions of Eqs. (4) and (5) can be represented as a power series in p as



U (x) = p n Un . (8)
n=0

Now let us write the Eq. (5) in the following form

L(U (x)) = u0 (x) + p[f (r(x)) − u0 (x) − N (U (x))]. (9)

Numerical Methods for Partial Differential Equations DOI 10.1002/num


482 AMINIKHAH AND BIAZAR

By applying the inverse operator, L−1 , to both sides of Eq. (9), we have

U (x) = L−1 (u0 (x)) + p[L−1 (f (r(x))) − L−1 (u0 (x)) − L−1 N (U (x))]. (10)

Suppose that the initial approximation of Eq. (1) has the form



u0 (x) = an Pn (x), (11)
n=0

where a0 , a1 , a2 , . . . are unknown coefficients and P0 (x), P1 (x), P2 (x), . . . are specific functions
depending on the problem. Now by substituting Eqs. (8) and (11) into the Eq. (10), we get
 

∞ 

−1
p Un (x) = L
n
an Pn (x)
n=0 n=0
   ∞ 

∞ 
−1 −1 −1
+ p L (f (r(x))) − L an Pn (x) − L N n
p Un (x) . (12)
n=0 n=0

Comparing coefficients of terms with identical powers of p, leads to


∞ 

−1
p : U0 (x) = L
0
an Pn (x) ,
n=0
 


p1 : U1 (x) = L−1 (f (r(x))) − L−1 an Pn (x) − L−1 N (U0 (x)),
n=0

p2 : U2 (x) = −L−1 N (U0 (x), U1 (x)),


..
.
p j : Uj (x) = −L−1 N (U0 (x), U1 (x), . . . , Uj −1 (x))
..
. (13)

Now if can solve these equations in such a way that U1 (x) = 0, [in some cases we set the Taylor
series of U1 (x) equal to zero] then Eq. (13) result in U2 (x) = U3 (x) = · · · = Uj (x) = · · · = 0.
Therefore, the exact solution may be obtained by using
∞ 

−1
u(x) = U0 (x) = L an Pn (x) .
n=0

It is worthwhile to note that if f (r(x)) and u0 (x) are analytic at x = x0 , then their Taylor series


∞ 

u0 (x) = an (x − x0 )n , f (r(x)) = an∗ (x − x0 )n ,
n=0 n=0

can be used in Eq. (12), where a0∗ , a1∗ , a2∗ , . . . are known coefficients and a0 , a1 , a2 , . . . are unknown
ones, which must be computed.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


HPM FOR ORDINARY DIFFERENTIAL EQUATIONS 483

III. ILLUSTRATIVE EXAMPLES

In this section, to illustrate the method and to show the ability of the method four examples are
presented.
Example 1. Consider the following Euler-Lagrange equation of order two, with the initial
conditions

x 2 y  − 2xy  + 2y = x 4 + 3x 3 + 1,
1
y(0) = , y  (0) = 1. (14)
2
To solve equation (14), by the NHPM, we construct the following homotopy

  2  2 1
(1 − p)[Y (x) − y0 (x)] + p Y (x) − Y (x) + 2 Y (x) − x − 3x − 2 = 0.
2
x x x
Or equivalently

 2  2 1
Y (x) = y0 (x) − p y0 (x) − Y (x) + 2 Y (x) − x − 3x − 2 .
2
(15)
x x x

x
τ
Applying the inverse operator, L−1 = 0 0 (·)dξ dτ to both sides of Eq. (15), we obtain
x τ
Y (x) = Y (0) + xY  (0) + y0 (ξ )dξ dτ
0 0
 x τ 
2  2 1
−p y0 (ξ ) − Y (ξ ) + 2 Y (ξ ) − ξ − 3ξ − 2 dξ dτ ,
2
(16)
0 0 ξ ξ ξ
Suppose the solution of Eq. (16) has the following form

Y (x) = Y0 (x) + pY1 (x) + p 2 Y2 (x) + · · · , (17)

where Yi (x) are functions which should be determined.


Substituting (17) into (16), and comparing coefficients of terms with identical powers of p,
leads to:
x τ
p 0 : Y0 (x) = Y (0) + xY  (0) + y0 (ξ )dξ dτ ,
0 0
x τ 
2  2 1
p : Y1 (x) =
1
Y (ξ ) − 2 Y0 (ξ ) + ξ + 3ξ + 2 − y0 (ξ ) dξ dτ ,
2

0 0 ξ 0 ξ ξ
x τ
2  2
p2 : Y2 (x) = Y1 (ξ ) − 2 Y1 (ξ ) dξ dτ ,
0 0 ξ ξ
..
.
x τ 
2  2
p : Yj (x) =
j
Y (ξ ) − 2 Yj −1 (ξ ) dξ dτ ,
0 0 ξ j −1 ξ
..
.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


484 AMINIKHAH AND BIAZAR
∞  
Now assume that y0 (x) = n=0 an Pn (x), Pk (x) = x , Y (0) = y(0), Y (0) = y (0), and
k

Y1 (x) = 0. Then we have


   
1 a1 1 a2 3a3 5 a4 6 5a5 7 3a5 8 7a7 9
Y1 (x) = − x +
3
− x4 − x − x − x − x − x − · · · = 0.
2 18 12 24 100 45 294 224 648
This implies that

a1 = 9, a2 = 2, a3 = a4 = · · · = 0.

Therefore, the exact solution is recognized easily


1 a0 a1 a2 a3
y(x) = Y0 (x) = + x + x2 + x3 + x4 + x5 + · · ·
2 2 6 12 20
1 a0 2 3 3 1 4
= +x+ x + x + x .
2 2 2 6
where a0 is arbitrary.
Example 2. Let us solve the following Ricatti differential equations with the initial conditions

y  = y 2 + 8xy + 16x 2 − 5,
y(0) = 1. (18)

For solving differential equation (18), by NHPM we construct the following homotopy

Y  (x) = y0 (x) − p[y0 (x) − Y 2 (x) − 8xY (x) − 16x 2 + 5]. (19)

x
Applying the inverse operator, L−1 = 0 (·)dξ to both sides of Eq. (19), we obtain
x x
Y (x) = Y (0) + y0 (ξ )dξ − p [y0 (ξ ) − Y 2 (ξ ) − 8ξ Y (ξ ) − 16ξ 2 + 5]dξ . (20)
0 0

Suppose that the solution of Eq. (20) has the form Eq. (8). Substituting Eq. (8) into Eq. (20)
and equating the coefficients of p with the same power leads to
x
p0 : Y0 (x) = Y (0) + y0 (ξ )dξ ,
0
x 
p 1 : Y1 (x) = −y0 (ξ ) + Y02 (ξ ) + 8ξ Y0 (ξ ) + 16ξ 2 − 5 dξ ,
0
x
p2 : Y2 (x) = [2Y0 (ξ )Y1 (ξ ) + 8ξ Y1 (ξ )]dξ ,
0

..
.
 j −1 
x 
p : Yj (x) =
j
Yk (ξ )Yj −k−1 (ξ ) + 8ξ Yj −1 (ξ ) dξ ,
0 k=0

..
.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


HPM FOR ORDINARY DIFFERENTIAL EQUATIONS 485

Assume that y0 (x) = n=0 an x n , Y (0) = 1 and Y1 (x) = 0, then we have
  2 
a1  2 a0 a1 16 8a0 a2
− (a0 + 4)x + a0 + 4 − x + + + + − x3
2 3 3 3 3 3
  
a2 a 1 a0 a3  4 8a2 a12 2a0 a2 a3 a4
+ a1 + + − x + + + + − x5
6 4 4 15 20 15 10 5
a a  
1 2 a 0 a3 a4 a3 a5  6 8a4 2a0 a4 a5 a 1 a3 a22 a6
+ + + + − x + + + + + − x7
18 12 15 3 6 35 35 21 28 63 7
+ · · · = 0.

Thus we have

a0 + 4 = 0,
a1
a0 + 4 − = 0,
2
a02 a1 16 8a0 a2
+ + + − = 0,
3 3 3 3 3
a2 a 1 a0 a3
a1 + + − = 0,
6 4 4
8a2 a2 2a0 a2 a3 a4
+ 1 + + − = 0,
15 20 15 10 5
..
.

Now, it can be easily shown

a0 = −4, a1 = a2 = · · · = 0.

This implies that

x2 x3 x4
y(x) = Y0 (x) = 1 + a0 x + a1 + a2 + a4 + · · ·
2 3 4
= 1 − 4x,

which is the exact solution.


Example 3. Consider the following Bernoulli equation with the initial conditions

y  + (x 2 − 1)y = x 2 e−2x y 3 ,
y(0) = 1. (21)

To solve Eq. (21) by the NHPM, we construct the following homotopy:

(1 − p)[Y  (x) − y0 (x)] + p[Y  (x) + (x 2 − 1)Y (x) − x 2 e−2x Y 3 (x)] = 0.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


486 AMINIKHAH AND BIAZAR

Or equivalently

Y  (x) = y0 (x) − p[y0 (x) + (x 2 − 1)Y (x) − x 2 e−2x Y 3 (x)]. (22)

By integration of Eq. (22) we have


x x
Y (x) = Y (0) + y0 (ξ )dξ − p [y0 (ξ ) + (ξ 2 − 1)Y (ξ ) − ξ 2 e−2ξ Y 3 (ξ )]dξ . (23)
0 0

Suppose that the solution of Eq. (23) has the form of Eq. (8). Substituting Eq. (8) into Eq. (23),
and comparing coefficients of terms with identical powers of p, leads to
x
p0 : Y0 (x) = Y (0) + y0 (ξ )dξ ,
0
x 
p 1 : Y1 (x) = ξ 2 e−2ξ Y03 (ξ ) − (ξ 2 − 1)Y0 (ξ ) − y0 (ξ ) dξ ,
0
 
x 
1 
1−i
2 −2ξ
p : Y2 (x) =
2
ξ e Yi (ξ )Yk (ξ )Y1−k−i (ξ ) − (ξ − 1)Y1 (ξ ) dξ ,
2

0 i=0 k=0

..
.
 j −1 j −i−1

x  
2 −2ξ
p : Yj (x) =
j
ξ e Yi (ξ )Yk (ξ )Yj −k−i−1 (ξ ) − (ξ − 1)Yj −1 (ξ ) dξ ,
2

0 i=0 k=0

..
.

Assume that y0 (x) = ∞ n=0 an x , Y (0) = 1. If we set the Taylor series of Y1 (x) equal to zero,
n

then we will have


a a1  2  a 1 a2  3
0
Y1 (x) = (1 − a0 )x + − x + − x
2 2 6 3
   2 
a0 a2 1 a3 3a0 a1 a3 6a0 2 a4
+ + − − x +
4
+ + − + − x 5 + · · · = 0.
2 12 2 4 5 5 20 5 5 5

It can be easily shown

1 1 1 1
a0 = 1, a1 = 1, a2 = , a3 = , a4 = ,..., an = .
2! 3! 4! n!
This implies that

x2 x3 x4
y(x) = Y0 (x) = 1 + a0 x + a1 + a2 + a4 + · · ·
2 3 4
x2 x3 x4
=1+x+ + + + · · · = ex .
2! 3! 4!
Which is the exact solution.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


HPM FOR ORDINARY DIFFERENTIAL EQUATIONS 487

Example 4. Consider the following ordinary differential equation

1
y = + y 2 + sin2 x, (24)
1 + y2

with the initial condition

y(0) = 0

The exact solution of above equation was found to be of the form

y(x) = tan(x) (25)

The Taylor expansion of y(x) about x = 0 gives

1 2 17 7 62 9 1382 11
y(x) = x + x 3 + x 5 + x + x + x + ··· .
3 15 315 2835 155925
To solve Eq. (24), by the NHPM, we construct the following homotopy

(1 − p)[Y  (x) − y0 (x)] + p[Y  (x) + Y  (x)Y 2 (x) − Y 4 (x) − (1 + Y 2 (x))(1 + sin2 x)] = 0,

or

Y  (x) = y0 (x) − p[y0 (x) + Y  (x)Y 2 (x) − Y 4 (x) − (1 + Y 2 (x))(1 + sin2 x)]. (26)

x
Applying the inverse operator, L−1 = 0
(·)dξ to the both sides of the above equation, we
obtain
x
Y (x) = Y (0) + y0 (ξ )dξ
0
 t

−p [y0 (ξ ) + Y (ξ )Y (ξ ) − Y (ξ ) − (1 + Y (ξ ))(1 + sin ξ )]dξ ,
2 4 2 2
(27)
0

Suppose that the solution of Eq. (27) has the form Eq. (8). Substituting Eq. (8) into Eq. (27),
collecting the same powers of p, and equating each coefficient of p to zero, results in
x
p0 : Y0 (x) = Y (0) + y0 (ξ )dξ ,
0
x   
p1 : Y1 (x) = − y0 (ξ ) + Y0 (ξ )Y02 (ξ ) − Y04 (ξ ) − 1 + Y02 (ξ ) (1 + sin2 ξ ) dξ ,
0
x
1 
1−i 
1  
1−i 1−i−k
p2 : Y2 (t) = − Yi (ξ )Yk (ξ )Yj −k−i−1 (ξ ) + Yi (ξ )Yk (ξ )Yl (ξ )Yj −l−k−i−1 (ξ )
0 i=0 k=0 i=0 k=0 l=0
 

1
− 1+ Yk (ξ )Yj −k−1 (ξ ) (1 + sin2 ξ )dξ ,
k=0

..
.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


488 AMINIKHAH AND BIAZAR

j −1 j −i−1
x 
pj : Yj (x) = − Yi (ξ )Yk (ξ )Yj −k−i−1 (ξ )
0 i=0 k=0

j −1 j −i−1 j −i−k−1
  
+ Yi (ξ )Yk (ξ )Yl (ξ )Yj −l−k−i−1 (ξ )
i=0 k=0 l=0
 j −1


− 1+ Yk (ξ )Yj −k−1 (ξ ) (1 + sin2 ξ )dξ ,
k=0

..
. (28)

Assume that y0 (x) = ∞ n=0 an x and Y (0) = y(0). If we set the Taylor series of Y1 (x) at
n

x = 0 equal to zero we will have


   
a1 2 1 a03 a2
a 0 a1 a2 a3 a 2 a1
Y1 (x) = (1 − a0 )x − x + − − + 0
− − 0 x3 + x4
2 3 3 43 3 4 2
 
2a0 a2 1 a4 a4 a2 a2 a0 a12 a 2 a2
+ − + 0 − + 0 + 1 − − 0 x 5 + · · · = 0.
15 15 5 5 5 20 4 3

Vanishing Y1 (x) lets the coefficients an (n = 0, 1, 2, . . .) to take the following values

2 17
a0 = 1, a1 = 0, a2 = 1, a3 = 0, a4 = , a5 = 0, a6 = , a7 = 0, · · ·
3 45
Therefore, we gain the solution of Eq. (24) as
a 1 2 a2 3 a 3 4 a 4 5 a 5 6
y(x) = Y0 (x) = a0 x + x + x + x + x + x + ···
2 3 4 5 6
1 2 17 7 62 9 1382 11
= x + x3 + x5 + x + x + x + ··· ,
3 15 315 2835 155,925

and this in the limit of infinitely many terms, yields the exact solution of (25).

IV. CONCLUSION

In this article, we have introduced a new homotopy perturbation method (NHPM) for solving lin-
ear and nonlinear ordinary differential equations. Several examples, including some well known
problems, are presented to show the ability of the new method. The computations associated with
the examples in this article were performed using maple 10. The analytical approximations to
the solution are reliable and confirm the power and ability of the NHPM as an easy device for
computing the solution of nonlinear equations.

References
1. J. H. He, Homotopy perturbation technique, Computer Methods Appl Mechanics Eng 178 (1999),
257–262.

Numerical Methods for Partial Differential Equations DOI 10.1002/num


HPM FOR ORDINARY DIFFERENTIAL EQUATIONS 489

2. J. H. He, A coupling method of homotopy technique and perturbation technique for nonlinear problems,
Int J Non-Linear Mechanics 35 (2000), 37–43.
3. J. H. He, Comparison of homotopy perturbation method and homotopy analysis method, Appl Math
Computation 156 (2004), 527–539.
4. J. H. He, Homotopy perturbation method: a new nonlinear analytical technique, Appl Math Computation
135 (2003), 73–79.
5. J. H. He, The homotopy perturbation method for nonlinear oscillators with discontinuities, Appl Math
Computation 151 (2004), 287–292.
6. J. H. He, Application of homotopy perturbation method to nonlinear wave equations, Chaos Solitons
Fractals 26 (2005), 695–700.
7. J. H. He, Homotopy perturbation method for solving boundary value problems, Phys Lett A 350 (2006),
87–88.
8. J. H. He, Limit cycle and bifurcation of nonlinear problems, Chaos Solitons Fractals 26 (2005), 827–833.
9. J. Biazar and H. Ghazvini, Exact solutions for nonlinear Schrödinger equations by He’s homotopy
perturbation method, Phys Lett A 366 (2007), 79–84.
10. D. D. Ganji, The application of He’s homotopy perturbation method to nonlinear equations arising in
heat transfer, Phys Lett A 355 (2006), 337–341.
11. S. Abbasbandy, Numerical solutions of the integral equations: homotopy perturbation method and
Adomian’s decomposition method, Appl Math Computation 173 (2006), 493–500.
12. Z. Odibat and S. Momani, Modified homotopy perturbation method: application to quadratic Riccati
differential equation of fractional order, Chaos Solitons Fractals 36 (2008), 167–174.
13. A. M. Siddiqui, R. Mahmood, and Q. K. Ghori, Homotopy perturbation method for thin film flow of a
third grade fluid down an inclined plane, Chaos Solitons Fractals 35 (2008), 140–147.
14. L. Cveticanin, Homotopy–perturbation method for pure nonlinear differential equation, Chaos Solitons
Fractals 30 (2006), 1221–1230.
15. A. Golbabai and M. Javidi, Application of homotopy perturbation method for solving eighth-order
boundary value problems, Appl Math Computation 191 (2007), 334–346.
16. A. Golbabai and B. Keramati, Modified homotopy perturbation method for solving Fredholm integral
equations, Chaos Solitons Fractals 37 (2008), 1528–1537.
17. F. Shakeri and M. Dehghan, Solution of delay differential equations via a homotopy perturbation method,
Math Computer Model 48 (2008), 486–498.
18. A. Beléndez, T. Beléndez, A. Márquez, and C. Neipp, Application of He’s homotopy perturbation
method to conservative truly nonlinear oscillators, Chaos Solitons Fractals 37 (2008), 770–780.
19. J. Biazar and H. Ghazvini, He’s homotopy perturbation method for solving system of Volterra integral
equations of the second kind, Chaos Solitons Fractals, to appear.
20. J. Biazar and H. Ghazvini, Numerical solution for special non-linear Fredholm integral equation by
HPM, Appl Math Computation 195 (2008), 681–687.

Numerical Methods for Partial Differential Equations DOI 10.1002/num

You might also like