Applied Mathematical Sciences, Vol. 6, 2012, no. 8, 357 – 367

Numerical Solution of Deformation Equations

in Analysis Method

J. Izadian and M. MohammadzadeAttar

Department of Mathematics, Faculty of Sciences, Mashhad Branch, Islamic Azad University, Mashhad, Iran

M. Jalili

Department of Mathematics, Neyshabur Branch, Islamic Azad University, Neyshabur, Iran [email protected]

Abstract

In this paper, we consider the homtopy analysis method (HAM) for solving nonlinear ordinary with boundary conditions. The partial sum of solution is determined using finite difference method and spectral method. These methods are used for solving deformation equation. For improving the rate of convergence, we apply the methods of Marinca and Niu-Wang. The results are compared with finite difference method and spectral method. Unlike HAM, these methods don’t need convergence control parameter. Numerical experiments show efficiency and performance of proposed methods.

Keywords: , Deformation equation, Spectral method, Finite difference method

1 Introduction

Ordinary differential equations with boundary conditions (BVP) are very important in various domains of sciences and engineering. In most cases, it is very complicated to achieve analytic solutions of these equations. Numerical finite difference methods and spectral methods can be used for solving certain types of these problems with applying nonlinear equation solvers as Newton's methods 358 J. Izadian, M. MohammadzadeAttar and M. Jalili

[7,8], but these techniques are valid only for weakly nonlinear problems. Recently, homotopy analysis method (HAM) has been successfully applied to various types of these problems. In 2003, Liao published the book [1] in which he summarized the basic ideas of the homotopy analysis method and gave the details of his approach both in the theory and on a large number of practical examples and in a series of papers [2-4,9], he developed HAM. Homotopy series solution is depended to convergence control parameter. For instance Liao has used the functional series that their coefficients are the control parameters. These parameters can be used for accelerating the convergence of solutions series, or finding a homotopy series that is convergent for certain value of homotopy parameters. Some authors like Marinca et al. [5], Yabushita et al. [10], and Niu et al. [6] have considered the optimization convergence control parameters that can be obtained by minimizing the square residual error. In this paper, the known methods like finite difference method and spectral method are applied to solving deformation equation, next, Marinca, and Niu-Wang methods are used to minimize the task of determining the solution, and these two methods are compared by presenting some numerical experiments. This paper is organized as follows. In section 2 the basic idea of HAM is presented. In the section 3 the application of finite difference and Chebyshev collocation method for solving deformation equation is described. In section 4 Marinca and Niu-Wang methods are combined with numerical methods of section 3, next in the section 5 the numerical results are presented. The results of Marinca and Niu- Wang methods are compared for two boundary value problems. Finally, we discuss and analyse the results.

2 The basic idea of HAM for solving BVP

We consider the following boundary value problems:

, ∈ , , where is a nonlinear differential , operator of , second order, ∈ ∁ , is independent variable and is an unknown function. For this problem the homotopy equation can be written as follows : where , is an embedding parameter,, , is an initial guess of is linear ∈ , differential , ∈ , operator of second order, and is the homotopy series , , ∞

, Numerical solution of deformation equations 359

That is assumed to be convergent on [0,1]. It easily deduces that

(3) When , it holds ! , | . 1 ∞ , (4) , ∑ that is a solution of (2), and consequently the solution of (1), see [1]. The initial guess satisfies two boundary conditions of (1), see [1,2,4]. Referring the homotopy literature [1-4], one can find the deformation equations of order m is found as follows:

m ≥1, (5) where ,

, | , ,,…,, and !

, Then, the equation (5) is a second order linear ODEs 1 with boundary conditions,

By accepting is a solution of , , , , , The homotopy series solution (4) can be determined step by step by solving following linear problem :

