Introduction

This study is concerned with the following one-dimensional modified regularized long wave (MRLW) equation:

U t + U x +6 U 2 U x μ U xxt =0,
(1)

where t is time, x is the space coordinate, μ is a positive parameter, and U(x,t) is the wave amplitude with the physical boundary conditions U→0 as x→± . The equation was first introduced to describe the development of an undular bore by Peregrine [1] and later by Benjamin et al. [2]. This equation is very important in physics media since it describes the phenomena with weak nonlinearity and dispersion waves, including nonlinear transverse waves in shallow water, ion-acoustic and magneto hydrodynamic waves in plasma, and phonon packets in nonlinear crystals [2]. The MRLW equation which we discuss here is based upon the regularized long wave equation [[3]-[21]] and is related with both the modified equal width wave [[22]-[25]] and modified Korteweg-de Vries equation [26]. This equation is a special case of the generalized long wave (GRLW) equation which has the form:

U t + U x +δ U p U x μ U xxt =0,
(2)

where δ and μ are positive constants and p is a positive integer. Few authors have studied the GRLW equation; a quasilinearization method based on finite differences was used by Ramos [27] for solving the GRLW equation. Zhang [28] used a finite difference method to solve the GRLW equation for a Cauchy problem. Kaya and El-Sayed [29] also studied the GRLW equation with the Adomian decomposition method. Roshan [30] solved the GRLW equation numerically by the Petrov-Galerkin method using a linear hat function as the trial function and a quintic B-spline function as the test function. The MRLW equation with a limited set of boundary and initial conditions has analytical solutions. Therefore, numerical solutions of the equation have been the subject of some papers. Gardner et al. [31] introduced a collocation solution to the MRLW equation using quintic B-spline finite elements. Khalifa et al. [32, 33] applied the finite difference and cubic B-spline collocation finite element method to obtain the numerical solutions of the MRLW equation. Solutions based on collocation method with quadratic B-spline finite elements and the central finite difference method for time are investigated by Raslan [34]. Raslan and Hassan [35] solved the MRLW equation by a collocation finite element method using quadratic, cubic, quartic, and quintic B- splines to obtain the numerical solutions of the single solitary wave. Haq et al. [36] have developed a numerical scheme based on quartic B-spline collocation method for the numerical solution of MRLW equation. Ali [37] has formulated a classical radial basis function collocation method for solving the MRLW equation.

In this paper, we have applied a lumped Petrov-Galerkin method in which the element shape functions are cubic, and the weight functions are quadratic B-splines. The motion of a single solitary wave, interaction of two and three solitary waves, and Maxwellian initial condition are studied to show the performance and accuracy of the proposed method. A linear stability analysis of the scheme shows that it is unconditionally stable.

Cubic B-spline Petrov-Galerkin method

To apply the numerical method, the solution domain of the problem is restricted over an interval axb. The interval is partitioned into uniformly sized finite elements of equal length h by the nodes x m such that a=x0<x1⋯<x N =b and h=xm+1x m , m=1,2,…,N. The MRLW equation (1) is considered with the boundary conditions

U ( a , t ) = 0 , U ( b , t ) = 0 , U x ( a , t ) = 0 , U x ( b , t ) = 0 , t > 0 ,
(3)

and the initial condition

U ( x , 0 ) = f ( x ) , a x b

where f(x) is a prescribed function. Physical boundary conditions require U and U x →0 that U→0 for x→±. The cubic B-splines ϕ m (x), m=−1(1)N+1 are defined at the knots x m by [17].

ϕ m (x)= 1 h 3 ( x x m 2 ) 3 , x [ x m 2 , x m 1 ] , h 3 + 3 h 2 ( x x m 1 ) + 3 h ( x x m 1 ) 2 3 ( x x m 1 ) 3 x [ x m 1 , x m ] , h 3 + 3 h 2 ( x m + 1 x ) + 3 h ( x m + 1 x ) 2 3 ( x m + 1 x ) 3 , x [ x m , x m + 1 ] , ( x m + 2 x ) 3 , x [ x m + 1 , x m + 2 ] , 0 otherwise.
(4)

The set of functions {ϕ−1,ϕ0,…ϕ1} forms a basis for functions defined over the interval axb. So, the numerical solution U N (x,t) to the exact solution U N (x,t) is given by:

U N (x,t)= j = 1 N + 1 δ j (t) ϕ j (x)
(5)

