Next Article in Journal
Mathematical Evaluation of Classical and Quantum Predictive Models Applied to PM2.5 Forecasting in Urban Environments
Previous Article in Journal
Applying λ-Statistical Convergence in Fuzzy Paranormed Spaces to Supply Chain Inventory Management Under Demand Shocks (DS)
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Fourth-Order Compact Finite Difference Method for the Schrödinger Equation with Anti-Cubic Nonlinearity

Department of Mathematics, Augusta University, 1120 15th Street, Augusta, GA 30912, USA
Mathematics 2025, 13(12), 1978; https://doi.org/10.3390/math13121978
Submission received: 19 May 2025 / Revised: 10 June 2025 / Accepted: 14 June 2025 / Published: 16 June 2025

Abstract

:
In this paper, we present a compact finite difference method for solving the cubic–quintic Schrödinger equation with an additional anti-cubic nonlinearity. By applying a special treatment to the nonlinear terms, the proposed method preserves both mass and energy through provable conservation properties. Under suitable assumptions on the exact solution, we establish upper and lower bounds for the numerical solution in the infinity norm, and further prove that the errors are fourth-order accurate in space and second-order in time in both the 2-norm and infinity norm. A detailed description of the nonlinear system solver at each time step is provided. We validate the proposed method through numerical experiments that demonstrate its efficiency, including fourth-order convergence (when sufficiently small time steps are used) and machine-level accuracy in the relative errors of mass and energy.

1. Introduction

In this paper, we consider the initial-boundary value problem for the following nonlinear Schrödinger equation with an anti-cubic nonlinearity:
i u t + u x x + 1 | u | 4 | u | 2 | u | 4 u = f ( x , t ) u ,
for x [ L , L ] , t ( 0 , T ] , where L and T are given positive constants. The solution u ( x , t ) is a complex-valued function, and f ( x , t ) is a given real-valued function. In Equation (1), | u | denotes the modulus of the function u. The three nonlinear terms, i.e., 1 | u | 4 u , | u | 2 u , and | u | 4 u , correspond to the anti-cubic, cubic, and quintic terms, respectively. Equation (1) is considered with the initial condition u ( x , 0 ) = u 0 ( x ) and periodic boundary conditions.
This problem possesses two key conservation laws: mass and energy conservations, given by
Q ( t ) = L L | u ( x , t ) | 2 d x = Q ( 0 ) ,
and
E ( t ) = L L | u x ( x , t ) | 2 d x + L L 1 | u | 2 + 1 2 | u | 4 + 1 3 | u | 6 d x = E ( 0 ) 0 t L L f ( x , t ) t | u | 2 d x d t ,
respectively. Note that in Equation (3), the energy is exactly conserved (i.e., E ( t ) = E ( 0 ) ) in the classical sense when f = 0 . More generally, if the modulus of u remains constant over time, as in one of the numerical examples in Section 5, the energy is also conserved even when f 0 . In other cases with general f, the energy may vary due to the integral term on the right-hand side of (3). Nevertheless, we continue to refer to Equation (3) as the energy conservation law, following the terminology commonly used in the literature. Therefore, in order to design an effective numerical scheme, one must not only ensure high accuracy in approximating the solution, but also preserve the conservation properties in the discrete sense.
The nonlinear Schrödinger equation with an anti-cubic term was first introduced by Fedele et al. [1] in 2003. Since then, it has attracted significant attention from researchers worldwide. The anti-cubic nonlinearity has been shown to play a critical role in stabilizing soliton solutions, even in the presence of perturbations, allowing solitons to persist over longer times and across larger spatial domains [2].
In the literature, a wide range of analytical methods have been developed to construct exact soliton solutions, including the Jacobi elliptic function method [3], extended trial function method [4,5], csch method, extended tanh–coth method, modified simple equation method [6], and mapping method [7]. Ramzan et al. [8] further explored analytical approaches such as the E x p a -function method, modified Kudryashov method, and generalized tanh method. However, these analytical techniques often rely on symbolic computation and assume ansatz forms for the solutions, which limits their applicability to general initial conditions and leads to considerable algebraic complexity.
To address these limitations, we propose a high-order numerical method that achieves provable convergence and preserves conservation properties. To the best of our knowledge, few studies have focused on numerical methods for Schrödinger equations with anti-cubic nonlinearity, despite the fact that this model generalizes the well-studied cubic–quintic case. Among all the work, there are some articles particularly focusing on developing high-order numerical methods with conservation properties. For example, Hu and Hu [9] introduced a compact finite difference method for the cubic–quintic Schrödinger equation. They proved the fourth-order spatial convergence and conservation of mass and energy. Yang [10] proposed a local discontinuous Galerkin method with Crank–Nicholson time discretization and established conservation properties in both semi-discrete and fully discrete settings. More recently, Le, Huynh and Nguyen [11] studied a Crank–Nicholson finite difference scheme for the (2 + 1)D cubic–quintic Schrödinger equation with cubic damping and proved existence and uniqueness of the numerical solution.
Building on these developments, we propose a fourth-order compact finite difference method to approximate the spatial derivative in Equation (1) in order to achieve high-order accuracy in x. A central feature of our method is its provable mass and energy conservation. That is, the invariants given in (2) and (3) are preserved in the discrete formulation, which is of fundamental importance in many physical applications. In the broader context of conservative numerical methods for nonlinear Schrödinger-type equations, various approaches have been developed, including finite difference methods [9,12,13,14,15,16,17], spectral methods [18,19,20], (local and direct) discontinuous Galerkin methods [21,22,23,24,25], and wavelet-based methods [26,27]. Most of these schemes use standard spatial discretization techniques combined with Crank–Nicholson or other time-stepping methods. However, a direct application of the standard Crank–Nicholson method to Equation (1) does not lead to a numerical method with provable energy conservation property due to the nonlinear terms in (1). To overcome this obstacle, we carefully design a discretization that ensures both mass and energy conservation can be rigorously proved. Furthermore, under suitable assumptions on the exact solution, we establish bounds for the numerical solution in both the 2-norm and -norm, and derive error estimates confirming fourth-order accuracy in space and second-order accuracy in time, which together guarantee stable and accurate numerical solutions.
The remainder of this paper is organized as follows. In Section 2, we introduce the notation used throughout the paper, state the assumptions needed for the theoretical analysis, and present our proposed numerical method for the Schrödinger equation with an anti-cubic term. Section 3 provides the main results on the conservation properties of the method, along with their mathematical proofs. In Section 4, we establish bounds for the numerical solution in the 2-norm and the -norm, and derive error estimates in these norms. Section 5 presents numerical examples to verify the fourth-order spatial convergence of the method and to demonstrate the conservation of discrete mass and energy. Finally, Section 6 concludes the paper with a summary and discussion.

2. Compact Finite Difference Method for the Problem