, (6) In fact, one can only computes partial sum of series solution. However, in general these equations are solved analytically or with pade’ homotopy method [1]. In these methods the control parameters are used to guarantee convergence of homotopy series, for more information, the reader is refered the appropriate literature. This partial sum can be determined numerically by solving (6), with a proper numerical method. Here the finite difference method and the spectral method are applied to solve deformation equation. 360 J. Izadian, M. MohammadzadeAttar and M. Jalili

3 Numerical solution of deformation equation 3.1 Finite difference method Consider a partition of [a,b] , as follows:

⋯ , ,,,...,, and take (for simplicity), by omitting the truncation error, equation (6) yields :

(7) where , ,,…,, , ≅ , ,,,…, , Now by applying boundary conditions, we have a linear system of equations that can be solved by one of suited methods. Then we have an approximation of on [a,b] . By repeating M-times this procedure, finally we obtain an approximation of partial sum of series solution:

≅ , where , .

≅ 3.2 Spectral method Another method that can be used for solving deformation equations, is spectral method with Chebyshev points. Here, we consider an approximation of , that is solution of deformation equation (5) as given: (8 ) where is Lagrange polynomials, ∑ and , are Chebyshev points [8]. If we denote , for i=0,1,2,…,n and , then (8) , 0,1,2,…, can be written as: , By twice differentiation the equation (9) with respect to x, we have

′ ′ , Numerical solution of deformation equations 361

′′ ′′ . = Or by using the spectral differentiation ∑ matrix D ( d ij ) n+1, n + 1 see[7,8], we have

′ , ,,,…,, ′′ . By substituting these derivatives in deformation equation, a linear system of (n+1) equations with (n-1) unknowns , is obtained: ,,,…, (10) ∑ ∑ ∑ ∑ ,

,,…, The initial solution is considered as following :

, ∈ , , that can be easily transformed to [-1,1] by a linear transformation to use Chebyshev points. For , the boundary conditions are used. Then (7) is reduced to a linear system with n-1 unknowns that can be easily solved. One knows that the coefficient matrix of this system is not sparse, however regarding the spectral precision of method this matrix can be of an acceptable order [8].

4 Finding optimal control parameters

To have a solution series that is convergent for q=1, sometimes we need to apply convergence control parameters. In such cases using the so called h-curve can be useful for determining the convergence control parameter [4]. However there are the methods that allow us to find the control parameter by a minimization process. Here we apply two methods to compute computing optimal control parameters due to Marinca and Niu-Wang [6]. For this purpose one chooses the following zero-th order deformation equation (or homotopy equation): where , , , ∞ . ∑

362 J. Izadian, M. MohammadzadeAttar and M. Jalili

