Theory and Modern Applications

# Nonstandard finite difference variational integrators for nonlinear Schrödinger equation with variable coefficients

## Abstract

In this paper, the idea of nonstandard finite difference discretization is employed to develop two variational integrators for the nonlinear Schrödinger equation with variable coefficients. These integrators are naturally multi-symplectic, and their multi-symplectic structures are presented by the multi-symplectic form formulas. Local truncation errors and convergences of the integrators are briefly discussed. The effectiveness and efficiency of the proposed schemes, such as the convergence order, numerical stability, and the capability in preserving the norm conservation, are verified in the numerical experiments.

## 1 Introduction

The nonlinear Schrödinger equation (NLSE) [1, 2]

$i{u}_{t}+{u}_{xx}+{V}^{\prime }\left({|u|}^{2}\right)u=0,$

has wide applications in many areas such as quantum mechanics, nonlinear optics, and plasma physics, etc. Extensive efforts have been devoted to studying the equation theoretically and numerically due to its broad and important applications. Various numerical methods for the nonlinear Schrödinger equation  such as finite element methods , finite difference methods , spectral method , etc. have been developed. Among these numerical methods of different categories, the multi-symplectic method has attracted special attention for its better numerical stability for long-time computations and perfect performance in preserving the multi-symplecticity of NLS equations, which is an intrinsic conservative property of the Schrödinger equations.

In this paper, we consider the nonlinear Schrödinger equation with variable coefficients

$i{u}_{t}+\alpha \left(t\right){u}_{xx}+\beta \left(t\right){|u|}^{2}u=0,$
(1)

where $i=\sqrt{-1}$, $\alpha \left(t\right)$ and $\beta \left(t\right)$ are integrable real functions in t, and $u\left(x,t\right)$ is a scalar field function with two independent variables labeled by x and t.

The nonlinear Schrödinger equation (1) can be reformulated as a multi-symplectic Hamiltonian system . Hong et al. [10, 11] proposed a numerical scheme for the NLSE with variable coefficients (1) by means of Preissman integrator . For this Preissman integrator, they derived a discrete multi-symplectic structure, named multi-symplectic conservation law . Also, the discrete normal conservation law and a global energy transit formula in temporal direction were shown in their paper.

It is a classical way to derive multi-symplectic numerical schemes from the Hamiltonian point of view [9, 12, 14]. After applying a numerical discretization to Hamilton’s equation , however, we need to rederive the discrete multi-symplectic conservation law since it is unclear what is geometrically conserved by this discretization. On this aspect, another classical way, i.e., deriving the multi-symplectic numerical schemes from the Lagrangian viewpoint and variational principle, has more advantages since it leads in a natural way to multi-symplectic integrators, and the discrete multi-symplectic structures are obtained at the same time. Based on this Lagrangian viewpoint, Chen et al.  have elaborately studied the variational multi-symplectic integrators for the nonlinear Schrödinger equation. By the discrete variational principle with the discrete Lagrangian function, the discrete variational integrator is derived, and the corresponding multi-symplectic structure, i.e., the multi-symplectic form formula by Marsden [22, 23], is also obtained from the variational principle. In this work, we follow this Lagrangian viewpoint to study the multi-symplectic methods for the nonlinear Schrödinger equation with variable coefficients (1).

In this process, the discrete Lagrangian function needs to be defined for the discrete variational principle. The Lagrangian function can be discretized by using finite difference methods. In our paper, we use the nonstandard finite difference methods rather than the classical finite difference methods to approximate the Lagrangian function. The nonstandard finite difference methods developed by Mickens  have better performances than the classical ones in terms of numerical stability, and they can be constructed flexibly to preserve some important properties and conservation laws of the original models. The rules of designing nonstandard finite difference schemes are listed in Section 2.

Combining the ideas of discrete variational integrators and the nonstandard finite difference methods is our starting point to study the nonlinear Schrödinger equation with variable coefficients (1), which can be reformulated as the following Euler-Lagrange equation:

$\frac{\partial L}{\partial u}=\frac{d}{dt}\frac{\partial L}{\partial {u}_{t}}+\frac{d}{dx}\frac{\partial L}{\partial {u}_{x}},$
(2)

with the Lagrangian function

$L\left(u,{u}_{t},{u}_{x}\right)=\frac{1}{2}\alpha \left(t\right){u}_{x}{\overline{u}}_{x}+\frac{1}{4}i\left(u{\overline{u}}_{t}-\overline{u}{u}_{t}\right)-\frac{1}{4}\beta \left(t\right){\left(u\overline{u}\right)}^{2},$
(3)

where $\overline{u}$ and ${\overline{u}}_{x}$ are the conjugates of u and ${u}_{x}$, respectively.

The rest of the paper is organized as follows. In Section 2, we give some brief and necessary introductions to discrete variational integrators, the corresponding multi-symplectic form formulas, and the rules of nonstandard finite difference methods. In Section 3, with the triangle discretization and square discretization, we derive two discrete variational integrators for the NLS equation with variable coefficients (1) based on nonstandard finite difference methods. The discrete multi-symplectic structures are presented by multi-symplectic form formulas. Local truncation errors of the developed integrators are discussed, and the convergence orders are shown in error tables in the numerical experiment section. Section 4 is devoted to showing the numerical performances of the developed nonstandard finite difference variational integrators. It also shows that our methods have a good performance in preserving the norm conservation law.

## 2 Discrete variational integrators and nonstandard finite difference methods

In this section, we first introduce the concepts of discrete variational integrators, the corresponding multisymplectic structures, and the rules of nonstandard finite difference methods.

### 2.1 Discrete variational integrators and multi-symplectic form formulas

Assume that we have a regular quadrangular mesh in the base space, with mesh lengths Δx and Δt. The nodes in this mesh are denoted by $\left(j,k\right)\in \mathbb{Z}×\mathbb{Z}$, corresponding to the points $\left({x}_{j},{t}_{k}\right):=\left(j\mathrm{\Delta }x,k\mathrm{\Delta }t\right)$ in ${\mathbb{R}}^{2}$. We denote the value of the field u at the node $\left(j,k\right)$ by ${u}_{j}^{k}$. When we consider the triangle discretization, we denote a triangle at $\left(j,k\right)$ with ordered triple $\left(\left(j,k\right),\left(j+1,k\right),\left(j,k+1\right)\right)$ by ${△}_{jk}$. Define ${X}_{△}$ to be the set of all such triangles. Then the discrete jet bundle [23, 30] is defined as follows:

${J}_{△}^{1}Y:=\left\{\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)\in {\mathbb{R}}^{3}:\left(\left(j,k\right),\left(j+1,k\right),\left(j,k+1\right)\right)\in {X}_{△}\right\},$

which equals ${X}_{△}×{\mathbb{R}}^{3}$.