In this section, we introduce our proposed fourth-order compact finite difference method for Equation (1) under the given initial and boundary value conditions.
We begin by defining the mesh, grid points, and solution space. The spatial domain [ L , L ] is divided into J uniform subintervals [ x 0 , x 1 ] , [ x 1 , x 2 ] , , [ x J 1 , x J ] , where x j = L + j h and the spatial mesh size is h = 2 L / J for j = 0 , 1 , , J . The temporal domain [ 0 , T ] is partitioned into N subintervals such that t n = n τ , where τ = T / N is the time step size. Throughout the paper, we use u j n and U j n to represent the numerical and exact solutions at the grid point ( x j , t n ) , respectively.
Next, we define the following discrete operators:
δ t u j n = u j n + 1 u j n τ , δ x 2 u j n = u j + 1 n 2 u j n + u j 1 n h 2
to represent the first-order forward difference in time and the second-order centered difference in space. We further define the operator A h by
A h u j n = u j n + h 2 12 δ x 2 u j n = 1 12 u j + 1 n + 10 u j n + u j 1 n .
It is well known that the inverse operator of A h acting on δ x 2 , i.e., A h 1 δ x 2 , yields a fourth-order approximation of the second spatial derivative.
Due to the periodic boundary condition of the problem, we define the solution space at each time step as
V h = { v | v = ( v 0 , v 1 , , v J 1 , v J ) T , v 0 = v J , v j C , j } .
For any a , b , v V h , we define the grid inner product by
a , b = h j = 0 J 1 a j b j ¯ ,
where b j ¯ denotes the complex conjugate of b j . The p-norm and -norm of v are defined as
v p = h j = 0 J 1 | v j | p 1 p , v = max 0 j J 1 | v j | ,
for 1 p < .
We also assume the exact solution satisfies the following condition:
max { U n 2 , δ x U n 2 , U n } C .
Here, U n = ( U 0 n , U 1 n , , U J 1 n ) T is the column vector representing the exact solution at time t n , and C is a generic positive constant. We assume this condition holds for all 0 n T / τ . Additionally, we assume the existence of a positive constant C 0 < C such that
| U j n | C 0 > 0 , 0 n T τ .
The assumption in Equation (8) ensures that the solution to Equation (1) is well-defined.
Furthermore, to establish the error estimates in Theorems 3–5, we assume that the exact solution u ( x , t ) is sufficiently smooth, specifically u C 6 , 3 ( [ L , L ] × [ 0 , T ] ) , i.e., six times continuously differentiable in space and three times in time.
Our proposed Crank–Nicholson compact finite difference method is defined as follows:
i A h δ t u j n + 1 2 δ x 2 ( u j n + 1 + u j n ) + 1 2 A h 1 | u j n + 1 | 2 1 | u j n | 2 ( u j n + 1 + u j n ) 1 4 A h ( | u j n + 1 | 2 + | u j n | 2 ) ( u j n + 1 + u j n ) 1 6 A h ( | u j n + 1 | 4 + | u j n + 1 | 2 | u j n + 1 | 2 + | u j n | 4 ) ( u j n + 1 + u j n ) = 1 2 A h f j n + 1 2 ( u j n + 1 + u j n ) ,
u j 0 = u 0 ( x ) ,
u 0 n = u J n , u 1 n = u J 1 n ,
for j = 0 , 1 , , J 1 and n = 0 , 1 , , N 1 . Here, f j n + 1 2 represents f ( x j , t n + τ / 2 ) . We rewrite the scheme above in vector form by defining u n = ( u 0 n , u 1 n , , u J 1 n ) T , and denoting the matrix form of the discrete operator A h as
M = 1 12 10 1 0 0 1 1 10 1 0 0 0 1 10 1 0 0 0 1 10 1 1 0 0 1 10 J × J .
Additionally, we introduce the following notation: 1 | u n + 1 | 2 | u n | 2 , | u n + 1 | 2 + | u n | 2 , and f n + 1 2 , to represent diagonal matrices, defined by
1 | u n + 1 | 2 | u n | 2 = d i a g ( 1 | u 0 n + 1 | 2 | u 0 n | 2 , 1 | u 1 n + 1 | 2 | u 1 n | 2 , , 1 | u J 1 n + 1 | 2 | u J 1 n | 2 ) , | u n + 1 | 2 + | u n | 2 = d i a g ( | u 0 n + 1 | 2 + | u 0 n | 2 , | u 1 n + 1 | 2 + | u 1 n | 2 , , | u J 1 n + 1 | 2 + | u J 1 n | 2 ) , f n + 1 2 = d i a g ( f 0 n + 1 2 , f 1 n + 1 2 , , f J 1 n + 1 2 ) .
Similarly, | u n + 1 | 4 + | u n + 1 | 2 | u n | 2 + | u n | 4 denotes a diagonal matrix defined analogously. Using this notation, Equation (9) can be rewritten compactly as
i M δ t u n + 1 2 δ x 2 ( u n + 1 + u n ) + 1 2 M 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) 1 4 M ( | u n + 1 | 2 + | u n | 2 ) ( u n + 1 + u n ) 1 6 M ( | u n + 1 | 4 + | u n + 1 | 2 | u n + 1 | 2 + | u n | 4 ) ( u n + 1 + u n ) = 1 2 M f n + 1 2 ( u n + 1 + u n ) .
Note that the matrix M in the system above is symmetric positive definite. We denote its inverse by H, which is also symmetric positive definite. With this, the system of equations can be reformulated as
i δ t u n + 1 2 H δ x 2 ( u n + 1 + u n ) + 1 2 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) 1 4 ( | u n + 1 | 2 + | u n | 2 ) ( u n + 1 + u n ) 1 6 ( | u n + 1 | 4 + | u n + 1 | 2 | u n + 1 | 2 + | u n | 4 ) ( u n + 1 + u n ) = 1 2 f n + 1 2 ( u n + 1 + u n ) ,
for n = 0 , 1 , , N 1 . The initial condition is given by u 0 = ( u 0 ( x 0 ) , u 0 ( x 1 ) , , u 0 ( x J 1 ) ) T .

3. Conservation Properties of the Scheme

In this section, we analyze the conservation properties of our proposed scheme, in analogy with the mass and energy conservation laws at the PDE level, as given in Equations (2) and (3). The following two lemmas are essential for establishing the proof of the discrete conservation properties.
Lemma 1. 
For any a , b V h , the following identify holds:
j = 0 J 1 ( δ x 2 a j ) b j ¯ = j = 0 J 1 ( δ x a j ) ( δ x b j ¯ ) .
Lemma 2. 
Suppose H = R T R is the Cholesky factorization of the symmetric positive definite matrix H, where R is an upper triangular matrix with positive diagonal entries. Then,
R e H δ x 2 ( u n + 1 + u n ) , u n + 1 u n = R δ x u n + 1 2 2 R δ x u n 2 2 .
Lemma 1 can be interpreted as a discrete integration by parts formula. Its proof can be found in Lemma 3.1 of [28], and is omitted here for brevity. Lemma 2 follows directly from Lemma 1 and the definition of the grid inner product. The proof is detailed in Lemma 3.7 of [14].
We now state the main result regarding the discrete conservation of mass and energy.
Theorem 1. 
The finite difference scheme (12) satisfies the following conservation properties:
Q n = u n 2 2 = Q n 1 = = Q 0 , E n + 1 = R δ x u n + 1 2 2 + h j = 0 J 1 1 | u j n + 1 | 2 + 1 2 u n + 1 4 4 + 1 3 u n + 1 6 6
= E n h j = 0 J 1 f j n + 1 2 | u j n + 1 | 2 | u j n | 2 .
Proof. 
We first prove the mass conservation result in Equation (13). Taking the grid inner product of both sides of Equation (12) with u n + 1 + u n , and then extracting the imaginary part, we obtain the following equation:
Im i δ t u n , u n + 1 + u n + 1 2 Im H δ x 2 ( u n + 1 + u n ) , u n + 1 + u n + 1 2 Im 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) , u n + 1 + u n 1 4 Im ( | u n + 1 | 2 + | u n | 2 ) ( u n + 1 + u n ) , u n + 1 + u n 1 6 Im ( | u n + 1 | 4 + | u n + 1 | 2 | u n + 1 | 2 + | u n | 4 ) ( u n + 1 + u n ) , u n + 1 + u n = 1 2 Im f n + 1 2 ( u n + 1 + u n ) , u n + 1 + u n .
We denote the terms on the left-hand side as I i for i = 1 , 2 , , 5 , and the term on the right-hand side as I 6 . Each of these terms is then simplified using known identities. Notably, in simplifying I 2 , we use Lemma 1 and the fact that H = R T R . In addition, since f is a real-valued function, we can show that the corresponding term simplifies accordingly. Putting these results together, we obtain:
I 1 = Im i τ ( u n + 1 u n ) , u n + 1 + u n = h τ Im i j = 0 J 1 | u j n + 1 | 2 + 2 i Im ( u j n + 1 u j n ¯ ) | u j n | 2 = 1 τ u n + 1 2 2 u n 2 2 ,
I 2 = 1 2 Im H δ x ( u n + 1 + u n ) , δ x ( u n + 1 + u n ) = 1 2 Im R δ x ( u n + 1 + u n ) 2 2 = 0 ,
I 3 = 1 2 Im 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) , u n + 1 + u n = 0 ,
I 4 = 1 4 Im ( | u n + 1 | 2 + | u n | 2 ) ( u n + 1 + u n ) , u n + 1 + u n = 0 ,
I 5 = 1 6 Im ( | u n + 1 | 4 + | u n + 1 | 2 | u n + 1 | 2 + | u n | 4 ) ( u n + 1 + u n ) , u n + 1 + u n = 0 ,
I 6 = 1 2 Im f n + 1 2 ( u n + 1 + u n ) , u n + 1 + u n = 0 .
Thus, Equation (15) leads to u n + 1 2 2 u n 2 2 = 0 for any n, which confirms the discrete mass conservation.
Next, we consider the energy conservation property given in Equation (14). We take the grid inner product of both sides of Equation (12) with u n + 1 u n , and extract the real part, yielding:
Re i δ t u n , u n + 1 u n + 1 2 Re H δ x 2 ( u n + 1 + u n ) , u n + 1 u n + 1 2 Re 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) , u n + 1 u n 1 4 Re ( | u n + 1 | 2 + | u n | 2 ) ( u n + 1 + u n ) , u n + 1 u n 1 6 Re ( | u n + 1 | 4 + | u n + 1 | 2 | u n + 1 | 2 + | u n | 4 ) ( u n + 1 + u n ) , u n + 1 u n = 1 2 Re f n + 1 2 ( u n + 1 + u n ) , u n + 1 u n .
We denote the terms on the left-hand side of Equation (16) as Θ i for i = 1 , 2 , , 5 , and the right-hand side as Θ 6 . Each Θ i is simplified individually. In particular,
Θ 1 = Re i δ t u n , u n + 1 u n = Re i τ ( u n + 1 u n ) , u n + 1 u n = 0 .
Applying Lemma 2 to Θ 2 , we obtain
Θ 2 = 1 2 R δ x u n + 1 2 R δ x u n 2 .
For Θ 3 , we have
Θ 3 = 1 2 Re 1 | u n + 1 | 2 | u n | 2 ( u n + 1 + u n ) , u n + 1 u n = h 2 j = 0 J 1 | u j n + 1 | 2 | u j n | 2 | u j n + 1 | 2 | u j n | 2 = h 2 j = 0 J 1 1 | u j n + 1 | 2 1 | u j n | 2 .
Similarly, the terms Θ 4 and Θ 5 are simplified as
Θ 4 = 1 4 u n + 1 4 4 u n + 1 4 4 , Θ 5 = 1 6 u n + 1 6 6 u n + 1 6 6 .
For Θ 6 , we make use of the fact that f is real-valued to get
Θ 6 = 1 2 Re f n + 1 2 ( u n + 1 + u n ) , u n + 1 u n = 1 2 j = 0 J 1 f j n + 1 2 | u j n + 1 | 2 | u j n | 2 .
Finally, combining the simplified forms of Θ 1 through Θ 6 , we verify that Equation (14) holds, thereby establishing discrete energy conservation. This concludes the proof. □

