#### Abstract

The Laplace-Adomian Decomposition Method (LADM) and Homotopy Perturbation Method (HPM) are both utilized in this research in order to obtain an approximate analytical solution to the nonlinear Schrödinger equation with harmonic oscillator. Accordingly, nonlinear Schrödinger equation in both one and two dimensions is provided to illustrate the effects of harmonic oscillator on the behavior of the wave function. The available literature does not provide an exact solution to the problem presented in this paper. Nevertheless, approximate analytical solutions are provided in this paper using LADM and HPM methods, in addition to comparing and analyzing both solutions.

#### 1. Introduction

The Schrödinger equation is often encountered in many branches of science and engineering, including quantum mechanics, nonlinear optics, plasma physics, hydrodynamics, and superconductivity. It is a mathematical partial differential equation used to describe the motion and behavior change of the physical system over time. In classical mechanics, it plays the role of Newton’s law and conservation of energy. In quantum mechanics, we describe systems using wave function. The Schrödinger equation has two “forms”; one is the time-dependent wave equation that describes how the wave function of a particle will evolve in time. The other is the time independent wave equation in which the time dependence has been “removed”; it describes what the allowed energies are of the particle [1, 2].

In recent years, a considerable amount of research focused on finding analytical solution to the Schrödinger equations using various methods, among which are Adomian Decomposition Method [3–8], Elzaki decomposition method [9], Variation Iteration method [10], Nikiforod–Uvarov (NV) method [11], and Homotopy Perturbation Method [3, 4, 12–16]. Additionally, Borhanifar [17] solved the nonlinear Schrödinger and coupled Schrödinger equations with a differential transformation method. Shidfar and Molabahrami [18, 19] investigated the d-dimensional Schrödinger equation with a power-law nonlinearity, Zhenga et al. [20] solved the time-dependent Schrödinger equation using homotopy analysis method (HAM) and the Adomian decomposition technique (ADM), and Amador et al. [21] solved nonlinear Schrödinger equations with variable coefficients using Riccati equations and similarity transformations. Finally, Khan and Wu [22] applied Homotopy perturbation transform method (HPTM) to solve nonlinear equations; HPTM uses the Homotopy Perturbation Method together with the Laplace transformation to solve the nonlinear equations. Also, Hosseini et al. [23–27] investigated various forms of the nonlinear Schrödinger equation (NLSE).

This paper is organized in several sections. The HPM method is briefly explained in “Homotopy Perturbation Method”. Then the LADM model is described in the “Laplace-Adomian Decomposition Method”. Then in the “One-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator”, the solution to the One-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator equation in its nonlinear version is provided with a numerical example. Similarly, the solution of the Two-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator is presented in the “Two-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator”. Finally, in the “Conclusion”, we summarize our findings and present our final remarks. Since the exact solution to this problem is not available, we compare our numerical results with the results obtained using Mathematica function NDsolve.

#### 2. Laplace-Adomian Decomposition Method

The Adomian Decomposition Method (ADM) is a method to solve differential equations by expressing the analytic solution in terms of a series. The method separates the linear and nonlinear parts of a differential equation. The nonlinear part can be expressed in terms of what is called Adomian Polynomials [28–30]. The initial condition and the terms that contain the independent variables will be used as the initial approximation. Then by means of a recurrence relation, it is possible to find the terms of the series that give the approximate solution of the differential equation.

The Laplace transform is an integral transform that is powerful and useful technique to solve differential equations, which transforms the original differential equation into an algebraic equation.

Below are the definitions of Laplace transform and inverse Laplace transform.

*Definition 1. *Given a function defined for all , the Laplace transform of is the function defined by

and the inverse Laplace transform is defined as follows.

*Definition 2. *Given a continuous function , if , then is called the inverse Laplace transform of denoted .

The Laplace-Adomian Decomposition Method (LADM) was first introduced by Suheil A. Khuri [31] and has been effectively used to find solutions to general nonlinear equations. The added value of this method utilizes the two methods (Laplace Transform and ADM) to obtain the solution for nonlinear equations. Consider the following equation:

where and , and are Linear operators, and is a nonlinear operator.

Laplace-Adomian Decomposition Method consists of applying Laplace transform to both sides of (2) and yields

From Laplace transform of first derivative and substituting the initial condition, we get

Next step is replacing the wave function by an infinite series of terms to be determined later as per the Adomian Decomposition Method (ADM):

and the nonlinear terms are replaced by the series:

where ’s are the Adomian Polynomials, defined by

Substituting (5) and (6) into (4) and taking inverse Laplace transform, we get

From (8), one can obtain

#### 3. Homotopy Perturbation Method

The Homotopy Perturbation Method (HPM) is a special case of the homotopy analysis method (HAM) [32]. HPM was presented by He [33] in 1999, and is considered as a strong and efficient technique in finding an exact or an approximate analytical solutions to nonlinear equations.

