A nonstandard numerical method for the modified KdV equation
AYHAN AYDIN1,∗and CANAN KOROGLU2
1Department of Mathematics, Atilim University, Ankara 06836, Turkey
2Department of Mathematics, Hacettepe University, Beytepe, Ankara 06800, Turkey
∗Corresponding author. E-mail: ayhan.aydin@atilim.edu.tr
MS received 16 August 2016; revised 8 May 2017; accepted 1 June 2017; published online 25 October 2017 Abstract. A linearly implicit nonstandard finite difference method is presented for the numerical solution of modified Korteweg–de Vries equation. Local truncation error of the scheme is discussed. Numerical examples are presented to test the efficiency and accuracy of the scheme.
Keywords. Nonstandard finite difference; modified Korteweg–de Vries equation; local truncation error.
PACS Nos 02.70.Bf; 02.30.Jr; 02.60.Lj
1. Introduction
Many physical phenomena in various fields of science such as fluid mechanics and quantum field theory can be described by the modified Koreteweg–de Vries (mKdV) equation [1]
ut +qu2ux+r ux x x =0, (1)
where r andq are real parameters. Here u = u(x,t) is a function of the space variable x and time variable t. In most applications,u(x,t)represents the amplitude of the relevant wave mode (e.g., u may represent the vertical displacement of the pycnocline). Equation (1) is a nonlinear partial differential equation (PDE) with third-order dispersion. For many years, many pow- erful methods have been developed for solving the mKdV eq. (1) such as inverse scattering method [2], bilinear transformation [3], the tanh–sech method [4], extended tanh method [5] etc. Under the assumption thatu(x,t)→0 as|x| → ∓∞, the mKdV eq. (1) has an analytical solution of the form [6]
u(x,t)= sech2(p(x−νt−x0)). (2) It is a completely integrable equation under periodic boundary conditions and has infinite number of con- served quantities, among which are the charge, the momentum and the energy:
Q = ∞
−∞udx
M = ∞
−∞u2dx E =
∞
−∞
u4− 6
qu2x
dx. (3)
In [7], Wazwaza and Xu derived negative order forms for mKdV equation, one for the focussing branch
ut +6u2ux+r ux x x =0 (4)
and the other for the defocussing form
ut −6u2ux+r ux x x =0. (5)
Moreover, if u(x,t) is a solution of the defocussing eq. (5), then by the Miura transformation [8] u → u2+ux,the solutions of the mKdV eq. (1) are mapped to the standard KdV equation
ut +quux+r ux x x =0. (6)
Based on an infinite-dimensional Kolmogorov–Arnold–
Moser (KAM) theory and partial Birkhoff normal form, it was proved that the one-dimensional defocussing mKdV eq. (5) admits a Cantor family of small ampli- tude, quasiperiodic solutions [9]. Various numerical methods are proposed for the numerical solution of the mKdV eq. (1). For example, in [10] an energy con- serving finite difference scheme is proposed. Focussing mKdV eq. (4) on an unbounded domain is solved in [11] by using a dual Petrov–Galerkin spectral method for a reduced problem after imposing non-reflecting boundary conditions. As far the authors are aware, a nonstandard finite difference (NSFD) method is never
proposed and analysed in the literature for the numeri- cal solution of the mKdV eq. (1). In this study, we shall propose and analyse a NSFD scheme for the numerical solution of the mKdV eq. (1).
The rest of the paper is organized as follows: In §2, a NSFD scheme is proposed and analysed for the mKdV equation. In §3, numerical experiments are demon- strated for the accuracy of the proposed scheme. Finally, in §4, a brief conclusion is given.
2. A NSFD scheme for mKdV equation In this paper, we consider the mKdV equation
ut +qu2ux+r ux x x =0, x ∈ [a,b], t >0 (7) with the initial condition
u(x,0)=u0(x), x ∈ [a,b] (8) and boundary conditions
u(a,t)= f(t), u(b,t)=g(t), t >0, (9) wherer = −β/2, β, q ∈R.Some solitary wave solu- tion of eq. (7) are listed in [12]. In this work we consider the kink soliton solution [12]
u(x,t)= −6r
q tanh(x+2r t), r,q ∈R. (10) Using the exact solitary wave solution (10), we propose a numerical scheme for solving the mKdV eq. (7) by contracting a NSFD scheme [13]. Nonstandard finite difference schemes for the numerical solution of both ordinary differential equation (ODE) and partial differ- ential equation (PDE) have been proved to be one of the most efficient numerical approaches in recent years [14]. Positivity preservation and boundedness of solu- tions of NSFD schemes provide a better performance over the standard finite difference schemes [15]. A stan- dard finite difference scheme for the mKdV eq. (7) can be proposed as
Unj+1−Unj
t +q(Unj)2Unj −Unj−1 x
+r−5Unj +18Unj+1−24Unj+2+14Unj+3−3Unj+4 2x3
=0, (11)
where x and t are the step sizes, and Unj is the approximation for the exact solution u(tn,xj) at the grid point (tn,xj). The most important dif- ference of a NSFD scheme is choosing convenient denominator functions(t, λ) = t+O(t2)and (x, μ) = x + O(x2) instead of t and x
used in conventional methods, whereλandμ are real parameters depending on the differential equation under consideration. In addition to the denominator functions, the nonlinear terms, such as u2 are modelled locally, for example u2 ≈ UnjUnj+1 instead of u2 ≈ (Unj)2. Mickens [13] presented the following five basic rules for constructing a NSFD:
1. The orders of the discrete derivatives must be exactly equal to the orders of the corresponding derivatives of the differential equations.
2. Denominator functions for the discrete derivatives must, in general, be expressed in terms of more complicated functions of the step sizes than those conventionally used.
3. Nonlinear terms must, in general, be modelled non-locally, i.e. evaluated on different computa- tional grid or lattice, for example:
y2 →yk+1yk, y3 →yk2
yk+1+yk−1 2
. 4. Special solutions of the differential equations
should also be special (discrete) solutions of the finite-difference models.
5. The finite-difference equations should not have solutions that do not correspond exactly to solu- tions of the differential equations.
In classical sense, the first derivatives ut(t,x) and ux(t,x)can be represented by
ut ∼= Un+1−Un
t , ux ∼= Uj+1−Uj
x .
In NSFD sense these derivatives can be generalized as [13]
Ut → Un+1−Un
φ(t, λ) , φ(t, λ)=t+O(t2), Ux → Uj+1−Uj−1
ψ(h, μ) , ψ(h, μ)=h+O(h2), (12) whereλandμare parameters found in the differential equation,tn =nt, xj = jx. These generalizations in discrete derivative can be stretched to build second discrete partial derivatives. Using the generalizations in the above equation and the exact solitary wave solution (10) of (7), we propose the following linearly implicit NSFD scheme:
Un+1j −Unj
+qUnjUnj+1Unj −Unj−1
+r−5Unj +18Unj+1−24Unj+2+14Unj+3−3Unj+4
=0 (13)
for the numerical solution of the mKdV eq. (1). Here is the time-step function and and = 23 are the space-step functions. From the NSFD scheme (13), we can write
= (Unj −Unj+1)
qUnjUnj+1(Unj −Unj−1)+rF(Unj), (14) where
F(Unj) = −5Unj +18Unj+1−24Unj+2 +14Unj+3−3Unj+4.
We substitute the kink soliton solution (10) into (14), and after tedious calculations we select
= e2x−1
2 and =23 (15)
so that=x+O(x2)and →2(x)3+O(x6) which is the most important difference of a NSFD scheme in selecting the denominator functions [16].
Using (15), the time-step functionin (14) is simplified to
= 1−e−4rt
4r (16)
so that→t+O(t2)as it should be for a NSFD scheme.
To analyse the local truncation error and consistency of the proposed scheme (13), we introduce the following difference quotients:
∂tunj = (Un+1j −Unj)
, ∂xunj = (Unj+1−Unj)
,
∂¯xunj
= −5Unj +18Unj+1−24Unj+2+14Unj+3−3Unj+4
.
(17) From the definition of local truncation error, we use Tay- lor’s formula for the solution of eq. (7), with appropriate
¯
xj ∈(xj,xj+1)andt¯n ∈(tn,tn+1), and get τnj =∂tunj +qunjunj+1∂xunj +r∂u¯ nj
=(∂tunj −ut(xj,tn))
+(qunjunj+1∂xunj −(u(xj,tn)2ux(xj,tn))) +r(∂¯unj −ux x x(xj,tn))
=ut(xj,tn) t
φ −1
+t2
2φ utt(xj,tn) +t3
6φ uttt(xj,t¯n) +
x −1
qu2(xj,tn)ux(xj,tn)
−(x)2
2 qu2(xj,tn)ux x(xj,tn) +(x)3
6 qu2(xj,tn)ux x x(x¯j,tn) +xt
qu(xj,tn)ux(xj,tn)ut(xj,tn)
−(x)2t
2 qu(xj,tn)ut(xj,tn)ux x(xj,tn) +(t)2x
2 qu(xj,tn)ux(xj,tn)utt(xj,tn) +(t)3x
6 qu(xj,tn)ux(xj,tn)uttt(xj,t¯n) +
2(x)3 ψ −1
r ux x x(xj,tn)
−7(x)5
2ψ r ux x x x x(x¯j,tn).
Notice that, from the construction of the time-step function and space-step functions, as x and t are chosen small enough, we have ≈ t, ≈ x and ≈2(x)3. So the local truncation error for the NSFD scheme (13) isO(t+x).This shows that the pro- posed scheme (13) is consistent with the mKdV eq. (7) when(x, t)→(0,0).
3. Numerical experiments
In this section, we present some numerical experiments to test the accuracy and efficiency of the proposed NSFD scheme (13) for the numerical solution of the mKdV eq. (7) over the spatial domaina≤ x ≤band the tem- poral interval 0 ≤ t ≤ T. The initial condition u0(x) and boundary conditions are taken from the exact solu- tion (10)
u0(x)= −6r
q tanh(x), x ∈ [a,b] (18) u(a,t)=
−6r
q tanh(a+2r t) (19) u(b,t)=
−6r
q tanh(b+2r t), t ≥0 (20)
respectively, wherer = −β/2, β,q ∈ R.We use the following error norms:
L∞= max
1≤j≤N|ue(j)−ua(j)|, L2=
N
j=1
[ue(j)−ua(j)]2,
RMS= L2
√N,
(21)
to asses the performance of the NSFD scheme. Here ue is the exact solution obtained from (10), ua is the approximate solution obtained from the NSFD scheme (13), and N is the total number of grid points in space.
Table1representsL∞,L2and the root mean square (RMS) errors of the standard finite difference scheme (11) and the NSFD scheme (13) for the mKdV eq. (7) withβ =0.01 andq =1 in the spatial domain−15≤ x ≤ 15 withx = 0.25, t = 0.001. From the table we see that the NSFD scheme (13) is more accurate than standard finite difference scheme (11) in all the cases.
Table2represents the absolute errors
|u(xj,tn)−U(xj,tn)|
for various values ofβ,x andtfor the mKdV equation (7) withq =1.Comparison shows that there is a good agreement between the NSFD scheme with the exact solution (10). It is important to note that decreasingβ values improves the accuracy.
Table 1. Efficiency comparison for the solution of (7) withβ = 0.01,q = 1 on the spatial domain−15 ≤ x ≤ 15 with t =0.001,x=0.25.N: Nonstandard, S: Standard.
T L∞(N) L∞(S) L2(N) L2(S) RMS (N) RMS (S)
0.5 5.010E−4 6.464E−4 4.210E−4 5.809E−4 3.827E−5 5.281E−5
1.0 1.028E−3 1.473E−3 8.615E−4 1.407E−3 7.832E−5 1.279E−4
1.5 1.579E−3 3.111E−3 1.335E−3 3.174E−3 1.213E−4 2.885E−4
2.0 2.153E−3 5.968E−3 1.870E−3 9.003E−3 1.700E−4 8.184E−4
3.0 3.373E−3 7.932E−2 3.441E−3 1.202E−1 3.129E−4 1.092E−2
4.0 5.558E−3 7.962E−1 7.429E−3 1.372E−0 6.753E−4 0.124E−0
5.0 1.361E−2 1.254E−0 2.059E−2 2.693E−0 1.872E−3 0.244E−0
Table 2. Absolute errors for mKdV eq. (7) withq =1 on−5≤x≤5 witht=0.01,x=0.25.
x t β=0.1 β=0.01 β =0.001
−2.5 0.1 6.088E−5 −1.714E−6 5.473E−8
0.5 3.208E−2 8.608E−6 2.722E−7
1.0 4.877E−1 2.282E−5 5.414E−7
0.0 0.1 2.527E−3 7.821E−5 2.469E−6
0.5 1.579E−2 3.950E−4 1.235E−5
1.0 3.896E−2 8.033E−4 2.474E−5
2.5 0.1 1.809E−4 5.600E−6 1.766E−7
0.5 1.120E−3 2.831E−5 8.843E−7
1.0 2.729E−3 5.727E−5 1.771E−6
-5
0
5
0 0.2 0.4 0.6 0.8 1 -0.15 -0.1 -0.05 0 0.05 0.1 0.15
t x
u(x,t)
-5
0
5
0 0.2 0.4 0.6 0.8 1 -0.15 -0.1 -0.05 0 0.05 0.1 0.15
t x
u(x,t)
Figure 1. Surface of solution.Left: Finite difference scheme (11).Right: NSFD scheme (13).
-5
0
5
0 0.2 0.4 0.6 0.8 10 0.2 0.4 0.6 0.8 1 1.2 1.4
x 10-3
t x
u(x,t)
-5
0
5
0 0.2 0.4 0.6 0.8 1 0 0.2 0.4 0.6 0.8 1
x 10-3
t x
u(x,t)
Figure 2. Absolute errors.Left: Finite difference scheme (11).Right: NSFD scheme (13).
-5 -4 -3 -2 -1 0 1 2 3 4 5
0 0.5 1 1.5 x 10-3
x L ∞ error
Standard Non-standard
-5 -4 -3 -2 -1 0 1 2 3 4 5
0 0.2 0.4 0.6 0.8 1 1.2 1.4x 10-3
x L 2 error
Standard Non-standard
Figure 3. Comparison ofL∞andL2errors for the finite difference scheme (11) with the NSFD scheme (13).
Figure 1 represents the surface of the kink soliton solution (10) obtained by the standard finite difference scheme (11) and the NSFD scheme (13) for the mKdV eq. (7). This picture represents the result of an integra- tion with q = 1, β = 0.01 over the spatial domain
−5 ≤ x ≤ 5 and temporal interval 0 ≤ t ≤ 1 with x = 0.25 and t = 0.01.Figure2 shows the cor- responding absolute errors. Note that the absolute error of the NSFD scheme is less than that of the standard scheme. L∞andL2errors are compared in figure3. In all the cases, we see that the performance of the NSFD scheme is better than that of the standard finite differ- ence scheme.
4. Conclusion
In this study, we propose a nonstandard finite differ- ence (NSFD) scheme for the numerical solution of the modified Korteweg–de Vries (mKdV) equation. In the numerical experiments, the results obtained from the NSFD scheme are compared with both the results of the standard finite difference scheme and the exact solution.
The numerical results show that the proposed scheme
provides highly accurate results for the numerical solu- tion of the mKdV equation. Thus, we can say that NSFD scheme is a powerful tool for searching solutions of var- ious nonlinear evolution equations.
Acknowledgements
The authors thank the referees for their valuable com- ments and suggestions.
References
[1] M Wadati,J. Phys. Soc. Jpn38, 673 (1975)
[2] M J Ablowitz and H Segur,Solitons and inverse scat- tering transform(SIAM, Philadelphia, 1981)
[3] R Hirota, Direct method of finding exact solutions of nonlinear evolution equations, in:Backlund transforma- tions(Springer, Berlin, 1980) pp. 1157–75
[4] W Malfliet,Am. J. Phys.60, 650 (1992)
[5] A M Wazwaz,Appl. Math. Comput.184(2), 1002 (2007) [6] M Wadati,J. Phys. Soc. Jpn34, 1289 (1972)
[7] A M Wazwaza and G Q Xu,Math. Meth. Appl. Sci.39, 661 (2016)
[8] R M Miura,J. Math. Phys.9, 1202 (1968) [9] Y Shi and J Xu,J. Geom. Phys.90, 1 (2015)
[10] K R Raslan and H A Baghdady,Gen. Math. Notes27, 101 (2015)
[11] C Zheng,Numer. Math.105, 315 (2006)
[12] A Bekir,Commun. Nonlinear Sci. Numer. Simulat.14, 1038 (2009)
[13] R E Mickens, Nonstandard finite difference models of differential equations(World Scientific, Singapore, 1994)
[14] R E Mickens,Advences in applications of nonstandard finite difference schemes (Wiley-Interscience, Singa- pore, 2005)
[15] R Anguelov, P Kama and J M-S.
Lubuma, J. Comput. Appl. Math. 75, 11 (2005)
[16] L Zhang, L Wang and X Ding,J. Appl. Math.597926 (2014).