1. Introduction
The Hirota equation is a fundamental nonlinear integrable partial differential equation that plays a significant role in soliton theory and the study of nonlinear waves. This equation has applications across different fields like fluid dynamics and optical physics, where it helps describe phenomena such as localized wave structures and modulational instability. In this work, we focus on the following form of the Hirota equation [
1]:
with the initial value
where
denotes the imaginary unit,
t is the time variable,
x is the spatial coordinate,
is a complex-valued function,
and
are the real constants. A given smooth complex-valued function is denoted as
. For the Hirota equation, two important invariants need to be considered, namely the mass
and the energy
For Equation (
1), when
, Equation (
1) can be simplified to the conventional form of the nonlinear Schrödinger equation (NLSE) [
2,
3], which is a significant nonlinear partial differential equation extensively utilized across multiple domains of physics. If
, it will turn into the complex modified Korteweg-de Vries equation (mKdVE) [
4]. Therefore, this equation is integrable and can be regarded as a combination of the NLSE and the mKdVE. As a modified NLSE, Equation (
1) displays higher-order dispersion and time-delay corrections to the cubic nonlinearity. Owing to the inclusion of higher-order terms and additional nonlinear effects [
5,
6], it can describe more complex marine phenomena, such as sea depth, bottom friction, viscosity, etc.; these factors must all be considered during the simulation process. In the context of wave propagation within oceanic environments and optical fiber systems, it can be considered a more precise approximation compared to the NLSE.
In 1973, Hirota first formulated the Hirota equation and derived its exact N-envelope-soliton solutions [
1]. After that, the Hirota equation has been the subject of extensive scholarly investigation. Ankiewicz et al. [
7] investigated rational solutions of the Hirota equation through the application of a modified Darboux transformation technique, and demonstrated numerically that these solutions are closely related to rogue waves arising from chaotic wave fields. Tao and He [
8] systematically derived multisoliton, breather, and first-order rogue wave solutions of the Hirota equation through the Darboux transformation, and derived a generalized formulation of rogue wave solutions with multiple tunable parameters via Taylor expansion of breather solutions, providing a theoretical basis for controllable experimental observation of rogue waves. Li et al. [
9] constructed high-order rogue wave solutions for the Hirota equation using a parameterized Darboux transformation. Mu et al. [
10] conducted an investigation into the higher-order rogue waves of the Hirota equation using a variable separation and Taylor expansion method, providing explicit solutions. In a recent paper, Peng et al. [
11] investigate the rogue dn-periodic waves (the rogue wave solutions on the dn-periodic waves background) for the Hirota equation by adopting the Darboux transformation. Notably, Zouraris [
12] proposed a linear implicit finite-difference discretization for a Schrödinger–Hirota type equation and proved optimal second-order convergence in a discrete
-norm under suitable mesh constraints. However, the scheme did not obtain the conservation of mass and energy. Motivated by these developments, the present paper focuses on constructing a conservative scheme for the Hirota equation that preserves discrete mass and energy.
To preserve mass and energy at the discrete level, we employ a conservative numerical discretization method. Conservative schemes have been widely studied in the context of nonlinear dispersive equations such as the nonlinear Schrödinger equation and the Korteweg–de Vries equation, where preserving invariants like mass, momentum, and energy is crucial for accurately capturing long-time dynamics. For instance, Sanz-Serna [
13] and De Frutos [
14] proposed time-centered conservative schemes for the NLSE, demonstrating their ability to preserve discrete analogues of conserved quantities and improve numerical stability. Similarly, Furihata [
15] developed the discrete variational derivative method, a systematic framework for constructing schemes that preserve conservation laws for a class of Hamiltonian partial differential equations, including the Korteweg-de Vries equation, by discretizing the underlying variational structure. Recently, Li et al. [
16] proposed two conservative operator-compensation methods to address the Gross-Pitaevskii equation, which is a variant of the NLSE.
In this paper, we construct a numerical scheme for the Hirota equation utilizing the Crank–Nicolson (CN) method. The combination of high-order derivatives and nonlinear terms characteristic of the Hirota equation results in a highly complex algebraic system upon discretization. Consequently, refining the spatial mesh leads to a substantial increase in computational complexity. Moreover, direct solvers can be applied in principle, but their computational cost becomes prohibitive for the nonlinear algebraic systems arising from such discretizations. To efficiently handle this complexity and maintain numerical stability, a numerical iteration method is proposed to deal with the complicated system of linear algebraic equations, which results from the large stencil. This method can save the computational cost.
The structure of this paper is outlined as follows: In
Section 2, we present the spatial discretization of the Hirota equation, and analyze the conservation properties of the resulting semi-discrete system. Subsequently, the fully discrete system is derived by using the Crank–Nicolson method for temporal discretization.
Section 3 presents numerical experiments to evaluate the accuracy and verify the conservation properties of the proposed schemes. Finally, conclusions are discussed in the
Section 4.
2. Numerical Method for the Hirota Equation
In practical computations, since the solution of the Hirota equation decays rapidly in the far field and satisfies homogeneous Dirichlet boundary conditions, the computational domain is typically taken sufficiently large so that truncation errors can be neglected. For convenience of presentation, we restrict our attention to the one-dimensional (1-D) spatial case, where the Hirota equation is considered on a bounded interval . The subsequent discussion can be readily extended to two- and three-dimensional settings.
In the 1-D case, the problem, together with the initial and boundary conditions, is formulated as
with the initial condition
and boundary condition
2.1. Semi-Discretized Scheme
Some notations are introduced, before we present a semi-discretized scheme for the Hirota. For a positive integer
J, denotes the spatial mesh size
, and grid points
. Set the index sets as
Given a grid function
(
if
), we define the difference operators as follows:
Applying the difference operators to the Hirota equation, we obtain the semi-discrete scheme as follows:
with the initial value
and the boundary condition
where we approximate the nonlinear term
by
to ensure the conservation properties of the scheme,
is the conjugate of
.
Next, we investigate the conservation properties of the semi-discretized scheme. For this purpose, we first present the following lemma:
Lemma 1. Let and be the grid functions for . For , the values of and are the boundary values. Proof. Expanding the discrete second-order difference operator
, we have
The proof is complete. □
Remark 1. According to Lemma 1, it can be inferred thatwhen u and v satisfy periodic boundary conditions or zero boundary conditions. Theorem 1. The semi-discretized scheme is capable of maintaining mass conservation in the sensewhere Proof. Multiply both sides of Equation (
9) by
to obtain the following:
Subtract the conjugate from Equation (
17) to obtain the following:
Sum Equation (
18) over
and then we can obtain the following:
Subsequently, we will divide Equation (
19) into four terms and solve each one individually, where Lemma 1 was used:
This completes the proof. □
Theorem 2. The semi-discretized scheme is capable of maintaining energy conservation in the sensewhere Proof. Multiply both sides of Equation (
9) by
to obtain the following:
Add the conjugate from Equation (
23) to obtain the following:
Sum Equation (
24) over
and then we can obtain Equation (
25), where Lemma 1 was used:
This completes the proof. □
2.2. Fully Discretized Scheme
Let the time step size be
and define the time steps as
for
. Let
denote the numerical approximation of
for
and
. By applying the Crank–Nicolson method in time, the semi-discrete method (
9) is discretized as follows:
where
with the initial value
and the boundary condition
By applying Taylor series expansion to the spatial and temporal discretizations, it follows that the truncation error of the scheme is of order , which confirms that the method is second-order accurate in both space and time. This result will be verified in the next section.
The definitions of discrete mass and energy are as follows:
Next, we show the conservative properties of the fully discretized scheme (
26).
Theorem 3. The Crank–Nicolson finite difference method (26) is conservative in the sense that Proof. Firstly, we prove the conservation of mass. Multiply both sides of Equation (
26) by
to obtain the following:
Subtract the conjugate from Equation (
32), sum it over
, and we can obtain the following:
Then, we will divide Equation (
33) into four terms and solve each one individually similar to Theorem 1:
This completes the proof of mass conservation. Furthermore, the proof of energy conservation is similar to that of Theorem 2 for the semi-discretized problem. □
Remark 2. According to Theorem 3, fully-discrete CN schemes (26) are unconditionally stable. If the nonlinear term
in Equation (
26) is not approximated by
but instead replaced by
or treated in another equivalent form, the mass and energy conservation cannot be proved. And the fully-discrete method is as follows:
Equation (
26) results in a nonlinear algebraic system; thus, the solution necessitates an efficient iterative scheme. The following method is employed.
In the process of solving, since solving the linear algebraic equation of the five diagonal matrix requires a large amount of computation, the high-order term is iteratively calculated. Scheme (
26) can be written in the following iterative scheme, i.e.,
where
l denotes iteration number.
Further Equation (
36) can be rewritten as the following matrix system:
where for
,
with
When , , where . can be obtained by numerical iterative calculation when is less than the given threshold.