To demonstrate the idea of Homotopy Perturbation Method, we consider the general form nonlinear differential equation with initial conditions of the form [3]:

where and are linear and nonlinear operators respectively, is an analytic function, is the boundary of the domain , and denotes the differentiation of with respect to .

To apply the Homotopy concept to (10), we construct a suitable Homotopy,that satisfieswhere is a parameter which increases from to , represents all real numbers, and is an initial approximate solution of (10), which satisfies the boundary conditions (11). Clearly, from (13) we have

Now, when the value of changes from to , changes from to . According to the concept of topology, this is called deformation and and are called homotopy. If we consider as a small parameter, then applying the original perturbation technique method, we can assume that the solution of (13) can be defined as a power series in :

Then the solution to (10) is obtained as approaches :

The series in (17) is convergent for most cases, the rate of convergence however is dependent on the nonlinear operator [33].

In the following two sections we apply the above two methods to solve the One- and Two-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator.

#### 4. One-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator

The nonlinear Schrödinger equation with harmonic oscillator described by with identical initial condition can be expressed as [20]

where is the wave function, is the mass of the particle, is the imaginary unit to describe motion, and spring constant.

##### 4.1. LADM

In this section we solve the One-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator (18) using LADM method by first applying Laplace transform to both sides of the equation (18) as follows:

From the properties of Laplace transform of the first derivative and substituting the initial conditions (19), (20) becomes

Now substituting (5) and (6) into (21), we get

By applying inverse Laplace transform to (22) and taking into consideration

we have

where are the so called Adomian Polynomials of to replace and is the conjugate of .

The Adomian Polynomials can be calculated using (7):

Now, using (24), we get

Therefore, the solution is given by

##### 4.2. HPM

In this section we apply the Homotopy Perturbation Method to obtain a solution to (18). Consider the following homotopy:where , , and is the complex conjugate of . Suppose that the series solution of (28) and its conjugate have the following forms:andand hence, the solution to (18) is

Substituting (29) and (30) into (28) and equating the coefficients of powers, we have

We finally obtain the general solution of (18) given the recurrence relation for

The first few terms of the solution are calculated as follows:

and hence, the solution to (18) is

The graphs of the one-dimensional wave function are shown in Figures 1, 2, 3, and 4. Figure 1 is the graph of the third order approximation for the solution of the real part of the wave function obtained by LADM and HPM. Figure 2 is the graph of the wave function obtained using Mathematica function NDsolve. Figures 3 and 4 show the imaginary part of the solution. We use in the calculations.

#### 5. Two-Dimensional Nonlinear Schrödinger Equation with Harmonic Oscillator

In this section we look at a particle movement in two dimensions, the nonlinear Schrödinger equation with harmonic oscillator when a particle moves in two dimensions with the initial condition can be written as [20]

##### 5.1. LADM

Similar to the one-dimensional, after applying Laplace transform to (36), substituting the initial condition, and making the subject, we have

Replacing the wave function and in (38) by the infinite series below,respectively,and

we get

Applying inverse Laplace transform, we have

and thus

Solving the above system of equations, we get

Therefore, the approximate solution can be written as

##### 5.2. HPM

In this section we apply the HPM to solve the two-dimensional equation; first we construct the following suitable homotopy:Using the same steps as in the one-dimensional case, we get the following system of equations:

The general term can be obtained as follows:

Therefore, we can now evaluate the solution to the above system of differential equations:

Hence, the approximate solution to (36), (37) is

The graphs of the solution of the two-dimensional wave function are shown in Figures 5, 6, 7, and 8. Figure 5 is the graph of the third-order approximation for the solution of the real part of the wave function obtained by LADM and HPM. Figure 6 is the graph of the wave function obtained using Mathematica function NDsolve. Figures 7 and 8 show the imaginary part of the solution. We use and in the calculations.

#### 6. Conclusion

In this paper, homotopy perturbation and Laplace-Adomian decomposition methods have proven successful when used to find the approximate solution to the nonlinear Schrödinger equation with harmonic oscillator in one and in two dimensions. Our theoretical analyses have shown that both methods have given equivalent analytical approximate solutions successfully and efficiently. Comparison between HPM and LADM shows that although the results of these two methods when applied to solve the Schrödinger equation are in good agreement, HPM can overcome the difficulties arising in calculation of Adomian’s polynomials. The solutions have been obtained and plotted for the real and imaginary wave function with the effect of adding the harmonic oscillator to the nonlinear Schrödinger equation in one and in two dimensions. HPM and LADM methods numerical results are in agreement with the solution obtained using Mathematica function NDsolve.

#### Data Availability

No data is involved in this research.

#### Conflicts of Interest

The authors declare no conflicts of interest.