Abstract

In this study, we implemented the well-known Crank–Nicolson scheme for the numerical solution of Schrödinger equation. The numerical results converge to the exact solution because the Crank–Nicolson scheme is unconditionally stable and accurate. We have compared the results for different parameters with analytical solution, and it is found that the Crank–Nicolson scheme is suitable for the numerical solution of Schrödinger equations. Three different problems are included to verify the accuracy, stability, and capability of the Crank–Nicolson scheme.

1. Introduction

Differential equations are widely used in many fields and are useful tools for analyzing dynamic phenomena. They also play a very important role in description of physical system into mathematical form. Diversities of physical system such as the flow of current through a conductor, the growth rate of the population of some vintage (species), the motion of a missiles, potential of uniform electric and magnetic field, the operation of the mixture, the spread of different diseases, and the pull of gravitational field of Earth are modeled by differential equation.

The model equations which are depending only on one independent variable are helpful in science and engineering field particularly in the field of classical mechanics. Some of the physical problems that can be modeled by using ordinary differential equations are Newton’s law of cooling, the amount of glucose absorbs by the body, spread of epidemics, population growth, simple harmonic motion, Newton’s second law of motion, and the motion of free falling bodies [13].

The physical system depending on more than one independent variable is commonly used to model the complex dynamic system in applied science such as biology and finance. Many experts frequently used partial differential equations to model various dynamic systems of their interest based on their knowledge and understanding. The parameters in the equation often have interesting scientific implications, but their values are frequently unknown and must be estimated from dynamic system having measurement errors [4, 5]. These types of equation have no analytical solution and can only be solved with numerical methods.

The Schrödinger equation is one of the basic equation of the quantum theory. It is also the fundamental equation of quantum mechanics, which deals with submicroscopic events [6]. Erwin Schrödinger, an Austrian physicist, developed this equation in 1926. The Schrödinger equation is an essential to quantum mechanics as Newton’s laws of motion to classical mechanics large-scale phenomena. The study of this equation plays an important role in modern physics [7]. It also describes how external forces affect the structure of probability waves (see [8]) that govern the motion of tiny particles. Schrödinger demonstrated the equation’s correctness by applying it to the hydrogen atom, which accurately predicted many of its properties. It has also applications in atomic, nuclear, and solid-state physics.

The Schrödinger equation has two forms, one of which explicitly includes time and so describes how a particle’s wave function would evolve over time. The wave function is often referred to as the time-dependent Schrödinger wave equation since it acts like a wave in general. The other is the steady-state Schrödinger equation. The time-dependent equation is used to describe progressive waves, which are applicable to free particle motion, whereas Schrödinger’s time-independent wave equation is used to describe standing waves. The particle’s potential energy does not always depend on time, and the potential energy is only a function of position. In such instances, the particle’s behavior is described by Schrödinger’s time-independent wave equation. [9, 10]. In general, the solutions to the time-dependent Schrödinger equation will explain the particle’s dynamical behavior in a manner comparable to Newton’s equation in classical physics [11, 12]. The nonlinear Schrödinger equation also appears in applied physics having important applications in various fields including plasma physics, nonlinear optics, and water waves [1315]. The nonlinear Schrödinger equation has been investigated by Yajima and Outi [16], Karpman and Krushkal [17], Satsuma and Yajima [18], Hardin and Tappert [19, 20], and Tappert [21] using various techniques. Mathematically, the Schrödinger equation can be written aswhere represents the imaginary part, is Planck’s constant having unit in joule second, is the mass of the particle, is the wave function define over space and time, is the Laplacian operator, and is the potential energy influencing the particle. This equation is the important equation of the quantum mechanics related to matter in terms of the wave-like properties of particles in a field.

The numerical treatment is an alternative approach to get the required solution. Some of the recent numerical contribution related to Schrödinger types equation are studied in [6, 22] by a stable Haar wavelet collocation method (HWCM). In [23], the cubic Schrdinger equation has been converted into system of PDEs by using that gives separate equations for the real and imaginary part which are then solved by HWCM. The two-dimensional Schrdinger equation has been solved by HWCM with stability analysis [24]. Different types of nonlinear equations are solved using the Kudryashov method [25] and quintic B-splines collocation methods [2629] including fractional Schrödinger equations [30], which have importance in applied mathematics and optics.