4. Stability and Error Estimates

In this section, we analyze the stability and accuracy of the proposed scheme (12). As established in Theorem 1, the boundedness of u n 2 for all n implies the stability of the scheme in 2-norm. We further show that the numerical solution is also bounded in the -norm, and we establish the convergence order of the scheme.
Throughout this section, we use C to denote a generic positive constant that is independent of the spatial mesh size h, the time step size τ , the number of spatial intervals J, and the number of time steps.
The following two lemmas will be used in proving the main theorems in this section:
Lemma 3. 
For any v V h and any given constant ϵ > 0 , there exists a constant C, depending only on ϵ, such that
v ϵ δ x v 2 + C v 2 .
Lemma 4. 
For any symmetric positive definite matrix H, there exist two positive constants C and C such that
C u n 2 2 H u n , u n C u n 2 2 .
Among the two lemmas introduced above, Lemma 3 corresponds to the discrete Sobolev inequality (see [29]). The proof of Lemma 4 can be found in [14]. We now present a result on the positivity and boundedness of | u j n | :
Theorem 2. 
Suppose the real-valued function f ( x , t ) in (1) satisfies | f ( x , t ) | M 1 and | f t ( x , t ) | M 2 for all x and t in the domain, where M 1 and M 2 are given constants. Additionally, assume that u 0 H 1 and that | u 0 | is bounded between two positive constants. Then, there exist constants C 1 , C 2 > 0 with C 1 < C 2 such that
0 < C 1 | u j n | C 2
for any all j = 0 , 1 , , J and n with 0 n T / τ .
Proof. 
From the discrete energy conservation law (14), we have
E n = R δ x u n 2 2 + h j = 0 J 1 1 | u j n | 2 + 1 2 u n 4 4 + 1 3 u n 6 6 = E n 1 h j = 0 J 1 f j n 1 2 | u j n | 2 | u j n 1 | 2 = E n 2 h j = 0 J 1 f j n 1 2 | u j n | 2 | u j n 1 | 2 h j = 0 J 1 f j n 3 2 | u j n 1 | 2 | u j n 2 | 2 = E 0 h l = 1 n j = 0 J 1 f j l 1 2 | u j l | 2 | u j l 1 | 2 = E 0 h j = 0 J 1 f j n 1 2 | u j n | 2 + h j = 0 J 1 f j 1 2 | u j 0 | 2 + h l = 2 n j = 0 J 1 ( f j l 1 2 f j l 3 2 ) | u j l | 2 ,
which leads to the following inequality:
R δ x u n 2 2 + h j = 0 J 1 1 | u j n | 2 | E 0 | + h j = 0 J 1 | f j n 1 2 | | u j n | 2 + h j = 0 J 1 | f j 1 2 | | u j 0 | 2 + h l = 2 n j = 0 J 1 | f j l 1 2 f j l 3 2 | | u j l | 2 | E 0 | + M 1 u n 2 2 + M 1 u 0 2 2 + τ M 2 l = 2 n u l 2 2 = | E 0 | + 2 M 1 u 0 2 2 + τ M 2 ( n 1 ) u 0 2 2 | E 0 | + ( 2 M 1 + M 2 T ) u 0 2 2 C .
The second inequality above follows from the mean value theorem and the assumed boundedness of | f | and | f t | . Applying Lemma 4 to the left-hand side of (17), we obtain:
0 < C δ x 2 u n 2 2 H δ x u n , δ x u n = R δ x u n 2 2 C .
This implies:
δ x 2 u n 2 C C .
Next, we apply Lemma 3 with v = u , and use inequality (19), yielding
u n C 2 ,
which implies | u j n | C 2 for all j = 0 , 1 , , J and 0 n T / τ .
Moreover, inequality (17) also implies:
h j = 0 J 1 1 | u j n | 2 | E 0 | + ( 2 M 1 + M 2 T ) u 0 2 2 .
From this, we derive:
min j , n | u j n | 2 h | E 0 | + ( 2 M 1 + M 2 T ) u 0 2 2 .
Using the definition of the norm and the assumptions on u 0 from the theorem statement, we conclude that the right-hand side of (21) is independent of h, and maybe be denoted by a generic constant C 1 2 . Hence, we obtain C 1 | u j n | C 2 , which completes the proof. □
We now turn to the convergence analysis of the proposed scheme. The first step is to estimate the truncation error r n = ( r 0 n , r 1 n , , r J 1 n ) T , defined by:
r n = i δ t U n + 1 2 H δ x 2 ( U n + 1 + U n ) + 1 2 1 | U n + 1 | 2 | U n | 2 ( U n + 1 + U n ) 1 4 ( | U n + 1 | 2 + | U n | 2 ) ( U n + 1 + U n ) 1 6 ( | U n + 1 | 4 + | U n + 1 | 2 | U n + 1 | 2 + | U n | 4 ) ( U n + 1 + U n ) 1 2 f n + 1 2 ( U n + 1 + U n ) ,
where U n is the exact solution vector at t = t n . The following theorem establishes the order of this truncation error.
Theorem 3. 
Let u ( x , t ) C 6 , 3 . Then the truncation error r j n satisfies r j n = O ( τ 2 + h 4 ) .
Proof. 
Applying the properties of the fourth-order compact finite difference operator to Equation (22), we derive
r j n = i δ t U j n + 1 2 ( U x x ) j n + 1 + ( U x x ) j n + O ( h 4 ) + 1 2 1 | U j n + 1 | 2 | U j n | 2 ( U j n + 1 + U j n ) 1 4 ( | U j n + 1 | 2 + | U j n | 2 ) ( U j n + 1 + U j n ) 1 6 ( | U j n + 1 | 4 + | U j n + 1 | 2 | U j n + 1 | 2 + | U j n | 4 ) ( U j n + 1 + U j n ) 1 2 f j n + 1 2 ( U j n + 1 + U j n ) ,
We note the following approximations: i δ t U j n = i ( U t ) j n + 1 2 + O ( τ 2 ) , 1 2 ( U x x ) j n + 1 + ( U x x ) j n = ( U x x ) j n + 1 2 + O ( τ 2 ) , 1 2 U j n + 1 + U j n = U j n + 1 2 + O ( τ 2 ) , and 1 2 | U j n + 1 | 2 + | U j n | 2 = | U j n + 1 2 | 2 + O ( τ 2 ) .
We also estimate 1 3 ( | U j n + 1 | 4 + | U j n + 1 | 2 | U j n | 2 + | U j n | 4 ) and 1 | U j n + 1 | 2 | U j n | 2 . For the first term, we derive
| U j n + 1 | 4 = | U j n + 1 2 | 4 + τ | U | 2 ( U U t ¯ + U ¯ U t ) | ( x j , t n + 1 2 ) + O ( τ 2 ) , | U j n | 4 = | U j n + 1 2 | 4 τ | U | 2 ( U U t ¯ + U ¯ U t ) | ( x j , t n + 1 2 ) + O ( τ 2 ) , | U j n + 1 | 2 | U j n | 2 = | U j n + 1 2 | 4 + O ( τ 2 ) ,
and substitute these estimates to obtain
1 3 | U j n + 1 | 4 + | U j n + 1 | 2 | U j n | 2 + | U j n | 4 = | U j n + 1 2 | 4 + O ( τ 2 ) .
Similarly for the second term, we show that
1 | U j n + 1 | 2 | U j n | 2 = 1 | U j n + 1 2 | 4 + O ( τ 2 ) = 1 | U j n + 1 2 | 4 + O ( τ 2 ) .
Finally, substituting these estimates into Equation (23), we obtain
r j n = i ( U t ) j n + 1 2 + ( U x x ) j n + 1 2 + 1 | U j n + 1 2 | 4 U j n + 1 2 | U j n + 1 2 | 2 U j n + 1 2 | U j n + 1 2 | 4 U j n + 1 2 f j n + 1 2 U j n + 1 2 + O ( τ 2 + h 4 ) = O ( τ 2 + h 4 ) ,
which concludes the proof. □
Using Theorem 3, we now estimate the error in the 2-norm:
e n = U n u n .
Theorem 4. 
Under assumptions (7) and (8), and the conditions of Theorems 2 and 3, the error satisfies
e n 2 C ( h 4 + τ 2 )
for sufficiently small τ, and for all 0 n T / τ .
Proof. 
Subtracting Equation (12) from the truncation error Equation (22) yields the error equation:
r n = i δ t e n + 1 2 H δ x 2 ( e n + 1 + e n ) 1 4 F n 1 6 G n + 1 2 H n 1 2 f n + 1 2 ( e n + 1 + e n ) ,
where each component of the vectors F n , G n and H n are defined as:
F j n = ( | U j n + 1 | 2 + | U j n | 2 ) ( U j n + 1 + U j n ) ( | u j n + 1 | 2 + | u j n | 2 ) ( u j n + 1 + u j n ) , G j n = ( | U j n + 1 | 4 + | U j n + 1 | 2 | U j n + 1 | 2 + | U j n | 4 ) ( U j n + 1 + U j n ) ( | u j n + 1 | 4 + | u j n + 1 | 2 | u j n + 1 | 2 + | u j n | 4 ) ( u j n + 1 + u j n ) , H j n = 1 | U j n + 1 | 2 | U j n | 2 ( U j n + 1 + U j n ) 1 | u j n + 1 | 2 | u j n | 2 ( u j n + 1 + u j n ) ,
for j = 0 , 1 , , J 1 .
Next, we estimate the upper bound for each of | F j n | , | G j n | and | H j n | . For F j n , we rewrite it as
F j n = | U j n + 1 | 2 + | U j n | 2 | u j n + 1 | 2 | u j n | 2 U j n + 1 + U j n + | u j n + 1 | 2 + | u j n | 2 e j n + 1 + e j n = U j n + 1 e j n + 1 ¯ + u j n + 1 ¯ e j n + 1 + U j n e j n ¯ + u j n ¯ e j n U j n + 1 + U j n + | u j n + 1 | 2 + | u j n | 2 e j n + 1 + e j n
From Theorem 2 and the assumption (7), we get | U j n | , | u j n | C and estimate | F j n | as | F j n | C | e j n | + | e j n + 1 | , which leads to
F n 2 2 C e n 2 2 + e n + 1 2 2 .
To estimate | G j n | , we rewrite G j n as
G j n = | U j n + 1 | 4 | u j n + 1 | 4 U j n + 1 + U j n + | U j n | 4 | u j n | 4 U j n + 1 + U j n + | U j n + 1 | 2 | U j n | 2 | u j n + 1 | 2 | u j n | 2 U j n + 1 + U j n + | u j n + 1 | 4 + | u j n + 1 | 2 | u j n | 2 + | u j n | 4 e j n + 1 + e j n .
Applying the following identities:
| U j n + 1 | 4 | u j n + 1 | 4 = | U j n + 1 | 2 + | u j n + 1 | 2 U j n + 1 e j n + 1 ¯ + u j n + 1 ¯ e j n + 1 , | U j n + 1 | 2 | U j n | 2 | u j n + 1 | 2 | u j n | 2 = | U j n + 1 | 2 U j n e j n ¯ + u j n ¯ e j n + | u j n | 2 U j n + 1 e j n + 1 ¯ + u j n + 1 ¯ e j n + 1 , | U j n | 4 | u j n | 4 = | U j n | 2 + | u j n | 2 U j n e j n ¯ + u j n ¯ e j n ,
we obtain
G j n = | U j n + 1 | 2 + | U j n | 2 + | u j n | 2 U j n e j n ¯ + u j n ¯ e j n U j n + 1 + U j n + | U j n + 1 | 2 + | u j n + 1 | 2 + | u j n | 2 U j n + 1 e j n + 1 ¯ + u j n + 1 ¯ e j n + 1 U j n + 1 + U j n + | u j n + 1 | 4 + | u j n + 1 | 2 | u j n | 2 + | u j n | 4 e j n + 1 + e j n .
Further application of the assumption (7) and Theorem 2, we obtain the following inequality | G j n | C | e j n | + | e j n + 1 | , which leads to
G n 2 2 C e n 2 2 + e n + 1 2 2 .
For H j n , we rewrite it as
H j n = 1 | U j n + 1 | 2 | U j n | 2 | u j n + 1 | 2 | u j n | 2 × ( U j n + 1 + U j n ) | u j n + 1 | 2 | u j n | 2 ( u j n + 1 + u j n ) | U j n + 1 | 2 | U j n | 2 = 1 | U j n + 1 | 2 | U j n | 2 | u j n + 1 | 2 | u j n | 2 × ( e j n + 1 + e j n ) | u j n + 1 | 2 | u j n | 2 ( u j n + 1 + u j n ) ( | u j n + 1 | 2 | u j n | 2 | U j n + 1 | 2 | U j n | 2 ) = e j n + 1 + e j n | U j n + 1 | 2 | U j n | 2 ( u j n + 1 + u j n ) ( U j n e j n ¯ + e j n u j n ¯ ) | U j n | 2 | u j n + 1 | 2 | u j n | 2 ( u j n + 1 + u j n ) ( U j n + 1 e j n + 1 ¯ + e j n + 1 u j n + 1 ¯ ) | U j n | 2 | u j n + 1 | 2 | u j n | 2 .
According to the assumptions (7) and (8), along with the conclusion of Theorem 2, we derive that 0 < C 0 | U j n | C and 0 < C 1 | u j n | C 2 . Thus, inequality (27) leads to | H j n | C | e j n | + | e j n + 1 | , which implies
H n 2 2 C e n 2 2 + e n + 1 2 2 .
Taking the grid inner product of the error Equation (24) with e n + 1 + e n and extracting the imaginary part gives:
Im r n , e n + 1 + e n = Im i δ t e n , e n + 1 + e n + 1 2 Im H δ x 2 ( e n + 1 + e n ) , e n + 1 + e n 1 4 Im F n , e n + 1 + e n 1 6 Im G n , e n + 1 + e n + 1 2 Im H n , e n + 1 + e n 1 2 Im f n + 1 2 ( e n + 1 + e n ) , e n + 1 + e n .
Label each term on the right-hand side of Equation (29) as Λ i for i = 1 , 2 , , 6 . Then, we estimate the upper bound of each term. For Λ 1 , we derive that
Λ 1 = Im i δ t e n , e n + 1 + e n = 1 τ e n + 1 2 2 e n 2 2 .
The term Λ 2 can be simplified as
Λ 2 = 1 2 Im R δ x e n + 1 + e n 2 2 = 0 .
To estimate the upper bound of | Λ 3 | , we apply the Cauchy–Schwartz inequality and inequality (25). Specifically,
| Λ 3 | 1 4 F n , e n + 1 + e n C F n 2 2 + e n 2 2 + e n + 1 2 2 C e n 2 2 + e n + 1 2 2 .
Similarly, inequalities (26) and (28) lead to
| Λ 4 | C e n 2 2 + e n + 1 2 2 ,
and
| Λ 5 | C e n 2 2 + e n + 1 2 2 .
Utilizing the property of the real-valued function f ( x , t ) , we also show that
| Λ 6 | C e n 2 2 + e n + 1 2 2 .
Therefore, Equation (29) leads to
Λ 1 Im r n , e n + e n + 1 + i = 2 5 | Λ i | 1 2 r n 2 2 + C e n 2 2 + e n + 1 2 2
Applying Theorem 3 to estimate r n 2 2 and use the fact that Λ 1 = 1 τ e n + 1 2 2 e n 2 2 , the inequality above is equivalent to the following inequality:
e n + 1 2 2 e n 2 2 C τ ( h 4 + τ 2 ) 2 + C τ e n + 1 2 2 + e n 2 2 ,
which can be rewritten as
e n + 1 2 1 + C τ 1 C τ e n 2 2 + C τ 1 C τ ( h 4 + τ 2 ) 2 ,
assuming that τ is sufficiently small, for instance, C τ 1 / 2 , so that 1 C τ > 0 . Let α = 1 + C τ 1 C τ and β = C τ 1 C τ , then we can show that
e n 2 2 α n e 0 2 2 + j = 0 n 1 α j β ( h 4 + τ 2 ) 2 = α n 1 α 1 β ( h 4 + τ 2 ) 2 .
Here we have used the fact that e 0 = 0 due to the given initial condition. After simplifying the inequality above, we can obtain that
e n 2 2 1 2 1 + 2 C τ 1 C τ n 1 ( h 4 + τ 2 ) 2 1 2 exp 2 C n τ 1 C τ ( h 4 + τ 2 ) 2 1 2 exp 4 C T ( h 4 + τ 2 ) 2 ,
where we have used the inequality 1 + x e x for x 0 , the inequality n τ T , and the condition that C τ 1 / 2 in deriving the inequality above. Therefore, we have derived that e n 2 C ( h 4 + τ 2 ) , which completes the proof. □
Theorem 4 provides the error bound in the 2-norm. To derive an error estimate in the infinity norm, it suffices to estimate δ x e n 2 and then apply the discrete Sobolev inequality in Lemma 1. The result is described in the theorem below.
Theorem 5. 
Under the same conditions as Theorem 4, we have
e n C ( h 4 + τ 2 )
for sufficiently small τ and for all n satisfying 0 n T / τ .
Proof. 
We begin with the error Equation (24), take the grid inner product of each term with δ t e n , and then extract the real part. This yields the following system:
Re r n , δ t e n = Re i δ t e n , δ t e n + 1 2 Re H δ x 2 ( e n + 1 + e n ) , δ t e n 1 4 Re F n , δ t e n 1 6 Re G n , δ t e n + 1 2 Re H n , δ t e n 1 2 Re f n + 1 2 ( e n + 1 + e n ) , δ t e n .
We denote each term on the right-hand side of Equation (30) as Θ i for i = 1 , 2 , , 6 . It is straightforward to see that Θ 1 = 0 . Applying Lemma 1 to term Θ 2 , we obtain:
Θ 2 = 1 2 τ R δ x e n + 1 2 2 R δ x e n 2 2 .
In order to estimate | Θ 3 | = 1 4 | Re F n , δ t e n | , we first express δ t e n using the error Equation (24):
δ t e n = i r n + 1 2 i H δ x 2 ( e n + 1 + e n ) i 4 F n i 6 G n + i 2 H n i 2 f n + 1 2 ( e n + 1 + e n ) .
Taking the grid inner product of each term in (31) with F n , we obtain:
Θ 3 = 1 4 Im F n , r n + 1 8 Im F n , H δ x 2 ( e n + 1 + e n ) 1 24 Im F n , G n + 1 8 Im F n , H n 1 8 Im F n , f n + 1 2 ( e n + 1 + e n ) .
We denote each resulting term on the right-hand side of Equation (32) as Θ 3 i , for i = 1 , 2 , , 5 , and estimate them individually. For Θ 31 , we apply the Cauchy–Schwartz inequality, bound (25), and the result of Theorem 3 to obtain:
| Θ 31 | C e n 2 2 + e n + 1 2 2 + ( h 4 + τ 2 ) 2 .
As for Θ 32 , we get
| Θ 32 | = 1 8 | Im F n , H δ x 2 ( e n + 1 + e n ) | = 1 8 | Im R δ x F n , R δ x ( e n + 1 + e n ) | C δ x F n 2 2 + R δ x e n + 1 2 2 + R δ x e n 2 2
Following the derivation of F j n and the estimation of F n 2 in the proof of Theorem 4, we derive:
δ x F n 2 2 C e n 2 2 + e n + 1 2 2 + δ x e n 2 2 + δ x e n + 1 2 2 .
Using Lemma 4, we also obtain
R δ x e n 2 2 = H δ x e n , δ x e n C δ x e n 2 2 ,
which implies
δ x e n 2 C R δ x e n 2 .
Thus, inequality (35) leads to
δ x F n 2 2 C e n 2 2 + e n + 1 2 2 + R δ x e n 2 2 + R δ x e n + 1 2 2 .
Applying inequality (37) to (34), we obtain
| Θ 32 | C e n 2 2 + e n + 1 2 2 + R δ x e n + 1 2 2 + R δ x e n 2 2 .
For Θ 33 , we use bounds (25) and (26) to derive
| Θ 33 | = 1 24 Im F n , G n C e n 2 2 + e n + 1 2 2 .
Similarly, we estimate | Θ 34 | and | Θ 35 | as
| Θ 34 | = 1 8 Im F n , H n C e n 2 2 + e n + 1 2 2 ,
and
| Θ 35 | = 1 8 Im F n , f n + 1 2 ( e n + 1 + e n ) C e n 2 2 + e n + 1 2 2 .
Combining the estimates from (33) and (38)–(41), and using the 2-norm bound from Theorem 4, we arrive at a bound for | Θ 3 | of the form:
| Θ 3 | C ( h 4 + τ 2 ) 2 + R δ x e n + 1 2 2 + R δ x e n 2 2 .
Following similar steps, we estimate the bounds of | Θ 4 | , | Θ 5 | , and | Θ 6 | . In fact, the upper bounds for all three of these terms match the bound derived for Θ 3 in (42).
Substituting all bounds into Equation (30), we obtain
Θ 2 = 1 2 τ R δ x e n + 1 2 R δ x e n 2 = Θ 1 + Θ 3 + Θ 4 + Θ 5 + Θ 6 Re r n , δ t e n C ( h 4 + τ 2 ) 2 + C R δ x e n + 1 2 2 + R δ x e n 2 2 Re r n , δ t e n .
Thus, based on the inequality above, we have
R δ x e l 2 2 R δ x e l 1 2 2 C τ ( h 4 + τ 2 ) 2 + C τ R δ x e l 2 2 + R δ x e l 1 2 2 τ Re r l 1 , δ t e l 1 ,
for l = 1 , 2 , , n , with n τ T .
Summing this inequality over l = 1 , 2 , , n 1 , and using the facts that e 0 = 0 and n τ T , we obtain
R δ x e n 2 2 C T ( h 4 + τ 2 ) 2 + C τ R δ x e n 2 2 + 2 C τ l = 1 n 1 R δ x e l 2 2 τ l = 1 n Re r l 1 , δ t e l 1 .
To estimate the fourth term on the right-hand side of inequality (43), we first rewrite τ l = 1 n r l 1 , δ t e l 1 as
τ l = 1 n r l 1 , δ t e l 1 = l = 0 n 1 r l , e l + 1 e l = r n 1 , e n τ l = 1 n 1 e l , δ t r l 1 .
According to Theorem 3, the truncation error satisfies r j n = O ( τ 2 + h 4 ) . From the proof of that theorem, it also follows that δ t r j n = O ( τ 2 + h 4 ) . Moreover, Theorem 4 ensures that e l 2 C ( τ 2 + h 4 ) , so we derive:
τ l = 1 n r l 1 , δ t e l 1 C ( τ 2 + h 4 ) 2 ,
where we have used the bound ( n 1 ) τ T .
With this result, the fourth term on the right-hand side of inequality (43) can be estimated as
τ l = 1 n Re r l 1 , δ t e l 1 τ l = 1 n r l 1 , δ t e l 1 C ( τ 2 + h 4 ) 2 .
Therefore, inequality (43) becomes
R δ x e n 2 2 C ( h 4 + τ 2 ) 2 + C τ R δ x e n 2 2 + 2 C τ l = 1 n 1 R δ x e l 2 2 .
Suppose we choose the time step size τ sufficiently small such that C τ 1 2 . Then, we can rewrite (44) as
R δ x e n 2 2 2 C ( h 4 + τ 2 ) 2 + 4 C τ l = 1 n 1 R δ x e l 2 2 .
Letting α = 2 C ( h 4 + τ 2 ) 2 and β = 4 C τ , and applying the discrete Gronwall inequality [30] to inequality (45), we obtain
R δ x e n 2 2 α ( 1 + β ) n α e n β 2 C ( h 4 + τ 2 ) 2 e 4 C T .
Since C is a generic positive constant, Equation (46) implies
R δ x e n 2 C ( h 4 + τ 2 ) .
Finally, applying inequality (36) to the left-hand side of (47), we obtain
δ x e n 2 C ( h 4 + τ 2 ) .
Combining the discrete Sobelev inequality from Lemma 3, the 2-norm error estimate from Theorem 4, and inequality (48), we conclude the desired bound for the infinity norm of the error:
e n C ( h 4 + τ 2 ) .