where δ j are the time dependent quantities to be determined from the boundary and weighted residual conditions. Each cubic B-spline covers four elements so that each element [x m ,xm+1] is covered by four splines. Applying a local coordinate system for the typical finite element [x m ,xm+1] defined by:

=x x m 0η1,
(6)

so the cubic B-spline shape functions over the element [0,1] can be defined as:

ϕ m 1 = ( 1 η ) 3 , ϕ m = 1 + 3 ( 1 η ) + 3 ( 1 η ) 2 3 ( 1 η ) 3 , ϕ m + 1 = 1 + 3 η + 3 η 2 3 η 3 , ϕ m + 2 = η 3 .
(7)

All splines apart from ϕm−1(x),ϕ m (x),ϕm+1(x) and ϕm+2(x) are zero over the element [x m ,xm+1]. Over the typical element [x m ,xm+1], the numerical solution U N (x,t) is given by:

U N (x,t)= j = m 1 m + 2 ϕ j (x) δ j (t)
(8)

where δm−1,δ m ,δm+1,δm+2 act as element parameters and B-splines ϕm−1, ϕ m , ϕm+1, ϕm+2 as element shape functions. Using trial function (5) and cubic splines (4), the nodal values of U,U and U′′ at the knot x m are given in terms of the element parameters δ m by:

U m = U ( x m ) = δ m 1 + 4 δ m + δ m + 1 , U m = U ( x m ) = 3 h ( δ m 1 + δ m + 1 ) , U m ′′ = U ′′ ( x m ) = 6 h 2 ( δ m 1 2 δ m + δ m + 1 ) .
(9)

where the symbols and ′′ denote first and second differentiation with respect to x, respectively. The splines ϕ m (x) and their two principle derivatives vanish outside the interval [xm−2,xm+2]. The weight function Ψ m is taken a quadratic B-spline. Quadratic B-spline Ψ m at the knots x m is defined over the interval [a,b] by:

Ψ m ( x ) = 1 h 2 ( x m + 2 x ) 2 3 ( x m + 1 x ) 2 + 3 ( x m x ) 2 , [ x m 1 , x m ] ( x m + 2 x ) 2 3 ( x m + 1 x ) 2 [ x m , x m + 1 ] ( x m + 2 x ) 2 [ x m + 1 , x m + 2 ] 0 otherwise.
(10)

Using the local coordinate transformation for the finite element [x m ,xm+1] by h η=xx m ,0≤η≤1 quadratic B-spline Ψ m can be defined as:

Ψ m 1 = ( 1 η ) 2 , Ψ m = 1 + 2 η 2 η 2 , Ψ m + 1 = η 2 .
(11)

Applying the Petrov-Galerkin approach to Equation 1, we obtain the weak form of Equation 1:

a b Ψ( U t + U x +6 U 2 U x μ U xxt dx)=0.
(12)

For a single element [x m ,xm+1], using transformation (6) into Equation 12 we obtain:

0 1 Ψ U t + 1 + 6 U 2 h U η μ h 2 U ηηt =0.
(13)

Integrating Equation 13 by parts and using Equation 1 lead to:

0 1 [Ψ( U t +λ U η )+β Ψ η U ηt )]=βΨ U ηt | 0 1
(14)

where λ= 1 + 6 U 2 h and β= μ h 2 . Taking the weight function Ψ i with quadratic B-spline shape functions given by Equation 11 and substituting approximation (8) into integral Equation 14, we obtain the element contributions in the form:

j = m 1 m + 1 0 1 Ψ i ϕ j + β Ψ i ϕ j β Ψ i ϕ j | 0 1 δ ̇ j e + j = m 1 m + 1 λ 0 1 Ψ i ϕ j δ j e
(15)

which can be written in matrix form as follows:

[ A e +β( B e C e )] δ ̇ e +λ D e δ e
(16)

where δe=(δm−1,δ m ,δm+1,δm+2)T are the element parameters, and the dot denotes differentiation with respect to t. The element matrices Ae,Be,Ce, and De are rectangular 3×4 given by the following integrals:

A ij e = 0 1 Ψ i ϕ j = 1 60 10 71 38 1 19 221 221 19 1 38 71 10 B ij e = 0 1 Ψ i ϕ j = 1 2 3 5 7 1 2 2 2 2 1 7 5 3 C ij e = Ψ i ϕ j | 0 1 = 3 1 1 0 1 0 1 1 1 1 0 1 0 1 D ij e = 0 1 Ψ i ϕ j = 1 10 6 7 12 1 13 41 41 13 1 12 7 6