Let us posit a discrete Lagrangian ${L}_{d}:{J}_{△}^{1}Y\to \mathbb{R}$. Given a triangle ${△}_{jk}$, define the function ${L}_{d}$ by ${L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)$ which is a discrete version of the Lagrangian density . Then the action functional can be defined as

$S=\cdots +{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)+{L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)+{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)+\cdots .$

By the discrete variational principle , we obtain the discrete Euler-Lagrange equation by keeping the values of the field on the boundary fixed and taking variations with respect to ${u}_{j}^{k}$,

${D}_{1}{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)+{D}_{2}{L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)+{D}_{3}{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)=0.$

The discrete Euler-Lagrange equation is the so-called discrete variational integrator. Meanwhile, the discrete multi-symplectic structure is also generated [22, 23] in the variational principle.

By Hamilton’s principle [23, 32], the discrete multi-symplectic structure, which is preserved by the discrete variational integrator, is described by Poincaré-Cartan forms in a differential geometric language. In their paper , Marsden et al. showed how to obtain this structure directly from the variational principle on the Lagrangian side. They defined the structure as the multi-symplectic form formula and demonstrated that it was conserved by the discrete variational integrator in their paper.

Lemma 2.1 If u is a solution of the discrete Euler-Lagrangian equation, and V, W are first variations of u, then the following discrete multi-symplectic form formula holds:

$\sum _{\begin{array}{c}△;△\cap \partial U\ne 0\end{array}}\left(\sum _{\begin{array}{c}l:{△}^{l}\in \partial U\end{array}}\left[\left({j}^{1}u\right)\ast \left({ı}_{{j}^{1}V}{ı}_{{j}^{1}W}{\mathrm{\Omega }}_{L}^{l}\right)\right]\left(△\right)\right)=0.$
(4)

The details of this conclusion can be found in papers [22, 23]. This conclusion states that the discrete variational principles produce the discrete variational integrators, and that the multi-symplecticity of these variational integrators is presented by the discrete multi-symplectic form formula (4).

Vankerschaver et al.  revisited the multi-symplectic form formula in the work . They showed that it can be obtained from the boundary Lagrangian which they defined in their paper. An easier way was presented to derive the discrete multi-symplectic form formula from the discrete variational principle, using the notations of Poincaré-Cartan forms. In this paper, we follow the same derivation for the discrete multi-symplectic form formulas to derive our discrete variational integrators.

When we use the discrete variational principle, we need to make an approximation of the Lagrangian. Here we employ nonstandard finite difference methods, instead of the standard finite difference, to approximate the Lagrangian function and derive the corresponding discrete variational integrators as well.

### 2.2 The nonstandard finite difference methods

The nonstandard finite difference schemes developed by Mickens et al.  were proposed to compensate the weaknesses which may be found in standard finite difference methods, for example, numerical instabilities. Regarding the positivity, boundedness, and monotonicity of solutions, nonstandard finite difference schemes also have a better performance than standard finite difference ones. Because it is more flexible in its construction, a nonstandard finite difference scheme can more easily preserve certain properties and structures obeyed by the original equations and can have better dynamical consistency for dynamical problems.

These advantages of nonstandard finite difference methods have been shown in many numerical applications. González-Parra et al. [33, 34] developed some nonstandard finite difference methods to preserve the positivity condition and population conservation law of biological models. Jordan  and Malek  constructed nonstandard finite difference schemes for heat transfer problems. For symplectic systems, Mickens  derived a nonstandard finite difference variational integrator for symplectic ODEs. Recently, Ma et al.  developed a nonstandard finite difference scheme for stochastic differential equations with additive noises.

The initial foundation of nonstandard finite difference methods came from exact finite difference schemes . After generalizing these results, Mickens formulated the following three basic rules  in constructing nonstandard finite difference schemes.

1. 1.

The orders of discrete derivatives should be equal to the orders of corresponding derivatives appearing in the differential equations.

Note: If the orders of discrete derivatives are larger than those occurring in differential equations, then numerical instabilities will in general occur.

1. 2.

Discrete representations for derivatives, in general, have nontrivial denominator functions.

Note: For example, the discrete first-derivative is generally represented by

$\frac{du}{dt}\to \frac{{u}_{i+1}-\phi \left(\mathrm{\Delta }t\right){u}_{i}}{\varphi \left(\mathrm{\Delta }t\right)},$

where the numerator functions $\phi \left(\mathrm{\Delta }t\right)$ and the denominator functions $\varphi \left(\mathrm{\Delta }t\right)$ satisfy

$\phi \left(\mathrm{\Delta }t\right)=1+\mathcal{O}\left(\left(\mathrm{\Delta }t\right)\right),\phantom{\rule{2em}{0ex}}\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t+\mathcal{O}\left({\left(\mathrm{\Delta }t\right)}^{2}\right).$
1. 3.

Both linear and nonlinear terms should be represented by nonlocal discrete representations on the discrete computational lattice.

Note: For example,

$\begin{array}{c}u\to 2{u}_{i}-{u}_{i+1},\hfill \\ {u}^{2}\to {u}_{i}{u}_{i+1},\hfill \\ {u}^{2}\to \left(\frac{{u}_{i-1}+{u}_{i}+{u}_{i+1}}{3}\right){u}_{i},\hfill \\ {u}^{3}\to 2{u}_{i}^{3}-{u}_{i}^{2}{u}_{i+1},\hfill \\ {u}^{3}\to {u}_{i-1}{u}_{i}{u}_{i+1}.\hfill \end{array}$

In our paper, we combine the advantages of nonstandard finite difference methods and discrete variational principles to construct multi-symplectic numerical schemes for the nonlinear Schrödinger equation with variable coefficients (1). Their multi-symplecticities are presented by discrete multi-symplectic form formulas respectively.

## 3 Nonstandard finite difference variational integrators for the nonlinear Schrödinger equation with variable coefficients

We consider the nonlinear Schrödinger equation with variable coefficients (1),

$i{u}_{t}+\alpha \left(t\right){u}_{xx}+\beta \left(t\right){|u|}^{2}u=0,$

where $u\left(x,t\right)$ is a scalar field function with two independent variables labeled by x and t and $\alpha \left(t\right)$ and $\beta \left(t\right)$ are integrable real functions in t. We now use the triangle discretization and the square discretization respectively to obtain the nonstandard finite difference variational integrators.

### 3.1 Triangle discretization for the nonstandard finite difference variational integrator

We consider the same regular quadrangular mesh in the base space defined in Section 2.1. The triangle ${△}_{jk}$ is the three-ordered triple $\left(\left(j,k\right),\left(j+1,k\right),\left(j,k+1\right)\right)$ at $\left(j,k\right)$. Let ${X}_{△}$ be the set of all such triangles. The discrete jet bundle [23, 30] is defined as follows:

${J}_{△}^{1}Y:=\left\{\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)\in {\mathbb{R}}^{3}:\left(\left(j,k\right),\left(j+1,k\right),\left(j,k+1\right)\right)\in {X}_{△}\right\},$

