# An Unconventional Finite Difference Scheme for Modified Korteweg-de Vries Equation

Authors: Canan Koroglu; Ayhan Aydin
Journal: Advances in Mathematical Physics
 (2017)

---

## Abstract

A numerical solution of the modified Korteweg-de Vries (MKdV) equation is presented by using a nonstandard finite difference (NSFD) scheme with theta method which includes the implicit Euler and a Crank-Nicolson type discretization. Local truncation error of the NSFD scheme and linear stability analysis are discussed. To test the accuracy and efficiency of the method, some numerical examples are given. The numerical results of NSFD scheme are compared with the exact solution and a standard finite difference scheme. The numerical results illustrate that the NSFD scheme is a robust numerical tool for the numerical integration of the MKdV equation.


---

## Body

## 1. Introduction

This paper is concerned with the nonstandard integration of modified Korteweg-de Vries (MKdV) equation(1)ut+qu2ux+ruxxx=0,x,t∈xL,xR×0,Twith initial condition(2)ux,0=u0x,x∈xL,xRand boundary conditions(3)uxL,t=ft,uxR,t=gt,t∈0,T, where q,r∈R. The analytical solution of the MKdV equation (1) can be expressed as [1](4)ux,t=∓-6rqtanh⁡x+2rt.It plays an important role in the study of nonlinear physics such as fluid physics and quantum field theory. It is a model equation for the weakly nonlinear long waves which occur in many different physical systems. It is an integrable equation and admits soliton solution obtained by means of the inverse scattering method and Hirota’s direct method and by using Backlund transformations [2, 3]. It is well known that (1) has a solitary wave solution of the form(5)ux,t=∓6rqksech⁡kx-rk2t.Although the MKdV equation has been extensively studied by many authors in soliton theory, the solution (4) is never considered before in the literature. For the purpose of nonstandard integration, the kink soliton solution (4) will be used throughout the study. A nonstandard finite difference scheme can be constructed from the exact finite difference scheme [4]. An exact finite difference scheme can be constructed for any ordinary differential equation (ODE) or partial differential equation (PDE) from the analytical solution of the differential equation [5–7]. Among the various numerical techniques such as classical finite difference, finite volume, adaptive mesh, finite element, and spectral method for solving ODEs and PDEs, NSFD schemes have been proved to be one of the most efficient approaches in recent years. The authors in [8] proposed a nonstandard finite volume method for the numerical solution of a singularly perturbed Schrödinger equation. They have shown that the proposed nonstandard finite volume method is capable of reducing the computational cost associated with most classical schemes. They have highlighted that NSFD schemes have been efficient in tackling the deficiency of classical finite difference scheme for the approximation of solutions of several differential equation models. A nonstandard symplectic Runge-Kutta method is applied to Hamiltonian systems in [9]. In [9], it has been shown that nonstandard schemes are better than standard finite difference schemes in long time computations. Compared with some other methods, NSFD method is more stable [10].Up to the author’s knowledge, a NSFD scheme for the numerical solution of the MKdV equation (1) is never studied before. The aim of this paper is to designed a robust NSFD scheme for the numerical solution of the MKdV equation (1) that is better than the standard scheme in the numerical precision for large spatial step size which reduces the computational cost associated with most classical schemes. This paper is organized as follows. In the next section we begin with proposing the NSFD scheme for the MKdV equation (1). Stability and local truncation error of the NSFD scheme are examined in Section 3. In Section 4 some numerical experiments for the NSFD scheme are presented to show that our proposed method is efficient and accurate. Finally, we summarize our observation in Section 5.


## 2. Nonstandard Discretization