5. Numerical Examples

In this section, we discuss the numerical implementation of our proposed method and present numerical examples to demonstrate its performance. Specifically, we verify the fourth-order convergence in space and evaluate the method’s effectiveness in preserving mass and energy.

5.1. Numerical Implementation

Recall that our proposed Crank–Nicholson compact finite difference method was introduced in Equations (9)–(11), namely,
i A h δ t u j n + 1 2 δ x 2 ( u j n + 1 + u j n ) + 1 2 A h 1 | u j n + 1 | 2 1 | u j n | 2 ( u j n + 1 + u j n ) 1 4 A h ( | u j n + 1 | 2 + | u j n | 2 ) ( u j n + 1 + u j n ) 1 6 A h ( | u j n + 1 | 4 + | u j n + 1 | 2 | u j n + 1 | 2 + | u j n | 4 ) ( u j n + 1 + u j n ) = 1 2 A h f j n + 1 2 ( u j n + 1 + u j n ) ,
for j = 0 , 1 , , J 1 and n = 0 , 1 , , N 1 . At each time step, we must solve a nonlinear system of equations. Although Newton’s method is widely used for this purpose, it requires computing the Jacobian matrix, which increases derivation and implementation complexity. Instead, we propose a simpler iterative scheme that avoids Jacobian computation. At each time step, we evaluate the nonlinear coefficients using values from the previous iteration. As a result, each iteration reduces to solving a cyclic tri-diagonal system.
Let u j n denote the numerical solution at time step t n , and let u j n + 1 ( s ) represent the s t h iteration for the next time step t n + 1 . For convenience, we define the following intermediate terms:
E j n + 1 ( s ) = | u j n + 1 ( s ) | 2 + | u j n | 2 , F j n + 1 ( s ) = | u j n + 1 ( s ) | 4 + | u j n + 1 ( s ) | 2 | u j n | 2 + | u j n | 4 , G j n + 1 ( s ) = 1 | u j n + 1 ( s ) | 2 | u j n | 2 .
Then, the iterative method based on Equation (49) is given by
A j 1 n + 1 ( s ) u j 1 n + 1 ( s + 1 ) + B j n + 1 ( s ) u j n + 1 ( s + 1 ) + C j + 1 n + 1 ( s ) u j + 1 n + 1 ( s + 1 ) = D j n + 1 ( s ) ,
where
A j 1 n + 1 ( s ) = i 12 + r 2 τ 48 E j 1 n + 1 ( s ) τ 72 F j 1 n + 1 ( s ) + τ 24 G j 1 n + 1 ( s ) τ 24 f j 1 n + 1 2 , B j n + 1 ( s ) = 5 i 6 r 5 τ 24 E j n + 1 ( s ) 5 τ 36 F j n + 1 ( s ) + 5 τ 12 G j n + 1 ( s ) 5 τ 12 f j n + 1 2 , C j + 1 n + 1 ( s ) = i 12 + r 2 τ 48 E j + 1 n + 1 ( s ) τ 72 F j + 1 n + 1 ( s ) + τ 24 G j + 1 n + 1 ( s ) τ 24 f j + 1 n + 1 2 ,
and
D j n + 1 ( s ) = i 12 r 2 + τ 48 E j 1 n + 1 ( s ) + τ 72 F j 1 n + 1 ( s ) τ 24 G j 1 n + 1 ( s ) + τ 24 f j 1 n + 1 2 u j 1 n + 5 i 6 + r + 5 τ 24 E j n + 1 ( s ) + 5 τ 36 F j n + 1 ( s ) 5 τ 12 G j n + 1 ( s ) + 5 τ 12 f j n + 1 2 u j n + i 12 r 2 + τ 48 E j + 1 n + 1 ( s ) + τ 72 F j + 1 n + 1 ( s ) τ 24 G j + 1 n + 1 ( s ) + τ 24 f j + 1 n + 1 2 u j + 1 n .
Here, we use the notation r = τ / h 2 . Note that the coefficients A j 1 n + 1 ( s ) , B j n + 1 ( s ) , C j + 1 n + 1 ( s ) , and D j n + 1 ( s ) in Equation (50) are computed using the current iterate u j n + 1 ( s ) , making the resulting linear system cyclic and tri-diagonal.
At each time step t = t n , we initiate the iteration with u j n + 1 ( 0 ) : = u j n for all j = 0 , 1 , , J 1 , and compute successive iterates u j n + 1 ( s ) by solving the linear system defined in (50). The iteration continues until the convergence criterion
max j u j n + 1 ( s + 1 ) u j n + 1 ( s ) ϵ
is satisfied. In our simulations, we set the tolerance ϵ = 10 8 .
To demonstrate the accuracy of our proposed scheme, we also compare its numerical errors with those of a second-order Crank–Nicholson finite difference method. The second-order scheme is defined as follows:
i δ t u j n + 1 2 δ x 2 ( u j n + 1 + u j n ) + 1 2 1 | u j n + 1 | 2 1 | u j n | 2 ( u j n + 1 + u j n ) 1 4 ( | u j n + 1 | 2 + | u j n | 2 ) ( u j n + 1 + u j n ) 1 6 ( | u j n + 1 | 4 + | u j n + 1 | 2 | u j n + 1 | 2 + | u j n | 4 ) ( u j n + 1 + u j n ) = 1 2 f j n + 1 2 ( u j n + 1 + u j n ) ,
for j = 0 , 1 , , J 1 and n = 0 , 1 , , N 1 . Note that the scheme in Equation (51) resembles Equation (49), except that it does not incorporate the operator A h . To solve the nonlinear system (51), we apply the following iterative method:
i u j n + 1 ( s + 1 ) u j n + r 2 u j + 1 n + 1 ( s + 1 ) 2 u j n + 1 ( s + 1 ) + u j 1 n + 1 ( s + 1 ) + r 2 u j + 1 n 2 u j n + u j 1 n τ 4 E j n + 1 ( s ) u j n + 1 ( s + 1 ) + u j n τ 6 F j n + 1 ( s ) u j n + 1 ( s + 1 ) + u j n + τ 2 G j n + 1 ( s ) u j n + 1 ( s + 1 ) + u j n = τ 2 f j n + 1 2 ( u j n + 1 ( s + 1 ) + u j n ) ,
for j = 0 , 1 , , J 1 and n = 0 , 1 , , N 1 , and s = 0 , 1 , 2 , representing the iteration index, the iterative process at step s + 1 is terminated when max j | u j n + 1 ( s + 1 ) u j n + 1 ( s ) | 10 8 .
The next two sections, Section 5.2 and Section 5.3, present numerical simulations for two test problems to evaluate the performance to evaluate the performance of the proposed scheme. All simulations in these sections are implemented in MATLAB R2023b and performed on a desktop with a 13th Gen Intel Core i7 processor and 16 GM of RAM.