which is equal to ${X}_{△}×{\mathbb{R}}^{3}$.

Now, we use the nonstandard finite difference to define the discrete Lagrangian ${L}_{d}$ on ${J}_{△}^{1}Y$, which is the discrete version of the Lagrangian density . Here, for the nonlinear Schrödinger equation (1) with the Lagrangian

$L\left(u,{u}_{t},{u}_{x}\right)=\frac{1}{2}\alpha \left(t\right){u}_{x}{\overline{u}}_{x}+\frac{1}{4}i\left(u\overline{{u}_{t}}-\overline{u}{u}_{t}\right)-\frac{1}{4}\beta \left(t\right){\left(u\overline{u}\right)}^{2},$

the discrete Lagrangian is defined as

$\begin{array}{rcl}{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)& =& \frac{1}{2}\mathrm{\Delta }t\mathrm{\Delta }x\left(\frac{1}{2}{\alpha }_{k+\frac{1}{2}}\frac{{u}_{j+1}^{k}-{u}_{j}^{k}}{\psi \left(\mathrm{\Delta }x\right)}\frac{{\overline{u}}_{j+1}^{k}-{\overline{u}}_{j}^{k}}{\psi \left(\mathrm{\Delta }x\right)}\\ +\frac{1}{4}i\left(\frac{{u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j}^{k+1}}{3}\frac{{\overline{u}}_{j}^{k+1}-{\overline{u}}_{j}^{k}}{\varphi \left(\mathrm{\Delta }t\right)}-\frac{{\overline{u}}_{j}^{k}+{\overline{u}}_{j+1}^{k}+{\overline{u}}_{j}^{k+1}}{3}\frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{\varphi \left(\mathrm{\Delta }t\right)}\right)\\ -\frac{1}{12}{\beta }_{k+\frac{1}{2}}\left({|{u}_{j}^{k}|}^{2}{|{u}_{j+1}^{k}|}^{2}+{|{u}_{j+1}^{k}|}^{2}{|{u}_{j}^{k+1}|}^{2}+{|{u}_{j}^{k+1}|}^{2}{|{u}_{j}^{k}|}^{2}\right)\right),\end{array}$
(5)

where ${\alpha }_{k+\frac{1}{2}}=\alpha \left({t}_{k+\frac{1}{2}}\right)$, ${\beta }_{k+\frac{1}{2}}=\beta \left({t}_{k+\frac{1}{2}}\right)$,

$\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t+\mathcal{O}\left({\left(\mathrm{\Delta }t\right)}^{2}\right),\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}\right).$
(6)

We have obeyed the rules of constructing nonstandard finite difference schemes in Mickens’ papers  in the following ways. In the triangle ${△}_{jk}$ with three points $\left(\left(j,k\right),\left(j+1,k\right),\left(j,k+1\right)\right)$:

1. 1.

The discrete first-derivative is represented by

$\frac{du}{dt}\to \frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{\varphi \left(\mathrm{\Delta }t\right)},\phantom{\rule{2em}{0ex}}\frac{du}{dx}\to \frac{{u}_{j+1}^{k}-{u}_{j}^{k}}{\psi \left(\mathrm{\Delta }x\right)},$

where denominator functions $\varphi \left(\mathrm{\Delta }t\right)$, $\psi \left(\mathrm{\Delta }x\right)$ [22, 23] satisfy the conditions

$\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t+\mathcal{O}\left({\left(\mathrm{\Delta }t\right)}^{2}\right),\phantom{\rule{2em}{0ex}}\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}\right).$
1. 2.

Nonlocal representation on the discrete computational lattice is given by

$u\to \frac{{u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j}^{k+1}}{3},$

and

$\begin{array}{rcl}{\left(u\overline{u}\right)}^{2}& \to & \frac{{u}_{j}^{k}{\overline{u}}_{j}^{k}{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}+{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}{u}_{j}^{k+1}{\overline{u}}_{j}^{k+1}+{u}_{j}^{k+1}{\overline{u}}_{j}^{k+1}{u}_{j}^{k}{\overline{u}}_{j}^{k}}{3}\\ =& \frac{{|{u}_{j}^{k}|}^{2}{|{u}_{j+1}^{k}|}^{2}+{|{u}_{j+1}^{k}|}^{2}{|{u}_{j}^{k+1}|}^{2}+{|{u}_{j}^{k+1}|}^{2}{|{u}_{j}^{k}|}^{2}}{3}.\end{array}$

By discrete Hamilton’s principle [23, 30], we have the discrete Euler-Lagrangian equation

${D}_{1}{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)+{D}_{2}{L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)+{D}_{3}{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)=0,$
(7)

where ${L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)$ and ${L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)$ are defined similarly to (5) by and

$\begin{array}{rcl}{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)& =& \frac{1}{2}\mathrm{\Delta }t\mathrm{\Delta }x\left(\frac{1}{2}{\alpha }_{k-\frac{1}{2}}\frac{{u}_{j+1}^{k-1}-{u}_{j}^{k-1}}{\psi \left(\mathrm{\Delta }x\right)}\frac{{\overline{u}}_{j+1}^{k-1}-{\overline{u}}_{j}^{k-1}}{\psi \left(\mathrm{\Delta }x\right)}\\ +\frac{1}{4}i\left(\frac{{u}_{j}^{k-1}+{u}_{j+1}^{k-1}+{u}_{j}^{k}}{3}\frac{{\overline{u}}_{j}^{k}-{\overline{u}}_{j}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}-\frac{{\overline{u}}_{j}^{k-1}+{\overline{u}}_{j+1}^{k-1}+{\overline{u}}_{j}^{k}}{3}\frac{{u}_{j}^{k}-{u}_{j}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}\right)\\ -\frac{1}{12}{\beta }_{k-\frac{1}{2}}\left({|{u}_{j}^{k-1}|}^{2}{|{u}_{j+1}^{k-1}|}^{2}+{|{u}_{j+1}^{k-1}|}^{2}{|{u}_{j}^{k}|}^{2}+{|{u}_{j}^{k}|}^{2}{|{u}_{j}^{k-1}|}^{2}\right)\right).\end{array}$

Substituting ${L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)$, ${L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)$, and ${L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)$ into above equation (7), we arrive at a nonstandard finite difference variational integrator. We rearrange it as follows: (8)

This is a nonstandard finite difference variational integrator for the nonlinear Schrödinger equation with variable coefficients (1).

As we have mentioned in Section 2 and Lemma 2.1, the advantages of deriving multi-symplectic numerical schemes from the discrete variational principle are that they are naturally multi-symplectic, and the discrete multi-symplectic structures are also generated in the variational principle. Now, it is meaningful to show the multi-symplectic structure of this discrete variational integrator (8) which is based on the nonstandard finite difference method.

Since we employ the triangle discretization here, we focus on three adjacent triangles around ${u}_{j}^{k}$ and denote their area by U. Following the idea used in , the discrete boundary Lagrangian is given by

