We consider the nonlinear Schrödinger equation with variable coefficients (1),
i{u}_{t}+\alpha (t){u}_{xx}+\beta (t){u}^{2}u=0,
where u(x,t) is a scalar field function with two independent variables labeled by x and t and \alpha (t) and \beta (t) 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 {\u25b3}_{jk} is the threeordered triple ((j,k),(j+1,k),(j,k+1)) at (j,k). Let {X}_{\u25b3} be the set of all such triangles. The discrete jet bundle [23, 30] is defined as follows:
{J}_{\u25b3}^{1}Y:=\{({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1})\in {\mathbb{R}}^{3}:((j,k),(j+1,k),(j,k+1))\in {X}_{\u25b3}\},
which is equal to {X}_{\u25b3}\times {\mathbb{R}}^{3}.
Now, we use the nonstandard finite difference to define the discrete Lagrangian {L}_{d} on {J}_{\u25b3}^{1}Y, which is the discrete version of the Lagrangian density [30]. Here, for the nonlinear Schrödinger equation (1) with the Lagrangian
L(u,{u}_{t},{u}_{x})=\frac{1}{2}\alpha (t){u}_{x}{\overline{u}}_{x}+\frac{1}{4}i(u\overline{{u}_{t}}\overline{u}{u}_{t})\frac{1}{4}\beta (t){(u\overline{u})}^{2},
the discrete Lagrangian is defined as
\begin{array}{rcl}{L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1})& =& \frac{1}{2}\mathrm{\Delta}t\mathrm{\Delta}x(\frac{1}{2}{\alpha}_{k+\frac{1}{2}}\frac{{u}_{j+1}^{k}{u}_{j}^{k}}{\psi (\mathrm{\Delta}x)}\frac{{\overline{u}}_{j+1}^{k}{\overline{u}}_{j}^{k}}{\psi (\mathrm{\Delta}x)}\\ +\frac{1}{4}i(\frac{{u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j}^{k+1}}{3}\frac{{\overline{u}}_{j}^{k+1}{\overline{u}}_{j}^{k}}{\varphi (\mathrm{\Delta}t)}\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 (\mathrm{\Delta}t)})\\ \frac{1}{12}{\beta}_{k+\frac{1}{2}}({\left{u}_{j}^{k}\right}^{2}{\left{u}_{j+1}^{k}\right}^{2}+{\left{u}_{j+1}^{k}\right}^{2}{\left{u}_{j}^{k+1}\right}^{2}+{\left{u}_{j}^{k+1}\right}^{2}{\left{u}_{j}^{k}\right}^{2})),\end{array}
(5)
where {\alpha}_{k+\frac{1}{2}}=\alpha ({t}_{k+\frac{1}{2}}), {\beta}_{k+\frac{1}{2}}=\beta ({t}_{k+\frac{1}{2}}),
\varphi (\mathrm{\Delta}t)=\mathrm{\Delta}t+\mathcal{O}\left({(\mathrm{\Delta}t)}^{2}\right),\phantom{\rule{1em}{0ex}}\text{and}\phantom{\rule{1em}{0ex}}\psi (\mathrm{\Delta}x)=\mathrm{\Delta}x+\mathcal{O}\left({(\mathrm{\Delta}x)}^{2}\right).
(6)
We have obeyed the rules of constructing nonstandard finite difference schemes in Mickens’ papers [24–28] in the following ways. In the triangle {\u25b3}_{jk} with three points ((j,k),(j+1,k),(j,k+1)):

