See discussions, stats, and author profiles for this publication at: https://www.researchgate.
net/publication/269015023
A numerical solution of the Lax’s 7th-order KdV equation by pseudospectral
method and Darvishi’s preconditioning
Article · January 2007
CITATIONS READS
13 359
3 authors:
M. T. Darvishi Samad Kheybari
Razi University Razi University
128 PUBLICATIONS 2,336 CITATIONS 15 PUBLICATIONS 183 CITATIONS
SEE PROFILE SEE PROFILE
F. Khani
Ilam University
54 PUBLICATIONS 1,349 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
Fractional partial differential equation View project
Soliton solution for different partial differential equations View project
All content following this page was uploaded by M. T. Darvishi on 20 May 2015.
The user has requested enhancement of the downloaded file.
Int. J. Contemp. Math. Sciences, Vol. 2, 2007, no. 22, 1097 - 1106
A Numerical Solution of the Lax’s 7th -order
KdV Equation by Pseudospectral Method
and Darvishi’s Preconditioning
M. T. Darvishia,∗ , S. Kheybaria and F. Khanib
a
Department of Mathematics, Razi University
Kermanshah 67149, Iran
b
Department of Mathematics, Ilam University
P. O. Box 69315516, Ilam, Iran
Abstract
In this paper, we solve the Lax’s seventh-order Korteweg-de Vires
(KdV) equation by pseudospectral method. To enhance the accuracy in
matrix vector multiplication method we use Darvishi’s preconditioning.
We compare the numerical results with exact solution of the equation.
They are in a good agreement with each other because absolute errors
are very small.
Mathematics Subject Classification: 65N55
Keywords: Lax’s seventh-order KdV equation; Pseudospectral method;
Darvishi’s preconditioning
1 Introduction
The Lax’s seventh-order KdV equation is taken as [14]
ut +(35u4 +70(u2uxx +uu2x )+7(2uuxxxx +3u2xx +4ux uxxx)+uxxxxxx )x = 0. (1)
Equation (1) is a nonlinear problem. The study of nonlinear problems is
of crucial importance in mathematics and physics. Many authors had paid
attention to study the solution of nonlinear equations using different schemes.
Among these methods, we can point to Backlund transformation [1], inverse
scattering scheme [10], the tanh-function [13], Hirota’s bilinear method [12] and
the homogeneous method [18]. Fan [9] described an extended tanh-function
method and symbolic computation to solve the new coupled modified KdV
1098 M. T. Darvishi, S. Kheybari and F. Khani
equations. Soliman [15] by means of variational iteration method solved the
Lax’s seventh-order KdV equation.
The aim of this study is to solve the Lax’s seventh-order KdV equation
with known initial and boundary conditions by pseudospectral method using
Darvishi’s preconditioning.
2 Pseudospectral method
We can approximate the arbitrary function f (x) by polynomials in x. However,
it is well known that the Lagrange interpolation polynomial based on equally
spaced points does not give a satisfactory approximation to general smooth
f . In fact, it converges for analytic functions with poles far enough from the
interval of interpolation. This poor behavior of polynomial interpolation can
be avoided for smoothly differentiable functions by removing the restriction
to equally spaced collocation points. Good results are obtained by relating
the collocation points to the structure of classical orthogonal polynomials, like
Chebyshev and Legendre polynomials. In the most common pseudospectral
Chebyshev method, the interpolation points in the interval [−1, 1] are the
Chebyshev-Gauss-Lobatto collocation points xj = cos( jπ N
) for j = 0, · · · , N,
which are the extreme of the Nth order Chebyshev polynomials TN (x) =
cos(Ncos−1 x). In order to construct the interpolant of f (x) at the point x the
following polynomials are defined
(−1)j+1 (1 − x2 )TN (x)
gj (x) = , j = 0, · · · , N, (2)
cj N 2 (x − xj )
where c0 = cN = 2 and cj = 1 for j = 1, 2, . . . , N − 1. The interpolation
polynomial, PN (x), to f (x) is given by
N
PN (x) = f (xj )gj (x). (3)
j=0
Then to obtain a pseudospectral approximation we have to express the deriva-
tives of PN (x) in terms of f (x) at collocation points xj . This can be done by
differentiating (3), that is
dr PN (x) N
(r)
r
= f (xj )gj (x), (4)
dx j=0
so that
dr PN (xk ) N
(r)
= f (xj )dkj , (5)
dxr j=0
Numerical solution of the Lax’s 7th -order KdV equation 1099
where
(r) (r)
dkj = gj (xk ), (6)
are the elements of differentiation matrix Dr . The elements of Dr can be
obtained analytically. For example if r = 1 and j, k = 0, · · · , N elements of D
are [11]
⎧ j+k
⎪ (−1)
⎪
⎪ dkj = cckj (xk −xj )
, k = j
⎪
⎪
⎨ 1 xk
dkk = − 2 (1−x2 ) , k = 0, N
k (7)
⎪
⎪
2
d00 = 2N6 +1 ,
⎪
⎪
⎪
⎩ 2
dN N = − 2N 6 +1 .
One of the basic steps in pseudospectral methods involves finding an approx-
imation for the differential operator in terms of the grid point values of uN .
The derivative of u(x) at collocation points xj can be computed using the
matrix-vector multiplication method.
2.1 Matrix-Vector multiplication method
If u = {u(xi )} is the vector consisting of values of u(x) at the N +1 collocation
points and u = {u(xi )} consists of values of the derivative at the collocation
points, then the collocation derivative matrix D is the matrix mapping u → u .
Two matrix multiplications yield u , where u is the vector containing the sec-
ond derivatives evaluated at the collocation points. More efficiently, the matrix
D 2 = D2 maps u → u , and so on. Collocation matrix methods are asymptot-
ically less efficient than the Chebyshev transform method (see [16]), because it
needs O(N 2 ) operations. It can be shown that the Chebyshev derivative, when
computing the derivative using the matrix vector multiplication method, is a
rather ill-conditioned operator, and inaccuracies in the function can be magni-
fied by as much as O(N 4 ) where N is the number of collocation points. Hence
attempts have been made to improve the method. These studies have concen-
trated on the problem of the roundoff error in Chebyshev collocation methods
and various algorithms have been suggested to reduce it. The best result for
the matrix vector multiplication algorithm managed to reduce the roundoff
error from O(N 4 ε) to O(N 3 ε), where ε is the machine precision [7, 8].
Some researchers have studied the problem of reducing roundoff errors in
Chebyshev collocation derivative methods. Baltensperger and Trummer [3]
demonstrated that naive algorithms for computing these matrices suffer from
severe loss of accuracy due to roundoff errors. Breuer and Everson [5] intro-
duced a preconditioning to reduce roundoff error by making the value of the
function on the boundaries vanish. Tang and Trummer [17] used trigonometric
identities and a flipping trick to reduce roundoff errors. A different approach
was suggested in [2, 4].
1100 M. T. Darvishi, S. Kheybari and F. Khani
Don and Solomonoff attempted to reduce the roundoff error using trigono-
metric identities for rewriting components of the derivative matrix as follows
[7]:
⎧ j+k
(−1)
⎪
⎪
⎪ dkj = − 12 cckj sin[ π (k+j)] π
sin[ 2N (k−j)]
, k = j,
⎪
⎪ 2N
⎨ 1
dkk = − 2 sin2 ( kπ ) ,
xk
k = 0, N,
⎪ 2
N (8)
⎪
⎪
⎪ d00 = 2N6 +1 ,
⎪
⎩ 2
dN N = − 2N6 +1 ·
Formula (8), which avoids the differencing of nearly equal numbers was intro-
duced to reduce this source of error from O(N 4 ε) to O(N 3 ε).
Preconditioning. From (8) for k = j we have
ck 1
|dkj | = (9)
2cj | sin((k + j) 2N ) sin((k − j) 2N
π π
)|
since the value of sin((k − j) 2N
π
) is near zero when k is near j, hence this causes
|dkj | to become large for k near j. This means that the entries of derivative
matrix D with large absolute values are on a band near the main diagonal.
That is, large values of |dkj | correspond to values of k near j. Therefore, the
matrix vector multiplication method causes large roundoff errors. In [6], to
reduce roundoff error in the kth node, Darvishi and Ghoreishi defined hk (x)
as follows:
hk (x) = u(x) − u(xk ), (10)
where xk = cos( kπ
N
). We can interpolate hk (x) as
N
hk (x) = gj (x)hk (xj ) (11)
j=0
hence from (4)-(6) the derivative of hk at xk is
N
hk (xk ) = dkj hk (xj ) (12)
j=0
or as hk = u we have
N
u(xk ) = dkj (u(xj ) − u(xk )). (13)
j=0
j=k
Therefore, using this preconditioning, we can vanish the influence of large
values of |dkj |, that is |dkk | for all k in the matrix vector multiplication method.
Numerical solution of the Lax’s 7th -order KdV equation 1101
3 Governing equation
The Lax’s seventh-order equation is defined as
ut + (35u4 + 70(u2uxx + uu2x ) + 7(2uuxxxx + 3u2xx + 4ux uxxx ) + uxxxxxx )x = 0,
a ≤ x ≤ b ,t ≥ 0
(14)
where a and b are real numbers. The initial and boundary conditions of equa-
tion (14) are taken as
u(x, 0) = 2k 2 sech2 (kx) = H(x) (15)
u(a, t) = 2k 2 sech2 (k(a − 64k 6 t)) = g1 (t) (16)
and
u(b, t) = 2k 2 sech2 (k(b − 64k 6 t)) = g2 (t). (17)
The exact solution of equation (14) is taken as
u(x, t) = 2k 2 sech2 (k(x − 64k 6 t)), (18)
where k is a known constant [15]. To solve equation (14) by pseudospectral
method we discretize the equation in space
∂u
∂t
= −(70D 3 u(D 2 u + u2 ) + 140uDu(2D 2u + u2 )+
(19)
42DuD 4u + 70(Du)3 + 14uD 5u + D 7 u)
where D is the differentiation matrix and if Dr is the matrix mapping u → u(r) ,
then we have Dr = D r , [11]. From equation (19) in the kth collocation point
we have
(3) (2)2
∂u
∂t
= −(70 N
(xk , t) N
j=0 dkj u(xj , t){ j=0 dkj u(xj , t) + u (xk , t)}
N N (2)
+140u(xk , t) j=0 dkj u(xj , t){2 j=0 dkj u(xj , t) + u2 (xk , t)}
N (4) N 3
(20)
+42 Nj=0 dkj u(xj , t) j=0 dkj u(xj , t) + 70{ j=0 dkj u(xj , t)}
(5) N (7)
+14u(xk , t) Nj=0 dkj u(xj , t) + j=0 dkj u(xj , t))
(r)
where D r = (dkj ) for r = 2, 3, . . . , 7 and D = D1 . For simplicity we set
u(xk , t) = vk (t), k = 0, . . . , N. Hence vk (t) is a function of t, where v0 (t) and
vN (t) are boundary functions, namely g1 (t) and g2 (t). Equation (20) can be
rewritten as
(3) (2)
vk (t) = −(70 N N 2
j=0 dkj vj (t){ j=0 dkj vj (t) + vk (t)} + 140vk (t)
N N (2) 2 N
j=0 dkj vj (t){2 j=0 dkj vj (t) + vk (t)} + 42 j=0 dkj vj (t)
N (4) N 3 N (5) (21)
j=0 dkj vj (t) + 70{ j=0 dkj vj (t)} + 14vk (t) j=0 dkj vj (t)
(7)
+ N j=0 dkj vj (t)), k = 1, . . . , N − 1
1102 M. T. Darvishi, S. Kheybari and F. Khani
Preconditioned system. The kth row of the preconditioned system of equation
(20) by Darvishi’s preconditioning is as follows
−1 (3) (2)
N −1 2
d
v (t)
dt k
= −(70 N j=1 dkj (vj (t) − vk (t)){ j=1 dkj (vj (t) − vk (t)) + vk (t)}
−1 N −1 (2) 2
+140vk (t) N j=1 dkj (vj (t) − vk (t)){2 j=1 dkj (vj (t) − vk (t)) + vk (t)}
N −1 N −1 (4) N −1
+42 j=1 dkj (vj (t) − vk (t)) j=1 dkj (vj (t) − vk (t)) + 70{ j=1 dkj (vj (t)
N −1 (5) −1 (7)
−vk (t))}3 + 14vk (t) j=1 dkj (vj (t) − vk (t)) + N j=1 dkj (vj (t) − vk (t)))−
(3) (3) (2) (2)
(70{dk0 (g1 (t) − vk (t)) + dkN (g2 (t) − vk (t))} + {dk0 (g1 (t) − vk (t)) + dkN
(2)
(g2 (t) − vk (t))} + 140vk (t){dk0 (g1 (t) − vk (t)) + dkN (g2 (t) − vk (t))}{2dk0
(2)
(g1 (t) − vk (t)) + 2dkN (g2 (t) − vk (t)) + vk2 (t)} + 42{dk0(g1 (t) − vk (t))+
(4) (4)
dkN (g2 (t) − vk (t))}{dk0 (g1 (t) − vk (t)) + dkN (g2 (t) − vk (t))} + 70{dk0
(5)
(g1 (t) − vk (t)) + dkN (g2 (t) − vk (t))}3 + 14vk (t){dk0 (g1 (t) − vk (t))+
(5) (7) (7)
dkN (g2 (t) − vk (t))} + {dk0 (g1 (t) − vk (t)) + dkN (g2 (t) − vk (t))})
k = 1, . . . , N − 1.
(22)
Note that system (22) is a system of ordinary differential equations (ODEs).
Hence we can use any ODE solver to solve it. In this paper we use the standard
fourth-order Runge-Kutta method.
4 Numerical results
In this section we solve equation (14) for different values of a and b. Note that
as Chebyshev-Gauss-Lobatto collocation points are in interval [−1, 1], therefore
we have to map interval [a, b] to [−1, 1] by a linear mapping. To demonstrate
the efficiency of our method we report the absolute errors in some arbitrary
points in tables 1 and 2. To obtain the numerical results we used MATLAB
7.0 software.
Problem 1. We solve equation (14) for −a = b = 100 and N = 8 collocation
points. Numerical results are shown in Table 1.
Problem 2. We set b = −a = 200 and N = 8 collocation points. The results
are shown in Table 2.
Numerical solution of the Lax’s 7th -order KdV equation 1103
Table 1. Comparison of the exact and numerical solutions by pseudospectral
method using Darvishi’s preconditioning for the Lax’s seventh-order KdV
equation with t = 2, N = 8 and Δt = 0.0001.
t x Exact solution Numerical solution Abs. error
0.05 −92.388 9.4082083361E − 05 9.4082521546E − 05 4.38184E − 10
−38.268 1.7334939645E − 04 1.7334980144E − 04 4.04986E − 10
0.0000 1.9999999999E − 04 2.0000000000E − 04 2.04795E − 15
38.268 1.7335020642E − 04 1.7334980143E − 04 4.04983E − 10
92.388 9.4082959732E − 05 9.4082521547E − 05 4.38185E − 10
0.5 −92.388 9.4078139754E − 05 9.4082521542E − 05 4.38179E − 09
−38.268 1.7334575143E − 04 1.7334980144E − 04 4.04995E − 09
0.0000 1.9999999972E − 04 2.0000000000E − 04 2.04800E − 13
38.268 1.7335385120E − 04 1.7334980144E − 04 4.04974E − 09
92.388 9.4086903462E − 05 9.4082521551E − 05 4.38191E − 09
1 −92.388 9.4073758069E − 05 9.4082521539E − 05 8.76347E − 09
−38.268 1.7334170132E − 04 1.7334980144E − 04 8.10012E − 09
0.0000 1.9999999918E − 04 2.0000000000E − 04 8.19200E − 14
38.268 1.7335790070E − 04 1.7334980144E − 04 8.09927E − 09
92.388 9.4091285484E − 05 9.4082521555E − 05 8.76392E − 09
2 −92.388 9.4064995045E − 05 9.4082521530E − 05 1.75265E − 09
−38.268 1.7333360035E − 04 1.7334980144E − 04 1.62011E − 09
0.0000 1.9999999672E − 04 2.0000000000E − 04 3.27680E − 13
38.268 1.7336599912E − 04 1.7334980144E − 04 1.61977E − 09
92.388 9.4100049864E − 05 9.4082521563E − 05 1.75283E − 09
1104 M. T. Darvishi, S. Kheybari and F. Khani
Table 2. Comparison of the exact and numerical solutions by pseudospectral
method using Darvishi’s preconditioning for the Lax’s seventh-order KdV
equation with t = 15, N = 8 and Δt = 0.01.
t x Exact solution Numerical solution Abs. error
1 −184.78 1.8914131990, −05 1.8916435810, −05 2.30381, −09
−76.536 1.1698459384, −04 1.1699424120, −04 9.64736, −09
0.0000 1.9999999918, −04 2.0000000000, −04 8.19199, −13
76.536 1.1700388878, −04 1.1699424119, −04 9.64759, −09
184.78 1.8918739898, −05 1.8916435812, −05 2.30409, −09
5 −184.78 1.8904919365, −05 1.8916435805, −05 1.15164, −08
−76.536 1.1694600677, −04 1.1699424119, −04 4.82344, −08
0.0000 1.9999997952, −04 2.0000000000, −04 2.04800, −11
76.536 1.1704248149, −04 1.1699424119, −04 4.82403, −08
184.78 1.8927958905, −05 1.8916435817, −05 1.15231, −08
10 −184.78 1.8893409564, −05 1.8916435799, −05 2.30262, −08
−76.536 1.1689777823, −04 1.1699424119, −04 9.64630, −08
0.0000 1.9999991808, −04 2.0000000000, −04 8.19200, −11
76.536 1.1709072765, −04 1.1699424120, −04 9.64864, −08
184.78 1.8939488653, −05 1.8916435822, −05 2.30528, −08
15 −184.78 1.8881906406, −05 1.8916435793, −05 3.45294, −08
−76.536 1.1684955560, −04 1.1699424119, −04 1.44685, −07
0.0000 1.9999981568, −04 2.0000000000, −04 1.84319, −10
76.536 1.1713897965, −04 1.1699424120, −04 1.44738, −07
184.78 1.8951025056, −05 1.8916435829, −05 3.45892, −08
5 Conclusion
In this study, the Lax’s seventh-order Korteweg-de Vries equation is solved by
pseudospectral method using a preconditioning scheme. As numerical results
show, the errors are very small.
References
[1] M.J. Ablowitz and P.A. Clarkson, Solitons, Nonlinear Evolution Equations
and Inverse Scattering, Cambridge: Cambridge University Press, 1991.
[2] R. Baltensperger and J.P. Berrut, The errors in calculating the pseudospe-
tral differentiation matrices for Chebvshev-Gauss-Lobatto points, Comput.
Math. Appl. 37 (1999), 41-48.
[3] R. Baltensperger and M.R. Trummer, Spectral differencing with a twist,
SIAM J. of Sci. Comput., 24 (5) (2003), 1465-1487.
Numerical solution of the Lax’s 7th -order KdV equation 1105
[4] A. Bayliss, A. Class and B. Matkowsky, Roundoff error in computing
derivatives using the Chebyshev differentiation matrix, J. Comput. Phys.,
116 (1995), 380-383.
[5] K.S. Breuer and R.S. Everson, On the errors incurred calculating deriva-
tives using Chebyshev polynomials, J. Comput. Physics, 99 (1992), 56-67.
[6] M.T. Darvishi and F. Ghoreishi, Error reduction for higher derivatives of
Chebyshev collocation method using preconditioning and domain decom-
position, Korean J. Comput. and Appl. Math., 6 (2) (1999), 421-435.
[7] W.S. Don and A. Solomonoff, Accuracy and speed in computing the Cheby-
shev collocation derivative, SIAM J. of Sci. Comput., 16 (4) (1995), 1253-
1268.
[8] W.S. Don and A. Solomonoff, Accuracy enhancement for higher derivatives
using Chebyshev collocation and a mapping technique, SIAM J. of Sci.
Comput., 18 (4) (1997), 1040-1055.
[9] E. Fan, Soliton solutions for a generalized Hirota-Satsuma coupled KdV
equation and a coupled MKdV equation, Phys. Lett. A, 282 (2001), 18-22.
[10] C.S. Gardner, J.M. Green, M.D. Kruskal and R.M. Miura, Method for
solving the Korteweg-de Vires equation, Phys. Rev. Lett., 19 (1967), 1095-
1097.
[11] D. Gottlieb, M.Y. Hussaini and S.A. Orszag, Theory and application of
spectral methods, in spectral methods for partial differential equations, ed.
by R.G. Voigt, D. Gottlieb and M.Y. Hussaini, (SIAM-CBMS, Philadel-
phia) (1984), 1-54.
[12] R. Hirota, Exact solution of the Korteweg-de Vries equation for multiple
collisions, Phys. Rev. Lett., 27 (1971), 1192-1194.
[13] W. Malfiet, Solitary wave solutions of nonlinear wave equations, Am. J.
Phys., 60 (1992), 650-654.
[14] S. M. El-Sayed, D. Kaya, An application of the ADM to seven-order
Sawada-Kotara equations, Applied Mathematics and Computation 157
(2004), 93-101.
[15] A.A. Soliman, A numerical simulation and explicit solutions of KdV-
Bursers’ and Lax’s seventh-order KdV equations, Chaos, Solitons and Frac-
tals, 29 (2) (2006), 294-302.
[16] A. Solomonoff and E. Turkel, Global properties of pseudospectral meth-
ods, J. Comput. Phys., 81 (1989), 239-276.
[17] T. Tang and M.R. Trummer, Boundary layer resolving pseudospetral
methods for singular perturbation problems, SIAM J. Sci. Comput. Phys.,
17 (1996), 430-438.
1106 M. T. Darvishi, S. Kheybari and F. Khani
[18] M. L. Wang, Exact solutions for a compound KdV-Burgers equation,
Phys. Lett. A, 213 (1996), 279-287.
Received: March 20, 2007
View publication stats