${L}_{\partial U}\left({u}_{\partial U}\right):=\underset{{u}_{j}^{k}}{ext}\left[{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)+{L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j-1}^{k+1}\right)+{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j}^{k}\right)\right],$
(9)

where

${u}_{\partial U}:=\left({u}_{j+1}^{k},{u}_{j}^{k+1},{u}_{j-1}^{k+1},{u}_{j-1}^{k},{u}_{j}^{k-1},{u}_{j+1}^{k-1}\right).$

Taking exterior derivative twice on both sides and knowing that ${\mathbf{d}}^{2}{L}_{\partial U}\equiv 0$, we have the discrete multi-symplectic form formula of the following form :

$\sum _{n=1}^{3}\sum _{l=1;l\ne n}^{3}{\mathrm{\Omega }}_{L}^{n}\left({\mathrm{\Delta }}^{\left(l\right)}\right)=0,$
(10)

where ${\mathrm{\Omega }}_{L}^{n}=-\mathbf{d}{\mathrm{\Theta }}_{L}^{n}$ (for $n=1,2,3$) and the discrete Poincaré-Cartan forms ${\mathrm{\Theta }}_{L}^{1}$, ${\mathrm{\Theta }}_{L}^{2}$, and ${\mathrm{\Theta }}_{L}^{3}$ are defined by

${\mathrm{\Theta }}_{L}^{1}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right):={D}_{1}{L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}\right)\phantom{\rule{0.2em}{0ex}}d{u}_{j}^{k}.$

Thus, for the nonlinear Schödinger equation with variable coefficients (1), the multi-symplectic form formula of the scheme (8), based on the nonstandard finite difference methods, can be obtained by (11)

where ${\overline{△}}_{jk}=\left({u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j}^{k+1}\right)/3$, ${\overline{△}}_{j-1k}=\left({u}_{j-1}^{k}+{u}_{j}^{k}+{u}_{j-1}^{k+1}\right)/3$, and ${\overline{△}}_{jk-1}=\left({u}_{j}^{k-1}+{u}_{j+1}^{k-1}+{u}_{j}^{k}\right)/3$. Now, we arrive at the first conclusion of this paper.

Theorem 3.1 The nonstandard finite difference variational integrator (8) for the nonlinear Schrödinger equation (1) is multi-symplectic, and its discrete multi-symplectic structure is (11).

We now analyze the truncation error of the integrator (8). We choose $\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x$ and $\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t$ here. By the Taylor series expansion, we have

$\begin{array}{c}{\alpha }_{k+\frac{1}{2}}\frac{{u}_{j+1}^{k}-2{u}_{j}^{k}+{u}_{j-1}^{k}}{{\left(\mathrm{\Delta }x\right)}^{2}}={\alpha }_{k}{{u}_{xx}^{k}}_{j}+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}\right)+\mathcal{O}\left(\mathrm{\Delta }t\right),\hfill \\ \frac{i}{6}\left(2\frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{\varphi \left(\mathrm{\Delta }t\right)}+\frac{{u}_{j-1}^{k+1}-{u}_{j-1}^{k}}{\varphi \left(\mathrm{\Delta }t\right)}+2\frac{{u}_{j}^{k}-{u}_{j}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}+\frac{{u}_{j+1}^{k}-{u}_{j+1}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}\right)=i{u}_{tj}^{k}+\mathcal{O}\left({\left(\mathrm{\Delta }t\right)}^{2}\right)+\mathcal{O}\left(\mathrm{\Delta }x\right),\hfill \\ \frac{1}{6}{\beta }_{k+\frac{1}{2}}{u}_{j}^{k}\left({|{u}_{j+1}^{k}|}^{2}+{|{u}_{j}^{k+1}|}^{2}+{|{u}_{j-1}^{k}|}^{2}+{|{u}_{j-1}^{k+1}|}^{2}\right)+\frac{1}{6}{\beta }_{k-\frac{1}{2}}{u}_{j}^{k}\left({|{u}_{j+1}^{k-1}|}^{2}+{|{u}_{j}^{k-1}|}^{2}\right)\hfill \\ \phantom{\rule{1em}{0ex}}={\beta }_{k}{u}_{j}^{k}{|{u}_{j}^{k}|}^{2}+\mathcal{O}\left(\mathrm{\Delta }x\right)+\mathcal{O}\left(\mathrm{\Delta }t\right).\hfill \end{array}$

Combining the above three equations, we can observe that the nonstandard finite difference variational integrator (8) has the truncation error $\mathcal{O}\left(\mathrm{\Delta }x+\mathrm{\Delta }t\right)$.

### 3.2 Square discretization for the nonstandard finite difference variational integrator

In this case, we denote a square at $\left(j,k\right)$ with ordered quaternion $\left(\left(j,k\right),\left(j+1,k\right),\left(j+1,k+1\right),\left(j,k+1\right)\right)$ by ${\mathrm{\square }}_{jk}$, and define ${X}_{\mathrm{\square }}$ to be the set of all such squares. Then the discrete jet bundle [23, 30] is defined as follows:

${J}_{\mathrm{\square }}^{1}Y:=\left\{\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j+1}^{k+1},{u}_{j}^{k+1}\right)\in {\mathbb{R}}^{4}:\left(\left(j,k\right),\left(j+1,k\right),\left(j+1,k+1\right),\left(j,k+1\right)\right)\in {X}_{\mathrm{\square }}\right\},$

which is equal to ${X}_{\mathrm{\square }}×{\mathbb{R}}^{4}$.

According to the nonstandard finite difference method, the discrete Lagrangian ${L}_{d}$ on ${J}_{\mathrm{\square }}^{1}Y$ now is defined as follows: (12)

In this case, we have used the following rules of nonstandard finite difference methods. In the square ${\mathrm{\square }}_{jk}$:

1. 1.

The discrete first-derivative is represented by

$\begin{array}{c}\frac{du}{dt}\to \frac{{u}_{j+\frac{1}{2}}^{k+1}-{u}_{j+\frac{1}{2}}^{k}}{2\varphi \left(\mathrm{\Delta }t\right)}=\frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{2\varphi \left(\mathrm{\Delta }t\right)}+\frac{{u}_{j+1}^{k+1}-{u}_{j+1}^{k}}{2\varphi \left(\mathrm{\Delta }t\right)},\hfill \\ \frac{du}{dx}\to \frac{{u}_{j+1}^{k+\frac{1}{2}}-{u}_{j}^{k+\frac{1}{2}}}{2\psi \left(\mathrm{\Delta }x\right)}=\frac{{u}_{j+1}^{k+1}-{u}_{j}^{k+1}}{2\psi \left(\mathrm{\Delta }x\right)}+\frac{{u}_{j+1}^{k}-{u}_{j}^{k}}{2\psi \left(\mathrm{\Delta }x\right)},\hfill \end{array}$

where

