matrix numerov method for solving schrödinger’s equationtgwalker/106.numerov.pdf · matrix...

4
Matrix Numerov method for solving Schrödinger’s equation Mohandas Pillai, Joshua Goglio, and Thad G. Walker Citation: Am. J. Phys. 80, 1017 (2012); doi: 10.1119/1.4748813 View online: http://dx.doi.org/10.1119/1.4748813 View Table of Contents: http://ajp.aapt.org/resource/1/AJPIAS/v80/i11 Published by the American Association of Physics Teachers Related Articles The quadratically damped oscillator: A case study of a non-linear equation of motion Am. J. Phys. 80, 816 (2012) Pointy ice-drops: How water freezes into a singular shape Am. J. Phys. 80, 764 (2012) Why no shear in “Div, grad, curl, and all that”? Am. J. Phys. 80, 519 (2012) Jacobi elliptic functions and the complete solution to the bead on the hoop problem Am. J. Phys. 80, 506 (2012) Embeddings and time evolution of the Schwarzschild wormhole Am. J. Phys. 80, 203 (2012) Additional information on Am. J. Phys. Journal Homepage: http://ajp.aapt.org/ Journal Information: http://ajp.aapt.org/about/about_the_journal Top downloads: http://ajp.aapt.org/most_downloaded Information for Authors: http://ajp.dickinson.edu/Contributors/contGenInfo.html Downloaded 29 Oct 2012 to 128.104.162.78. Redistribution subject to AAPT license or copyright; see http://ajp.aapt.org/authors/copyright_permission

Upload: others

Post on 12-Mar-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Matrix Numerov method for solving Schrödinger’s equationMohandas Pillai, Joshua Goglio, and Thad G. Walker Citation: Am. J. Phys. 80, 1017 (2012); doi: 10.1119/1.4748813 View online: http://dx.doi.org/10.1119/1.4748813 View Table of Contents: http://ajp.aapt.org/resource/1/AJPIAS/v80/i11 Published by the American Association of Physics Teachers Related ArticlesThe quadratically damped oscillator: A case study of a non-linear equation of motion Am. J. Phys. 80, 816 (2012) Pointy ice-drops: How water freezes into a singular shape Am. J. Phys. 80, 764 (2012) Why no shear in “Div, grad, curl, and all that”? Am. J. Phys. 80, 519 (2012) Jacobi elliptic functions and the complete solution to the bead on the hoop problem Am. J. Phys. 80, 506 (2012) Embeddings and time evolution of the Schwarzschild wormhole Am. J. Phys. 80, 203 (2012) Additional information on Am. J. Phys.Journal Homepage: http://ajp.aapt.org/ Journal Information: http://ajp.aapt.org/about/about_the_journal Top downloads: http://ajp.aapt.org/most_downloaded Information for Authors: http://ajp.dickinson.edu/Contributors/contGenInfo.html

Downloaded 29 Oct 2012 to 128.104.162.78. Redistribution subject to AAPT license or copyright; see http://ajp.aapt.org/authors/copyright_permission

Matrix Numerov method for solving Schr€odinger’s equation

Mohandas Pillai, Joshua Goglio, and Thad G. Walkera)

Department of Physics, University of Wisconsin-Madison, Madison, Wisconsin 53706

(Received 16 May 2012; accepted 15 August 2012)

We recast the well-known Numerov method for solving Schr€odinger’s equation into a representation

of the kinetic energy operator on a discrete lattice. With just a few lines of code in a high-level

programming environment such as MATHEMATICA, it is simple to calculate and plot accurate

eigenvalues and eigenvectors for a variety of potential problems. We illustrate the method by

calculating high-accuracy solutions for the jxj potential. VC 2012 American Association of Physics Teachers.

[http://dx.doi.org/10.1119/1.4748813]

I. INTRODUCTION

With modern high-level programming and visualizationenvironments such as MATHEMATICA, MATLAB, and PYTHON, itis possible and desirable to use computational methods toillustrate and illuminate many basic physics principles with aminimum of programming overhead. This latter point is akey: if the programming is too difficult and/or time consum-ing, the focus shifts from the physics to the programming.

A case in point is the solution of boundary value problemsfor the one-dimensional Schr€odinger equation. One typicallystarts at one boundary with an assumed value for the energy,then integrates to the other boundary where the boundaryconditions are tested. A new guess for the energy is gener-ated, and the process is repeated until the desired level of ac-curacy is obtained.1 Using the Numerov method, thenumerical integration can be done with relatively high accu-racy even with large step sizes.1–3 Though straightforward,this process is tedious to program when one needs to solvefor a large number of eigenstates.

An alternative approach that gives a large number of eigen-states simultaneously is to expand the wave function in a setof orthogonal basis states that satisfy the appropriate boundaryconditions. By truncating the basis set, the Hamiltonian can bediagonalized with built-in matrix routines. The resultingeigenvectors can be used to generate a superposition of the ba-sis states to represent the spatial wave function.

A particularly attractive hybrid approach is to discretize thewave function on a (linear) lattice. This is equivalent toexpanding in a basis set of Dirac d functions centered at thelattice points. The eigenvectors are then simply lists of the val-ues of the various eigenfunctions at the lattice points. Thisallows straightforward visualization of the eigenfunctions, asdemonstrated recently on time-dependent problems.4

In the discretized approach, the potential energy operatoris simply a diagonal matrix of the potential energy evaluatedat each lattice point. The kinetic energy operator, being a dif-ferential operator, is more difficult to realize. The purpose ofthis paper is to show how the Numerov method can be usedto represent the kinetic energy operator on the lattice in astraightforward manner, allowing for high-accuracy solu-tions to be obtained with very straightforward programsusing matrix diagonalization.

II. MATRIX NUMEROV REPRESENTATION

OF THE HAMILTONIAN

The Numerov method1–3 is a specialized integration for-mula for numerically integrating differential equations of theform

w00ðxÞ ¼ f ðxÞwðxÞ: (1)

For the time-independent 1-D Schr€odinger equation,f ðxÞ ¼ �2mðE� VðxÞÞ=�h2. On a lattice of points xi evenlyspaced by a distance d, the integration formula is

wiþ1 ¼wi�1ð12� d2fi�1Þ � 2wið5d2fi þ 12Þ

d2fiþ1 � 12þ Oðd6Þ;

(2)

where, for example, wi ¼ wðxiÞ. This can be rearranged intothe form

� �h2

2m

ðwi�1 � 2wi þ wiþ1Þd2

þ Vi�1wi�1 þ 10Viwi þ Viþ1wiþ1

12

¼ Eðwi�1 þ 10wi þ wiþ1Þ

12: (3)

Now, if we represent w as the column vector ð…wi�1;wi;wiþ1…Þ and define matrices A ¼ ðI�1 � 2I0 þ I1Þ=d2,B ¼ ðI�1 þ 10I0 þ I1Þ=12, V ¼ diagð…Vi�1;Vi;Viþ1…Þ,where Ip is a matrix of 1s along the pth diagonal, and zeroselsewhere, this becomes the matrix equation

� �h2

2mAwþ BVw ¼ EBw: (4)

Multiplying by B�1, we get

� �h2

2mB�1Awþ Vw ¼ Ew: (5)

The first term is the Numerov representation of the kineticenergy operator.

On an N-point grid, the boundary conditions are imple-mented by taking N � N submatrices of A and B. This corre-sponds to the condition w0 ¼ wNþ1 ¼ 0; effectively we haveplaced the potential of interest inside an infinite-walled box.Alternatively, one can use periodic boundary conditions,with A1;N ¼ AN;1 ¼ 1=d2 and B1;N ¼ BN;1 ¼ 1=12.

We choose the grid in the following manner, valid forfinding bound-state solutions to attractive potentials. It iseasy to extend the following advice to other cases. Supposewe wish to find all the states with E < Em above the potentialminimum. The minimum local de Broglie wavelength is,therefore, k ¼ h=

ffiffiffiffiffiffiffiffiffiffiffiffi

2mEm

p. We have found that sufficient

1017 Am. J. Phys. 80 (11), November 2012 http://aapt.org/ajp VC 2012 American Association of Physics Teachers 1017

Downloaded 29 Oct 2012 to 128.104.162.78. Redistribution subject to AAPT license or copyright; see http://ajp.aapt.org/authors/copyright_permission

accuracy is generally obtained by taking the grid spacing dcorresponding to about one point per radian, i.e., d ¼ k=2p.The number of grid points needed can be estimated by find-ing the outer turning points xt such that VðxtÞ ¼ Em, andallowing for an extra 2k in the classically forbidden region.Thus, N ¼ 2ðxt=d þ 4pÞ rounded to the nearest integer.

III. EXAMPLE: jxj POTENTIAL

The “linear” potential VðxÞ ¼ bjxj is analytically solva-ble5 and so is useful for comparison to the numericalcalculations. Introducing scaled variables s ¼ xðmb=�h2Þ1=3

and � ¼ Eðm=b2�h2Þ1=3, we get

� 1

2B�1Awþ jsjw ¼ �w: (6)

Following the guidelines for selecting the grid, we pick agrid spacing ds ¼ 1=

ffiffiffiffiffiffiffi

2�m

pin order to find accurate results

for states up to energy �m. The turning point is st ¼ �m, sowith the additional two de Broglie wavelengths outside theturning point, we get N ¼ 2ð4pþ st=dsÞ. A MATHEMATICA

code for solving this problem is shown in Fig. 1. The gridused is ds ¼ 0:158, N¼ 278, and the program runs in typi-cally 0.1 s of CPU time.

A comparison of the exact and matrix Numerov results forsome of the energy levels is given in Table I. It is remarkablethat such high-accuracy results can be achieved with such asimple program. An even simpler program might be obtained

by using a simple three-point approximation to the secondderivative, equivalent to setting B¼ 1. The results are alsoshown in Table I and are of similar quality to the Numerovmethod for small n but give clearly less accurate results forlarge n. Figure 2 compares the Numerov and exact wavefunctions for n¼ 50.

We have used the matrix Numerov method to solve a vari-ety of problems. These include the harmonic oscillator, parti-cle in a box, hydrogen atom, and the partner super potentialto the particle in a box.6 With periodic boundary conditions,we have solved the cosine potential and the periodic squarewell. We have also simulated a double-well potential to dem-onstrate tunneling. Among these, the hydrogen atom is themost challenging due to its singularity at x¼ 0 and the rapidincrease of the classical turning point with principal quantumnumber. Codes for a few of these examples are availableonline.7

IV. CONCLUSIONS

While there are other related methods, examples beingb-splines8 and the Fourier grid representation,9 that may besuperior for accurate calculation of energies and wave func-tions by experts, we feel that the simplicity of the matrixNumerov method introduced here makes it ideal for class-room and course work settings as a tool for helping studentsgrow comfortable with the notion of the wave function andeigenvalue problems. The method, though illustrated herefor the prominent 1-D Schr€odinger equation, is of courseuseful for any Numerov-type problem. We have used it tosolve for diffusion modes of simple geometries, for example.

We have also experimented with variable-mesh grids,which can be useful for certain problems such as the hydro-gen atom where such grids can improve the accuracy.However, this adds new complexities that detract from whatwe feel is the main advantage of the method: attainment ofvery high accuracy for minimum programming complexityand computer time.

Fig. 1. Full MATHEMATICA code for solving the potential problem V ¼ jsj. The

energy of the mth state can be accessed by the command eval[[-m]],

and the corresponding list of wave function values at the grid points s is

evec[[-m]].

Table I. Comparison of exact and numerical results for the quantized ener-

gies (in scaled units, see text) of the jxj potential. The numerical results are

calculated on an N¼ 278 point grid with a spacing of 0.158 in scaled dis-

tance units.

n¼ 1 2 3 4 10 20 50

Exact 0.8086 1.8558 2.5781 3.2446 6.3053 10.182 18.947

Numerov 0.8099 1.8557 2.5785 3.2445 6.3049 10.181 18.936

3-pt 0.8089 1.8529 2.5728 3.2358 6.2717 10.094 18.634

Fig. 2. The lower graph shows the analytical Airy function solution to the

Schr€odinger equation for the n¼ 50 state of the jxj potential, compared to

the Numerov method eigenfunction (dots). The upper graph shows the dif-

ference between the analytical and Numerov wave functions.

1018 Am. J. Phys., Vol. 80, No. 11, November 2012 Pillai, Goglio, and Walker 1018

Downloaded 29 Oct 2012 to 128.104.162.78. Redistribution subject to AAPT license or copyright; see http://ajp.aapt.org/authors/copyright_permission

ACKNOWLEDGMENTS

This work was supported by the National Science Founda-tion. This paper is an outgrowth of work done by two of theauthors (M.P. and J.G.) as part of the Atomic and QuantumPhysics course at the University of Wisconsin-Madison.

a)Electronic mail: [email protected]. M. Blatt, “Practical points concerning the solution of the Schr€odinger