5.2. Numerical Test 1

To demonstrate the performance of our proposed method, we consider the following numerical example:
i u t + u x x + 1 | u | 4 | u | 2 | u | 4 u = 3 π L π 2 L 2 1 u ,
u ( x , 0 ) = exp π i L x ,
for t [ 0 , 1 ] , x [ L , L ] with L = 15 , and periodic boundary condition. The exact solution to the problem is given by u ( x , t ) = exp π i L ( x 3 t ) .
We first test the convergence order of our proposed scheme. Simulations are run up to T = 1 using four different spatial mesh sizes: h = 0.2 , 0.1 , 0.05 , and 0.025 . Since Theorem 5 implies that the error is O ( h 4 + τ 2 ) , we choose τ = h 2 for each h, and compute the -norm of the error. Therefore, we expect fourth-order convergence in space. The results are presented in Table 1, where clear fourth-order convergence is observed as the mesh is refined, verifying the theoretical results of Theorem 5. For comparison, we also include the numerical results obtained using the Crank–Nicholson scheme described in Equation (52). These results show that the Crank–Nicholson method achieves slightly better than second-order convergence. Notably, when h = 0.025 , the error of the Crank–Nicholson scheme is more than 10 times larger than that of our proposed method.
The real and imaginary parts of the solution over the domain x [ 15 , 15 ] and t [ 0 , 1 ] are plotted in Figure 1. Both components exhibit wave-like behavior propagating along the positive x-direction. The uniform color distribution suggests that the modulus of the solution is well preserved numerically.
To better visualize the error distribution, we plot the errors in the real and imaginary parts of the numerical solution at t = 1 in Figure 2. Both components show excellent agreement with the exact solution throughout the spatial domain. A more quantitative comparison is shown in Figure 3, where the modulus of the difference between the numerical and exact solution at t = 1 is plotted. The error is nearly uniform, with a magnitude just above 2 × 10 6 . Specifically, numerical values range between 2.06710808 × 10 6 and 2.067108086 × 10 6 , demonstrating excellent accuracy even on a relatively coarse mesh h = 0.1 .
Next, we evaluate the mass and energy conservation properties of our scheme. The discrete mass and energy at time t n are computed as:
Q n : = h j = 0 J 1 | u j n | 2 , E n : = h j = 0 J 1 u j + 1 n u j n h 2 + h 2 j = 0 J 1 | u j n | 4 + h 3 j = 0 J 1 | u j n | 6 + h j = 0 J 1 1 | u j n | 2 .
Since the modulus of the exact solution is constant, the continuous energy E ( t ) should be conserved over time. We plot the relative errors in the computed discrete mass and energy in Figure 4. In Figure 4a, we observe a slight decreasing trend in the 2-norm, suggesting excellent numerical stability. The magnitude of relative error in mass is around 10 14 , while that in energy is approximately 10 15 . These results confirm that our proposed scheme preserves both the mass and energy to machine precision, consistent with Theorem 1.
To further examine the long-time behavior of the numerical solution, we extend the simulation up to t = 200 . A spatial mesh size of h = 0.05 and a time step size τ = h 2 are used. The real and imaginary parts of the numerical solution | u ( x , t ) | over the domain x [ 15 , 15 ] and t [ 0 , 200 ] are plotted in Figure 5. The results clearly exhibit a periodic propagation pattern for both the real and imaginary components, consistent with the exact solution. The relative errors in discrete mass and energy remain at the order of 10 14 , similar to the trends shown in Figure 4. Therefore, we omit additional plots for brevity.