$\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t+\mathcal{O}\left({\left(\mathrm{\Delta }t\right)}^{2}\right),\phantom{\rule{2em}{0ex}}\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}\right).$
1. 2.

Nonlocal representations for u and ${\left(u\overline{u}\right)}^{2}$ are approximated by

$\begin{array}{c}u\to {u}_{j+\frac{1}{2}}^{k+\frac{1}{2}}=\frac{{u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j+1}^{k+1}+{u}_{j}^{k+1}}{4},\hfill \\ {\left(u\overline{u}\right)}^{2}\to \frac{{u}_{j}^{k}{\overline{u}}_{j}^{k}{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}+{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}{u}_{j+1}^{k+1}{\overline{u}}_{j+1}^{k+1}+{u}_{j+1}^{k+1}{\overline{u}}_{j+1}^{k+1}{u}_{j}^{k+1}{\overline{u}}_{j}^{k+1}+{u}_{j}^{k+1}{\overline{u}}_{j+1}^{k+1}{u}_{j}^{k}{\overline{u}}_{j}^{k}}{4}.\hfill \end{array}$

Similarly, we give the definitions of ${L}_{d}$ on the other three squares adjoint to ${u}_{j}^{k}$: and

$\begin{array}{c}{L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j+1}^{k},{u}_{j}^{k}\right)\hfill \\ \phantom{\rule{1em}{0ex}}=\mathrm{\Delta }x\mathrm{\Delta }t\left(\frac{1}{2}{\alpha }_{k-\frac{1}{2}}\frac{{u}_{j+1}^{k-\frac{1}{2}}-{u}_{j}^{k-\frac{1}{2}}}{\psi \left(\mathrm{\Delta }x\right)}\frac{{\overline{u}}_{j+1}^{k-\frac{1}{2}}-{\overline{u}}_{j}^{k-\frac{1}{2}}}{\psi \left(\mathrm{\Delta }x\right)}\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{i}{4}\left({u}_{j+\frac{1}{2}}^{k-\frac{1}{2}}\frac{{\overline{u}}_{j+\frac{1}{2}}^{k}-{\overline{u}}_{j+\frac{1}{2}}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}-{\overline{u}}_{j+\frac{1}{2}}^{k-\frac{1}{2}}\frac{{u}_{j+\frac{1}{2}}^{k}-{u}_{j+\frac{1}{2}}^{k-1}}{\varphi \left(\mathrm{\Delta }t\right)}\right)\hfill \\ \phantom{\rule{2em}{0ex}}-\frac{1}{16}{\beta }_{k-\frac{1}{2}}\left({u}_{j}^{k-1}{\overline{u}}_{j}^{k-1}{u}_{j+1}^{k-1}{\overline{u}}_{j+1}^{k-1}+{u}_{j+1}^{k-1}{\overline{u}}_{j+1}^{k-1}{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}+{u}_{j+1}^{k}{\overline{u}}_{j+1}^{k}{u}_{j}^{k}{\overline{u}}_{j}^{k}+{u}_{j}^{k}{\overline{u}}_{j}^{k}{u}_{j}^{k-1}{\overline{u}}_{j}^{k-1}\right)\right).\hfill \end{array}$

From the discrete variational principle, taking the derivative of the action functional with respect to ${u}_{j}^{k}$, we have the discrete Euler-Lagrangian equation in this square discretization [22, 23, 30], which is defined by (13)

After substituting the four discrete Lagrangian ${L}_{d}\left({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j+1}^{k+1},{u}_{j}^{k+1}\right)$, ${L}_{d}\left({u}_{j-1}^{k},{u}_{j}^{k},{u}_{j}^{k+1},{u}_{j-1}^{k+1}\right)$, ${L}_{d}\left({u}_{j-1}^{k-1},{u}_{j}^{k-1},{u}_{j}^{k},{u}_{j-1}^{k}\right)$, and ${L}_{d}\left({u}_{j}^{k-1},{u}_{j+1}^{k-1},{u}_{j+1}^{k},{u}_{j}^{k}\right)$ into above equation (13), we have (14)

This scheme is multi-symplectic and symmetric with respect to $\left(j+1,k\right)$ and $\left(j-1,k\right)$. Following the steps given in the above examples, we have the multi-symplectic form formula (15)

Now, we summarize our conclusion as follows.

Theorem 3.2 The nonstandard finite difference variational integrator (14) for the nonlinear Schrödinger equation with variable coefficients (1) is multi-symplectic, and its discrete multi-symplectic form formula is shown by (15).

Now, we discuss the truncation error for the nonstandard finite difference variational integrator (14). Here, we choose $\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x$ and $\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t$. By the Taylor series expansion, we have

$\begin{array}{c}\frac{1}{2}\left({\alpha }_{k+\frac{1}{2}}\frac{{u}_{j+1}^{k+\frac{1}{2}}-2{u}_{j}^{k+\frac{1}{2}}+{u}_{j-1}^{k+\frac{1}{2}}}{{\left(\mathrm{\Delta }x\right)}^{2}}+{\alpha }_{k-\frac{1}{2}}\frac{{u}_{j+1}^{k-\frac{1}{2}}-2{u}_{j}^{k-\frac{1}{2}}+{u}_{j-1}^{k-\frac{1}{2}}}{{\left(\mathrm{\Delta }x\right)}^{2}}\right)\hfill \\ \phantom{\rule{1em}{0ex}}={\alpha }_{k}{{u}_{xx}^{k}}_{j}+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}+{\left(\mathrm{\Delta }t\right)}^{2}\right),\hfill \\ \frac{i}{4\mathrm{\Delta }t}\left({u}_{j+\frac{1}{2}}^{k+1}+{u}_{j-\frac{1}{2}}^{k+1}-{u}_{j-\frac{1}{2}}^{k-1}-{u}_{j+\frac{1}{2}}^{k-1}\right)={u}_{tj}^{k}+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}+{\left(\mathrm{\Delta }t\right)}^{2}\right),\hfill \\ \frac{1}{2}\left(\frac{1}{4}{\beta }_{k+\frac{1}{2}}{u}_{j}^{k}\left({|{u}_{j+1}^{k}|}^{2}+2{|{u}_{j}^{k+1}|}^{2}+{|{u}_{j-1}^{k}|}^{2}\right)+\frac{1}{4}{\beta }_{k-\frac{1}{2}}{u}_{j}^{k}\left({|{u}_{j+1}^{k}|}^{2}+2{|{u}_{j}^{k-1}|}^{2}+{|{u}_{j-1}^{k}|}^{2}\right)\right)\hfill \\ \phantom{\rule{1em}{0ex}}={\beta }_{k}{|{u}_{j}^{k}|}^{2}{u}_{j}^{k}+\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}+{\left(\mathrm{\Delta }t\right)}^{2}\right).\hfill \end{array}$

