A Novel Method for Solving Nonlinear Schrödinger Equation with a Potential by Deep Learning ()
1. Introduction
It is well known that differential systems are nonlinear phenomena that describe mathematics, physics, biology, chemistry, transportation, finance and other fields. Solving these differential systems can make people understand these phenomena as much as possible, especially in the study of differential systems in finance, such as financial soliton solutions and financial rogue wave solutions. The peaks and troughs of these waves correspond to the inflection points of stock prices in the financial market. Obviously, it provides a theoretical mechanism for people to understand the phenomenon of the financial crisis. In recent years, many classical analytical and numerical methods have been developed in the field of computing. Although these methods give numerical solutions or analytical solutions of partial differential systems to a certain extent, such as Lie symmetry in analytical methods, this method first calculates the characteristic sequence set, then calculates the infinitesimal generator, and finally transforms the partial differential system into an ordinary differential system solution. The amount of calculation involved in this process is very large. Although there is the help of a computer only reduces the computational burden to a certain extent, and some problems must be calculated manually. Especially when the partial differential problem is transformed into an ordinary differential problem, although the order of the differential equation is reduced, some ordinary differential problems cannot be solved, and the final problem is still unsolved. Another example is the finite difference method in the classical numerical method, which divides the solution domain into differential grids, but with the increase of the complexity of the boundary, the grid intersections cannot all be guaranteed to fall on the boundary conditions; this method lacks flexibility on complex boundaries. Therefore, the solution of differential systems has always been a research hotspot in the scientific community.
In recent years, with the development and application of artificial intelligence technology in various neighborhoods, experts have turned their attention to artificial intelligence, and they have considered using neural networks to study differential systems. For example, I.E. Lagaris and A.C. Likas studied the solutions of ordinary and partial differential equations using artificial neural networks in 1998 [1]. In 2000, S. He and K. Reif investigated the solution of partial differential equations by multilayer neural networks [2]. In the same year, I.E. Lagaris et al. studied differential equations with irregular boundaries by neural networks [3]. In 2006, A. Malek and R.S. Beidokhti obtained numerical solutions for high-order differential equations by a hybrid neural network method [4]. In 2008, Y. Shirvany et al. studied the numerical solution of the nonlinear Schrödinger equation by feedforward neural networks [5]. In 2011, H. Chen et al. got the numerical solution of PDEs by integrated radial basis function networks [6]. In 2015, N. Yadav et al. got the solution to nonlinear elliptic boundary value problems by the neural network [7]. Lin Z. studied the multiphase flow problem by Physics-Aware deep learning [8]. D.A. Maturi and H.M. Malaikah solving nonlinear partial differential equation by Adomian decomposition method [9]. In 2018, Y. Yang et al. studied the solution of ordinary differential equations by Legendre neural network methods [10]. The breakthrough in using a neural network to solve differential equations is the physical information neural network(PINN) algorithm proposed by professor Raissi from Brown University in 2019 [11]. The physical information neural network algorithm does not need to assume the expression of the solution. It embeds the physical information and the initial-boundary value conditions in the neural network. Only a small number of random sample points on the initial-boundary value conditions can obtain the numerical solution of the differential equation. In view of these advantages, many scholars have studied them. Such as Z. Yan et al. studied forward and inverse problems of the Schrödinger equation with
-symmetric harmonic potential [12], the team of Y. Chen used the PINN method to study integrable systems [13] [14] [15] [16]. With the research on PINN, it is found that it does not converge on some complex problems, so many improvement methods are proposed. Such as Bayesian physics-informed neural networks (B-PINNs) [17], fractional Physics-Informed Neural Networks(fPINNs) [18], Parareal physics-informed neural network (PPINN) [19], Conservative physics-informed neural networks(CPINN) [20], nonlocal Physics-Informed Neural Networks(nPINNs) [21] and so on. Jagtap A. D. et al. added an adaptive activation function [22] to PINN and studied the inverse problem of differential equations. Subsequently, based on the work of Jagtap A. D., the team of Chen Yong used the PINN algorithm with an adaptive activation function to study the problem of solving differential equations and named it IPINN [23]. We also studied the rogue wave solution [24] and the soliton solution [25] using by IPINN method. Although the PINN algorithm and its improvement have made some achievements, the research of these new algorithms on differential systems is much more than that.
Recently, some scholars discovered an interesting thing in their research. It is found that the nonlinear wave phenomenon that occurs in the focused NLS equation also appears stably in the generalized defocusing NLS equation with an external potential [26], and they used PINN method to study the rogue wave solutions of the defocusing NLS equation with spatio-temporal potential. In this paper, we will use the IPINN algorithm to study defocusing NLS equation. It is known that the IPINN algorithm converges faster and has higher accuracy by comparing the results obtained by the IPINN algorithm and the PINN algorithm. The numerical experiments in this paper are performed on a computer with an 11th generation Intel(R) Core(TM) i7-11800H @ 2.30 GHz processor and 16.0 GB memory.
2. Rogue Wave Solution for Defocusing NLS Equation
The defocusing NLS equation with spatio-temporal potential [27] is written as
(1)
where
denotes the spatio-temporal potential and it can be written as
, q is the complex solution with the independent variables x, t of Equation (1). Li Wang and Zhenya Yan [27] proved for the first time that there is also an analytical rogue wave solution for the defocusing NLS equation. We assume
, the real part and imaginary part of
are
and
. Equation (1) can be inverted into
(2)
In this paper, we focus on solving the rogue wave solution of Equation (1) by applying an improved PINN algorithm. Suppose the network has 8 hidden layers and each hidden layer has 40 neurons. The real parts
and imaginary parts
of the network residual are defined as
(3)
Loss function is defined as
, where
(4)
where
and
denote randomly sampling
and
points on the initial-boundary value conditions. The exact solutions
,
,
,
are given by initial-boundary value conditions.
,
,
,
are the predicted values by improved PINN of
,
,
,
respectively. We obtain configuration points
of real part
and imaginary part
through the Latin hypercube sampling strategy [28]. The optimal weights
, bias
and activation function slopes
are obtained by automatic differentiation technology, Adam [29] and L-BFGS [30] algorithm to minimize the loss function
, and the numerical solution of Equation (1) is finally determined. We also give the deep neural network in Figure 1 and schematic of IPINN for the defocusing NLS equation in Figure 2.
The rogue wave solution [27] of Equation (1) is
, we use the IPINN algorithm to study the Cauchy problem of Equation (1), and assuming that the initial conditions are
,
. We divide
Figure 1. Schematic of deep neural network.
Figure 2. Schematic of Improved PINN for the defocusing NLS equation.
into 3000 points and
into 2000 points by MATLAB. The improved physical information neural network is composed of 8 hidden layers, and each hidden layer has 40 neurons. We sample
points from the initial-boundary value conditions by random sub-sampling and
points in the feasible region by Latin hypercube sampling strategy as our experimental training point. Without loss of generality, we initialize the scalable parameter as
. Hyperbolic tangent is chosen as an activation function. Finally, the training time is 8174.6736 seconds, the network residual is 1.6892622e−05, relative
norm errors of
,
, and
are 3.55117e−02, 5.829360e−02, 2.273524e−02 respectively. We show the fitting diagram of accuracy (blue solid line) and prediction(red dotted line) at different times
, the curve diagram of network residual changing with the number of iterations under the condition of the Adam optimization algorithm, and the density diagram of accurate rogue wave and predicted rogue wave in Figure 3.
(a)(b)(c)
Figure 3. We choose a neural network with 8 hidden layers, each with 40 neurons, and choose 1800 points on the initial boundary value condition. (a) shows the density diagrams and predicted numerical solution at
; (b) shows the variation of the loss function of the network with the number of iterations when Adam optimization algorithm is adopted; (c) represents the exact density diagram and predicted density diagram of rogue waves of Equation (1).
In order to study the influence of the number of hidden layers and the neurons in each layer on the relative
norm errors of
, we select the training point
,
, the number of hidden layers are 2, 4, 6 and 8 respectively, and the neurons in each hidden layer are 10, 15, 20, 25 and 30 respectively, as is shown in Table 1. According to the data from Table 1, relative
norm errors of
of neurons with fixed hidden layers do not decrease monotonically with the increase in the number of hidden layers. When the hidden layer is fixed, the norm error does not decrease monotonically with the increase of neurons. Therefore, we know that the norm error is affected by the number of hidden layers and neurons. At the same time, we study the influence of sampling points
and
on the relative
norm errors of
. We fix the hidden layer of the improved physical information neural network as 8 and each layer has 10 neurons, then the corresponding relative
norm errors of
value is given when we assume that sampling points
and
, as is shown in Table 2. When
is fixed, the relative
norm error of
decreases with the increase of
. However, when
, the relative
norm error of
does not decrease with the increase of
. When
, the relative
norm error of
decreases with the increase of
, which also shows that the boundary sampling points and regional configuration points jointly affect the relative
norm error of
.
In order to understand the influence of regional configuration points
on the predicted rogue wave solution, we fixed the improved physical information neural network, which has 8 hidden layers and each layer contains 10 neurons.
Table 1. The rogue wave solution of Equation (1): The relative
-norm error of
when taking the
with different network layers and different numbers of neurons per hidden layers.
Table 2. The rogue wave solution of the Equation (1): We chose the neural network with 8 hidden layers, one input layer and one output layer, and each hidden layer has 10 neurons. The relative
-norm error of q was studied under different
,
and
conditions.
We set the initial-boundary value sampling point 300. From Figure 4, we can see that with the increase in regional configuration points
, the fitting effect of the exact rogue wave solution and predicted rogue wave solution is getting better and better. In order to study the influence of sampling point
on the relative norm error of
of the improved physical information neural network, when the fixed network has 8 hidden layers and their neurons (10, 15, 20, 25, 30), the corresponding norm error is shown in Figures 5(a)-(e). From the figure, we can see that the relative norm error (
) roughly shows a decreasing trend with the increase of
.
Finally, we compare the performance of PINN and IPINN in solving rogue wave solutions. The two algorithms have the same hidden layer and its neurons, and both have the same random sampling points 300 from initial-boundary value condition. The network residuals is 0.009715796 and relative norm error of
are 9.229974e−01, 1.630527e+00, 3.833559e−01 respectively of PINN. The network residuals is 8.936103e−05 and the relative norm error of
are 3.415088e−02, 6.299041e−02, 2.121869e−02 respectively of IPINN. It is known from the experimental data that the IPINN has a better fitting effect on the exact solution and prediction solution, as shown in Figure 6(a) & Figure 6(b). At the same time, the curve of the network residual corresponding to the Adam algorithm and the L-BFGS algorithm of the two
methods with the number of iterations is given, as shown in Figure 6(c) & Figure 6(d). It is known from the curve that whether it is the Adam optimization algorithm or the L-BFGS optimization algorithm, the IPINN algorithm has faster convergence and higher accuracy.
3. Conclusion
In this paper, we mainly use the IPINN algorithm to solve the rogue wave solution of the defocusing NLS equation and study the influence of the network’s hidden layer and its neurons on the relative norm error value of
. At the same time, in order to illustrate that IPINN has better network performance than PINN, such as faster convergence and higher precision. The experimental results show that IPINN has better potential in solving high-order and nonlinear differential equations. Whether to apply it to more complex high-order differential equations or adding conservation laws or more integrable system properties to the IPINN algorithm to expand IPINN algorithm are our research content in the future.
Acknowledgements
This work is supported by University Experimental Technology Team Construction in Shanghai.
Availability of Data and Code
The datasets generated or analysed during the current study are available from the corresponding author upon reasonable request.