5.3. Numerical Test 2

In this section, we consider a second numerical test based on one of the soliton solutions derived in [1]. The exact soliton solution is given by
u ( x , t ) = 3 q 1 8 | q 2 | 1 + sech ξ Δ × exp i α 15 q 1 2 64 | q 2 | + u 0 2 2 t + u 0 x + 2 | Q 0 | 16 | α q 2 | 3 q 1 2 2 | q 2 | 3 ξ Δ tanh ξ 2 Δ ,
where ξ = x u 0 t and Δ = 2 | α | 2 | q 2 | / ( 3 q 1 ) . The parameters q 1 , q 2 , u 0 , Q 0 , α are all real-valued.
The soliton solution defined in Equation (55) satisfies the following equation:
i u t + u x x + 1 | u | 4 | u | 2 + | u | 4 u = 0 .
We apply our proposed compact finite difference scheme to solve Equation (56) with Dirichlet boundary conditions and initial condition derived from Equation (55) at t = 0 . The parameters are set as follows: α = q 1 = 2 , Q 0 = q 2 = 2 , and u 0 = 1 . The spatial domain is taken as x [ 15 , 15 ] .
We note that Equation (56) is slightly different from Equation (1) in two respects: the sign of the quintic term is opposite, and the source term f is omitted. In addition, Dirichlet boundary conditions are used here instead of periodic boundary conditions. The scheme in Equation (50) is adapted accordingly for this setup.
Table 2 presents the numerical errors, convergence orders, and CPU time for our simulations up to t = 10 . The results confirms fourth-order spatial convergence. For h = 0.2 and 0.1 , the CPU time is under 1 s. When h = 0.025 , corresponding to 1200 spatial intervals, the error is approximately 3.3236 × 10 5 , demonstrating the accuracy of our method.
We further fix h = 0.05 , set τ = h 2 , and run the simulation up to t = 10 . Figure 6 shows a surface plot of the modulus of the numerical solution. According to Equation (55), the modulus | u ( x , t ) | represents a traveling wave propagating in the positive x-direction at speed 1, with crest height approximately 3 q 1 / ( 4 | q 2 | ) 0.8660 . The numerical solution in Figure 6 captures the correct direction of propagation.
To visualize the distribution of errors, we include heat maps of the modulus of the numerical solution and its modulus error over t [ 0 , 10 ] in Figure 7. Figure 7a shows the solution profile traveling rightward with a symmetric peak around x = 10 at t = 10 , indicating correct propagation speed and shape preservation. Figure 7b illustrates the spatial-temporal distribution of the error in modulus, which remains at the order of 10 4 throughout the domain.
The real and imaginary parts of the numerical solution at t = 10 are shown in Figure 8, where both match the exact solution closely. The difference is visually negligible.
Finally, we extend the simulation to t = 16 and show the heat map of the modulus of the numerical solution and its modulus error in Figure 9. Since the wave speed of | u | is 1 and the spatial domain is [ 15 , 15 ] , we expect the wave to begin exiting the domain at the right boundary, which is observed in Figure 9a. The corresponding error heat map in Figure 9 shows that the modulus error remains at the order of 10 4 , further supporting the accuracy of our scheme. To summarize, this example demonstrates that our numerical method is effective in preserving the shape, speed, and accuracy of soliton solutions.

