1. Introduction and Governing Equation
In this article, quintic B-spline Galerkin finite element method is applied to find the numerical solution of nonlinear Schrödinger (NLS) equation:
Equation (1) is called a self- focusing NLS equation (
) and allows for bright soliton solutions, as well as the defocusing NLS equation (
). 
 is a complex-valued function over the real line, 
 is a positive number and 
 = 
. The initial and boundary conditions are as follows:
Let
      
      where 
 and 
 are real functions. Substituting Equation (4) into Equation (1), we obtain the coupled partial differential equations
      
Finite element method is a powerful and established method used to approximate the solution of the partial differential equation. Besides finite element method, splines are also very useful to approximate the solution of partial differential equation with piecewise polynomial approximation. A finite element method with B-splines defines a new weighting approximate method and possesses computational advantages of B-splines and finite elements. Spline functions have been applied to develop numerical methods for the solution of nonlinear differential equations [
1,
2]. The analytical solution of the NLS equation is solved by using the inverse scattering method by Zakharov and Shabat [
3]. In 1974, Zakharov and Manakov proved that the NLS equation is completely integrable [
4]. Many researchers have worked on the solution of the partial differential equations by using collocation finite element method based on splines.
Spline-based numerical methods have been proposed by many researchers to obtain the numerical solution of nonlinear evolutionary problems. Mittal [
5] obtained the numerical solutions of the extended Fisher–Kolmogorov equation using the quintic B-spline collocation method. Saka and Dag [
6] presented the Galerkin finite element method based on quartic B-spline functions to obtain the numerical solution of the regularized long-wave (RLW) equation. Gardner [
7] proposed the Galerkin finite element method based on cubic B-spline to find the numerical solution of the RLW equation. Dogan [
8] presented the Galerkin method based on linear space finite elements to the numerical solution of the RLW equation. Kutluay and Ucar [
9] and Saka and Dag [
10] found the numerical solution of the coupled Korteweg–de-Vries (KdV) and Korteweg–de-Vries–Burgers (KdVB) equations using the Galerkin finite element method based on quadratic and quartic B-spline functions, respectively.
Gorgulu et al. [
11] used exponential B-splines Galerkin finite element method for solving the advection–diffusion equation. They developed a new algorithm by incorporating exponential B-spline functions with the Galerkin finite element method. This method gives satisfactory results. The exponential B-splines Galerkin method is also applied to solve the Burger’s equation and the results are comparable with the quartic B-spline collocation method [
2].
There are many non-spline numerical methods developed to solve the NLS equation; some of them are discussed here. Wang et al. [
12] proposed a finite difference method using an artificial boundary conditions on an unbounded domain. In this scheme, extrapolation operator is applied to deal with the nonlinear term. Moreover, Barletti et al. [
13] presented energy-conserving methods that can confer robustness on the numerical solution. Taleei and Dehghan [
14] presented a time-splitting pseudo-spectral domain decomposition method, whereby the original equation is split into linear and nonlinear equations. The Chebyshev pseudo-spectral collocation method is used to solve the linear equation in the spatial dimension and Crank–Nicolson scheme in the temporal dimension. In this study, overlapping multi-domain scheme is chosen. Univariate multi-quadrics (MQ) quasi-interpolation method is developed where the spatial derivatives are calculated from the derivative of the quasi-interpolation.
Some spline-based numerical methods are proposed to solve the NLS equation. Quartic spline approximation and semidiscretization were applied using finite difference method by Sheng et al. [
15]. Zlotnik and Zlotnik [
16] were the first to implement the finite element method using non-discrete transparent boundary conditions. Naturally, higher-order finite element method is observed to converge faster. The exponential B-spline with collocation method was presented by Ersoy et al. [
17]. The Crank–Nicolson scheme is used for time integration and exponential cubic B spline functions for the space integration. Dag [
18] proposed a Galerkin finite element method based on quadratic B-spline functions.
In this paper, numerical scheme for the Galerkin method with quintic B-spline is developed to solve the NLS equation. Numerical results are generated and compared with some of the afore-mentioned methods.
This paper is organized as follows. In 
Section 2, the fundamentals of quintic B-spline Galerkin method are introduced. In 
Section 3, the initial parameters to find the solutions of the system are calculated. Numerical results and test problems are discussed in 
Section 4 followed by the conclusion in 
Section 5.
  2. Quintic B-spline Galerkin Method
We consider a mesh 
 over the finite domain 
 divided uniformly by grid points 
 with 
. Quintic B-spline function is chosen as the weight and trial function. The quintic B-splines, 
, 
 at the grid points 
 forms a basis over the interval 
 as follows [
19]:
The global approximate solution, 
, for the NLS equation in Equation (1) is written in terms of the quintic B-spline function as
      
      where
      
The functions 
 and 
 are time-dependent parameters that are determined from the boundary and residual conditions. We make use of a local coordinate transformation
      
The quintic B-spline shape functions in Equation (6) can be defined in term of 
,
      
Since all other quintic B-spline functions are zero over the interval 
 except for 
 the approximation function in Equation (8) over the typical interval 
 can be written as
      
Applying the quintic B-splines definition in Equations (6)–(8), the nodal values of 
, 
 and its first and second derivatives at the knots 
 are found to be
      
When using the Galerkin method on Equation (5) with weight function 
, the weak form of Equation (5) over the finite interval 
  is written as
      
      where
      
By using the weight function 
 as quintic B-spline shape functions 
 and inserting the quantities 
 and 
 in Equation (10) into the integral Equation (12) instead of 
 and 
      where 
  the derivative with respect to time 
t.
The finite element in Equation (14) can be written in matrix form as
      
      where 
 and 
 are the element parameters. The element matrices 
, 
 and 
 are given by integrals
      
      where 
. The element matrices in Equation (16) are calculated as
      
The values of 
 are obtained by writing 
 and 
 in Equation (13). Using the values of 
 and 
 at the grid points 
 we obtain
      
Assembling all the elements in Equation (15) leads to the following system:
      where 
 and 
 are the global element parameters, and 
 and 
 are the global matrices with generalized kth row given by:
      where
      
Substituting the time derivatives of the parameters 
 and 
 by the finite difference approximation, 
 and 
 and parameters 
 and 
 by the Crank–Nicolson method, 
 and 
 into Equation (18) yields Equation (21).
      
      where 
 and 
 are unknown parameters. This final system consists of 
 equations and 
 unknown’s parameters. To find the unique solution of this system, we need to eliminate parameters 
, 
 and 
. Using the following boundary conditions
      
      we obtain
      
  3. The Initial Vectors
The initial parameters 
 and 
 can be determined using initial and boundary conditions to solve the system in Equation (21). The approximation can be re-written over the interval 
 at 
 as
      
      where all parameters 
 and 
 are determined. The functions 
 and 
 are required to satisfy the following relations at the nodal points 
:
	  
A pentadiagonal matrix system is obtained using the conditions in Equation (24). The initial vectors 
 and 
 can be calculated from the following matrix equations:
The above system can be solved by inverting the matrices in MATLAB. The approximate solution of  and  can be calculated from  and  using Equation (21).