Error Analysis For Solving The Korteweg-De Vries Equation by A Legendre Pseudo-Spectral Method
Error Analysis For Solving The Korteweg-De Vries Equation by A Legendre Pseudo-Spectral Method
A Legendre pseudo-spectral method is proposed for the Korteweg-de Vries equation with nonperiodic
boundary conditions. Appropriate base functions are chosen to get an efficient algorithm. Error analysis
is given for both semi-discrete and fully discrete schemes. The numerical results confirm to the theoretical
analysis. c (2000) John Wiley & Sons, Inc. Numer Methods Partial Differential Eq 16: 513–534, (2000)
I. INTRODUCTION
Spectral methods have become increasingly popular in the numerical solution of partial differential
equations due to their high-order accuracy [1-3]. The primary purpose of this article is to present
a Legendre pseudo-spectral method for the Korteweg-de Vries (KdV) equation
∂t U + U Ux + Uxxx = 0, x ∈ I, t ∈ (0, T ],
(1.1)
U (x, 0) = U0 (x), x ∈ I,
where I = (−1, 1). A Fourier pseudo-spectral method for such a KdV equation with peri-
odic boundary conditions was analyzed by Ma and Guo [4]. They gave the error analysis for
both semi-discrete and fully discrete schemes. Maday and Quarteroni [5] analyzed the Fourier
spectral/pseudo-spectral approximation of the Korteweg-de Vries equation. They proved that the
genuine pseudo-spectral methods enjoy the same convergence properties as the spectral Galerkin
method.
Correspondence to: Prof. Heping Ma, Dept. of Mathematics, Shanghai Univ., Shanghai 200436, P.R.C. (e-mail:
[email protected])
Contract grant sponsor: City University of Hong Kong; contract grant number: 7100100
c (2000) John Wiley & Sons, Inc.
514 LI, MA, AND SUN
is more interesting. Numerical studies for solving the nonperiodic KdV equation have been made
by many authors [6-9]. Pavoni [6] proposed spectral Chebyshev collocation schemes for the
problem. Numerical results illustrate that the method is efficient, but no theoretical analysis has
been provided.
It has been pointed out that the Chebyshev and Legendre collocation methods using the Gauss-
Lobatto points may be unstable for third-order differential equations and thus are poor choices
for such problems [10]. The Gauss–Lobatto points are from the generalized Gaussian quadrature
rule, which uses the values U (−1) and U (1). With the Legendre method, these are the zeros of
(1,1)
the Jacobi polynomial PN −1 (x). As for the Legendre method using the values U (−1), U (1), and
(2,1)
Ux (1), the generalized Gaussian quadrature nodes are the zeros of PN −2 (x) [11]. Huang and
Sloan [11] have shown that, with this choice of collocation points, the pseudo-spectral method is
stable for the linear third-order differential equation and the convergence has been established.
But no error estimate is shown with a specific order related to the regularity of the solution
U (x, t). The error analysis of pseudo-spectral methods for solving the KdV equation (1.1) with
the nonperiodic boundary conditions has been less explored.
In this article, we generalize this Legendre pseudo-spectral method developed in [11] to the
KdV equation with nonperiodic boundary conditions (1.2). We first prove an error estimate of
the method for the third-order differential equation, which complements the result in [11]. Then
the same rate of convergence estimates are obtained for both the semi-discrete scheme and fully
discrete scheme for the KdV equation. Appropriate base functions are chosen to get an efficient
algorithm.
In Section II, we introduce some notations and propose the pseudo-spectral scheme. Section
III gives some lemmas needed in the error analysis. In Section IV, we consider the error estimate
for the pseudo-spectral method of the linear third-order differential equation. In Sections V-VI,
we analyze the convergence of the method for the KdV equation. Section VII contains some
numerical results. Finally, we give a conclusion in Section VIII.
Let IPN (I) be the space of polynomials of degree at most N on the interval I,
(α,β)
and Pn (x) be the Jacobi polynomials orthogonal with the weight functions ωα,β (x) =
(1 − x)α (1 + x)β , where α, β > −1. We denote by {xm }N −2
m=1 the zeros of the Jacobi poly-
(2,1) N
nomial PN −2 (x) and by {ωm }m=0 the weights of the quadrature formula [11]. For simplicity,
let
N
X −2
[f ]d = ωm f (xm ) + ω0 f (−1) + ωN −1 f (1) + ωN fx (1) .
m=1
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 515
Then the quadrature rule is exact for any f ∈ IP2N −2 (I), i.e.,
Z 1
[f ]d = f (x)dx. (2.1)
−1
For a positive weight ω(x) on I, the inner product and norm of L2ω (I) are denoted by (·, ·)ω and
k · kω , respectively, where the subscript ω is dropped whenever ω ≡ 1. Let x0 = −1, xN −1 = 1,
and
IN = {xm , 1 ≤ m ≤ N − 2}.
We define the discrete inner product and norms
N
X −2 p
(u, v)N = ωm u(xm )v(xm ), kvkN = (v, v)N , |v|∞,IN = max |v(xm )|.
xm ∈IN
m=1
¯ to WN −1 such that
We introduce a polynomial interpolation operator PC from C(I)
The fully discrete pseudo-spectral method for (1.1) with (1.2) is to find u(tk ) ∈ VN such that
1 1
u (t ) + (PC u2 (tk ))x + PC (u(tk )ux (tk ))
t k 4 2
+ (1 − σ)uxxx (tk ) + σuxxx (tk+1 ) = 0, (2.3)
on IN × Sτ ,
u(0) = U0 , on IN ,
where σ is a parameter. If σ = 1/2, the time integration for the linear part in (2.3) is the
Crank–Nicolson scheme.
A direct approximation to an advection term, a(x)ux , by pseudo-spectral methods may cause
instability [12]. To avoid this, one rewrites it as
1 1 1
a(x)ux ≡ a(x)ux + (a(x)u)x − ax (x)u
2 2 2
before applying the pseudo-spectral approximation [12]. A similar idea has been used in [4] for
the nonlinear term with periodic boundary conditions. Based on the consideration of stability,
516 LI, MA, AND SUN
here we write the nonlinear term as two parts: U Ux ≡ 14 (U 2 )x + 12 U Ux . We shall give a remark
at the end of Section V to point out that this form seems important for the stability of the scheme.
We give a brief description for implementing the scheme (2.3). At each time level, we need to
solve the following equation: Find u(tk+1 ) ∈ VN ,
(u(tk+1 ), v)N + τ σ(uxxx (tk+1 ), v)N = (u(tk ), v)N − τ (1 − σ)(uxxx (tk ), v)N
(2.4)
τ τ
− ((PC u2 (tk ))x , v)N − (PC (u(tk )ux (tk )), v)N := (G(tk ), v)N , ∀ v ∈ VN .
4 2
Equation (2.4) can be solved either in the physical space or in the transform space. For the former,
let u(tk ) = [u(x1 , tk ), u(x2 , tk ), · · · , u(xN −2 , tk )]T , D be the pseudo-spectral approximation
matrix to the third-order derivative, and G(tk ) be the known on the right side of (2.4). Then the
algebraic system for (2.4) reads
(I + τ σD)u(tk+1 ) = G(tk ), (2.5)
where I is the identical matrix. Since the matrix D has a full structure [6], in general, directly
solving (2.5) is not efficient unless some preconditioning technique is adopted. A technique
to produce a sparse spectral linear system was developed in [13, 14] for the second-order and
forth-order equations. This technique can be applied here by reconstructing these basis functions.
For 0 ≤ n ≤ N − 3, we define cn = 1/(2n + 1) and
φn (x) = cn+1 [Ln (x) − Ln+2 (x)] − cn+2 [Ln+1 (x) − Ln+3 (x)],
NP
−3
where {Ln (x)} are the Legendre polynomials. Expanding u(x, tk ) = ûn (tk )φn (x) and
n=0
taking v = φm (0 ≤ m ≤ N − 3) leads to
N
X −3
[(φn , φm )N + τ σ(L0n+1 − L0n+2 , Lm+2 − Lm+1 )]ûn (tk+1 )
n=0 (2.6)
= (G(tk ), φm )N , ∀0≤m≤N −3.
Here we have used the exactness of the quadrature rule (2.1). Equation (2.6) can be expressed in
a matrix form as follows:
(A + τ σB)û(tk+1 ) = Ĝ(tk ),
where (A)mn = (φn , φm )N , (B)mn = (L0n+1 − L0n+2 , Lm+2 − Lm+1 ), (û(tk+1 ))m =
ûm (tk+1 ), and (Ĝ(tk ))m = (G(tk ), φm )N . By the exactness of the quadrature rule (2.1)
and the orthogonal property, for 0 ≤ m, n ≤ N − 3 and 0 ≤ m + n ≤ 2N − 8, we have
(A)mn := (φn , φm )N = (φn , φm ) such that
2
2cm+1 (cm + cm+2 ) + 2c2m+2 (cm+1 + cm+3 ), n = m,
2
−2c m+2 (cm+1 + cm+3 ) + 2cm+1 cm+2 cm+3 , n = m + 1,
(A)nm = (A)mn = −2cm+1 cm+2 cm+3 − 2cm+2 cm+3 cm+4 , n = m + 2,
2c c
m+2 m+3 m+4
c , n = m + 3,
0, n ≥ m + 4.
Only the remaining three elements (A)N −3,N −4 = (A)N −4,N −3 and (A)N −3,N −3 are a little
different. For the matrix B,
0, n < m,
(B)mn = (L0n+1 − L0n+2 , Lm+2 − Lm+1 ) = 2, n = m,
(−1)m+n 4, n > m.
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 517
Noting that (B)m,n + (B)m+1,n = 0 for n ≥ m + 2, we introduce a matrix T with the elements
(T)mn = 1 for n = m, m + 1 and (T)mn = 0 otherwise. Then we get the following system:
where T(A + τ σB) is an octa-diagonal matrix. We note that both (2.5) and (2.7) are equivalent
to the original scheme (2.4) algebraically.
α,β
In this section, we give some lemmas needed later in the error estimate. Let PN : L2ωα,β (I) →
IPN (I) be the orthogonal projection operator with the weight ωα,β . In the first lemma, we
α,β
present a new approximation result of PN , which seems a little better than the classical ones.
The second lemma deals with the discrete norm and inverse properties, which are frequently
used in our error analysis. The last two lemmas in this section play roles just as the well known
Gronwall lemma, one for the semi-discrete case and the other for the fully discrete case, except
that here the nonlinearity is to be considered. Throughout this article, C denotes a generic positive
constant with possibly different values in different contexts.
Proof. Since
Γ(n + k + α + β + 1) (α+k,β+k)
∂xk Pn(α,β) (x) = P (x),
2k Γ(n + α + β + 1) n−k
(α,β)
∂xk Pn are orthogonal polynomials with the weight ωα+k,β+k and
α,β P
∞
(α,β) 2
k∂xs (v − PN v) k2ωα+s,β+s = |v̂n |2 k∂xs Pn kωα+s,β+s
n>N
−1
P
∞ Q
r−1
(α,β) 2
= Ck,n |v̂n |2 k∂xr Pn kωα+r,β+r
n>N k=s
α,β
≤ CN 2(s−r) k∂xr (v − PN v)k2ωα+r,β+r ≤ CN 2(s−r) k∂xr vk2ωα+r,β+r .
518 LI, MA, AND SUN
It is well known that, for the Fourier Galerkin projection operator PN , we have
kPN u − uks ≤ CN s−r |u|r , s≤r (3.4)
when u is a periodic function. However, for the Jacobi projection such as the Legendre one, one
only has (see (6.8) of [2])
0,0 CN (3s/2)−r |u|r , if s ≤ 1,
kPN u − uks ≤ 0 ≤ s ≤ r.
CN 2s−1/2−r |u|r , if s ≥ 1,
The estimate in Lemma 3.1 is similar to that in (3.4).
We note that the points θm belong to intervals Im , contained in (0, π), of size CN −1 [16]. Thus,
NP
−2
kvk2N ≤ CN −1 supθ∈Im |v̂ 2 (θ) sin θ|
m=1
−2
NP
≤C k(sin θ)1/2 v̂k2L2 (Im ) + N −2 k[(sin θ)1/2 v̂]θ k2L2 (Im )
Z
m=1
π
(3.12)
≤C v̂ 2 (θ) + N −2 v̂ 2 (θ)ω̂−1,−1 (θ) + N −2 (v̂θ )2 (θ) sin θ dθ
0
= C kvk2 + N −2 kvk2ω−1,−1 + N −2 kvx k2ω1,1 .
which can be obtained by using Gauss quadrature formulas, and by (3.3), respectively.
For (3.6), we have from (2.1) and the asymptotic properties of the zeros of Jacobi polynomials
(see [15]),
N
X −2 N
X −2
kvk2ω−1,−1 = ωm (1 − x2m )−1 v 2 (xm ) ≤ CN 2 ωm v 2 (xm ) ≤ CN 2 kvk2N . (3.15)
m=1 m=1
So we have
v(0) − r1 √β1 t v(0) − r1 √β1 t
1− e v(t) − r1 ≤ −r2 e .
v(0) − r2 v(0) − r2
(3.20) is obtained.
Lemma 3.4. (Lemma 4.16 of [17]). Suppose that the following conditions are fulfilled:
( i ) E(tk ) is a nonnegative function defined on Sτ ;
( ii ) ρ0 , d1 and d2 are nonnegative constants;
(iii) E(0) ≤ ρ0 and for tn ∈ Sτ ,
n−1
X
E(tn ) ≤ ρ0 + τ [d1 E(tk ) + d2 (E(tk ))2 ] ;
k=0
In this section, we derive an error estimate of the pseudo-spectral method for the linear third-
order differential equation. This is an improvement of the result in [11],where an ‘‘infinite’’ order
estimate is obtained under the assumption that the solution is in C ∞ . Attention is paid on finding
a suitable compare function, which is an approximation to a related static problem, so that the
error with the third-order derivative disappears.
Consider the following model problem:
∂t U + Uxxx = 0, x ∈ I, t ∈ (0, T ],
U (−1, t) = 0, U (1, t) = 0, Ux (1, t) = 0, t ∈ [0, T ], (4.1)
U (x, 0) = U0 (x), x ∈ I,
which is exactly the same as in [11], if we replace x with −x in (4.1).
The semi-discrete pseudo-spectral method for (4.1) is to find u(t) ∈ VN such that, for 0 <
t ≤ T,
∂t u(t) + uxxx (t) = 0, on IN ,
(4.2)
u(0) = ΠN U0 ,
¯ to IPN (I) such that
where ΠN is the interpolation operator from C 1 (I)
ΠN v(xi ) = v(xi ), for i = 0, · · · , N − 1, (ΠN v)x (1) = vx (1).
As usual, we need to introduce an appropriate projection to deal with the third-order derivative
so that a better error estimate can be obtained . Let
H(I) = {u ∈ H01 (I) ∩ H 2 (I) | ux (1) = 0}.
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 521
1,2
Let v(x) = ∂x−3 PN −3 uxxx . We get from (3.1)
1,2 3−r
k(v − u)xxx kω1,2 = k(PN −3 − I)uxxx kω1,2 ≤ CN k∂xr ukωr−2,r−1 ,
which gives the result (4.6) for l = 3.
Next, we set
0,1
g = PN u − u, v = ∂x−1 [(1 + x)PN −2 gxx ]
522 LI, MA, AND SUN
0 0,1
so that v ∈ VN . Noting (1 + x)gxx − vx = (1 + x)(PN −2 − I)uxx , we obtain from (3.1)
We have
ω1,2 ([(1 + x)−1 ∂x−1 ((1 − x)−1 gx )]x )2
(4.9)
≤ 2(1 − x)−1 (gx )2 + 2(1 − x)(1 + x)−2 (∂x−1 [(1 − x)−1 gx ])2 .
The desired result for l = 1 follows from the Hardy’s inequality (see [18], p. 145).
Finally, we consider the case of l = 0. Let g be the same as before and
1,0 −1 −2
v(x) = PN −2 (∂x [(1 − x) (1 + x)−1 g]). (4.10)
Thus, we get from (4.5) and (3.1)
kPN u − uk2ω−2,−1 = (PN u − u, (1 − x)−2 (1 + x)−1 g − vx )
1,0 −1 −2
= −((PN u − u)x , (I − PN −2 )(∂x [(1 − x) (1 + x)−1 g]))
1,0
≤ k(PN u − u)x kω−1,0 k(I − PN −2 )(∂x [(1 − x)−2 (1 + x)−1 g]))kω1,0
−1
1,0
Let v(x) = ∂x−2 PN −2 uxx . We get from (3.1)
1,0 3−r
k(v − u)xxx kω2,1 = k∂x (PN −2 uxx − uxx )kω2,1 ≤ CN k∂xr ukωr−1,r−2 ,
which gives (4.12) for l = 3.
Next, we set p2 (x) = 14 (1 + x)(3 − x) so that p2 (−1) = p2x (1) = 0, p2 (1) = 1. Let
1,0
g = QN u − u, ṽ(x) = ∂x−1 [(1 − x)PN −2 gxx ], v(x) = ṽ(x) − p2 (x)ṽ(1)
1,0 1
so that v ∈ VN . Noting (1 − x)gxx − vx = (1 − x)(PN −2 − I)uxx + 2 (1 − x)ṽ(1) and
ṽ(1) = −2gx (−1),
k(QN u − u)xx k2ω1,0 = ((QN u − u)xx , (1 − x)gxx − vx )
1,0
= ((QN u − u)xx , (1 − x)[(PN −2 − I)uxx − gx (−1)])
1,0
≤ kgxx kω1,0 k(PN −2 − I)uxx kω1,0 + 2|gx (−1)|2 .
Since
|gx (−1)|2 = −2(gxx , gx ) = −2(gxx , (g − PN g)x )
(4.15)
≤ 2kgxx kω1,0 k∂x (I − PN )gkω−1,0 ,
by (3.1) and (4.6)
1,0
k(QN u − u)xx kω1,0 ≤ C(k(PN −2 − I)uxx kω1,0 + k(PN u − u)x kω−1,0 )
≤ CN 2−r (k∂xr ukωr−1,r−2 + N −1 k∂xr ukωr−2,r−1 ).
Then we see that (4.12) for l = 2 holds, and, therefore, (4.13) follows (4.15) by using (4.6).
R1
For l = 1, we let g = (QN u − u) − q2 (QN u − u)x (−1) ∈ H 0 (I), ∂¯x−1 f (x) = − x f (y) dy,
and
1,0 −1 ¯−1
v(x) = ∂x−1 ((1 − x)PN −2 [(1 − x) ∂x ((1 + x)−1 gx )]).
It is easy to see that v(−1) = vx (1) = 0 and
Z 1 Z 1
v(1) = ∂¯x−1 [(1 + x)−1 gx ] dx = ((x + 1)∂¯x−1 [(1 + x)−1 gx ])|1−1 − gx (x) dx = 0.
−1 −1
We have
ω2,1 ([(1 − x)−1 ∂¯x−1 ((1 + x)−1 gx )]x )2
≤ 2(1 + x)−1 (gx )2 + 2(1 − x)−2 (1 + x)(∂¯x−1 [(1 + x)−1 gx ])2 .
The desired result (4.12) for l = 1 follows from the Hardy’s inequality.
Finally, we consider (4.12) for l = 0. Let g ∈ H 0 (I) be the same as above and
0,1 −1 −1
v(x) = PN −2 (∂x [(1 − x) (1 + x)−2 g]).
Thus we get from (4.11) and (3.1)
kgk2ω−1,−2 = (g, (1 − x)−1 (1 + x)−2 g − vx )
0,1 −1 −1
= −((gx , (I − PN −2 )(∂x [(1 − x) (1 + x)−2 g]))
0,1
≤ kgx kω0,−1 k(I − PN −2 )(∂x [(1 − x)−1 (1 + x)−2 g]))kω0,1
−1
Hence,
d
kũ(t)k2N + |ũx (−1, t)|2 ≤ kũ(t)k2N + CN 2(2−r) (kU (t)k2r + k∂t U (t)k2r−1 ).
dt
The last inequality yields via Gronwall’s Lemma the following result.
Theorem 4.4. Assume that U ∈ L2 (0, T ; H(I) ∩ H r (I)) ∩ H 1 (0, T ; H(I) ∩ H r−1 (I)) and
r ≥ 2. Then for t < T ,
kU (t) − u(t)kN + k(U − u)x (−1)kL2 (0,t) ≤ CN 2−r .
We consider the error analysis of the scheme (2.2). Let e(0) be the initial error on the initial value
u(0). The error on the solution u(t) is denoted by e(t). We assume that all functions below are
valued at t unless otherwise specified. Then e satisfies
1 1
∂t e + (PC (2ue + e2 ))x + PC (ex u + ux e + eex ) + exxx = 0, ∀ (x, t) ∈ IN × (0, T ).
4 2
So we have
1
(∂t e, v)N + ((PC (2ue + e2 ))x , v)N
4 (5.1)
1
+ (PC (ex u + ux e + eex ), v)N + (exxx , v)N = 0, ∀ v ∈ VN .
2
Taking v = e in (5.1), we get
1d 1 1 1
kek2N + ((PC (2ue + e2 ))x , e)N + (PC (ex u + ux e + eex ), e)N + |ex (−1)|2 = 0.
2 dt 4 2 2
By the definition of PC and (2.1),
1 1
((PC (2ue +e2 ))x , e)N + (PC (ex u + ux e + eex ), e)N
4 2
1 1
= − (PC (2ue + e2 ), ex ) + (ex u + ux e + eex , e)N
4 2 (5.2)
1 1
= − (2ue + e2 , ex )N + (ex u + ux e + eex , e)N
4 2
1 1
= (e2 , ex )N + (ux e, e)N .
4 2
Then, on the use of (3.8) and (3.7), we get
1d 1 1 1
kek2N + |ex (−1)|2 = − (e2 , ex )N − (ux e, e)N
2 dt 2 4 2
1 1
≤ |e|∞,IN kekN kex kN + |ux |∞,IN kek2N
4 2
1 1
≤ CN 3 kek3N + |ux |∞,IN kek2N ≤ (C + |ux |∞,IN )kek2N + CN 6 kek4N .
2 2
If ke(0)kN ≤ εN −3 for ε being small enough so that the condition (3.19) of Lemma 3.3 holds,
we obtain from Lemma 3.3
∗
ke(t)k2N + kex (−1)k2L2 (0,t) ≤ Ceα t ke(0)k2N , ∀ t ∈ (0, T ],
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 527
We estimate Fj in the last equation, respectively. As shown in (4.26), we have for any v ∈ VN
|F1 | ≤ CN 2−r k∂t U kr−1 kvkN .
Using (3.5), (3.7), the embedding theorem, and (4.6),
1
|F2 | = |((u∗ )2 − PN −1 U 2 , vx )N + (PN −1 U 2 − U 2 , vx )|
4 (5.4)
≤ CN 2 (k(PN U )2 − U 2 k + kPN −1 U 2 − U 2 k)kvx k ≤ CN 2−r kU kr kU k2 kvkN .
By the definitions of PC , (3.5), and (4.6),
|F3 | ≤ |(u∗ u∗x − PN −2 (U Ux ), v)N | + |((PN −2 − I)(U Ux ), v)|
≤ CN (ku∗ (u∗ − U )x k + k(u∗ − U )Ux k + k(PN −2 − I)(U Ux )k)kvkN (5.5)
≤ CN 2−r kU kr kU k2 kvkN .
Similar to (4.27), we have
1
|F4 | ≤ CN 2(2−r) kU k2r + |vx (−1)|2 . (5.6)
4
By putting v = ũ in (5.3), the conditions of Lemma 3.3 are satisfied if r > 5. Then we have the
following convergence result.
Theorem 5.1. Assume that U ∈ L2 (0, T ; H(I) ∩ H r (I)) ∩ H 1 (0, T ; H(I) ∩ H r−1 (I)) and
r > 5. Then for t < T ,
kU (t) − u(t)kN + k(U − u)x (−1)kL2 (0,t) ≤ CN 2−r .
Remark. We can see from (5.2) that with the coefficients (1/4, 1/2) in the separation of the
nonlinear term the term (ue, ex )N is eliminated. This term causes the failure of getting an
error estimate in L2 -norm even for the Fourier pseudo-spectral method of the KdV equation as
discussed in [4]. A drawback is that the term (e2 , ex )N is left, which can be controlled here only
under a strong regularity assumption. The latter term does disappear if we choose the coefficients
(1/3, 1/3) as in [4]. However, in that case, to control the former, we may need a filter, which
affects the accuracy when the solution is very smooth.
528 LI, MA, AND SUN
In this section, we consider the error estimates of the scheme (2.3). Similarly, we denote by e(0)
and e(tk ) the initial error on the initial value u(0) and the error on the solution u(tk ). We assume
that all functions below are valued at tk unless otherwise specified. Note that (1 − σ)uxxx (tk ) +
σuxxx (tk+1 ) ≡ uxxx (tk ) + στ uxxxt (tk ). Then e satisfies
1 1
et + (PC (2ue + e2 ))x + PC (ex u + ux e + eex ) + exxx + στ exxxt = 0, on IN × Sτ .
4 2
So we have from (2.1)
1 1
(et , v)N + ((PC (2ue + e2 ))x , v)N + (PC (ex u + ux e + eex ), v)N
4 2 (6.1)
+(exxx , v) + στ (exxxt , v) = 0, v ∈ VN , tk ∈ Sτ .
We take v = 2e in (6.1),
1
(kek2N )t − τ ket k2N + ((PC (2ue + e2 ))x , e)N
2 (6.2)
+(PC (ex u + ux e + eex ), e)N + 2(exxx , e) + 2στ (exxxt , e) = 0,
and v = mτ et in (6.1),
mτ mτ
mτ ket k2N + ((PC (2ue + e2 ))x , et )N + (PC (ex u + ux e + eex ), et )N
4 2 (6.3)
+mτ (exxx , et ) + mστ 2 (exxxt , et ) = 0.
Combining (6.2) with (6.3) gives
where
1
G1 = ((PC (2ue + e2 ))x , e)N + (PC (ex u + ux e + eex ), e)N ,
2
mτ
G2 = ((PC (2ue + e2 ))x , et )N ,
4
mτ
G3 = (PC (ex u + ux e + eex ), et )N .
2
By (5.2),
|G1 | ≤ (C + |ux |∞,IN )kek2N + CN 6 kek4N .
Similarly,
mτ mτ
|G2 | = | (PC (2ue + e2 ), ext )| = | (PC (2ue + e2 ), ext )N |
4 4
≤ Cmτ (|u|∞,IN + |e|∞,IN )kekN kext kN
≤ Cmτ N 2 (|u|∞,IN kek + N kek2N )ket kN
≤ ετ ket k2N + Cε−1 m2 τ N 4 (|u|2∞,IN kek2N + N 2 kek4N ),
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 529
and
mτ
|G3 | ≤ ket kN (|u|∞,IN kex kN + |ux |∞,IN kekN + |e|∞,IN kex kN )
2
≤ Cmτ ket kN (N 2 |u|∞,IN kekN + |ux |∞,IN kekN + N 3 kek2N )
≤ ετ ket k2N + Cε−1 m2 τ (N 4 |u|2∞,IN kek2N + |ux |2∞,IN kek2N + N 6 kek4N ).
Substituting the above inequalities into (6.4), we have
(kek2N )t + τ (m − 1 − 2ε)ket k2N + |(e + στ et )x (−1)|2
1
+τ (m − 2σ)(exxx , et ) + στ 2 (m − 2σ)e2xt (−1)
2 (6.5)
≤ (C + (1 + Cε−1 m2 τ )|ux |∞,IN )kek2N + CN 6 kek4N
+Cε−1 m2 τ N 4 (|u|2∞,IN kek2N + N 2 kek4N ).
Let σ > 12 , m = 2σ = 1 + 3ε + α0 , ε be small enough, and α0 > 0. Summing (6.5) for
tk < tn ∈ Sτ gives
n−1
X
ke(tn )k2N + (α0 τ 2 ket (tk )k2N + |(e + στ et )x (−1, tk )|2 )
k=0
n−1
X
≤ ke(0)k2N + τ d1 ke(tk )k2N + d2 ke(tk )k4N ,
k=0
where
d1 = C + (1 + Cε−1 m2 τ )|ux (tk )|∞,IN + Cε−1 m2 τ N 4 |u(tk )|2∞,IN ,
d2 = CN 6 + Cε−1 m2 τ N 6 .
We define
Pn−1
E(tn ) := ke(tn )k2N + k=0 (α0 τ
2
ket (tk )k2N + |(e + στ et )x (−1, tk )|2 ),
ρ := ke(0)kN .
Then for any tn ≤ tc ∈ Sτ ,
n−1
X
E(tn ) ≤ ρ2 + τ [d1 E(tk ) + d2 E 2 (tk )].
k=0
Now we estimate G̃j in the last equation. We first show that, for any v ∈ VN , we have from (2.1)
and (3.5)
|(u, v)N − (w, v)| = |(u − PN −2 w, v)N + (PN −2 w − w, v)|
≤ C(ku − PN −2 wk + N kPN −2 w − wk)kvkN ≤ C(ku − wk + N k(PN −2 − I)wk)kvkN .
Thus, we have
|G̃1 | ≤ C(ku∗t − (∂t U + στ ∂t Ut )k + N k(PN −2 − I)(∂t U + στ ∂t Ut )k)kvkN
≤ C(ku∗t − Ut k + kUt − ∂t U k + kστ ∂t Ut k + N k(PN −2 − I)(∂t U + στ ∂t Ut )k)kvkN .
We need to bound the following terms:
n−1
X
τ k(PN − I)Ut (tk )k2
k=0
X Z tk+1
n−1
≤ k(PN − I)∂t U (s)k2 ds ≤ CN 2(2−r) k∂t U k2L2 (0,T ;H r−2 (I)) ,
k=0 tk
n−1
X
τ k(Ut − ∂t U )(tk )k2
k=0
n−1 Z X Z tk+1
n−1
C X tk+1
≤ |tk+1 − s|2 ds k∂t2 U (s)k2 ds ≤ Cτ 2 k∂t2 U k2L2 (0,T ;L2 (I)) ,
τ tk tk
k=0 k=0
n−1
X
τ kστ ∂t Ut (tk )k2
k=0 (6.7)
X Z tk+1
n−1 Z tk+1
≤ Cτ · ds k∂t2 U (s)k2 ds ≤ Cτ 2 k∂t2 U k2L2 (0,T ;L2 (I)) ,
k=0 tk tk
G̃2 and G̃3 can be estimated as in (5.4) and (5.5), respectively, and
|G̃4 | ≤ Cστ (|((I − PN −2 )(U Ux )t , v)| + |((PN −2 − I)(U Ux )t , v)N | + |((U Ux )t , v)N |)
≤ Cστ (N k(I − PN −2 )(U Ux )t k + k(U Ux )t k)kvkN ,
which can be bounded similar to (6.8) and (6.7),
τ N k(I − PN −2 )(U Ux )t k ≤ CN 2−r kU k2C(0,T ;H r (I)) ,
P
n−1
τ kστ (U Ux )t (tk )k2 ≤ Cτ 2 k∂t (U Ux )k2L2 (0,T ;L2 (I)) ≤ Cτ 2 kU k4H 1 (0,T ;H 1 (I)) .
k=0
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 531
In this section, we present some numerical experiments and compare them with those of a previous
spectral method.
Example 1. We consider the following KdV equation
∂t U + U Ux + Uxxx = 0, a < x < b, t > 0. (7.1)
The analytic solution of (7.1) on the infinite interval is
U (x, t) = Asech2 (κx − ωt − x0 ), (7.2)
where
A = 12κ2 , ω = 4κ3 , x0 = constant.
We compute the problem by the Legendre pseudo-spectral method (2.3) with the following pa-
rameters:
κ = 0.3, x0 = 0, [a, b] = [−40, 40].
To see the order of the accuracy, we let τ decrease from 10−1 to 10−5 for large N = 160 and
let N increase from 10 to 160 for small τ = 10−6 . The results are given in Table I, which agree
with the theoretical analysis well.
TABLE I. Error at t = 1 of the LPM method (2.3) for the solution (7.2) to the KdV equation (7.1).
τ N L∞ -error L2 -error
1e−1 5.0879e−3 8.1818e−3
1e−2 5.2136e−4 8.3376e−4
1e−3 160 5.2253e−5 8.3542e−5
1e−4 5.2264e−6 8.3626e−6
1e−5 5.2250e−7 8.6122e−7
10 6.7688e−1 1.4367e+0
20 2.7401e−1 6.9376e−1
1e−6 40 2.8409e−2 9.2131e−2
80 5.2951e−4 1.3874e−3
160 1.4191e−7 2.0651e−7
This problem was computed in [6]. We denote the relative error in L∞ -norm by
max |u(xi ) − U (xi )|
i
E(u) = .
max |U (xi )|
i
VIII. CONCLUSION
In this article, we analyzed the stability and convergence property of the Legendre pseudo-spectral
method for the KdV equation with nonperiodic boundary conditions. Unlike the second-order
and forth-order differential equations, the spectral approximation of odd order problems with
nonperiodic boundary conditions have not been well addressed. The first theoretical work we
know is given by [11], where an ‘‘infinite’’ order convergence is obtained for the third-order
linear problem under the assumption that the solution is in C ∞ . Here, we present a more precise
estimate O(N 2−r ).
For ease of exposition of our analysis, only a first-order in time scheme is considered. A simple
second-order in time scheme can be achieved by treating the nonlinear term with the Adams–
TABLE II. The relative error E(u) at t = 1 of the LPM method (2.3) (σ = 1) and BE/FE method.
Scheme (2.3) BE/FE Method
N τ = 0.01 τ = 0.001 τ = 0.01 τ = 0.001
30 1.7003e−2 7.9430e−3 3.2057e−2 3.1327e−2
40 1.4928e−2 1.8721e−3 1.6330e−2 2.5363e−3
50 1.8155e−2 1.6732e−3 1.7802e−2 1.7584e−3
ERROR ANALYSIS FOR SOLVING THE KDV EQUATION 533
Bashforth method and putting σ = 1/2 in (2.3). Other high-order time integration methods such
as Runge–Kutta methods can be designed based on the semi-discrete scheme (2.2) to improve
the accuracy of the time integration. The theoretical stability and convergence properties of such
combinations are still unclear.
As discussed in the remark in Section V, we use this separation for the nonlinear term based
on the consideration that many interesting solutions of the KdV equation are smooth, and spec-
tral methods may be more preferable to smooth solutions. Nevertheless, the strong regularity
assumption and severe restriction on the time-step τ (to make the error small) are undesirable.
We hope to pursue this problem in the future.
IX. ACKNOWLEDGMENTS
The authors thank Professor Guo Benyu for the helpful discussion and the anonymous referees
for their valuable suggestions and comments.The second author would like to thank the Liu Bie
Ju Centre for Mathematical Sciences, City University of Hong Kong, for their hospitality. The
work was done when he was visiting the Half-Year Programme on Numerical Analysis in this
centre.
References
1. C. Canuto, M. Y. Hussaini, A. Quarteroni, and T. A. Zan, Spectral methods in fluid dynamics, Springer–
Verlag, Berlin, 1988.
2. C. Bernardi and Y. Maday, Spectral methods, Handbook of numerical analysis, Vol. V, Techniques of
scientific computing (Part 2), P. G. Ciarlet and J. L. Lions (Editors), Elsevier, Amsterdam, 1997, pp.
209–486.
3. Ben-Yu Guo, Spectral methods and their applications, World Scientific, Singapore, 1998.
4. He-Ping Ma and Ben-Yu Guo, The Fourier pseudo-spectral method with a restrain operator for the
Korteweg-de Vries equation, J Comp Phys 65 (1986), 120–137.
5. Y. Maday and A. Quarteroni, Error analysis for spectral approximation of the Korteweg-de Vries
equation, M2 AN, 22 (1988), 499–529.
6. D. Pavoni, Single and multidomain Chebyshev collocation methods for the Korteweg-de Vries equation,
Calcolo 25 (1988), 311–346.
7. N. Bressan and D. Pavoni, Truncation versus mapping in the spectral approximation to the Korteweg-de
Vries equation, Comp Meth Appl Mech Eng 80 (1990), 443–450.
8. G. F. Carey and Y. Shen, Approximations of the KdV equation by least squares finite elements, Comp
Meth Appl Mech Eng 93 (1991), 1–11.
9. K. Djidjeli, W. G. Price, E. H. Twizell, and Y. Wang, Numerical methods for the solution of the third-
and fifth-order dispersive Korteweg-de Vries equations, J Comp Appl Math 58 (1995), 307–336.
10. W. J. Merryfield and B. Shizgal, Properties of collocation third-derivative operators, J Comp Phys 105
(1993), 182–185.
11. W. Z. Huang and D. M. Sloan, The pseudo-spectral method for third-order differential equations, SIAM
J Numer Anal 29 (1992), 1626–1647.
12. D. Gottlieb and S. Orszag, Numerical analysis of spectral methods: Theory and applications, SIAM-
CBMS, Philadelphia, 1977.
13. J. Shen, Efficient spectral-Galerkin method, I. Direct solvers for second- and fourth-order equations
using Legendre polynomials, SIAM J Sci Comp 15 (1994), 1489–1505.
14. J. Shen, Efficient spectral-Galerkin method, II. Direct solvers for second- and fourth-order equations
using Chebyshev polynomials, SIAM J Sci Comp 16 (1995), 74–87.
15. G. Szegö, Orthogonal polynomials, American Mathematics Society, Providence, RI, 1975.
16. C. Bernardi and Y. Maday, Polynomial interpolation results in Sobolev space, J Comp Appl Math 43
(1992), 53–82.
17. Ben-Yu Guo, Difference methods for partial differential equations, Science Press, Beijing, 1988.
18. D. S. Mitrinović, J. E. Pečarić, and A. M. Fink, Inequalities involving functions and their integrals and
derivatives, Kluwer Academic, Dordrecht, 1991.
19. T. F. Chan and T. Kerkhoven, Fourier methods with extended stability intervals for the Korteweg-
de Vries equation, SIAM J Numer Anal 22 (1985), 441–454.