From the above equations, we can readily observe that the nonstandard finite difference variational integrator (14) has a truncation error $\mathcal{O}\left({\left(\mathrm{\Delta }x\right)}^{2}+{\left(\mathrm{\Delta }t\right)}^{2}\right)$. To verify that the integrator has anticipated convergence accuracy, we investigate the numerical convergence order in our numerical experiments. See Section 4.

## 4 Numerical simulations

In this section, we report the performance of the nonstandard finite difference variational integrator (14) for solving the nonlinear Schrödinger equation with variable coefficients (1). The nonstandard finite difference variational integrator (14) is an implicit nine-points stencil. We just choose the denominator functions $\varphi \left(\mathrm{\Delta }t\right)=\mathrm{\Delta }t$ and $\psi \left(\mathrm{\Delta }x\right)=\mathrm{\Delta }x$ here. Consider the following two sets of variable coefficients and initial conditions:

$\begin{array}{r}i{u}_{t}+{\alpha }_{\mu }\left(t\right){u}_{xx}+{\beta }_{\mu }\left(t\right){|u|}^{2}u=0,\\ u\left(x,0\right)={v}_{\mu }\left(x\right),\phantom{\rule{1em}{0ex}}\mu =1,2,\end{array}$
(16)

where

$\begin{array}{c}{\alpha }_{1}\left(t\right)=\frac{1}{2}cos\left(t\right),\phantom{\rule{2em}{0ex}}{\beta }_{1}\left(t\right)=\frac{cos\left(t\right)}{sin\left(t\right)+3},\phantom{\rule{2em}{0ex}}{v}_{1}\left(x\right)=\frac{1}{\sqrt{3}}sech\left(\frac{1}{3}\right)exp\left(\frac{i\left({x}^{2}-1\right)}{6}\right),\hfill \\ {\alpha }_{2}\left(t\right)=\frac{1}{2}\left(cos\left(t\right)+\sqrt{2}cos\left(\sqrt{2}t\right)\right),\phantom{\rule{2em}{0ex}}{\beta }_{2}\left(t\right)=\frac{cos\left(t\right)+\sqrt{2}cos\left(\sqrt{2}t\right)}{sin\left(t\right)+sin\left(\sqrt{2}t\right)+5},\hfill \\ {v}_{2}\left(t\right)=\frac{1}{\sqrt{5}}sech\left(\frac{x}{5}\right)exp\left(\frac{i\left({x}^{2}-1\right)}{10}\right).\hfill \end{array}$

These two problems correspond to periodic and quasi-periodic solitary-waves. When $\mu =1$, the problem has a periodic solitary-wave solution

${u}_{p}\left(x,t\right)={P}_{1p}\left(x,t\right){P}_{2p}\left(x,t\right){P}_{3p}\left(x,t\right),$

where

$\begin{array}{c}{P}_{1p}\left(x,t\right)=\frac{1}{{\left(sin\left(t\right)+3\right)}^{\frac{1}{2}}},\phantom{\rule{2em}{0ex}}{P}_{2p}\left(x,t\right)=sech\left(\frac{x}{sin\left(t\right)+3}\right),\hfill \\ {P}_{3p}\left(x,t\right)=exp\left(\frac{i\left({x}^{2}-1\right)}{2\left(sin\left(t\right)+3\right)}\right).\hfill \end{array}$

When $\mu =2$, the problem has a quasi-periodic solitary-wave solution

${u}_{qp}\left(x,t\right)={P}_{1qp}\left(x,t\right){P}_{2qp}\left(x,t\right){P}_{3qp}\left(x,t\right),$

where

$\begin{array}{c}{P}_{1qp}\left(x,t\right)=\frac{1}{{\left(sin\left(t\right)+sin\left(\sqrt{2}t\right)+5\right)}^{\frac{1}{2}}},\phantom{\rule{2em}{0ex}}{P}_{2qp}\left(x,t\right)=sech\left(\frac{x}{sin\left(t\right)+sin\left(\sqrt{2}t\right)+5}\right),\hfill \\ {P}_{3qp}\left(x,t\right)=exp\left(\frac{i\left({x}^{2}-1\right)}{2\left(sin\left(t\right)+sin\left(\sqrt{2}t\right)+5\right)}\right).\hfill \end{array}$

We use the same boundary conditions in the above two problems, i.e.,

$u\left(-40,t\right)=u\left(40,t\right)=0.$

### 4.1 Simulation results for the problem (16)

First, for the periodic problem $\mu =1$, we plot the waveform in Figure 1. One can observe that the nonstandard finite difference variational integrator (14) displays the numerical properties of the periodic solitary-wave clearly and precisely.

We define the ${l}^{2}$-error ${e}_{k}$ of the numerical solution at time step ${t}_{k}$ as

${e}_{k}=\sqrt{\mathrm{\Delta }x\sum _{j}{|{u}_{j}^{k}-{u}_{p}\left({x}_{j},{t}_{k}\right)|}^{2}}.$

In Figure 2, we show the ${l}^{2}$-error ${e}_{k}$ of variational integrator (14) for the problem $\mu =1$.

Now, we use the variational integrator (14) to solve the nonlinear Schrödinger equation (16) with $\mu =2$. Figure 3 depicts the waveforms of the numerical solution obtained by the variational integrator (14). Figure 4 displays the ${l}^{2}$-errors of the variational integrator (14).

### 4.2 Accuracy and numerical stability

To investigate the numerical convergence of the proposed scheme (14), we conduct a series of numerical tests with varying mesh sizes. The ${l}^{2}$-errors at $t=1.5$, $t=3$, and $t=3.5$ are listed in Table 1. The orders in the table are calculated with the formula [39, 40]

$\mathit{Order}\approx \frac{ln\left(Error\left(\mathrm{\Delta }{x}_{1}\right)/Error\left(\mathrm{\Delta }{x}_{2}\right)\right)}{ln\left(\mathrm{\Delta }{x}_{1}/\mathrm{\Delta }{x}_{2}\right)}.$

Overall, it is clear that the error decreases as the mesh size goes to zero, indicating the convergence of our nonlinear integrator (14). Moreover, the numerical orders clearly exhibit second-order convergence when the mesh size decreases with fixing $\mathrm{\Delta }t=0.1\mathrm{\Delta }x$.

The numerical stability of the nonstandard finite difference variational integrator (14) is demonstrated in Figure 5. ${l}^{2}$-error curves are plotted with increasing time step sizes $\mathrm{\Delta }t=0.1,0.2,0.4,0.6$, respectively. We can see that our method performs very well even with large time steps and it is unrestricted by the CFL conditions . The ${l}^{2}$-errors are bounded without blowing up. Thus, the nonstandard finite difference variational integrator (14), based on an implicitly temporal discretization, is unconditionally stable from the viewpoint of numerical simulations. In general, nonstandard finite difference methods have better numerical stability than the standard finite difference method.

### 4.3 Norm conservation laws

We know that the nonlinear Schrödinger equation has the following global norm conservation law:

${\int }_{R}{|u|}^{2}\phantom{\rule{0.2em}{0ex}}dx=\mathit{constant}.$

The discrete version of this norm conservation law  can be written as

${\mathrm{Norm}}_{k}^{2}:=\mathrm{\Delta }x\sum _{j}{|{u}_{j}^{k}|}^{2}=\mathit{constant}.$

To show the performance of our integrator (14) on this aspect, we plot the norm conservation ${\mathrm{Norm}}_{k}^{2}$ in Figure 6 and Figure 7. We find that our method preserves the norm conservation law pretty well with very small periodic oscillation. The norm is constant within a percentage error of 0.4% in Figure 6. For Figure 7, the norm is constant within a percentage error of 3%.

### 4.4 Comparison with standard finite difference methods

A numerical test is made to compare the nonstandard finite difference method with the standard finite difference method. For the nonlinear Schrödinger equation (16) with $\mu =1$, we have a standard finite difference scheme

$i\frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{\mathrm{\Delta }t}+{\alpha }_{k+1}\frac{{u}_{j+1}^{k+1}-2{u}_{j}^{k+1}+{u}_{j-1}^{k+1}}{{\left(\mathrm{\Delta }x\right)}^{2}}+{\beta }_{j+1}{|{u}_{j}^{k+1}|}^{2}{u}_{j}^{k+1}=0,$
(17)

where the spatial and temporal derivatives are approximated by using the classical central differencing and the implicit Euler method, respectively.

The ${l}^{2}$-error of (17) is plotted in Figure 8. Furthermore, the norm conservation ${\mathrm{Norm}}_{k}^{2}$ is presented in Figure 9. From the two figures, it is easy to see that the standard finite difference method does not perform as well as the nonstandard finite difference method (14). The norm conservation law is totally lost by the standard finite difference scheme (17).

The nonstandard finite difference method has better stability and better performance on conservation laws. Actually, the well-known numerical method, the Crank-Nicolson scheme,

$\begin{array}{c}i\frac{{u}_{j}^{k+1}-{u}_{j}^{k}}{\mathrm{\Delta }t}+{\alpha }_{k+\frac{1}{2}}\frac{\left({u}_{j+1}^{k}-2{u}_{j}^{k}+{u}_{j-1}^{k}\right)+\left({u}_{j+1}^{k+1}-2{u}_{j}^{k+1}+{u}_{j-1}^{k+1}\right)}{2{\left(\mathrm{\Delta }x\right)}^{2}}\hfill \\ \phantom{\rule{1em}{0ex}}+\frac{1}{4}{\beta }_{k+\frac{1}{2}}\left({|{u}_{j}^{k}|}^{2}+{|{u}_{j}^{k+1}|}^{2}\right)\left({u}_{j}^{k}+{u}_{j}^{k+1}\right)=0,\hfill \end{array}$

also has some flavor of the nonstandard finite difference method, i.e., discretizing the equation at half time-grid points. The Crank-Nicolson scheme for the nonlinear Schrödinger equations also preserves the conservation law very well ; however, it is not multi-symplectic for the NLSE, which is a multi-symplectic PDE. We also compare our method (14) with the Crank-Nicolson scheme here. From the ${l}^{2}$-errors shown in Figure 10, we find both of them work well. To compare these two approaches in terms of computational efficiency, we perform a set of numerical tests with different spatial and temporal mesh sizes. Figure 11 depicts the ${l}^{2}$-errors versus the computational time consumed by each approach to achieve those errors. One can observe that our method is competitive to the Crank-Nicolson method in this case. What is more, our method costs less computational time to get error levels less than 10−2.

In all, the numerical tests verify that the nonstandard finite difference variational integrator is capable of preserving characteristics of the original equations. It is accurate, efficient, and suitable for solving the nonlinear Schrödinger equations with variable coefficients (1).

## 5 Conclusion

In this paper, we have considered the nonlinear Schrödinger equation with variable coefficients. We have derived two discrete variational integrators based on the nonstandard finite difference methods, and have presented the corresponding discrete multi-symplectic structures via multi-symplectic form formulas. We have shown that it is feasible to combine the idea of discrete variational integrators and nonstandard finite difference methods to construct the multi-symplectic schemes for the NLS equation. The convergence and the stability of our methods have been discussed. The numerical experiments have shown the effectiveness and efficiency of these nonstandard finite difference variational integrators. Some comparisons with standard finite difference schemes have been made to demonstrate the features of the proposed integrators.

## References

1. Zakharov V, Manakov S: On the complete integrability of a nonlinear Schrödinger equation. Theor. Math. Phys. 1974, 19(3):551–559. 10.1007/BF01035568

2. Korepin V, Bogoliubov N, Izergin A: Quantum Inverse Scattering Method and Correlation Functions. Cambridge University Press, Cambridge; 1993.

3. Hua D, Li X, Zhu J: A mass conserved splitting method for the nonlinear Schrödinger equation. Adv. Differ. Equ. 2012., 2012: Article ID 85

4. Ruffing A, Meiler M, Bruder A: Some basic difference equations of Schrödinger boundary value problems. Adv. Differ. Equ. 2009., 2009: Article ID 569803. doi:10.1155/2009/569803

5. Simon M, Ruffing A: Power series techniques for a special Schrödinger operator and related difference equations. Adv. Differ. Equ. 2005, 2005(2):109–118.

6. Karakashian O, Makridakis C: A space-time finite element method for the nonlinear Schrödinger equation: the discontinuous Galerkin method. Math. Comput. 1998, 67(222):479–499. 10.1090/S0025-5718-98-00946-6

7. Delfour M, Fortin M, Payr G: Finite-difference solutions of a non-linear Schrödinger equation. J. Comput. Phys. 1981, 44(2):277–288. 10.1016/0021-9991(81)90052-8

8. Feit MD, Fleck JA Jr., Steiger A: Solution of the Schrödinger equation by a spectral method. J. Comput. Phys. 1982, 47(3):412–433. 10.1016/0021-9991(82)90091-2

9. Bridges TJ: Multi-symplectic structures and wave propagation. Math. Proc. Camb. Philos. Soc. 1997, 121(1):147–190. 10.1017/S0305004196001429

10. Hong J, Liu Y: A novel numerical approach to simulating nonlinear Schrödinger equations with varying coefficients. Appl. Math. Lett. 2003, 16(5):759–765. 10.1016/S0893-9659(03)00079-X

11. Hong J, Liu Y, Munthe-Kaas H, Zanna A: Globally conservative properties and error estimation of a multi-symplectic scheme for Schrödinger equations with variable coefficients. Appl. Numer. Math. 2006, 56: 814–843. 10.1016/j.apnum.2005.06.006

12. Bridges TJ, Reich S: Numerical methods for Hamiltonian PDEs. J. Phys. A, Math. Gen. 2006, 39: 5287–5320. 10.1088/0305-4470/39/19/S02