1.
The discrete firstderivative is represented by
\frac{du}{dt}\to \frac{{u}_{j}^{k+1}{u}_{j}^{k}}{\varphi (\mathrm{\Delta}t)},\phantom{\rule{2em}{0ex}}\frac{du}{dx}\to \frac{{u}_{j+1}^{k}{u}_{j}^{k}}{\psi (\mathrm{\Delta}x)},
where denominator functions \varphi (\mathrm{\Delta}t), \psi (\mathrm{\Delta}x) [22, 23] satisfy the conditions
\varphi (\mathrm{\Delta}t)=\mathrm{\Delta}t+\mathcal{O}\left({(\mathrm{\Delta}t)}^{2}\right),\phantom{\rule{2em}{0ex}}\psi (\mathrm{\Delta}x)=\mathrm{\Delta}x+\mathcal{O}\left({(\mathrm{\Delta}x)}^{2}\right).

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}{(u\overline{u})}^{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 EulerLagrangian equation
{D}_{1}{L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1})+{D}_{2}{L}_{d}({u}_{j1}^{k},{u}_{j}^{k},{u}_{j1}^{k+1})+{D}_{3}{L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j}^{k})=0,
(7)
where {L}_{d}({u}_{j1}^{k},{u}_{j}^{k},{u}_{j1}^{k+1}) and {L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j}^{k}) are defined similarly to (5) by
and
\begin{array}{rcl}{L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j}^{k})& =& \frac{1}{2}\mathrm{\Delta}t\mathrm{\Delta}x(\frac{1}{2}{\alpha}_{k\frac{1}{2}}\frac{{u}_{j+1}^{k1}{u}_{j}^{k1}}{\psi (\mathrm{\Delta}x)}\frac{{\overline{u}}_{j+1}^{k1}{\overline{u}}_{j}^{k1}}{\psi (\mathrm{\Delta}x)}\\ +\frac{1}{4}i(\frac{{u}_{j}^{k1}+{u}_{j+1}^{k1}+{u}_{j}^{k}}{3}\frac{{\overline{u}}_{j}^{k}{\overline{u}}_{j}^{k1}}{\varphi (\mathrm{\Delta}t)}\frac{{\overline{u}}_{j}^{k1}+{\overline{u}}_{j+1}^{k1}+{\overline{u}}_{j}^{k}}{3}\frac{{u}_{j}^{k}{u}_{j}^{k1}}{\varphi (\mathrm{\Delta}t)})\\ \frac{1}{12}{\beta}_{k\frac{1}{2}}({\left{u}_{j}^{k1}\right}^{2}{\left{u}_{j+1}^{k1}\right}^{2}+{\left{u}_{j+1}^{k1}\right}^{2}{\left{u}_{j}^{k}\right}^{2}+{\left{u}_{j}^{k}\right}^{2}{\left{u}_{j}^{k1}\right}^{2})).\end{array}
Substituting {L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}), {L}_{d}({u}_{j1}^{k},{u}_{j}^{k},{u}_{j1}^{k+1}), and {L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j}^{k}) into above equation (7), we arrive at a nonstandard finite difference variational integrator. We rearrange it as follows:
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 multisymplectic numerical schemes from the discrete variational principle are that they are naturally multisymplectic, and the discrete multisymplectic structures are also generated in the variational principle. Now, it is meaningful to show the multisymplectic 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 [30], the discrete boundary Lagrangian is given by
{L}_{\partial U}({u}_{\partial U}):=\underset{{u}_{j}^{k}}{ext}[{L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1})+{L}_{d}({u}_{j1}^{k},{u}_{j}^{k},{u}_{j1}^{k+1})+{L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j}^{k})],
(9)
where
{u}_{\partial U}:=({u}_{j+1}^{k},{u}_{j}^{k+1},{u}_{j1}^{k+1},{u}_{j1}^{k},{u}_{j}^{k1},{u}_{j+1}^{k1}).
Taking exterior derivative twice on both sides and knowing that {\mathbf{d}}^{2}{L}_{\partial U}\equiv 0, we have the discrete multisymplectic form formula of the following form [30]:
\sum _{n=1}^{3}\sum _{l=1;l\ne n}^{3}{\mathrm{\Omega}}_{L}^{n}\left({\mathrm{\Delta}}^{(l)}\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}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1}):={D}_{1}{L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j}^{k+1})\phantom{\rule{0.2em}{0ex}}d{u}_{j}^{k}.
Thus, for the nonlinear Schödinger equation with variable coefficients (1), the multisymplectic form formula of the scheme (8), based on the nonstandard finite difference methods, can be obtained by
where {\overline{\u25b3}}_{jk}=({u}_{j}^{k}+{u}_{j+1}^{k}+{u}_{j}^{k+1})/3, {\overline{\u25b3}}_{j1k}=({u}_{j1}^{k}+{u}_{j}^{k}+{u}_{j1}^{k+1})/3, and {\overline{\u25b3}}_{jk1}=({u}_{j}^{k1}+{u}_{j+1}^{k1}+{u}_{j}^{k})/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 multisymplectic, and its discrete multisymplectic structure is (11).
We now analyze the truncation error of the integrator (8). We choose \psi (\mathrm{\Delta}x)=\mathrm{\Delta}x and \varphi (\mathrm{\Delta}t)=\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}_{j1}^{k}}{{(\mathrm{\Delta}x)}^{2}}={\alpha}_{k}{{u}_{xx}^{k}}_{j}+\mathcal{O}\left({(\mathrm{\Delta}x)}^{2}\right)+\mathcal{O}(\mathrm{\Delta}t),\hfill \\ \frac{i}{6}(2\frac{{u}_{j}^{k+1}{u}_{j}^{k}}{\varphi (\mathrm{\Delta}t)}+\frac{{u}_{j1}^{k+1}{u}_{j1}^{k}}{\varphi (\mathrm{\Delta}t)}+2\frac{{u}_{j}^{k}{u}_{j}^{k1}}{\varphi (\mathrm{\Delta}t)}+\frac{{u}_{j+1}^{k}{u}_{j+1}^{k1}}{\varphi (\mathrm{\Delta}t)})=i{u}_{tj}^{k}+\mathcal{O}\left({(\mathrm{\Delta}t)}^{2}\right)+\mathcal{O}(\mathrm{\Delta}x),\hfill \\ \frac{1}{6}{\beta}_{k+\frac{1}{2}}{u}_{j}^{k}({\left{u}_{j+1}^{k}\right}^{2}+{\left{u}_{j}^{k+1}\right}^{2}+{\left{u}_{j1}^{k}\right}^{2}+{\left{u}_{j1}^{k+1}\right}^{2})+\frac{1}{6}{\beta}_{k\frac{1}{2}}{u}_{j}^{k}({\left{u}_{j+1}^{k1}\right}^{2}+{\left{u}_{j}^{k1}\right}^{2})\hfill \\ \phantom{\rule{1em}{0ex}}={\beta}_{k}{u}_{j}^{k}{\left{u}_{j}^{k}\right}^{2}+\mathcal{O}(\mathrm{\Delta}x)+\mathcal{O}(\mathrm{\Delta}t).\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}(\mathrm{\Delta}x+\mathrm{\Delta}t).
3.2 Square discretization for the nonstandard finite difference variational integrator
In this case, we denote a square at (j,k) with ordered quaternion ((j,k),(j+1,k),(j+1,k+1),(j,k+1)) 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:=\{({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j+1}^{k+1},{u}_{j}^{k+1})\in {\mathbb{R}}^{4}:((j,k),(j+1,k),(j+1,k+1),(j,k+1))\in {X}_{\mathrm{\square}}\},
which is equal to {X}_{\mathrm{\square}}\times {\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:
In this case, we have used the following rules of nonstandard finite difference methods. In the square {\mathrm{\square}}_{jk}:

1.
The discrete firstderivative 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 (\mathrm{\Delta}t)}=\frac{{u}_{j}^{k+1}{u}_{j}^{k}}{2\varphi (\mathrm{\Delta}t)}+\frac{{u}_{j+1}^{k+1}{u}_{j+1}^{k}}{2\varphi (\mathrm{\Delta}t)},\hfill \\ \frac{du}{dx}\to \frac{{u}_{j+1}^{k+\frac{1}{2}}{u}_{j}^{k+\frac{1}{2}}}{2\psi (\mathrm{\Delta}x)}=\frac{{u}_{j+1}^{k+1}{u}_{j}^{k+1}}{2\psi (\mathrm{\Delta}x)}+\frac{{u}_{j+1}^{k}{u}_{j}^{k}}{2\psi (\mathrm{\Delta}x)},\hfill \end{array}
where
\varphi (\mathrm{\Delta}t)=\mathrm{\Delta}t+\mathcal{O}\left({(\mathrm{\Delta}t)}^{2}\right),\phantom{\rule{2em}{0ex}}\psi (\mathrm{\Delta}x)=\mathrm{\Delta}x+\mathcal{O}\left({(\mathrm{\Delta}x)}^{2}\right).