In this section, we will propose the NSFD model for the numerical solution of the MKdV equation (1). Firstly, we give three basic definitions and properties of the NSFD discretization proposed by Mickens [11, 12] to construct a NSFD scheme.(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. For example, the discrete derivativesut(x,t) and ux(x,t) are generalized as(6)utx,t≅ujn+1-ujnΦΔt,λ,ΦΔt,λ=Δt+OΔt2,uxx,t≅uj+1n-ujnΓΔx,μ,uxx,t≅ujn-uj-1nΓΔx,μ,ΓΔx,μ=Δx+OΔx2.(3)
Nonlinear terms must, in general, be modeled nonlocally on the computational grid or lattice; for example,(7)ujn2≈uj+1nujn,ujn2≈uj-1n+ujn+uj+1n3ujn.ujn3≈ujn2uj+1n+uj-1n2,ujn3≈uj-1nujnuj+1n.It is well known that a NSFD method is constructed from the exact finite difference schemes. But Mickens [11] discussed some difficulties of applying the nonstandard modeling rules in the actual construction of exact finite difference scheme for the MKdV equation. Some pitfalls in the procedures for constructing an exact finite difference schemes in terms of basic rules of the NSFD methods are investigated [11]. For the MKdV equation (1) two nonstandard finite difference models are proposed [11], namely, the explicit scheme(8)Ujn+1-UjnD3Δt+qUjn+1Ujn2-Uj-1n2D2Δx+Uj+2n-3Uj+1n+3Ujn-Uj-1nD1Δx2D2Δx=0and the implicit scheme(9)Ujn+1-UjnD3Δt+qUjn+1Ujn2-Uj-1n2D2Δx+Uj+2n+1-3Uj+1n+1+3Ujn+1-Uj-1n+1D1Δx2D2Δx=0,where Ujn is the approximation to the exact solution u(x,t) at the mesh point (xj,tn) and D1(Δx)=Δx, D2(Δx)=Δx, and D3(Δt)=Δt. The above construction processes do not give functional relation between the space and time step sizes which is not known yet (see Mickens [11], p: 228). The step sizes for exact schemes must satisfy some fixed conditions. In order to release these conditions for step size, we follow the way of Zhang et al. [13] and construct the following nonstandard-theta scheme [13](10)Ujn+1-UjnΦ+qUjnUjn+1θUjn+1-Uj-1n+1+1-θUjn-Uj-1nΓ+rθUj+2n+1-2Uj+1n+1+2Uj-1n+1-Uj-2n+1Ψ+r1-θUj+2n-2Uj+1n+2Uj-1n-Uj-2nΨ=0for the numerical integration of the MKdV equation (1). Here Φ is the time step function and Γ and Ψ=2Γ3 are the space step functions; Ujn is an approximation to the exact solution u(x,t) at the mesh point (xj,tn). A standard finite difference scheme for the MKdV equation (1) can be proposed as(11)Ujn+1-UjnΔt+qUjn2θUjn+1-Uj-1n+1+1-θUjn-Uj-1nΔx+rθUj+2n+1-2Uj+1n+1+2Uj-1n+1-Uj-2n+12Δx3+r1-θUj+2n-2Uj+1n+2Uj-1n-Uj-2n2Δx3=0.According to (10), we can write(12)Φ=Ujn-Ujn+1ΨΓqUjnUjn+1ΨA+rΓB,where (13)A=θUjn+1-Uj-1n+1+1-θUjn-Uj-1nB=θUj+2n+1-2Uj+1n+1+2Uj-1n+1-Uj-2n+1+1-θUj+2n-2Uj+1n+2Uj-1n-Uj-2n.When θ=1, we select Γ(Δx)=Γ(h)=(e2h-1)/2 and hence Ψ=2Γ3=e2h-13/4. Then substituting Γ and Ψ into (12), we can rewrite Φ as(14)Φ=e4rΔt-14r×41+se4rΔt1+se4rΔt-2h1+se4rΔt+4h1+se4rΔt+2h·1+se4rΔt-4h×6s-1se4rΔt-11+se4rΔt+4h1+se4rΔt+2h·1+se4rΔt-4h2e4rΔt-2h-4e2h+1s+11+se4rΔt2·s2e12rΔt-4h-se8rΔt-6he2h+12+e4rΔt-4h-1,where s=sjn=e2(xj+2rtn). If Γ(Δx)=Γ(h)=h+O(h2) when h→0, Δt→0, after tedious calculation we obtain(15)ΦΔt⟶e4rΔt-14rwithΦΔt=Δt+OΔt2.Similarly, for θ=0 and θ=1/2, if Γ is selected to be(16)ΓΔx=Γh=e2h-12we obtain the same “denominator function” Φ(17)Φ⟶e4rΔt-14r.We note that Φ→Δt, Γ→Δx, and Ψ→2Δx3 as (Δt,Δx)→(0,0).


## 3. Stability and Local Truncation Error

In this section, stability and local truncation error of the nonstandard scheme (10) are examined. For stability analysis we use the von Neumann method. Since the method is applicable only for linear PDE, we consider the linearized MKdV equation(18)ut+aux+ruxxx=0,x,t∈xL,xR×0,T,where a=max⁡{qu2(x,t)} in the domain (x,t)∈[xL,xR]×[0,T]. The application of the nonstandard-theta scheme (10) to the linear equation (18) yields(19)Ujn+1-UjnΦ+aθUjn+1-Uj-1n+1+1-θUjn-Uj-1nΓ+rθUj+2n+1-2Uj+1n+1+2Uj-1n+1-Uj-2n+1Ψ+r1-θUj+2n-2Uj+1n+2Uj-1n-Uj-2nΨ=0.We take the difference between the exact solution u(x,t) at the mesh point (xj,tn) and the approximate solution Ujn and define the error ϵjn=u(xj,tn)-Ujn. Substituting Ujn=u(xj,tn)-ϵjn into the difference equation (19), we see that the error ϵjn satisfies the same discrete equation(20)ϵjn+1-ϵjnΦ+aθϵjn+1-ϵj-1n+1+1-θϵjn-ϵj-1nΓ+rθϵj+2n+1-2ϵj+1n+1+2ϵj-1n+1-ϵj-2n+1+Ψ+r1-θϵj+2n-2ϵj+1n+2ϵj-1n-ϵj-2nΨ=0.The von Neumann stability analysis uses the fact that every linear constant coefficient difference equation has a solution of the form(21)ϵjn=eαΔtneiβjΔx=ξneiβjΔx,α,β∈R,i2=-1.The function ξ is determined from the difference equation by substituting the Fourier mode (21) into (20), and we obtain(22)ξn+1eiβjΔx1+A2+iB2=1-A1-iB1ξneiβjΔx,where (23)A1=2ΦaΓ1-θsin2βΔx2,A2=2ΦaΓθsin2βΔx2,B1=ΦaΓ1-θsinβΔx-8ΦrΨ1-θsinβΔxsin2βΔx2,B2=ΦaΓθsinβΔx-8ΦrΨθsinβΔxsin2βΔx2.Canceling the exponential term, we have ξn+1=ρξn, where(24)ρ=1-A1-iB11+A2+iB2is the amplification factor of the method. If the method is to be stable, the stability requirement ρ≤1 should be satisfied. Now we consider the following cases.Crank-Nicolson Type Scheme. When θ=1/2, the amplification factor is simplified to(25)ρ=1-A-iB1+A+iB,where (26)A=ΦaΓsin2βΔx2B=Φa2Γsin⁡βΔx-4ΦrΨsin⁡βΔxsin2βΔx2. From (25) we get ρ2=ρρ¯≤1; hence the proposed method (10) is unconditionally stable for θ=1/2.The Fully Implicit Scheme. When θ=1, the amplification factor is simplified to(27)ρ=11+A+iB,where (28)A=2ΦaΓsin2βΔx2B=ΦaΓsin⁡βΔx-8ΦrΨsin⁡βΔxsin2βΔx2. From (27) we get |ρ|2=ρρ¯≤1; hence the proposed method (10) is unconditionally stable for θ=1.The Explicit Scheme. When θ=0, the amplification factor is simplified to(29)ρ=1-A-iB,where (30)A=2ΦaΓsin2βΔx2B=ΦaΓsin⁡βΔx-8ΦrΨsin⁡βΔxsin2βΔx2. It is well known that the explicit methods are conditionally stable. Numerical experiments show that the amplification factor |ρ|≤1 when Φ/Γ<0.03 (or Δt/Δx<0.1) for the parameters q=0.3 and r=-0.5.Now, we will discuss the local truncation error of the nonstandard scheme (10). In theory, we can approximate the original problem as accurately as we wish by making the time step Δt and Δx small enough. It is said in this case that the approximation is consistent. The local truncation error and the stability play important roles in the convergence of the numerical method. In a convergent method, the order of the error is determined by the order of the local truncation error. The local truncation error Tjn of the nonstandard scheme (10) is defined by(31)Tjn=∂tujn-utxj,tn+qujnunn+1∂xujn-uxj,tn2uxxj,tn+r∂xxxujn-uxxxxj,tn,where(32)∂tujn=ujn+1-ujnΦ,∂xujn=θujn+1-uj-1n+1+1-θujn-uj-1nΓ,∂xxxujn=θuj+2n+1-2uj+1n+1+2uj-1n+1-uj-2n+1Ψ+1-θuj+2n-2uj+1n+2uj-1n-uj-2nΨand ujn is the approximate solution for the MKDV equation (1) obtained from the nonstandard scheme (10) and u(xj,tn) is the exact solution at the mesh point (jΔx,nΔt). For θ=1, the principal part of the local truncation error is(33)Tjn=ΔtΦ-1ut+Δt22Φutt+Δt36Φuttt+ΔxΓ-1qu2ux-Δx22Γqu2uxx+ΔxΔtΓqu2uxt+Δx36Γqu2uxxx-Δx2Δt2Γqu2uxxt+ΔxΔt22Γqu2uxtt+ΔxΔtΓquuxt-Δx2Δt2Γquuxxt+ΔxΔt2Γquutuxt+Δx3Δt6Γquutuxxx-Δx2Δt22Γquutuxxt+ΔxΔt32Γquutuxtt+ΔxΔt22Γquuttux-Δx2Δt24Γquuttuxx+ΔxΔt32Γquuttuxt+Δx3Δt212Γquuttuxxx-Δx2Δt34Γquuttuxxt+r2Δx3Ψ-1uxxx.It is clear that (Φ,Γ,Ψ)→(Δt,Δx,2Δx3) as (Δt,Δx)→(0,0). Thus, we get the local truncation error Tjn=O(Δt+Δx). Similarly, one can show that the local truncation error for θ=0 is first-order in time and space. The principal part of the local truncation error for θ=1/2 is(34)Tjn=ΔtΦ-1ut+Δt22Φutt+Δt36Φuttt+ΔxΓ-1qu2ux-Δx22Γqu2uxx+ΔxΔt2Γqu2uxt+Δx36Γqu2uxxx-Δx2Δt4Γqu2uxxt+ΔxΔt24Γqu2uxtt+ΔxΔt22Γquuxutt-Δx2Δt24Γquuxxutt-Δx2Δt24Γquutuxxt+ΔxΔt34Γquutuxtt+ΔxΔt48Γquuttuttx+2Δx3Ψ-1ruxxx+Δx3Δt22Ψruttxxx+Δx52Ψruxxxxx.It is clear that (Φ,Γ,Ψ)→(Δt,Δx,2Δx3) as (Δt,Δx)→(0,0). Thus, we get the local truncation error Tjn=O(Δt2+Δx). We deduce that the nonstandard scheme (10) is consistent since the local truncation Tjn tends to zero as Δt and Δx tend to zero. The centerpiece for the theory of convergence of linear difference approximations of time-dependent partial differential equations is the Lax Equivalence Theorem [14]. Since the proposed scheme (10) is consistent and stable, it is convergent according to the Lax theorem.


## 4. Numerical Results

In this section we present some numerical experiments to test the accuracy and efficiency of the proposed NSFD scheme (10) for the numerical solution of the MKdV equation (1) over the solution domains xL≤x≤xR and 0≤t≤T. The solution domain is divided into equal intervals with length Δx=(xR-xL)/M in the direction of the spatial variable x and Δt=T/M in the direction of time t such that xj=xL+jΔx, j=0,1,…,J, tn=nΔt, and n=0,1,…,M. The initial condition u0(x) and boundary conditions are taken from the exact solution (4)(35)u0x=-6rqtanh⁡x,x∈xL,xR(36)uxL,t=-6rqtanh⁡xL+2rt,t≥0(37)uxR,t=-6rqtanh⁡xR+2rt,t≥0,respectively, where r=-β/2, β,q∈R. We use the following error norms:(38)L∞=max0≤j≤Juej-uaj,L2=∑j=0Muej-uaj2,to assess the performance of the NSFD scheme. Here ue is the exact solution obtained from (4) and ua is the approximate solution obtained from the NSFD scheme (10).Table1 represents L∞ and L2 errors of the NSFD scheme (10) and the standard finite difference scheme (11) at different times for the MKdV equation (1) with θ=1, β=0.001, and q=50 in the spatial domain -15≤x≤15 with Δx=2.0 and  Δt=0.01. From the table we see that the NSFD scheme (10) is more accurate than standard finite difference scheme (11) in all cases. We obtained similar results for θ=0 and θ=1/2. The absolute error is defined by(39)uxj,tn-Ujn for the standard scheme (11) and the nonstandard scheme (10) are provided in Table 2 at various x and t values. From the experiments it is readily seen that our method is more accurate than the standard method.Table 1
L
∞ and L2 errors for MKDV equation (1) with θ=1, q=50, and β=0.001, on -15≤x≤15 with Δt=0.01 and Δx=2.0. N: nonstandard; S: standard.
T
L
∞ (N)
L
∞ (S)
L
2 (N)
L
2 (S)
2.0
6.261
E
-
6
1.466
E
-
5
8.007
E
-
6
1.560
E
-
5
4.0
1.251
E
-
5
2.912
E
-
5
1.601
E
-
5
3.104
E
-
5
6.0
1.872
E
-
5
4.339
E
-
5
2.402
E
-
5
4.630
E
-
5
8.0
2.492
E
-
5
5.747
E
-
5
3.202
E
-
5
6.140
E
-
5
10.0
3.111
E
-
5
7.137
E
-
5
4.002
E
-
5
7.632
E
-
5Table 2
Absolute errors for MKDV equation (1) with θ=1, q=0.3, and β=0.1 on -15≤x≤15 with Δt=0.01 and Δ=x=1.0. N: nonstandard; S: standard.
x
t
N
S
-10
0.2
1.203
E
-
10
8.241
E
-
10
0.5
2.897
E
-
10
2.251
E
-
09
0.8
4.466
E
-
10
3.949
E
-
09
0
0.2
1.983
E
-
02
1.448
E
-
02
0.5
4.953
E
-
02
3.636
E
-
02
0.8
7.915
E
-
02
5.833
E
-
02
10
0.2
3.298
E
-
10
6.636
E
-
10
0.5
9.267
E
-
10
1.969
E
-
09
0.8
1.668
E
-
09
3.761
E
-
09Table3 also measures the accuracy and the versatility of the NSFD scheme (10) with θ=1 by using the absolute error at the mesh point (xj,tn). From the table we see that the nonstandard scheme is very accurate and efficient. In addition, we notice that increasing the value of the nonlinear term q does not affect the accuracy for large spatial step sizes. Similar results are obtained for θ=0 and θ=1/2.Table 3
Nonlinear effect: absolute errors forθ=1 and β=0.1 on -15≤x≤15 with Δx=1.0 and T=1 with Δt=0.01.
x
t
q
=
0.3
q
=
10
q
=
100
-10
0.2
1.203
E
-
10
2.083
E
-
11
6.588E-12
0.5
2.897
E
-
10
5.018
E
-
11
1.587E-11
0.8
4.466
E
-
10
7.734
E
-
11
2.446E-11
0
0.2
1.983
E
-
02
3.434
E
-
03
1.086E-03
0.5
4.953
E
-
02
8.579
E
-
03
2.713E-03
0.8
7.915
E
-
02
1.371
E
-
02
4.335E-03
10
0.2
3.298
E
-
10
5.713
E
-
11
1.807
E
-
11
0.5
9.267
E
-
10
1.605
E
-
10
5.075E-11
0.8
1.668
E
-
09
2.889
E
-
10
9.136E-11It is well known that numerical instabilities occur in many discrete models unless certain numerical conditions on spatial and temporal step sizes are satisfied. For examples, forward and backward Euler and central difference for decay equations produce numerical instability for large step sizes [11]. Figure 1 compares the numerical solution of nonstandard scheme (10) and the exact wave solution (4). This picture represents the result of an integration with q=0.3, β=0.1, and θ=1/2, over the spatial domain -15≤x≤15 and temporal interval 0≤t≤1 with spatial step size Δx=0.5 and temporal step size Δt=0.001. From the figure we see that nonstandard scheme well simulates the exact solution without showing any numerical instabilities. Figures 2 and 3 represent the L∞ and L2 errors and Figures 4 and 5 represent the absolute errors for various spatial step sizes of the NSFD scheme (10) and the standard finite difference scheme (11) for the MKdV equation (1) with the same set of parameters of Figure 1. From the figures it is obvious that the NSFD scheme is better than the standard scheme in the numerical precision for large spatial step size, but it is inferior for small spatial step size. We obtained similar results for θ=0 and θ=1.Figure 1
Surface forθ=1/2. Nonstandard (a). Exact (b).
(a)
(b)Figure 2
θ
=
1
/
2, L∞ and L2 errors for the NSFD scheme (10), and standard scheme (11): Δx=2.Figure 3
θ
=
1
/
2, L∞ and L2 errors for the NSFD scheme (10), and standard scheme (11): Δx=0.5.Figure 4
θ
=
1
/
2, absolute errors for the NSFD scheme (10) (a) and standard scheme (11) (b). Δt=0.01, q=0.3, β=0.1, and Δx=2.
(a)
(b)Figure 5
θ
=
1
/
2, absolute errors for the NSFD scheme (10) (a) and standard scheme (11) (b). Δt=0.01, q=0.3, β=0.1, and Δx=0.5.
(a)
(b)A final issue to consider is the effect of the third-order dispersion coefficientr=-β/2 in (1). We see that for various values of β, as shown in Table 4, dispersion-dominated solution demonstrated that the error is increased at the place where the shock wave occurs. Both Tables 3 and 4 show that the errors are concentrated in the spatial region where there are steep solutions.Table 4
Dispersion effect: absolute errors forθ=1 and q=0.3 on -15≤x≤15 with Δx=1.0 and T=1 with Δt=0.01.
x
t
β
=
0.001
β
=
1.0
β
=
10
-10
0.2
1.232
E
-
13
3.060
E
-
09
1.609E-08
0.5
3.079
E
-
13
5.364
E
-
09
4.417E-09
0.8
4.925
E
-
13
6.117
E
-
09
1.305E-09
0
0.2
1.982
E
-
05
0.619
9.496
0.5
4.957
E
-
05
1.448
9.609
0.8
7.931
E
-
05
2.080
9.310
10
0.2
3.047
E
-
13
2.214
E
-
08
8.238
E
-
04
0.5
7.626
E
-
13
2.011
E
-
07
0.102E-04
0.8
1.221
E
-
12
1.230
E
-
06
0.236E-05


## 5. Conclusion

It is well known that explicit finite difference models for solution of differential equation require restriction on step size to prevent the numerical instabilities. For this reason, small step sizes are used to ensure the numerical stability. This causes many grid points and hence round-off errors in numerical computations. Moreover the use of small step size is computationally expensive. In this study a nonstandard finite difference (NSFD) model is proposed for the numerical solution of the modified Korteweg-de Vries (MKdV) equation based on kink soliton solution. Local truncation error is discussed. Linear stability analysis is performed for the linearized equation. The numerical results obtained by the NSFD scheme is compared to the exact solution and a standard finite difference scheme. Proposed scheme indicates that NSFD scheme shows better performance for large step sizes. The effect of nonlinear term and the dispersive term is also studied numerically. The numerical results that have been obtained in this paper exhibit that the coefficient of the nonlinear term does not change the numerical results much. Tables and figures illustrate that the NSFD scheme can be a robust tool for numerical solution of various nonlinear problems such as 2D-KdV.



---

*Source: 4796070-2017-11-01.xml*