6. Conclusions

In this paper, we propose a fourth-order compact finite difference method in space and a Crank–Nicholson-type method in time, to solve the Schrödinger equation with an anti-cubic term. The key to design a conservative finite difference scheme lies in the special treatment of the nonlinear cubic, quintic, and anti-cubic terms in Equation (1). With the scheme defined in (9), the conservation of discrete mass and energy can be rigorously established. Notably, mass conservation implies unconditional stability of the numerical solution in the 2-norm. Furthermore, under the additional assumptions of uniform boundedness, positivity, and sufficient smoothness of the exact solution, we use the discrete energy conservation property to derive upper and lower bounds for the numerical solution in the infinity norm. For the numerical implementation, we reformulate the complex nonlinear system at each time step into an iterative sequence of linear systems, avoiding the need to derive or compute Jacobi matrices. Numerical experiments demonstrate that the iterative solver converges rapidly at each time step, and confirm the expected fourth-order spatial accuracy, along with conservation of discrete mass and energy up to machine precision.

Funding

This research received no external funding.

Data Availability Statement

Data availability is not applicable. No new data were created or analyzed in this study.

Conflicts of Interest

The author declares no conflict of interest.

References

  1. Fedele, R.; Schamel, H.; Karpman, V.I.; Shukla, P.K. Envelope solitons of nonlinear Schrödinger equation with an anti-cubic nonlinearity. J. Phys. A Math. Gen. 2003, 36, 1169. [Google Scholar] [CrossRef]
  2. Durmus, S.A.; Ozdemir, N.; Secer, A.; Ozisik, M.; Bayram, M. Examination of optical soliton solutions for the perturbed Schrödinger–Hirota equation with anti-cubic law in the presence of spatiotemporal dispersion. Eur. Phys. J. Plus 2024, 139, 464. [Google Scholar] [CrossRef]
  3. Aslan, E.C.; İnç, M.; Baleanu, D. Optical solitons and stability analysis of the NLSE with anti-cubic nonlinearity. Superlattices Microstruct. 2017, 109, 784–793. [Google Scholar] [CrossRef]
  4. Ekici, M.; Mirzazadeh, M.; Sonmezoglu, A.; Ullah, M.Z.; Zhou, Q.; Triki, H.; Moshokoa, S.P.; Biswas, A. Optical solitons with anti-cubic nonlinearity by extended trial equation method. Optik 2017, 136, 368–373. [Google Scholar] [CrossRef]
  5. Biswas, A.; Ekici, M.; Sonmezoglu, A.; Belic, M. Chirped and chirp-free optical solitons with generalized anti-cubic nonlinearity by extended trial function scheme. Optik 2019, 178, 636–644. [Google Scholar] [CrossRef]
  6. Biswas, A.; Jawad, A.J.A.M.; Zhou, Q. Resonant optical solitons with anti-cubic nonlinearity. Optik 2018, 157, 525–531. [Google Scholar] [CrossRef]
  7. Krishnan, E.V.; Biswas, A.; Zhou, Q.; Babatin, M.M. Optical solitons with anti-cubic nonlinearity by mapping methods. Optik 2018, 170, 520–526. [Google Scholar] [CrossRef]
  8. Ramzan, M.; Chu, Y.M.; Rehman, H.; Saleem, M.; Park, C. Soliton solutions for anti-cubic nonlinearity using three analytical approaches. J. Appl. Anal. Comput. 2021, 11, 2177–2192. [Google Scholar] [CrossRef]
  9. Hu, H.; Hu, H. Maximum norm error estimates of fourth-order compact difference scheme for the nonlinear Schrödinger equation involving a quintic term. J. Inequalities Appl. 2018, 2018, 180. [Google Scholar] [CrossRef]
  10. Yang, H. Conservative local discontinuous Galerkin methods for the cubic-quintic nonlinear Schrödinger equation. Optik 2021, 226, 165821. [Google Scholar] [CrossRef]
  11. Le, A.H.; Huynh, T.T.; Nguyen, Q.M. A finite difference scheme for (2 + 1) D cubic-quintic nonlinear Schrödinger equations with nonlinear damping. Appl. Numer. Math. 2024, 205, 215–239. [Google Scholar] [CrossRef]
  12. Sonnier, W.J.; Christov, C.I. Christov. Strong coupling of Schrödinger equations: Conservative scheme approach. Math. Comput. Simul. 2005, 69, 514–525. [Google Scholar] [CrossRef]
  13. Volkov, V.M.; Matsuka, N.P. Conservativity, accuracy, and asymptotic properties of numerical methods for nonlinear schrödinger type equations. Differ. Equ. 2000, 36, 1033–1042. [Google Scholar] [CrossRef]
  14. Wang, T.C.; Guo, B.L. Unconditional convergence of two conservative compact difference schemes for non-linear Schrödinger equation in one dimension. Sci. Sin. Math. 2011, 41, 207–233. [Google Scholar] [CrossRef]
  15. Wang, T.; Guo, B.; Xu, Q. Fourth-order compact and energy conservative difference schemes for the nonlinear Schrödinger equation in two dimensions. J. Comput. Phys. 2013, 243, 382–399. [Google Scholar] [CrossRef]
  16. Ismail, M.S.; Taha, T.R. A linearly implicit conservative scheme for the coupled nonlinear Schrödinger equation. Math. Comput. Simul. 2007, 74, 302–311. [Google Scholar] [CrossRef]
  17. Ertug, S.; Aydin, A. Conservative schemes for three coupled nonlinear Schrödinger equation. Appl. Math. Comput. Sci. 2016, 8, 43–66. [Google Scholar]
  18. Pathria, D.; Ll Morris, J. Pseudo-spectral solution of nonlinear Schrödinger equations. J. Comput. Phys. 1990, 87, 108–125. [Google Scholar] [CrossRef]
  19. Gong, Y.; Wang, Q.; Wang, Y.; Cai, J. A conservative Fourier pseudo-spectral method for the nonlinear Schrödinger equation. J. Comput. Phys. 2017, 328, 354–370. [Google Scholar] [CrossRef]
  20. Bao, W.; Yang, L. Efficient and accurate numerical methods for the Klein–Gordon–Schrödinger equations. J. Comput. Phys. 2007, 225, 1863–1893. [Google Scholar] [CrossRef]
  21. Xu, Y.; Shu, C.W. Local discontinuous Galerkin methods for nonlinear Schrödinger equations. J. Comput. Phys. 2005, 205, 72–97. [Google Scholar] [CrossRef]
  22. Lu, W.; Huang, Y.; Liu, H. Mass preserving discontinuous Galerkin methods for Schrödinger equations. J. Comput. Phys. 2015, 282, 210–226. [Google Scholar] [CrossRef]
  23. Guo, L.; Xu, Y. Energy conserving local discontinuous Galerkin methods for the nonlinear Schrödinger equation with wave operator. J. Sci. Comput. 2015, 65, 622–647. [Google Scholar] [CrossRef]
  24. Yang, H. Error estimates for a class of energy-and Hamiltonian-preserving local discontinuous Galerkin methods for the Klein–Gordon–Schrödinger equations. J. Appl. Math. Comput. 2020, 62, 377–424. [Google Scholar] [CrossRef]
  25. Yang, H. Optimal error estimate of a decoupled conservative local discontinuous Galerkin method for the Klein-Gordon-Schrödinger equations. J. Korean Soc. Ind. Appl. Math. 2020, 24, 39–78. [Google Scholar]
  26. Qian, X.; Chen, Y.; Song, S. Novel conservative methods for Schrödinger equations with variable coefficients over long time. Commun. Comput. Phys. 2014, 15, 692–711. [Google Scholar] [CrossRef]
  27. Wang, J.; Liu, X.; Zhou, Y. A high-order accurate wavelet method for solving Schrödinger equations with general nonlinearity. Appl. Math. Mech. 2018, 39, 275–290. [Google Scholar] [CrossRef]
  28. Li, X.; Zhang, L.; Wang, S. A compact finite difference scheme for the nonlinear Schrödinger equation with wave operator. Appl. Math. Comput. 2012, 219, 3187–3197. [Google Scholar] [CrossRef]
  29. Chan, T.F.; Shen, L. Stability analysis of difference schemes for variable coefficient Schrödinger type equations. SIAM J. Numer. Anal. 1987, 24, 336–349. [Google Scholar] [CrossRef]
  30. Clark, D.S. Short proof of a discrete Gronwall inequality. Discret. Appl. Math. 1987, 16, 279–281. [Google Scholar] [CrossRef]
