# Application of the Finite Difference Method to the 1-D Schrödinger Equation

by Trevor Robertson

University of Massachusetts Dartmouth

Abstract

The time-dependent Schrödinger equation (TDSE) is a fundamental law in understanding the states of many microscopic systems. Such systems occur in nearly all branches of physics and engineering, including high-energy physics, solid-state physics, and semiconductor engineering, just to name a few. A robust and efficient algorithm to solve this equation would be highly sought-after in these respective fields. This study utilizes the well-known method for solving the TDSE, the finite difference method (FDM), but with an important modification to conserve flux and analyze the 1-D case given well-known potentials. Numerical results that agree with theoretical predictions are reported. [3] It becomes evident, however, that solving the TDSE still involves challenging problems of scaling to higher dimensions and refined grids. This study shows that it is a promising, intuitive, and accurate method for linear domains over lower dimensions with arbitrary potentials. [7]

Introduction

The Schrödinger equation serves as the quantum analog to the classical cases of Newton’s laws of motion and conservation laws. On the macroscopic scale, the classical laws of Newton as well as the modern ideas of Einstein provide a sound understanding. However, delving into the microscopic realms, the laws governing interactions are dominantly quantum mechanical. Given a set of initial conditions, the Schrödinger equation can predict the dynamical processes of a particle as it propagates through space and time. The wavefunction Ψ(x,t) embeds the information of the particle system throughout its evolution.[3] Solving for Ψ(x,t) can allow for the extraction of any physically meaningful observables that can be measured in a lab, such as the flux. Take the particle in an infinite potential well, for example. Quantum mechanically, the wavefunction is a series of sinusoidal waves that are zero at the walls (boundaries). Classically, these waves correspond to fundamental modes of vibration on a string.

Solutions to the TDSE require a robust and efficient algorithm capable of dealing with a sufficient domain of propagation over reasonable time scales. The need for such stable and efficient methods is a growing trend both in physics and in general scientific computing. It is well known that FDM is such an algorithm capable of dealing with the TDSE. Other, more sophisticated, methods include algorithms such as the finite element method, spectral methods, and meshless alternatives.[4]  Such alternatives have advantages over the standard finite difference method, which can be rigid or inefficient in its basic form.[7] It is also well known that the FDM is more difficult to apply with more arbitrary meshes of higher dimensions.[10] This bottleneck of the finite difference method must continue to be optimized for further application. The following study proposes an analysis of the 1-D TDSE using a modified approach of the FDM.

Solving the Schrödinger equation for arbitrary potentials is a valuable tool for extracting the information of a quantum system. In the following, an algorithm is presented that can extract probability density, as well as the expectation values of position, momentum, energy, and flux. As a test study, it should also be able to replicate results from numerically known potentials such as the simple harmonic oscillator, as well as potential wells and barriers.[4] Atomic units (a.u.) will be used throughout unless otherwise noted.

Computational Method

Since the wavefunction is composed of both real and imaginary parts, it is beneficial to deal with both components separately. Doing this simplifies the equations and creates a recursive relationship that can easily be integrated into the program.

〖(1.1)  Ψ〗_n (t)=R_Ψn+iI_Ψn

This splitting of the wavefunction will be crucial in constructing a flux-preserving system compatible with FDM, and is the first advantage of our modified approach. In the following, subscripts will represent the given location of the operation (n), while superscripts will be the given time step this operation is carried over (m). Using the atomic units system, the TDSE can be formulated using the FDM as follows:[7]

(1.2)   (dΨ_n (t))/dt=i/(2h^2 ) (Ψ_(n+1) (t)-2Ψ(t)+Ψ_(n-1) (t) )-iU_j (t)Ψ_j (t)

Converting a partial differential equation into a set of solvable ordinary differential equations reduces the system to an initial value problem. This is known as the method of lines.[5] Setting a domain of integration makes solving these ODEs straightforward, but it is important to recognize that as the evolution of the state occurs, the normalization of the wavefunction must also be preserved. Otherwise, physical properties of the system, such as flux and energy, can become unphysical. For this reason, we will use the leapfrog method, which is part of a family of symplectic solvers for dealing with numerical solutions of Hamiltonian systems.[5] This preserves the system to second order accuracy similar to other methods such as the midpoint method; but it is known from its Jacobian to preserve areas when going from one transformation space to another.[9] Now applying Equation (1.1) to this set of ODEs gives the following coupled relationship we can use to solve the TDSE.

(1.3a)  (dR_Ψn)/dt=-1/(2h^2 ) I_(Ψn-1)+(1/h^2 +U_j ) I_j-1/(2h^2 ) I_(Ψn+1)→f_n ({I_( Ψ) },t)(1.3b)  (dI_Ψn)/dt=-1/(2h^2 ) R_(Ψn-1)-(1/h^2 +U_j ) R_j+1/(2h^2 ) R_(Ψn+1)→ g_n ({R_( Ψ) },t)

Here the f_n and g_n denote that the right-hand sides are functions of purely imaginary or real parts of the wave function, respectively. The derivatives of both the real and imaginary parts of the system rely on one another, as is the applicability of leapfrog integration. This form of the coupled Schrödinger equation allows for the stepping forward of the TDSE in time, and is in a suitable format for symplectic integrators such as the leapfrog method.[7] Such a method is shown to conserve flux[7] and is a crucial modification to the standard FMD method in this study;it is thus a second advantage of the modified approach. From this evolution sequence the Schrödinger equation can be solved obtain any expectation value of the system can be obtained.

The quantity |Ψ(x,t)|^2 gives the probability of finding a particle. Given that a mesh was made between two boundary points (a, b), by integrating across all space with respect to that mesh one would expect the probability to be unity. This basic statement in probability states that if we impose a particle within space, if we scan all of space (the entire mesh) the particle will be found within that space. Otherwise there is a clear contradiction to our initial assumption of imposing a particle within that space. Given the probability distribution P_n^m (Eq 1.4a), expectation values (Eq 1.4b – 1.4f) can be obtained with a weighted average of appropriate observables as

(1.4a) P_n^m (x,t)= |Ψ_n^m |^2 (1.4b)〈x〉= 〈(Ψ_n^m )^* |x_n^m |(Ψ_n^m )〉= 〖∫_a^b dx[(R_Ψn^m )〗^2+(I_Ψn^m )^2] x_n^m (1.4c)〈p〉=

〈(Ψ_n^m )^* |p_n^m |(Ψ_n^m )〉=∫_a^b dx[R_Ψn^m  (dI_Ψn^m)/dx- I_Ψn^m  (dR_Ψn^m)/dx](1.4d)〈T〉= 〈(Ψ_n^m )^* |(p_n^m )^2/2m  |(Ψ_n^m)〉=1/2 ∫_a^b dx[((dR_Ψn^m)/dx)^2+((dI_Ψn^m)/dx)^2 ](1.4e)〈U〉=

〈(Ψ_n^m )^* |U_n^m |(Ψ_n^m )〉= ∫_a^b dx〖[(R_Ψn^m )〗^2+(I_Ψn^m )^2]U_n^m (1.4f) J_n^m=  [R_Ψn^m  (dI_Ψn^m)/dx- I_Ψn^m  (dR_Ψn^m)/dx]

where a and b are the respective left and right boundary points. Equations (1.4b – 1.4f) give the expectation values of position, momentum, kinetic energy, potential energy, and flux, respectively.

Although the algorithm can take any wavefunction and construct any potential, the following analysis will be focusing on the validation of the program. As is standard with partial differential equations such as the TDSE, boundary conditions as well as initial conditions must be specified in order to simulate an event.[6] The domain for the following analysis will be a span from -30 a.u. to 30 a.u. with 1024 grid points; this finds a balance between time efficiency as well as functional accuracy. This study  uses an initial Gaussian wave packet with the starting position at -5 a.u.

〖(1.5)Ψ〗_m^0=(σ√π)^(-1/2) e^((-(x-x_0 )^2)/(2σ^2 )+ik_0 x); k_0=2π/λ x_0=Center of Gaussian; σ=width of gaussian

Relationships that contain a recursive relationship such as the FDM are known to suffer from stability problems depending on the set of parameters. Therefore, stability analysis must be performed to find suitable parameters. One such measure is the von Neumann stability analysis of a system.[7] Under the space discretized leapfrog method, the stability criterion yields

(1.6)Δt≤λh^2

where h is the distance separation between two points on a mesh,[7] where λ is a coefficient dependent on the potential being used, and where 0<λ<1. For U=0, λ=1. For other potentials used in this study, the data show that the method is stable if λ=1/2.[7]

Another parameter that must be tested is how fast the initial wave packet can move within a certain time window. Given the mesh used for this analysis, the model begins to break down when k_0> 10. However, given a more refined mesh the algorithm can handle faster initial momentum of the wavefunction. This is an issue of resolution, as when the wavefunction gets too fast, the change in time (Δt) cannot keep up with the mesh size.[7] It can be shown that as the domain becomes more refined, the separation between points directly correlates to a higher resolution.

Results and Discussions

The first potential this study tests the algorithm with is the simple harmonic oscillator (SHO). This potential paints a very intuitive picture of the wave function’s evolution, similar to the classical case as we shall see. For the simple harmonic oscillator, the wave function will start with 0 initial momentum, making k_0= 0.

Fig 1: The integrated probability density (normalization) as a function of time.

Fig 2: The expectation value of position () for the simple harmonic oscillator as a function of time

Fig 3: The expectation value of momentum () for the simple harmonic oscillator starting as a function of time with zero inital given momentum.

Fig 4: The expectation values of kinetic engery (blue), potential energy (orange), and total energy (green) as a function of time.

Fig 5: The flux as a function of a space and time () for the simple harmonic oscillator.

Fig 6: A cross section of Fig 5 at point x = 0, the center of a simple harmonic oscillator, as a function of time.

The above figures were run for a sufficient time (typically 50,000 steps) to analytically extract all expectation values from Equations (1.4a-1.4f). They are for the simple harmonic oscillator with a potential of V(x)=  1/2 x^2. A fundamental statement of quantum mechanics is that if a particle is confined within a given region, the probability of finding the particle in that region is 1. For the SHO this is clearly the case (Fig 1) given the scale is +1 with a maximum deviation from one of 3.5e-5. The respective values for position (Fig 2), momentum (Fig 3), energies (Fig 4), and flux (Fig 5 and Fig 6) also seem to intuitively follow the expectation values of a Gaussian wave packet oscillating back and forth between two maximum potential values. Given that the initial conditions for this system were an initial position of -5 and no initial momentum, the figures follow this condition elegantly. Thus, the initial points of both the position and momentum graphs start at -5 and 0 respectively and follow the features of a typical oscillator.[5]

A slight fluctuation can be seen in the total energy from Fig 4, which should be constant because of energy conservation. The leapfrog method predicts such oscillations, but on a much smaller scale.[9] The leapfrog method conserves energy within a small range so it remains bounded.[8] Upon closer examination, it can be seen in Fig 4 that the amplitude of kinetic energy is less than that of the potential energy by a small amount, causing the total energy to fluctuate. Because the extraction of kinetic energy involves the derivative of the wavefunction (Eq 1.4d), it is more sensitive to inaccuracies in the wavefunction. These fluctuations can be attributed to the grid size, which is not yet sufficiently small. The investigation exhibits the convergence rate of the kinetic energy with respect to the grid size, and whether a more robust method of calculating the kinetic energy is needed.

Probability flux of the simple harmonic oscillator describes the particle flow through a given point. As expected, the surface of the flux (Fig 5) show oscillations between ± 5, which was the initial condition of this oscillator. Had the wavefunction started with some initial velocity (i.e k_0  ≠ 0) the evolution of the flux would begin to broaden before reaching constant oscillation again. When viewed across a cut at x=0 (Fig 6), the flux changes from positive to negative with equal areas under the peaks, consistent with the conservation of probability (Fig 1) in the periodic motion. This shows that our modified approach can reliably calculate the flux which gives rise to experimentally observable quantities such as scattering amplitudes.

The simple harmonic oscillator is a bound system regardless of the energy of the particle. In realistic potentials, particles are not always bound. The same method can also be applied to a different potential, namely the potential barrier. Rather than having a purely real wave function with zero initial momentum, the following wave function contains both real and imaginary initial conditions with a k_0=5.

Fig 7: The flux of an incident wave packet encountering a barrier

with potential 15 (a.u.). The flux is taken at x = 5.

Fig 8: The tranmission coefficient for the same potential as in Fig 7.

Figures 7 and 8 show the flux and transmission coefficient, respectively, for a potential barrier of width 3 and height 15. Given that flux must be taken over a particular region, the region the figures are expressing is when x = 5, directly after the barrier.

A common issue with all numerical solutions in open systems is how to treat boundary conditions when the solution reaches the outermost region of its domain.[7] This current algorithm uses a periodic boundary condition, meaning that once it hits one boundary, it moves instantaneously (wraparound) to the opposite side of the boundary. This is problematic for flux extraction because if left unchecked with a small domain, the wave function will wrap around and interfere with data collection. Towards the end of Fig 7 we can see another spike in the flux; this is due to the “background” of the wave function wrapping around and beginning to interfere with itself. One way to delay the onset of the spike is to make a sufficiently large domain such that the wraparound occurs well after the initial wave has passed. The disadvantage is the increased number of grid points, and hence increased computation time. Instead, we choose to maintain the domain size but to integrate the flux before the artificial spike arrives. This requires careful selection of the time window so it is robust and reproducible.

Fig 8 shows the integrated flux through this barrier. It represents the fraction of the incident wave transmitted through the barrier and is defined as the transmission coefficient. In this case roughly 0.07 or 7% of particles overcome this barrier. Because the height of the barrier (15 a.u.) is considerably larger than the center velocity of the wave packet (5 a.u.), the transmission coefficient is small, as expected. With increasing barrier height or width, the transmission is expected to become smaller because the process will occur mainly through tunneling.[3]

As stated earlier, because the flux and transmission coefficients relate directly to experimentally measurable data, these parameters are currently being calculated for other types of potentials. These potentials, depicted in Fig 9, may have complex shapes and contain multiple discontinuities. They present more stringent test cases of the robustness and accuracy of our modified FMD method.

Fig 9: Shapes of test potentials. Upper left: inverted quadratic well, Upper right: a standard potential well, and Bottom: a piecewise well-barrier potential.

Conclusions

This study has presented a modified finite difference method for solving the time-dependent Schrödinger equation. Two modifications are made: the separation of the real and imaginary parts of the wavefunction and the application of a norm-preserving symplectic integrator. When tested on the simple harmonic oscillator, the method is shown to be stable and can describe the motion accurately. The method preserves the normalization to a high degree of accuracy even with moderate grid sizes. Expectation values and probability flux can be computed efficiently. While the overall performance of the algorithm is high, it is found that the total energy has a slight fluctuation, indicating that energy conservation is not accurately computed. This can be attributed to the sensitivity in the calculation of kinetic energy which relies on the derivative of the wave function. Effort is underway to study more accurate ways of obtaining kinetic energy as well as the effect of grid size.

This study also applied the method to calculate the particle flux and transmission coefficients for a potential barrier. The results show that the transmission coefficient can be directly obtained from the wave function itself. However, boundary conditions can affect the actual value due to factors such as wraparound, so the window of integration must be carefully determined. A future goal is to perform calculations for other nontrivial potentials and compare with exact results where possible.

The ultimate goal is to apply the method to actual systems, for instance, in atomic reactions. This requires extending the modified method to higher (2D and 3D) dimensions. However, it will be challenging to scale the finite difference method to higher dimensions because of efficiency. The plan is to comparatively study the method discussed here with other approaches, including the finite element method and meshfree methods.[4, 11] The latter should have better scalability and be more suitable in higher dimensions. Thus, the modified method can serve as a useful benchmark for further studies.

References

A. Goldberg, H. M. Schey, and J. L. Schwartz. Computer-generated motion pictures of one-dimensional quantum-mechanical transmission and reflection phenomena. Am. J. Phys., 35:177–186, (1967).

C. R. Davis and H. M. Schey. Eigenvalues in quantum mechanics: a computer-generated film. Am. J. Phys., 40:1502–1508, (1972).

D.J. Griffiths and D.F. Schroeter, Introduction to Quantum Mechanics. (Cambridge University Press, Cambridge), 2018.

E. B. Becker, G. F. Carey, and J. T. Oden. Finite elements: an introduction. (Prentice Hall, Englewood Cliffs, NJ), 1981.

G. B. Arfken and H. J. Weber. Mathematical methods for physicists. (Academic Press, New York), 6th edition, 2005

G. R. Fowles and G. L. Cassiday. Analytical mechanics. (Thomson Brooks/Cole, Belmont, CA), 7th edition, 2004.

J. Wang, Computational Modeling and Visualization of Physical Systems with Python (John Wiley & Sons, Hoboken, NJ), 2016.

L. Verlet. Computer ‘experiments’ on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules. Phys. Rev., 159:98–103, (1967).

M. L. Boas. Mathematical methods in the physical sciences. (Wiley, New York), 3rd edition, 2006.

T. Liszka and J. Orkisz, Computers & Structures 11, 83 (1980).

J. Wang and Y. Hao. Meshfree computation of electrostatics and related boundary value problems. Am. J. Phys., 85:542–549, (2017).

Contact UReCA: The NCHC Journal of Undergraduate Research and Creative Activity

The National Collegiate Honors Council (NCHC) is the professional association of undergraduate Honors programs and colleges; Honors directors and deans; and Honors faculty, staff, and students. NCHC provides support for institutions and individuals developing, implementing, and expanding Honors education through curriculum development, program assessment, teaching innovation, national and international study opportunities, internships, service and leadership development, and mentored research.

Submitting Form...

The server encountered an error.