13. Reich S: Multi-symplectic Runge-Kutta collocation methods for Hamiltonian wave equation. J. Comput. Phys. 2000, 157(2):473–499. 10.1006/jcph.1999.6372

14. Bridges TJ, Reich S: Multi-symplectic integrators: numerical schemes for Hamiltonian PDEs that conserve symplecticity. Phys. Lett. A 2001, 284(4–5):184–193. 10.1016/S0375-9601(01)00294-8

15. Hilscher RS, Zeidan V: Symmetric three-term recurrence equations and their symplectic structure. Adv. Differ. Equ. 2010., 2010: Article ID 626942. doi:10.1155/2010/626942

16. Zemánek P: Rofe-Beketov formula for symplectic systems. Adv. Differ. Equ. 2012., 2012: Article ID 104. doi:10.1186/1687–1847–2012–104

17. Zheng B: Multiple periodic solutions to nonlinear discrete Hamiltonian systems. Adv. Differ. Equ. 2007., 2007: Article ID 41830. doi:10.1155/2007/41830

18. Chen J: A multisymplectic integrator for the periodic nonlinear Schrödinger equation. Appl. Math. Comput. 2005, 170: 1394–1417. 10.1016/j.amc.2005.01.031

19. Chen J, Qin M: Multi-symplectic Fourier pseudospectral method for the nonlinear Schrödinger equation. Electron. Trans. Numer. Anal. 2001, 12: 193–204.

20. Chen J, Qin M: A multisymplectic variational integrator for the nonlinear Schrödinger equation. Numer. Methods Partial Differ. Equ. 2002, 18(4):523–536. 10.1002/num.10021

21. Chen J, Qin M, Tang Y: Symplectic and multi-symplectic methods for the nonlinear Schrödinger equation. Comput. Math. Appl. 2002, 43: 1095–1106. 10.1016/S0898-1221(02)80015-3

22. Marsden JE, West M: Discrete mechanics and variational integrators. Acta Numer. 2001, 10: 357–514.

23. Marsden JE, Patrick GW, Shkoller S: Multisymplectic geometry, variational integrators, and nonlinear PDEs. Commun. Math. Phys. 1998, 199(2):351–395. 10.1007/s002200050505

24. Mickens RE: Application of Nonstandard Finite Difference Schemes. 1st edition. World Scientific, Singapore; 2000.

25. Mickens RE: Nonstandard finite difference schemes for differential equations. J. Differ. Equ. Appl. 2002, 8(9):823–847. 10.1080/1023619021000000807

26. Mickens RE: A nonstandard finite difference scheme for the diffusionless Burgers equation with logistic reaction. Math. Comput. Simul. 2003, 62: 117–124. 10.1016/S0378-4754(02)00180-5

27. Mickens RE: Dynamic consistency: a fundamental principle for constructing nonstandard finite difference schemes for differential equations. J. Differ. Equ. Appl. 2005, 11(7):645–653. 10.1080/10236190412331334527

28. Mickens RE: A numerical integration technique for conservative oscillators combining nonstandard finite-difference methods with a Hamilton’s principle. J. Sound Vib. 2005, 285: 477–482. 10.1016/j.jsv.2004.09.027

29. Mickens RE, Ramadhani I: Finite-difference scheme for the numerical solution of the Schrödinger equation. Phys. Rev. A 1992, 45(3):2074–2075. 10.1103/PhysRevA.45.2074

30. Vankerschaver, J, Liao, C, Leok, M: Generating functionals and Lagrangian PDEs. J. Math. Phys. (2012, submitted)

31. Ciarlet PG, Iserles A, Kohn RV, Wright MH Cambridge Monographs on Applied and Computational Mathematics. In Simulating Hamltonian Dynamics. Cambridge University Press, Cambridge; 2004.

32. Leok M, Zhang J: Discrete Hamiltonian variational integrators. IMA J. Numer. Anal. 2011, 31(4):1497–1532. 10.1093/imanum/drq027

33. Arenas AJ, González-Parra G, Chen-Charpentier BM: A nonstandard numerical scheme of predictor-corrector type for epidemic models. Comput. Math. Appl. 2010, 59(12):3740–3749. 10.1016/j.camwa.2010.04.006

34. González-Parra G, Arenas AJ, Chen-Charpentier BM: Combination of nonstandard schemes and Richardson’s extrapolation to improve the numerical solution of population models. Math. Comput. Model. 2010, 52(7–8):1030–1036. 10.1016/j.mcm.2010.03.015

35. Jordan PM: A nonstandard finite difference scheme for nonlinear heat transfer in a thin finite rod. J. Differ. Equ. Appl. 2003, 9(11):1015–1021. 10.1080/1023619031000146922

36. Malek A: Applications of nonstandard finite difference methods to nonlinear heat transfer problems. Heat Transfer - Mathematical Modelling, Numerical Methods and Information Technology 2011.

37. Ma, Q, Ding, D, Ding, X: A nonstandard finite-difference method for a linear oscillator with additive noise. Appl. Math. Inf. Sci. (accepted)

38. Manning, PM, Margrave, GF: Introduction to non-standard finite-difference modelling. CREWES Research Report 18 (2006)

39. Zhou S, Cheng X: Numerical solution to coupled nonlinear Schrödinger equations on unbounded domains. Math. Comput. Simul. 2010, 80: 2362–2373. 10.1016/j.matcom.2010.05.019

40. Zhou S, Cheng X: A linearly semi-implicit compact scheme for the Burgers-Huxley equation. Int. J. Comput. Math. 2010, 88(4):795–804.

41. Courant R, Friedrichs K, Lewy H: On the partial difference equations of mathematical physics. IBM J. Res. Dev. 1967, 11(2):215–234.

42. Che C, Xue X: Infinitely many periodic solutions for discrete second order Hamiltonian systems with oscillating potential. Adv. Differ. Equ. 2012., 2012: Article ID 50

## Acknowledgements

We are grateful to the editor and anonymous reviewers for their careful reading and many constructive suggestions which led to a great improvement of this paper. This work is supported by the NNSF of China (No. 11271101) and the NNSF of Shandong Province (No. ZR2010AQ021).

## Author information

Authors

### Corresponding author

Correspondence to Xiaohua Ding.

### Competing interests

The authors declare that they have no competing interests.

### Authors’ contributions

The authors declare that the study was realized in collaboration with the same responsibility. All authors read and approved the final manuscript.

## Authors’ original submitted files for images

Below are the links to the authors’ original submitted files for images.

## Rights and permissions

Reprints and Permissions

Liao, C., Ding, X. Nonstandard finite difference variational integrators for nonlinear Schrödinger equation with variable coefficients. Adv Differ Equ 2013, 12 (2013). https://doi.org/10.1186/1687-1847-2013-12

• Accepted:

• Published:

• DOI: https://doi.org/10.1186/1687-1847-2013-12

### Keywords

• variational integrators
• nonstandard finite difference
• multi-symplectic
• Schrödinger equation 