Figure 1. Real and imaginary parts of the numerical solution u ( x , t ) for x [ 15 , 15 ] and t [ 0 , 1 ] . Here h = 0.1 , τ = 0.01 .
Figure 1. Real and imaginary parts of the numerical solution u ( x , t ) for x [ 15 , 15 ] and t [ 0 , 1 ] . Here h = 0.1 , τ = 0.01 .
Mathematics 13 01978 g001
Figure 2. Real and imaginary parts of the numerical solution at t = 1 for h = 0.1 , τ = 0.01 .
Figure 2. Real and imaginary parts of the numerical solution at t = 1 for h = 0.1 , τ = 0.01 .
Mathematics 13 01978 g002
Figure 3. Modulus of the difference between numerical and exact solution at t = 1 .
Figure 3. Modulus of the difference between numerical and exact solution at t = 1 .
Mathematics 13 01978 g003
Figure 4. Relative errors in discrete mass and energy over t [ 0 , 1 ] with h = 0.1 and τ = 0.01 .
Figure 4. Relative errors in discrete mass and energy over t [ 0 , 1 ] with h = 0.1 and τ = 0.01 .
Mathematics 13 01978 g004
Figure 5. Real and imaginary parts of the numerical solution u ( x , t ) for x [ 15 , 15 ] and t [ 0 , 200 ] , computed using mesh size h = 0.05 and time step τ = h 2 .
Figure 5. Real and imaginary parts of the numerical solution u ( x , t ) for x [ 15 , 15 ] and t [ 0 , 200 ] , computed using mesh size h = 0.05 and time step τ = h 2 .
Mathematics 13 01978 g005
Figure 6. Modulus of the numerical solution | u ( x , t ) | for x [ 15 , 15 ] and t [ 0 , 10 ] .
Figure 6. Modulus of the numerical solution | u ( x , t ) | for x [ 15 , 15 ] and t [ 0 , 10 ] .
Mathematics 13 01978 g006
Figure 7. Heat maps of the modulus of the numerical solution and the modulus of its error for t [ 0 , 10 ] , with h = 0.05 and τ = h 2 .
Figure 7. Heat maps of the modulus of the numerical solution and the modulus of its error for t [ 0 , 10 ] , with h = 0.05 and τ = h 2 .
Mathematics 13 01978 g007
Figure 8. Real and imaginary parts of the numerical solution at t = 10 , using h = 0.05 and τ = h 2 .
Figure 8. Real and imaginary parts of the numerical solution at t = 10 , using h = 0.05 and τ = h 2 .
Mathematics 13 01978 g008
Figure 9. Heat maps of the modulus of the numerical solution and the modulus of its error for t [ 0 , 16 ] , with h = 0.05 and τ = h 2 .
Figure 9. Heat maps of the modulus of the numerical solution and the modulus of its error for t [ 0 , 16 ] , with h = 0.05 and τ = h 2 .
Mathematics 13 01978 g009
Table 1. Comparison of -norm errors and convergence orders at t = 1 between the Crank–Nicholson (CN) scheme and the proposed fourth-order compact scheme. For all tests, the time step size satisfies τ = h 2 .
Table 1. Comparison of -norm errors and convergence orders at t = 1 between the Crank–Nicholson (CN) scheme and the proposed fourth-order compact scheme. For all tests, the time step size satisfies τ = h 2 .
hError (CN)Order (CN)Error (Proposed)Order (Proposed)
0.2 3.9483 × 10 5 - 3.3071 × 10 5 -
0.1 3.6705 × 10 6 3.43 2.0671 × 10 6 4.00
0.05 5.3005 × 10 7 2.79 1.2920 × 10 7 4.00
0.025 1.0829 × 10 7 2.29 8.0749 × 10 9 4.00
Table 2. -norm errors, convergence orders, and CPU time at t = 10 using the proposed fourth-order compact scheme. For all tests, the time step size is chosen as τ = h 2 .
Table 2. -norm errors, convergence orders, and CPU time at t = 10 using the proposed fourth-order compact scheme. For all tests, the time step size is chosen as τ = h 2 .
hErrorOrderCPU Time (s)
0.2 1.4685 × 10 1 - 0.1719
0.1 8.5607 × 10 3 4.10 0.8125
0.05 5.3176 × 10 4 4.01 11.4531
0.025 3.3236 × 10 5 4.00 219.8750
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Yang, H. Fourth-Order Compact Finite Difference Method for the Schrödinger Equation with Anti-Cubic Nonlinearity. Mathematics 2025, 13, 1978. https://doi.org/10.3390/math13121978

AMA Style

Yang H. Fourth-Order Compact Finite Difference Method for the Schrödinger Equation with Anti-Cubic Nonlinearity. Mathematics. 2025; 13(12):1978. https://doi.org/10.3390/math13121978

Chicago/Turabian Style

Yang, He. 2025. "Fourth-Order Compact Finite Difference Method for the Schrödinger Equation with Anti-Cubic Nonlinearity" Mathematics 13, no. 12: 1978. https://doi.org/10.3390/math13121978

APA Style

Yang, H. (2025). Fourth-Order Compact Finite Difference Method for the Schrödinger Equation with Anti-Cubic Nonlinearity. Mathematics, 13(12), 1978. https://doi.org/10.3390/math13121978

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop