Upload
independent
View
0
Download
0
Embed Size (px)
Citation preview
Comparison study between the method of lines and series solution
methods for the solitary wave solution of the general Kdv equation
Mohamed M. Mousa and Mohamed Reda
Department of Mathematic and Physical Science, Benha university, Egypt
Department of Mathematic and Physical Science, Benha university, Egypt
Abstract
In this paper the method of lines (MOL) is presented for the numerical solution of the korteweg-
de varies(kdv) equation and then comparing the numerical solution with the analytical solution
such that adomian decomposition method (ADM). The method of lines (MOL) gives accurate
solution over the analytical method. MOL approximates the spatial derivative using finite
difference method (FDM) and this led to a system of ordinary differential equation. Solution of
the system was obtained by applying RK4 method. In order to show the accuracy of these
methods we compare these solutions with the exact solutions.
Keywords: KdV equation, the method of lines, and adomian decomposition method, Classical
four order Runge–Kutta scheme (RK4).
1. Introduction
It wasn 1895 that Korteweg and Vries derived KdV equation to model Russell’s phenomenon
of solitons [1] like shallow water waves with small but finite Amplitudes [2]. Solitons are
localized waves that propagate without change of it’s shape and velocity properties and table
against mutual collision [3]. It has also been used to describe a number of important physical
phenomena such as magneto hydrodynamics waves in warm plasma, acoustic waves in an
inharmonic crystal and ion-acoustic waves [4]. the models of KdV equation [1] is given by
u(x,0)=f(x)
Eq. (1) is the pioneering equation that gives rise to solitary wave solutions. Solitons, which are
waves with infinite support, are generated as a result of the balance between the nonlinear
convection and the linear dispersion in the above equations. Solitons are localized waves that
propagate without change of their shape and velocity properties and stable against mutual
collisions [5]. In this paper, The method of lines(MOL), and adomian decomposition method
(ADM) [10] . are used to conduct an analytic study on the KdV in order to show all the methods
above, are capable in solving a large number of linear or nonlinear differential equations, also
all the aforementioned methods give rapidly convergent successive approximations of the
exact solution if such solution exists otherwise approximations can be used for numerical
purposes. The nonlinear kdv equation (1) is an important mathematical model with wide
applications in quantum mechanics and nonlinear optics, fluid physics and quantum field
theory. For more details about the formulation o kdv equation, see [6-7].
2.The Method of Lines
The method of lines (MOL) is a well established numerical technique (or rather a semi
analytical method) for the analysis of transmission lines, waveguide. The method of lines is
regarded as a special finite difference method but more effective with respect to accuracy
and computational time than the regular finite difference method. It basically involves
discretising a given differential equation in one or two dimensions while using analytical
solution in the remaining direction. MOL has the merits of both the finite difference method
and analytical method; it does not yield spurious modes nor have the problem of relative
convergence. The method of lines (MOL) [8] is generally recognized as a comprehensive and
powerful approach to the numerical solution of time-dependent partial differential equations
(PDEs). This method usually proceeds in two separate steps: first, approximating the spatial
derivatives. Second, the resulting system of semi discrete (discrete in space–continuous in
time) ordinary differential equations (ODEs) is integrated in time. The essence of the method
of lines is a way of approximating PDEs by ODEs. Obviously, an advantage of the MOL is that
one can use all kinds of ODE solvers and techniques to solve the semi-discrete ODEs
directly. To apply MOL usually involves the following five basic steps:
1. Partitioning the solution region into layers.
2. Discretisation of the differential equation in one coordinate direction.
3. Transformation to obtain decoupled ordinary differential equations.
4. Inverse transformation and introduction of the boundary conditions.
5. Solution of the equations.
3.The Method of Lines Solution of the KdV equation
We consider KdV equation (1) with initial condition
√
and the boundary conditions
We replace the partial derivatives depend on spatial variables, and
in Kdv equation
(1) with known finite difference approximations at point This yields The derivative is
computed by finite differences in three ways
1. five-point centered approximations
2. seven-point centered approximations
3. nine-point centered approximations
The derivative is computed by finite differences in two ways
1. five-point centered approximations
2. seven-point centered approximations
This yields a system of ordinary differential equations depend on (t) in the form
Next, the following popular ODE solvers to solver for (4) so we will use Classical four order
Runge–Kutta scheme (RK4)
(
) (
)
In this section, we present two numerical examples. One simulates the propagation of a
single soliton and the other simulates the interaction of two solitons in KdV equation.
Example 1. Propagation of a single soliton (see [9]). And In this example, we study a single
soliton of Eq. (1) with ε=6 and µ=1.The initial condition is that
√
The exact solution of Eq. (1) is given by
√
The boundary function u(a,t)=f(t) and u(b,t)= g(t)in Eq. (1) can be obtained from the exact
solution. The computational domain is [-10, 20]*[0, 5]. The computational results are listed in
Tables 1…7. We plot the profiles of the single soliton at ,t= 0, 1, 2, 3, 4, 5 in Fig. 1.
Fig.1. the single soliton at , t= 0, 1, 2, 3, 4, 5
Fig.2. The error between the exact solution u(x, t) and the MOL solution for one solitons at t=1,2,3,5
Then we plot the profiles of the single soliton at , t= 0, 1, 2, 3, 4 in Fig.3.
Fig.3. The single soliton at , t= 0, 1, 2, 3, 4, 5
Fig.4. The error between the exact solution u(x, t) and the MOL solution for one solitons at t=1,2,3,4
Example 2. The interaction of two solitons (see [9]). In this example, we study the
interaction of two solitons of Eq. (1) with ε=6 and µ=1. The initial condition is
The exact solution of Eq. (1) is given by
The boundary function f(t) and g(t) in Eq. (1) can be obtained from the exact solution. The
computational domain is [-15, 15]*[-0.8, 0.8]. The computational results are listed in Tables
8...10. We also plot the profiles of the interaction of two solitons at t=-0.8, -0.6, -0.4, -0.2, -0.05,
0, 0.2, 0.4, 0.6, 0.8
Fig. 5. The interaction of two solitons at t=0, 0.05, 0.1, 0.2, 0.4, 0.6, 0.8, -0.1,-0.2,-0.4, -0.8.
Fig. 6. The error between the exact solution u(x, t) and the numerical solution for two solitons at t=0.05,
0.1, 0.2, 0.4, 0.6, 0.8
3. Description of the Adomian decomposition method
Following the analysis of Adomian [Adomian, 1994] equation (1) can be rewritten in an
operator form as the following:
Where
is the operator of the highest-ordered derivatives with respect to t and R is
the remainder of the linear operator. The nonlinear term is represented by . Thus we
get
The inverse is assumed an integral operator given by
∫
The operating with the operator on both sides of Eq. (16) we have
Where is the solution of homogeneous equation
involving the constants of integration. The integration constants involved in the solution of
homogeneous equation (19) are to be determined by the initial or boundary condition
according as the problem is initial-value problem or boundary - value problem. The ADM
assumes that the unknown function u(x, t) can be expressed by an infinite series of the form
∑
and the nonlinear operator F(u) can be decomposed by an infinite series of polynomials
given by ∑
Where will be determined recurrently, and are the so-called polynomials of
defined by
∑
It is now well known in the literature that these polynomials can be constructed for all
classes of nonlinearity according to algorithms set by Adomian [10,14] . Operating with the
integral operator on both sides of(13) and using the initial condition we find
Identifying the zeroth component by all terms that arise from the initial condition,
and as a result, the remaining components
Can be determined by using the recurrence relation:
Where are Adomian polynomials that represent the nonlinear term and given by:
Other polynomials can be generated in a like manner. The first few components of
follows as
The scheme in (26) can easily determine the components , n
it is possible to calculate more components in the decomposition series to enhance the
approximation.
5. Solution of KDV equation by using ADM
In the following, we discuss single soliton and two soliton solution of the kdv equation.
Consider the initial value problem associated with the kdv equation:
√
Applying the inverse operator of (17) on both sides of (27) Anderson using the
decomposition series (20) And (21) yield
∑
√
∑
∑
The resulting components are :
(
√
)
( √ )
√
( √ )
√
( √ ) ( √ )
√
Then the solution in a series form is given by
(
√
)
( √ )
√
( √ )
√
( √ ) ( √ )
√
Fig. 9. The approximation solution Fig. 10. The approximation solution
of KDV for of KDV for
at By using at By using
ADMPA technique. ADMPA technique.
Fig. 11. The comparison between the exact and the ADM at t =0, 1, 2 , 10 20x
Fig.12. The graph shows the comparison between the exact and theADM pad
approximation and t =2 10 20x solution for
Fig.13. The comparison between the exact and the approximation and t =3 10 20x
Fig.14. The comparison between the exact and the pade approximation and t =3 10 20x
solution for
Fig.15. The error between the exact solution u(x, t) and the ADM pade solution at t=1, 2, 3.
Fig. 16. The comparison between the exact and the approximation at t =4 and 10 20x
Fig.17. The comparison between the exact and ADM pade solution at t =4 and 10 20x
Fig.18. The comparison between the exact and ADM pade solution t =5 and 10 20x
Fig.19. The error between the exact solution u(x, t) and the ADM pade solution at t=4, 5.
In order to prove numerically whether the application of PAs to Adomian’s series solution of
korteweg-de varies(kdv) equation leads to better accuracy and larger convergence region, the
numerical solution of some examples with and without PAs were evaluated, and one concluded,
from the worked examples, that Pas improve the convergence region and the accuracy of the
solution, except in the increasing in time we observe that the numerical method of lines is better
and higher accuracy.
Fig. 20. The ADM pade approximation solution of KDV at 10 20x and 0 3t
Fig.18. The comparison between the exact and ADM solution at t =0, 1 and 10 20x
Fig.18. The comparison between the exact and ADM pade solution at t =1 and
t=1 and
Error OFADM ADM error of MOL x
8.124* 0.00024675 0.00000655 0.00024020 0.00024675 -8
1.267* 0.00182044 2.406* 0.00179637 0.00182044 -6
1.465* 0.09035184 3.431* 0.09034988 0.09035331 -2
5.097* 0.39321876 1.671* 0.39320715 0.39322386 0
1.491* 0.39322535 2.342* 0.39320044 0.39322386 2
2.642* 0.09035328 1.254* 0.09034077 0.09035331 4
2 0.00182044 6.571* 0.00182701 0.00182044 8
865* 0.00024675 0.00001717 0.00022905 0.00024675 10
212* 0.00003340 1.056* 0.00004396 0.00003340 12
Table 1 Comparison between the exact solution and approximation solution (MOL, ADM)
and the absolute error for both of them for example 1.
t=2 and
Error ADM error of MOL Exact MOL x
40010* 0.00009078 0.00001109 0.00009079 0.00007971 -8
1.198* 0.00066927 4.129* 0.00067047 0.00067460 -6
0.00262502 0.03270039 8.807* 0.03532541 0.03533421 -2
0.01587782 0.19410934 1.873* 0.20998717 0.20996843 0
0.00198087 0.50198083 5.262* 0.50000000 0.50005261 2
8.330* 0.20990386 2.611* 0.20998717 0.20996105 4
2.520* 0.00493104 3.095* 0.00493301 0.00493611 8
4012* 0.00067047 7.572* 0.00067047 0.00067804 10
1470* 0.00009079 0.00000131 0.00009079 0.00007779 12
0 0.00001228 2.908* 0.00001228 0.00004137 14
Table 2 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=3 and
Error ADM error of MOL Exact MOL x
2.292E-07 0.000033173 4.061* 0.0000334022 0.00002934022 -8
9.225E-05 0.00015451 7.827* 0.0002467586 0.00024597586 -6
0.1950573 -0.18176114 2.702* 0.0132961133 0.0132690838 -2
1.4682495 -1.37789620 2.291* 0.0903533194 0.0903762192 0
0.048744 0.44196799 2.483* 0.3932238665 0.3931990300 2
0.0087789 0.38444497 1.660* 0.3932238665 0.3932072587 4
3.27* 0.01329938 2.071* 0.0132961133 0.0133168317 8
4.023* 0.00182004 0.000017387 0.0018204423 0.0018030553 10
7.86* 0.00024668 3.082* 0.0002467586 0.000277586 12
1.22* 0.00003339 0.000001995 0.0000334022 0.0000314072 14
Table 3 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=1 and
Error ADMPA error of MOL MOL Exact x
0.006123 -0.003440993 6.346* 0.00274536 0.00268190 0
0.03357 0.053304163 2.955* 0.01976162 0.01973207 1
0.03561 0.176916331 0.00103972 0.14234136 0.14130164 2
0.799379 0.040569983 0.00166716 0.84161583 0.83994868 3
1.994413 0.005586571 0.00244057 2.00244056 2 4
0.839191 0.0007577930 0.00351941 0.83642926 0.83994868 5
0.141199 0.0001027386 0.00030092 0.14100072 0.14130164 6
0.019718 0.0000139529 0.00010097 0.01983303 0.01973207 7
0.00268 0.0000018831 2.024* 0.00266165 0.00268190 8
0.000363 0.00000000002 2.028* 0.00034287 0.00036316 9
Table 4 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=2 and
Error ADMPA error of MOL MOL Exact x
0.002595 0.000086762 0.000242 0.00243993 0.00268190 4
0.01972 0.000011805 0.00053 0.02025716 0.01973207 5
0.1413 0.000001594 0.00124 0.14253843 0.14130164 6
0.8444366 2.16285 0.00449 0.84443665 0.83994868 7
2.0017707 2.92332 0.00177 2.00177075 2 8
0.8336631 3.95711 0.006286 0.83366317 0.83994868 9
0.1406475 5.35370 0.000654 0.14064759 0.14130164 10
0.0192449 7.22883 0.000487 0.01924495 0.01973207 11
0.0024333 9.79051 0.000249 0.00243330 0.00268190 12
0.0007373 1.32706* 0.00037 0.00073732 0.00036316 13
Table 5 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=3 and
Error ADMPA error of MOL MOL Exact x
0.002959 3.35893* 0.00028 0.00295904 0.00268190 8
0.020344 4.54076* 0.00061 0.02034409 0.01973207 9
0.143063 6.14900* 0.00176 0.14306311 0.14130164 10
0.8473335 8.31597* 0.00738 0.84733357 0.83994868 11
2.002348 1.12438* 0.00235 2.00234852 2 12
0.8307134 1.52261* 0.009235 0.83071340 0.8399486 13
0.1397602 2.06048* 0.001541 0.13976023 0.1413016 14
0.0200765 2.78232* 0.00034 0.02007650 0.0197320 15
0.002308 3.77379* 0.000374 0.00230801 0.0026819 16
0.0003586 5.10027 4.52* 0.00035864 0.0003631 17
0.0001799 6.891739* 0.00028 0.00017996 0.0000491 18
Table 6 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=4 and
Error ADMPA error of MOL MOL Exact x
0.0000491 1.45367 0.00023 0.00028625 0.000049153 10
0.0003636 1.964889 0.00033 0.00003581 0.000363166 11
0.0026819 2.66305 0.00046 0.00314775 0.002681901 12
0.0197320 3.598489 0.00021 0.01994467 0.019732074 13
0.1413016 4.872775 0.00249 0.14379644 0.141301649 14
0.8399486 6.601960 0.01014 0.85009515 0.839948683 15
2 8.912864 0.00198 2.00197971 2 16
0.8399486 1.206641 0.01187 0.82807536 0.839948683 17
0.1413016 1.632730 0.00199 0.13930788 0.141301649 18
0.0197320 2.21352 0.00097 0.01876202 0.019732074 19
Table 7 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 1.
t=0.1
Error ADMPA error of MOL MOL Exact x
1.8E-08 0.00000329 0.00000297 0.00000625 0.00000328 -7.5
1E-08 0.00040079 0.00000366 0.00039714 0.00040080 -5.1
3E-06 0.02655683 3.47 0.02655734 0.02655387 -3
0.004755 0.77300968 2.277 0.77774164 0.77776441 -1.2
2.440337 -0.4397646 1.017E-05 2.00056192 2.00057209 0
0.179434 7.30811121 0.00090808 7.48845298 7.4875449 1.8
0.047589 0.41670944 7.3 0.46429958 0.46429885 3
1.2E-07 0.00033044 1 0.00033034 0.00033033 6
0.00031 0.00033044 2 0.00001614 0.00001634 7.5
Table 7 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 2.
t=0.2
Error ADMPA error of MOL Exact MOL x
0.00000008 0.0000014 0.0000082 0.00000148 0.00000968 -7.5
8.01E-07 0.0001793 0.0000168 0.00018010 0.00019693 -5.1
8.2408E-05 0.01205726 1.1819 0.01197485 0.01198667 -3
0.03905287 0.35592635 -5.68 0.39497922 0.39498490 -1.2
1.88919517 -0.0096877 4.6585 1.87950740 1.87946081 0
1.70036789 0.07482183 2.036 1.77518973 1.77516937 0.6
0.71816697 1.09144783 3.3922 0.37328086 0.37331478 1.8
3.52226765 0.13884917 0.0006676 3.66111682 3.66178449 3
0.00149757 0.00054504 1.186 0.00204262 0.00204273 6
0.00000295 0.00003666 1.178 0.00003961 0.00003843 7.5
5E-09 0.00000181 0.0000013 0.00000181 0.00000316 9
Table 8 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 2.
t=0.4
Error ADMPA error of MOL MOL Exact x
0.00009606 -0.0000597 0.00001368 0.00002268 0.00003636 -5.1
0.0003879 0.0028114 2.514E-05 0.00244861 0.00242347 -3
0.02858793 0.058224 7.75E-06 0.08681968 0.08681193 -1.2
0.77718936 -0.000475 3.2E-07 0.77671404 0.77671436 0
7.8186974 0.005308 6.1809821 1.64302330 7.82400540 0.6
1.11490356 0.079320 4.165E-05 1.19418191 1.19422356 1.8
0.14668776 0.0091068 2.19E-06 0.15579675 0.15579456 3
1.89069863 0.0003485 0.0017078 1.89275497 1.89104713 6
1.09672645 -0.0002204 0.00094512 1.09556093 1.09650605 7.5
0.00291482 0.00001512 4.2E-07 0.00293036 0.00292994 9
Table 9 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 2.
t=0.6 Error ADMPA error of MOL Numerical Exact x
0.00000121 -6.9358 1.991 0.00000141 0.000001213 -6
4.91966 0.00011545 4 0.00006625 0.000066257 -4
0.01941787 0.00714985 1.487 0.02656773 0.026552863 -1
0.18819486 -0.0000878 3.5812 0.18810705 0.18811064 0
1.9457138 0.01030557 5.0295 1.95601937 1.95606967 2
0.10559688 0.00018979 1.7782 0.10578667 0.10580446 4
0.00191184 0.00008694 2.938 0.00199878 0.00199585 6
0.00200321 -0.00000443 0.01574149 0.00199878 0.01774028 8
7.51475965 -0.00000518 0.00280319 7.51475447 7.51755766 10
0.00649942 4.0588 1.5214 0.00648420 0.00649942 12
Table 1Comparison between the exact solution and approximation solution (MOL,ADM) and
the absolute error for both of them for example 2. t=0.8
Error ADMPA error of MOL Numerical Exact x
0.00002010 0.00032744 0.000020104 0.00011894 0.00009884 -3
2.868 -0.00002672 2.868 0.03951145 0.03948276 0
0.00024296 0.000566554 0.000242963 1.77428741 1.774530373 3
1.486 0.000029577 1.486 0.00983819 0.009836705 6
0.000027 -3.81509 0.000010657 0.00003777 0.000027114 9
0.001078 4.53673 8.457 0.00108735 0.001078898 10.5
0.039347 3.03599 0.000238478 0.03958550 0.039347023 11.4
0.129893 1.58771 0.000682871 0. 13057594 0.129893070 11.7
0.423217 8.45728 0.002251805 0.425469719 0.423217914 12
7.517559 7.4545 0.009726957 7.507832936 7.517559893 13.2
4.175376 4.1032 0.017373096 4.158003631 4.175376727 13.5
Table 1 Comparison between the exact solution and approximation solution (MOL,ADM)
and the absolute error for both of them for example 2.
Conclusion
In this article, the method of lines (MOL) has been s successfully implemented to find new
traveling wave solutions for the nonlinear PDE’s namely, the KdV equations. The results
show that the method of lines is a powerful Mathematical tool for obtaining accurate
solutions for the KdV equation. a comparison between HPM and ADM shows that although
the results of both methods are the same, HPM can overcome difficulties arising in the
calculation of Adomian’s polynomials. Therefore HPM is much easier and more
convenient to apply than ADM. The computations associated with examples provided
here were performed using Maple 15.
References
[1] D.J. Korteweg, G. de Vries, On the change of form of long waves Advancing in a
rectangular canal, and on a new type of long stationary wave, Philos.
Mag. Vol.39, 1895, pp. 422–443.
[2] Luwai Wazzan, A modified tanh–coth method for solving the KdV and the KdV– Burgers
equations, Journal of Communication in nonlinear science and numerical simulation, (2007)
[3]A.J. Khattak, Siraj-ul-Islam, A comparative study of numerical solutions of a class of KdV
equation , Journal of Computnational Applied Mathematical, Vol. 199, 2008 , pp.425–434.
[4]T. Ozis, S. Ozer S, A simple similarity-transformation-iterative scheme applied toKorteweg-
de Vries equation, Journal of Applied.
[5] Abdul-Majid Wazwaz, The variational iteration method for rational solutions for KdV,
K(2,2) Burgers and cubic Boussinesq equations, Journal of Computational Applied
Mathematical, Article, (2006)
[6] Hirota R. Exact N-soliton solutions of a nonlinear wave.J Math Phys 1973;14(7):805-9.
[7] Hirota R. Exact N-soliton solutions of the wave equation of long waves in shallow-water
and in nonlinear lattices. J Math Phys1973;14(7):810-4.
[8] Schiesser WE. The numerical method of lines: integration of partial differential equations.
San Diego, California: Academic Press; 1991.
[10] G. Adomian, Solving Frontier Problems of Physics: The Decomposition Method, Kluwer
Academic Publishers, Boston, MA, 1994.
[11] A.H.A. Ali, Finite element studies of the Korteweg–de Vries equation, Ph.D. Thesis,
University of Wales, UK, 1989.
[12] L.R.T. Gardner, G.A. Gardner, Solitary waves of the regularized long wave equation, J.
Comput. Phys. 91 (1990) 2.
[13] L.R.T.Gardner,G.A. Gardner, Solitary waves of the equal width wave equation, J. Comput.