where i takes only the values 1,2,3, and the j takes only the values m−1, m, m+1, m+2 for the typical element [x m ,xm+1]. A lumped value for λ is found from 1 4 ( U m + U m + 1 ) 2 as:

λ = 6 4 h ( δ m 1 + 5 δ m + 5 δ m + 1 + δ m + 2 ) 2 .

Assembling all contributions from all elements leads to the following matrix equation:

[ A e +β( B e C e )] δ ̇ e +λ D e δ e =0
(17)

where δ=(δ−1,δ0,…,δ N ,δN+1)T are the global element parameters. The matrices A, B, and λ D are rectangular, and row m of each has the following form:

A = 1 60 ( 1 , 57 , 302 , 302 , 57 , 1 , 0 ) , B = 1 2 ( 1 , 9 , 10 , 10 , 9 , 1 , 0 ) , λD = 1 10 ( λ 1 , 12 λ 1 13 λ 2 , 7 λ 1 41 λ 2 6 λ 3 , 6 λ 1 + 41 λ 2 7 λ 3 , 13 λ 2 + 12 λ 3 , λ 3 , 0 )

where

λ 1 = 6 4 h ( δ m 2 + 5 δ m 1 + 5 δ m + δ m + 1 ) 2 , λ 2 = 6 4 h ( δ m 1 + 5 δ m + 5 δ m + 1 + δ m + 2 ) 2 , λ 3 = 6 4 h ( δ m + 5 δ m + 1 + 5 δ m + 2 + δ m + 3 ) 2 .

Substituting the Crank-Nicholson approach δ= 1 2 ( δ n + δ n + 1 ) and the forward finite difference δ ̇ = δ n + 1 δ n Δt in Equation 17, we obtain the following matrix system:

A + β ( B C ) + λΔt 2 D δ n + 1 = A + β ( B C ) λΔt 2 D δ n
(18)

where Δ t is the time step. Applying the boundary conditions (3) to the system (18), we make the matrix equation square. The resulting system can be efficiently solved with a variant of the Thomas algorithm. Two or three inner iterations are applied to δ n = δ n + 1 2 ( δ n δ n 1 ) at each time in order to improve the accuracy.

To evaluate the vector parameters δn, the initial vector δ0 must be determined from the initial and boundary conditions. So the approximation (8) can be rewritten for the initial condition:

U N ( x , 0 ) = m = 1 N + 1 ϕ m ( x ) δ m 0 ,

where the parameters δ m 0 will be determined. Using relations at the knots:

U N ( x m , 0 ) = U ( x m , 0 ) , U N ( x 0 , 0 ) = U ( x N , 0 ) = 0 , m = 0 , 1 , , N ,

together with the derivative condition, the initial vector δ0 can be determined from the following matrix equation:

[ 303 1 41 1 4 1 3 0 3 ] [ δ 0 1 δ 0 0 δ N 0 δ N + 1 0 ] = [ 0 U ( x 0 ) U ( x N ) 0 ]

which can be solved using a variant of the Thomas algorithm.

Stability analysis

A typical member of the matrix system (18) can be written in terms of the nodal parameters δ m n as:

γ 1 δ m 2 n + 1 + γ 2 δ m 1 n + 1 + γ 3 δ m n + 1 + γ 4 δ m + 1 n + 1 + γ 5 δ m + 2 n + 1 + γ 6 δ m + 3 n + 1 = γ 6 δ m 2 n + γ 5 δ m 1 n + + γ 4 δ m n + γ 3 δ m + 1 n + γ 2 δ m + 2 n + γ 1 δ m + 3 n
(19)

where

γ 1 = 1 60 β 2 λΔt 20 , γ 2 = 57 60 9 β 2 25 λΔt 20 , γ 3 = 302 60 + 10 β 2 40 λΔt 20 , γ 4 = 302 60 + 10 β 2 + 40 λΔt 20 , γ 5 = 57 60 9 β 2 + 25 λΔt 20 , γ 6 = 1 60 β 2 + λΔt 20 .

The stability analysis is based on the Fourier method in which the growth factor of the error in a typical mode of amplitude ξn,

δ j n = ξ n e ijkh
(20)

where k is the mode number and h is the element size, is determined from a linearization of the numerical scheme. To apply the stability analysis, the MRLW equation can be linearized by assuming that the quantity U in the non-linear term U2U x is locally constant. Substituting the Fourier mode (20) into (19) gives the growth factor g of the form:

g= a ib a + ib ,
(21)

where

a = ( 302 + 300 β ) cos θ 2 h + ( 57 270 β ) cos 3 θ 2 h + ( 1 30 β ) cos 5 θ 2 , b = 120 λΔt sin θ 2 h + 75 λΔt sin 3 θ 2 h + 3 λΔt sin ( 5 θ 2 ) h.
(22)

Taking the modulus of Equation 21, we have |g|=1. Therefore, the scheme is unconditionally stable.

Numerical examples and results

In this section, numerical solutions of the MRLW equation are obtained for four standard problems: the motion of single solitary wave, interaction of two and three solitary waves, and development of the Maxwellian initial condition into solitary waves. L2 and L error norms are used to show how good the numerical results in comparison with the exact results defined by:

L 2 = U exact U N 2 h J = 0 N U j exact U N j 2 ,
(23)

and the L error norm

L = U exact U N max j U j exact U N j .
(24)

For the MRLW equation, we evaluate the following invariants to validate the conservation properties: [31]

I 1 = a b Udx h J = 1 N U j n , I 2 = a b U 2 + μ ( U x ) 2 dx h J = 1 N ( U j n ) 2 + μ U x j n , I 3 = a b ( U 4 μU x 2 ) dx h J = 1 N ( U j n ) 4 μ ( U x ) j n ,

which correspond to conversation of mass, momentum, and energy, respectively.

The motion of single solitary wave

Firstly, we consider Equation 1 with the boundary conditions U→0 as x→± and the initial condition:

U ( x , 0 ) = c sec h p x x 0 .

An analytical solution of this problem is:

U ( x , t ) = c sec h p x ( c + 1 ) t x 0

which represents the motion of a single solitary wave with amplitude c , where p= c μ ( c + 1 ) , x0, and c are arbitrary constants. For this problem, the analytical values of the invariants can be found as [31]:

I 1 = π c p , I 2 = 2 c p + 2 μpc 3 , I 3 = 4 c 2 3 p 2 μpc 3 .
(25)

We have taken the parameters c=1, μ=1, h=0.2, x0=40, and k=0.025 over the interval [0,100] to make a comparison with those of earlier studies [3032, 37]. For these parameters, the solitary wave has amplitude 1.0. The simulations are done up to time t=10 to find the error norms L2 and L and the numerical invariants I1,I2, and I3 at various times. The obtained results are reported in Table 1. As seen in Table 1, the error norms L2 and L are found to be small enough, and the computed values of invariants are in good agreement with their analytical values I1=4.4428829, I2=3.2998316, I3=1.4142135. Amplitude is 1.000000 at t=0 which is located at x=40, while it is 0.999284 at t=10 which is located at x=60.0. The absolute difference in amplitudes at times t=0 and t=20 is 7.16×10−4, so that there is a little change between amplitudes. The percentage of the relative error of the conserved quantities I1, I2 and I3 are calculated with respect to the conserved quantities at t=0. Percentage of relative changes of I1, I2, and I3 are found to be 6×10−3, 14×10−3, and 33×10−3, respectively. So, the invariants remain almost constant during the computer run. Table 2 displays a comparison of the values of the invariants and error norms obtained by the present method with those obtained by other methods[3032, 37]. It is clearly seen from Table 2 that the error norms obtained by the present method are smaller than the other methods [3032, 37]. Figure 1 illustrates the motion of solitary wave with c=1, h=0.2, and k=0.025 at different time levels.

Table 1 Invariants and error norms for single solitary wave with c=1, h =0 . 2, k =0 . 025,0≤ x ≤100
Table 2 Errors and invariants for single solitary wave with c =1, h =0 . 2, k =0 . 025, 0≤ x ≤100, at t =10
Figure 1
figure 1

Single solitary wave with c = 1, h = 0.2, Δ t = 0.025,0 x ≤ 100 t = 0,2,4,6,8, and 10.

Interaction of two solitary waves

As a second problem, we consider the interaction of two separated solitary waves having different amplitudes and traveling in the same direction. For this problem, the initial condition is given by:

U(x,0)= j = 1 2 A j sech( p j [x x j ]),
(26)