equation,” J. Comput. Phys. 1, 382–396 (1967).2P. C. Chow, “Computer solutions to the Schr€odinger equation,” Am. J.

Phys. 40, 730–734 (1972).3R. H. Landau, M. J. Paez, and C. C. Bordeianu, A Survey of ComputationalPhysics (Princeton U.P., Princeton, NJ, 2008).

4M. Belloni and W. Christian, “Time development in quantum mechanics

using a reduced Hilbert space approach,” Am. J. Phys. 76, 385–392 (2008).5J. J. Sakurai and J. J. Napolitano, Modern Quantum Mechanics, 2nd ed.

(Addison Wesley, San Francisco, 2010).6A. Gangopadhyaya, J. V. Mallow, and C. Rasinariu, Supersymmetric Quan-tum Mechanics: An Introduction (World Scientific, Hackensack, NJ, 2011).

7See supplementary material at http://dx.doi.org/10.1119/1.4748813 or

<http://www.physics.wisc.edu/~tgwalker/NumerovExamples/> for the code

of Fig. 1 and some worked examples.8A. Derevianko, E. Luc-Koenig, and F. Masnou-Seeuws, “Application of

B-splines in determining the eigenspectrum of diatomic molecules: Robust

numerical description of halo-state and Feshbach molecules,” Can. J. Phys.

87, 67–74 (2009).9C. C. Marston and G. G. Balint-Kurti, “The Fourier grid Hamiltonian

method for bound state eigenvalues and eigenfunctions,” J. Chem. Phys.

91, 3571–3576 (1989).

1019 Am. J. Phys., Vol. 80, No. 11, November 2012 Pillai, Goglio, and Walker 1019

Downloaded 29 Oct 2012 to 128.104.162.78. Redistribution subject to AAPT license or copyright; see http://ajp.aapt.org/authors/copyright_permission