Then the homotopy solution is the function of , we can determine such that can be approximated , by ∈ a partial sum of small order , ( ∈ , , . For determining , more, … , precise, … approximate solution one note that for the exact solution u(x) ,the following equations is satisfied:

Then to find of a good approximate , solution ,,,…,, , each must become very small. Thus we define as [6] ,the following∗ function ∗ | |

(11) Where is M-th, partial, … , sum ∑ of series solution. , In method of Marinca, one minimize (11) to find an optimal approximation of at end of M-th step of i=1,2,…,M computing in method of Niu-wang in every step one minimizes a function of one variable that is defined by ,

, ,,…, , where have been determined, in previous step. For more information see [4,6]. These two methods are applied for two nonlinear examples , , … , and their results are compared in the next section.

5 Numerical experiments

In this section we present the numerical results for finite difference method and spectral method, then Marinca method and Niu-Wang method are applied to two boundary value problems, Computer codes have been prepared by using MATLAB 7.6.(2008) with a PC of model Pentium IV. * Denotes ui and ui are approximate solution and exact solution in xi , 1 n 2 respectively, and Nu()= ( ((())) Nux 2 . %∑i=0 % i

5.1 Example Following linear differential equation is considered : ′′ ′ , subject to the boundary conditions , ∈ , (1) with , , . Numerical solution of deformation equations 363

We know that the exact solution is , the program has executed with M=20 and n=40. Numerical results are shown in table 5.1 and 5.2. The graph of solution is presented in fig. 5.1.

Table 5.1. The results of ftinite difference method for M=20 and n=40. * − * xi ui ui |ui u i | -1 0.008484089× 0.008482089× 0 -0.5 0.0044665× 10 -0.00329488× 10 1.170599× 0 0.012962× 0.01× 2.962307× 10 10 10 0.5 0.129219× 10 0.124298×10 4.920621× 10 1 1.492546× 1.492546× 0 10 10 10 CPU Time 10 2.03 s 10

Table 5.2. The results of spectral method for M=20 and n=40. * − * xi ui ui |ui u i | -1 0.0084820× 0.008420× 0 -0.7071 0.0050946× 10 0.0050856× 10 0.897315× 0 0.0100166× 0.01× 1.6623× 10 10 10 0.7071 0.34793652× 10 0.347927×10 0.89731× 10 1 1.492546× 1.492546× 0 10 10 10 CPU Time 10 1132.65 10s

Fig 5.1. The results of finite difference method for m=20 and n=40.

5.2 Example We consider a nonlinear differential equation: ′ ′′ ′′ subject to boundary conditions

, 364 J. Izadian, M. MohammadzadeAttar and M. Jalili

The exact solution is unknown. For M=20 and n=40, numerical results are presented in table 5.2 and 5.3. The graph of solution is presented in fig. 5.2. Table 5.3. The results of finite difference method for M=20 and n=40.

* xi ui 0 0 0.25 -0.174064 0.5 -0.31091 0.75 -0.418099 1 -0.5 CPU Time 1.67 s 3.6552× ‖‖ Table 5.4. The results of spectral method for M=20 and n=40. * xi ui 0 0 0.1464 -0.10708756 0.5 -0.3109205 0.8535 -0.45490788 1 -0.5 CPU Time 1059.54 s 1.10102× ‖‖

Fig 5.2. The result of finite difference method for M=20 and n=40.

5.3 Example In this part the results of the two previous examples using spectral method and Niu-Wang method is presented in tables 5.5 and 5.6, then the comparison of these methods are accomplished in tables 5.8.

Numerical solution of deformation equations 365

Table 5.5 The results of Marinca method for example(1) M=4 and n=20. * − * xi ui ui |ui u i | -1 0.008484089× 0.008482089× 0 -0.89 0.00626277× -0.00626277× -0.003429× 10 10 -0.309 0.00308616× 10 0.00086401× 10 -0.236328× 10 0.309 0.0478369× 0.0047837× -0.2109929× 10 10 10 0.809 0.5772479× 10 0.5772480× 10 -0.143959× 10 1 1.492546× 1.492546× 0 10 10 10 CPU Time 10 18.84 s10 Max of relative error 10 Table 5.6. The results of Niu-Wang method example(1) M=4 and n=20. * − * xi ui ui |ui u i | -1 0.0084820× 0.008420× 0 -0.809 0.00066254× 0.0066277× 0.37977× 10 10 -0.309 0.00393946× 10 0.003086401×10 0.853065× 10 0.309 0.0486103× 0.047837164× 0.773184× 10 10 10 0.809 0.5774929× 10 0.57724808× 10 0.244865× 10 1 1.492546× 1.492546× 0 10 10 10 CPU Time 10 14.24 s 10 Max of relative error 10 table 5.7. The results of Marinca method for example (2) M=7 and n=20. * xi ui 0 0 -0.95491 -0.0715797 0.3455 -0.23022744 0.654 -0.380337978 0.904 -0.471501207 1 -0.5 CPU Time 3907.02 2.8280008× ‖‖ 10 Table 5.8. The results of Niu-Wang method for for example (2) M=7 and n=20. * xi ui 0 0 0.0954 -0.071579 0.3454 -0.2302288 0.6545 -0.38033 0.9045 -0.471501 1 -0.5 CPU Time 32.78 s 3.420761× ‖‖ 10

366 J. Izadian, M. MohammadzadeAttar and M. Jalili

Table 5.9. Comparison Niu –Wang and Marinca results for example (1) n=20and m=1,2,…,10. Marinca Niu – Wang M CPU Time CPU Time 1 ‖ -1.449‖ 6.54 ‖ 5/96252‖ 9.043 2 -0.48387× 8.098 0/8954003 8.228 3 -0.53378× 10 11.31 0.611957× 11.59 4 -0.431447 14.847 0.89122× 14.721 10 10 5 0.245746× 10 18.619 0.2552× 10 18.731 6 * * 0.158028× 23.01 10 10 7 * * 0.17988× 10 27.44 8 * * 0.47841× 44.43 10 9 * * 0.454179× 10 38.098 10 * * 0.477314× 43.896 10 10

table 5.10 Comparison Niu –Wang and Marinca results for example(2) n=20 and m=1,2,…,10. Marinca Niu – Wang M CPU Time CPU Time 1 0.215787‖‖ 6.431 ‖0.23329‖ 5.195 2 0.05003 20.722 0.0639155 8.35 3 0.011816 92.763 0.0171344 12.016 4 0.002751 356.43 0.595502× 16.078 5 6.3775× 1193.01 0.207005× 21.64 10 6 1.4687× 10 2480.66 7.04243× 10 26.499 7 6.5759× 3907.06 2.4362× 32.781 10 10 8 5.70934× 10 6693.34 8.706254×10 39.75 9 3.813234× 10 119343.05 3.098704× 10 49.02 10 7.03955× 21432.84 3.098704× 57.83 10 10 10 10

(*) in table 5.9 denote that execution of program was not successful because of memory overflow.

6 Conclusion and Discussion

In this paper, HAM is implemented to solve the nonlinear ODE’s with boundary conditions. For solving deformation equation, we applied finite difference method and spectral method. The results show that the spectral method is more accurate, but it is time consuming. The finite difference results are satisfactory. The comparison of methods Marinca and Niu-Wang show that the latter is more rapid, and more precise in majority of cases, but for certain problem is not suitable. Marinca method is time consuming but it is more precise. Numerical solution of deformation equations 367

References [1] Liao S.J., Beyond perturbation: introduction to the homotopy analysis method. Boca Raton: Chapman & Hall / CRC Press; (2003).

[2] Liao S.J., On The Homotopy Analysis method for Non-Linear Problems, Appl. Math. Comput. 147 (2004) 499-513.

[3] Liao S.J., Tan Y., A general approach to obtain series solutions of nonlinear differential equations. Studies in Applied Mathematics, 119 (2007) 297-354.

[4] Liao S.J., Notes on the homotopy analysis method: Some definitions and theorems, Commun. Nonlinear Sci. Numer. Simulat. 14 (2009) 983-997.

[5] Marinca V., Herisanu N., et al., An optimal homotopy asymptotic method applied to the steady flow of a fourth-grade fluid past a porous plate, Applied Mathematics Letters, 22 (2009) 245-251.

[6] Niu Zh ., Wang, Ch., A One-Step Optimal Homotopy Analysis Method for Nonlinear Differential Equation, Commun. Nonlinear Sci. Numer. Simulat. 1 (2010) 2026–2036.

[7] Stoer J., Bublirsch R., Introduction to Numerical Analysis, Springer–Verlag, (1983).

[8] Trefethen N., Spectral methods in Matlab SIAM ed., Philadelphia, (2000).

[9] Wu YY ., Cheung KF., Homotopy solution for nonlinear differential equations in wave propagation problems. Wave Motion 46 (2009) 1–14.

[10] Yabushita K., Yamashita M., Tsuboi K., An analytic solution of projectile motion with the quadratic resistance law using the homotopy analysis method, J. Phys. A: Math. Theor. 40 (2007) 8403-8416.

Received: June, 2011