where A j = c j , p j = c j μ ( c j + 1 ) , j=1,2,c j and x j are arbitrary constants. For the computational work, parameters μ=1,c1=0.03, c2=0.01, x1=18, x2=58 are used over the range [−40,180] to coincide with those used by [38]. The experiment is run from t=0 to t=2, and values of the invariant quantities I1,I2 and I3 are listed in Table 3. Table 3 shows a comparison of the values of the invariants obtained by the present method with those obtained in [38]. It is seen that the numerical values of the invariants remain almost constant during the computer run. Figure 2 shows the development of the interaction of two solitary waves. At t=0, the amplitude of larger waves is 0.1769525 at the point x=58.1 whereas the amplitude of the smaller one is 0.1003772 at the point x=97.9. However, at t=2, the amplitude of larger waves is 0.1768495 at the point x=60.1 whereas the amplitude of the smaller one is 0.1003873 at the point x=99.9. It is found that the absolute difference in amplitude is 1.01×10−5 for the smaller wave and 1.03×10−4 for the larger wave for this algorithm.

Table 3 Comparison of invariants for the interaction of two solitary waves with results from[38] with c 1 =0 . 03, c 1 =0 . 01, −40≤ x ≤180
Figure 2
figure 2

Interaction of two solitary waves at t = 2.

Interaction of three solitary waves

In this section, we study the behavior of the interaction of three solitary waves having different amplitudes and traveling in the same direction. So, we consider Equation 1 with the initial condition given by the linear sum of three well-separated solitary waves of different amplitudes:

U(x,0)= j = 1 3 A j sech( p j [x x j ]),
(27)

where A j = c j , p j = c j μ ( c j + 1 ) , j=1,2,3,c j and x j are arbitrary constants. For the computational work, we have chosen the parameters μ=1, c1=0.03, c2=0.02, c3=0.01, x1=8, x2=48, x3=88 over the interval [−40,180]. Simulations are done up to time t=1. Table 4 displays a comparison of the values of the invariants obtained by the present method with those obtained in Ref. [38]. It is seen from the table that the obtained values of the invariants remain almost during the computer run. The absolute differences between the values of the conservative constants obtained by the present method at times t=0 and t=1 are Δ I 1 =4.8×10−2, Δ I 2 =9.5×10−3,Δ I 3 =4.1×10−2. Figure 3 shows the interaction of these solitary waves at different times.

Table 4 Comparison of invariants for the interaction of three solitary waves with results from[38] with h =0.2, k =0.025 in the region -40 ≤ x ≤ 180
Figure 3
figure 3

Interaction of three solitary waves with t = 1.

The Maxwellian initial condition

Finally, the development of the Maxwellian initial condition

U(x,0)=exp ( x 40 ) 2 ,
(28)

into a train of solitary waves is studied. It is known that with the Maxwellian condition (28), the behavior of the solution depends on the values of μ. So, we study each of the following cases: μ=0.015, and μ=0.004. The obtained numerical values of the invariants are listed in Table 5. The absolute differences between the values of the invariants obtained for the μ=0.015 are Δ I 1 =4×10−5, Δ I 2 =1.1×10−4,Δ I 3 =2.74×10−4 whereas they are Δ I 1 =7×10−5,Δ I 2 =4.11×10−3,Δ I 3 =1.28×10−2 and for μ=0.004; Δ I 1 =1×10−5, Δ I 2 =1.4×10−4,Δ I 3 =4.62×10−4 whereas they are Δ I 1 =1×10−5, Δ I 2 =1.9×10−4, Δ I 3 =3.906×10−3in [38]. Figure 4 illustrates the development of the Maxwellian initial condition into solitary waves for μ=0.015 and μ=0.004 at time t=0.05. As seen from the figure that for μ=0.015 and μ=0.004 only a single soliton is generated.

Table 5 Invariants of MRLW equation using the Maxwellian initial condition
Figure 4
figure 4

Maxwellian initial condition at t = 0.05 with (a) μ = 0.004 and (b) μ = 0.015.

Conclusion

In this paper, a numerical method based on a Petrov-Galerkin method using quadratic weight functions and cubic B-spline finite elements has been presented to find numerical solutions of MRLW equation. We tested our scheme through single solitary wave in which the analytic solution is known and extended it to study the interaction of two and three solitary waves and the Maxwellian initial condition where the analytic solutions are unknown during the interaction. The performance and accuracy of the method were shown by calculating the error norms L2 and L . The obtained results show that a Petrov-Galerkin method involving quadratic weight functions and cubic B-spline finite elements can be used to produce reasonably accurate numerical solutions of the MRLW equation. This is a reliable method for getting the numerical solutions of the physically important non-linear problems.