The main objective of this study is to solve the Schrödinger equation via finite-difference formula. This Schrödinger equation is converted into system of algebraic equations using the difference formula at each steps. This technique is easy, reliable, and efficient to solve Equation (1) with optical soliton solutions. Due to the real and imaginary part of the complex function , Equation (1) is strenuous to tackle numerically, and most of the methods do not work due to the presence of imaginary part of the solution, such as Radial basis function methods.

2. Crank–Nicolson Scheme for Schrödinger Equations

Crank and Phyllis Nicolson (1947) proposed a method for the numerical solution of partial differential equations known as Crank–Nicolson method. The beauty of the method is the convergent and stability of results for all finite values of , i.e., [31].

We also implement the Crank–Nicolson scheme to solve the time-dependent Schrödinger equation, which has a lot of applications in physics including optics and acoustics. The nondimensionilized form of Equation (1) can be written asunder initial condition,and the boundary conditions,where . If , then Equation (2) becomeswhere the parameter may be positive or negative. The complex-valued function depends on as well as on and is a prescribed smooth function which represents the initial state. If and , then Equation (5) becomes

Using the finite-difference approximation, Equation (6) can be written as

Rearranging, we obtainwhere , and . In Equation (7), we used the following initial and boundary conditions:

In general, the left side of Equation (7) contains three unknown and right side contains three known values of U for each values of .

Introducing mesh points for each such as , then Equation (7) gives simultaneous equations for the unknown values for each time level.

For each ,

The above system of equation can be written in matrix formwhere

Hence, we can solve Equation (8) for :

Similarly, evaluation for can also be made to get the required solution, where .

3. Result and Discussion

Various test problems have been explored in this section to demonstrate the accuracy and applicability of the method. The concerned numerical results are compared with the exact solution. For numerical simulation, we have used MATLAB R2013a software. To observe the performance of the current technique, we used the maximum absolute error norm , which is defined aswhere and represent the exact and numerical values, respectively, having real part and imaginary part .

Test Problem 1. Taking the following equation in the interval ,The initial and boundary conditions areThe analytical solution is .
The numerical results are compared to the analytical solution in Figure 1 for different values of collocation points, and it is obvious that increasing the number of collocation points improves the results. The findings are also shown in Figure 2 for various final times.
The numerical solutions are presented for different points inside the interval in Table 1. In Table 2, the numerical results are displayed for various time iterations, and in the last row of the table, the exact solutions are also mentioned for comparison purposes. The absolute errors decrease as the number of meshes increases in Table 3. It can be observed from the table that raising the value of has resulted in reasonably excellent accuracy.

Test problem 2. Considering again the Schrdinger equation,where the required information can be retrieved from the analytical solution . In Table 4, the maximum absolute errors are presented and the error decreases by increasing the collocation points . Results are compared with the analytical solution in Figure 3 and also calculated for various time in Figure 4. We also illustrated exact and numerical results with different input values in Figure 5.

Test problem 3. Finally, considering the following equation,with exact solution . In Figure 6, the numerical as well as the analytical solutions are presented in terms of both real and imaginary parts. It can be seen from this figure that the results easily approach to the exact solution for all the collocation points. Results are also calculated for various time in Figure 6.

4. Conclusion

In this study, optical soliton solutions for the linear Schrödinger equation are conveyed by using the well-known Crank–Nicolson method. For this motivation, we use the Crank–Nicolson method for finding the numerical solution of Schrödinger equation. Three different examples are studied to verify the numerical results. From the comparison of the numerical solution with exact solution, it can be concluded that the numerical solutions converge to the exact solution without any restrictions of and , but the accuracy increases by increasing the number of collocation point ; in other way, the results get accurate by decreasing and . The current approach can also be implemented to nonlinear Schrödinger equation and is the focus of our future task.

Data Availability

No data were used to support this study.

Conflicts of Interest

The authors declare that they have no conflicts of interest.

Acknowledgments

The authors express their appreciation to the Deanship of Scientific Research at King Khalid University for funding this work through a research groups program under grant number R.G.P.2/43/40. Also, the authors extend their appreciation to the Deputyship for Research & Innovation,Ministry of Education, in Saudi Arabia, for funding this research work through the project no.IFP-KKU-2020/10