2.
Nonlocal representations for u and {(u\overline{u})}^{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 \\ {(u\overline{u})}^{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}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j+1}^{k},{u}_{j}^{k})\hfill \\ \phantom{\rule{1em}{0ex}}=\mathrm{\Delta}x\mathrm{\Delta}t(\frac{1}{2}{\alpha}_{k\frac{1}{2}}\frac{{u}_{j+1}^{k\frac{1}{2}}{u}_{j}^{k\frac{1}{2}}}{\psi (\mathrm{\Delta}x)}\frac{{\overline{u}}_{j+1}^{k\frac{1}{2}}{\overline{u}}_{j}^{k\frac{1}{2}}}{\psi (\mathrm{\Delta}x)}\hfill \\ \phantom{\rule{2em}{0ex}}+\frac{i}{4}({u}_{j+\frac{1}{2}}^{k\frac{1}{2}}\frac{{\overline{u}}_{j+\frac{1}{2}}^{k}{\overline{u}}_{j+\frac{1}{2}}^{k1}}{\varphi (\mathrm{\Delta}t)}{\overline{u}}_{j+\frac{1}{2}}^{k\frac{1}{2}}\frac{{u}_{j+\frac{1}{2}}^{k}{u}_{j+\frac{1}{2}}^{k1}}{\varphi (\mathrm{\Delta}t)})\hfill \\ \phantom{\rule{2em}{0ex}}\frac{1}{16}{\beta}_{k\frac{1}{2}}({u}_{j}^{k1}{\overline{u}}_{j}^{k1}{u}_{j+1}^{k1}{\overline{u}}_{j+1}^{k1}+{u}_{j+1}^{k1}{\overline{u}}_{j+1}^{k1}{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}^{k1}{\overline{u}}_{j}^{k1})).\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 EulerLagrangian equation in this square discretization [22, 23, 30], which is defined by
After substituting the four discrete Lagrangian {L}_{d}({u}_{j}^{k},{u}_{j+1}^{k},{u}_{j+1}^{k+1},{u}_{j}^{k+1}), {L}_{d}({u}_{j1}^{k},{u}_{j}^{k},{u}_{j}^{k+1},{u}_{j1}^{k+1}), {L}_{d}({u}_{j1}^{k1},{u}_{j}^{k1},{u}_{j}^{k},{u}_{j1}^{k}), and {L}_{d}({u}_{j}^{k1},{u}_{j+1}^{k1},{u}_{j+1}^{k},{u}_{j}^{k}) into above equation (13), we have
This scheme is multisymplectic and symmetric with respect to (j+1,k) and (j1,k). Following the steps given in the above examples, we have the multisymplectic form formula
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 multisymplectic, and its discrete multisymplectic form formula is shown by (15).
Now, we discuss the truncation error for the nonstandard finite difference variational integrator (14). Here, we choose \psi (\mathrm{\Delta}x)=\mathrm{\Delta}x and \varphi (\mathrm{\Delta}t)=\mathrm{\Delta}t. By the Taylor series expansion, we have
\begin{array}{c}\frac{1}{2}({\alpha}_{k+\frac{1}{2}}\frac{{u}_{j+1}^{k+\frac{1}{2}}2{u}_{j}^{k+\frac{1}{2}}+{u}_{j1}^{k+\frac{1}{2}}}{{(\mathrm{\Delta}x)}^{2}}+{\alpha}_{k\frac{1}{2}}\frac{{u}_{j+1}^{k\frac{1}{2}}2{u}_{j}^{k\frac{1}{2}}+{u}_{j1}^{k\frac{1}{2}}}{{(\mathrm{\Delta}x)}^{2}})\hfill \\ \phantom{\rule{1em}{0ex}}={\alpha}_{k}{{u}_{xx}^{k}}_{j}+\mathcal{O}({(\mathrm{\Delta}x)}^{2}+{(\mathrm{\Delta}t)}^{2}),\hfill \\ \frac{i}{4\mathrm{\Delta}t}({u}_{j+\frac{1}{2}}^{k+1}+{u}_{j\frac{1}{2}}^{k+1}{u}_{j\frac{1}{2}}^{k1}{u}_{j+\frac{1}{2}}^{k1})={u}_{tj}^{k}+\mathcal{O}({(\mathrm{\Delta}x)}^{2}+{(\mathrm{\Delta}t)}^{2}),\hfill \\ \frac{1}{2}(\frac{1}{4}{\beta}_{k+\frac{1}{2}}{u}_{j}^{k}({\left{u}_{j+1}^{k}\right}^{2}+2{\left{u}_{j}^{k+1}\right}^{2}+{\left{u}_{j1}^{k}\right}^{2})+\frac{1}{4}{\beta}_{k\frac{1}{2}}{u}_{j}^{k}({\left{u}_{j+1}^{k}\right}^{2}+2{\left{u}_{j}^{k1}\right}^{2}+{\left{u}_{j1}^{k}\right}^{2}))\hfill \\ \phantom{\rule{1em}{0ex}}={\beta}_{k}{\left{u}_{j}^{k}\right}^{2}{u}_{j}^{k}+\mathcal{O}({(\mathrm{\Delta}x)}^{2}+{(\mathrm{\Delta}t)}^{2}).\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}({(\mathrm{\Delta}x)}^{2}+{(\mathrm{\Delta}t)}^{2}). To verify that the integrator has anticipated convergence accuracy, we investigate the numerical convergence order in our numerical experiments. See Section 4.