<<

S ECTION T ITLE

Numerical Solution of the Stationary State Schrödinger Equation Using Transparent Boundary Conditions

To solve the discrete version of the stationary state Schrödinger equation to Numerov accuracy, the author uses boundary conditions at the limits of the computational domain that mimic an interval of infinite extent. He also describes methods for finding particle energies, scattering coefficients, and partial-wave phase shifts.

igenvalue problems in the form of dif- 2 d2ψ ferential equations have widespread ap- −+E Vx()ψψ () x = E () x, 2m 2 EE plication in all fields of science and dx engineering. Their numerical study re- Equires replacing the continuum formulation with a is an example of an eigenvalue problem. The coordi- discrete version, then solving the resulting model nate x extends from – to + and acceptable wave- ␷ iteratively using appropriate start values. How to forms E(x) must be continuous bounded functions of choose start values in each individual case is a mat- x, which are conditions that generally occur only for ter of some controversy. special values of the particle energy E. The eigenval- In this article, I advocate using discrete trans- ues are these allowed energies, and the corresponding ␷ parent boundary conditions (DTBCs), a technique are the stationary states E(x). that has proven successful in other contexts. Im- For simplicity, we can recast the problem as plementing DTBCs for eigenvalue problems typi- cally involves an approximation—the slowly dy2 varying approximation—that I present here along +=gxyx()() 0 .(1) 2 with suitable criteria for its validity. As the exam- dx ples make clear, this approach isn’t limited to just finding eigenvalues but also can be adapted to cal- The stationary state Schrödinger equation is re- ␷ culate other properties of physical interest. covered with the obvious identifications y(x) = E(x) and gx()=−2 mE [ V ()]/ x 2 . The discrete ver- Background sion of this equation follows by writing x xn nh Schrödinger’s equation for the stationary states of and f (x) f (xn) fn for any function f (x), where n a particle with mass m in a 1D potential V(x), is an integer and h is the size of the spatial grid. The procedure would be straightforward except for the second derivative, which requires some approxi- 1521-9615/06/$20.00 © 2006 IEEE mation. To this end, note that Copublished by the IEEE CS and the AIP 2 CURT A. MOYER fn–1 = ( fn–1) = f (xn + h) + f (xn – h) – 2f (xn), University of North Carolina, Wilmington where fn–1 fn – fn–1 symbolizes the usual forward

50 COMPUTING IN SCIENCE & ENGINEERING difference operation on any function f (x). Expand- accuracy by using the exact solution function y(x0) ing the first two terms on the right in a Taylor se- and its slope y (x0) at a single endpoint x0. But those ries gives values, too, are often elusive. Here, I advocate a different approach: instead of 2 2 4 (iv) 6 fn–1 = h f (xn) + (h /12)f (xn) + O(h ). focusing on the exact solution y(x), we can recover start values from the asymptotic solutions to the 2 2 The simplest approximation fn–1 h f (xn) discrete equation for yn. This tactical shift amounts gives the central difference approximation to the to fully embracing the discrete formulation for all second derivative and yields a discrete version of values of n; in effect, we impose boundary condi- Equation 1 that is accurate to O(h3): tions at the limits of the computational domain that mimic an interval of infinite extent. Researchers pi- 2 2 yn–1 + h gnyn = 0. (2) oneered using such DTBCs in connection with solving the time-dependent Schrödinger equa- The Numerov method improves on this by us- tion;3–5 applying DTBCs to stationary state prob- ing the original for y(x) to lems is actually simpler, as we will see in the 2 (iv) 2 2 write h f (xn) = –h (gy) – [gn–1yn–1]. This gives following sections. Although the technique is fa- the Numerov discretization of Equation 1: miliar,6 its connection to DTBCs and a rigorous exposition of the related slowly varying approxi- ⎡⎛ 2 ⎞ ⎤ mation are new here. ∆+2 ⎢ h ⎥ +=2 ⎜1 gynn−−11⎟ hgy nn0 ,(3) ⎣⎢⎝ 12 ⎠ ⎦⎥ Discrete Asymptotic Forms If the computational domain corresponds to N1 5 which is accurate to O(h ). Interestingly, the Nu- n N2, then – < n < N1 and N2 < n < define the merov version is identical to Equation 2, with the exterior regions. Our task is to find suitable analytic replacements solutions to Equation 2 in these exterior regions, from which we will infer the proper boundary con- ⎛ 2 ⎞ ditions to be imposed at the limits of the actual (fi- h gn y →+⎜1 gyg⎟ , → ,(4)nite) computational interval. Because the exterior nnnn⎝ 12 ⎠ 2 + h regions include the asymptotic realm n ±, so- 1 gn 12 lutions here can’t diverge for large |n| if they’re to be physically acceptable. so the Numerov method’s improved accuracy Let’s introduce the discrete counterpart of the ␮ comes at negligible computational cost. For the re- logarithmic derivative of y(x), n yn/yn+1, and a ␮ ␮ ␮ mainder of this article, I will adopt Equation 2 as measure of its variability, n–1 = n – n–1. In terms the discrete equation of interest, with the assurance of these, Equation 2 becomes that the results apply equally well to the Numerov µµµ22++∆−= version after suitably redefining the terms. nnnn()()hg −1 10.(5) We can solve Equation 2 recursively, using given values for yn at two successive points. Numerical Throughout each exterior region, we assume for stability requires that in regions in which y(x) is now that gn is unchanged from its value at the in- monotonic, recursion should be performed in the ner boundary, gN or gN . But if gn doesn’t change, 1 ␮ 2␮ direction of increasing |y| to reduce the solution’s then neither does n, so n–1 vanishes identically relative error.1 Oftentimes, this means construct- and Equation 5 reduces to a quadratic form that we ing separate solutions starting from each interval can solve to give the root pair limit, then matching them at some intermediate lo- ± 1 ⎛ 2422⎞ cation. In any event, start values for each recursive µ =±−hg hg4 hg (6) nnnn2 ⎝ ⎠ solution must be known to an accuracy compatible with the algorithm we use. Obtaining those values with the property in practical applications has sparked much discus- −−=µµ+− sion. Of course, yn = y(xn) are immediately available ()()11nn 1.(7) if y(x) is known exactly in the neighborhood of the interval limits, but such is rarely the case. (The index n is superfluous here, but I retain it for A less restrictive alternative was developed by its usefulness in subsequent analysis.) 2 2 J.L.M. Quiroz Gonzalez and D. Thompson, who For gn < 0 (or h gn > 4), both roots of Equation 6 ␮ showed how to select start values up to Numerov are real. Because (1 – n)yn+1 = yn, we must select the

MAY/JUNE 2006 51 ␮ tion 6 as the root for which |1 – N2| >1. 3.If gN2 > 0, choose an h small enough that 2 ␽ h gN2 < 4 and take yN2–1 = exp(–i N2–1)yN2; then calculate yN2–2, yN2–3, … recursively from Equation 2. This models the scatter- ing problem with particles incident from the left to give, in the transmitted region, a solution with a phase that increases with x— that is, a rightward traveling wave. Again, with g constant in the right exterior region, ␽ ␽ N2–1 is indistinguishable from N2 and is calculated from Equation 8.

In all cases, the values for yN1 and yN2 are arbi- trary, reflecting an overall choice of normalization, and we can set them equal to unity. If steps 1 and 2 both apply, the recursive solutions we obtain must be joined at some intermediate point, say, n = M. For optimal visual effect, we first match the slopes

at yM by adjusting the start value yN2. Then, when- Figure 1. Some stationary state waveforms of the ever E is an eigenvalue, both recursions will also oscillator, against the backdrop of the oscillator potential. The give identical values for yM. Otherwise, the solution lowest energy wave (yellow) is nodeless, followed in order of is discontinuous at yM and physically unacceptable. 3 energy by the wave with one node (green), two nodes (violet), and We can find slopes at yM accurate to O(h ) using the so forth. Because the energies are accurate, no discontinuity is centered difference evident in these waveforms. 3 y(xM + h) – y(xM – h) = 2hy (xM) + O(h ). (9)

root that makes |yn+1| > |yn| over the left exterior However, the Numerov implementation is more region (– < n < N1) and |yn+1| < |yn| on the right demanding and requires points two steps removed (N2 < n < ) to generate solutions that approach zero from xM to calculate the slopes y (xM) to the de- 2 ␮ ± as n ± . If 0 < h gn < 4, then n are complex con- sired accuracy: ␮ ± jugates, and Equation 7 implies |1 – n | = 1. It fol- lows that the exterior solutions have constant y(xM + h) – y(xM – h) – (1/8)y(xM + 2h) + 5 modulus, |yn+1| = |yn|, and are oscillatory. Specifi- (1/8)y(xM – 2h) = (3h/2)y (xM) + O(h ). (10) ␽ cally, we have for this case yn+1 = exp(±i n) yn, where Although convenient, the requirement that g be ⎛ 242− ⎞ constant in the exterior regions (these regions must 4hgnn hg θ = arctan ⎜ ⎟ .(8)be force free) is unnecessarily restrictive. But if g(x) n ⎜ − 2 ⎟ ⎝ ||2 hgn ⎠ isn’t constant in the exterior regions, Equation 6 af- fords only approximate values. In this context, we The preceding analysis leads us to the following al- refer to Equation 6 as the slowly varying approxima- ␮~ gorithm for constructing stationary states: tion and denote the roots n to distinguish them ␮ from the true values n. ␮ –1 ␮ 1. If gN1 < 0, take yN1+1 = (1 – N1) yN1 and cal- Conventional wisdom dictates that N1,N2–1 be culate yN1+2, yN1+3, … recursively from known to an accuracy compatible with the solu- ␮ 2 Equation 2. Calculate N1 as the root of tion technique we use—O(h ) for the central dif- ␮ 4 Equation 6 for which |1 – N1| <1. Alter- ference scheme and O(h ) for the Numerov natively, Equation 7 lets us write yN +1 = (1 method. This leads us to ask, how accurate is ␮ ␮ 1 – N )yN with |1 – N | > 1. Equation 6 when the exterior regions aren’t force 1 1 1 ␮ 2. If gN < 0, take yN –1 = (1 – N –1)yN and cal- free? An in-depth analysis shows that Equation 6 2 2 2 2 ␮ culate yN2–2, yN2–3, … recursively from is justified in principle for calculating n at the Equation 2. With g assumed constant in the endpoints of a suitably large computational inter- ␮ right exterior region, N –1 is indistinguish- val, provided gn is asymptotically monotonic and ␮ 2 able from N2 and can be found from Equa- finite valued. (See the “Slowly Varying Approxi-

52 COMPUTING IN SCIENCE & ENGINEERING mation” section for full details.) We can relax the latter restriction to include gn – as n ± (but not gn + , which leads to unphysical solu- tion behavior that reflects a fundamental incom- patibility between the continuum and discrete asymptotic limits in such cases). To test the methods in this section, I examined several low-lying stationary states of the quantum oscillator. I performed the calculations in units where 2 / 21m = . In these units, the oscillator po- tential is V(x) = x2, and the allowed energies are the odd integers Ej = 1, 3, 5, …. I calculated the wave- forms using the central difference approximation on a grid containing 512 points spanning the interval [–5, 5]. For each energy, I generated solutions using discrete transparent boundary conditions applied to each end of the computational interval and matched those solutions near the waveform peak. Figure 1 shows the results for the three lowest allowed energies. The waveforms in the figure all appear smooth, as expected; by contrast, a dis- Figure 2. The waveform for the quantum oscillator with E = 5.005. continuity is already evident in the waveform for The discontinuity in the circled region near the peak on the left E = 5.005 (see Figure 2), a value removed from the indicates this energy isn’t one of the allowed values. true energy by just 1 part in 1,000—a 0.1 percent change. Table 1 reports the fractional mismatch at the Table 1. Characteristics of some numerically generated match point for each of these waves. The mismatch waveforms for the quantum oscillator. grows by an order of magnitude with the aforemen- yy()left − ()right tioned 0.1 percent increase in E over the exact value. 2 MM ␮ ()left + ()right µµ−  For this example, N ,N –1 should be calculated to ac- yy NN−−11 1 2 Energy E MM 22 curacy h2; this requires that the slowly varying ap- ␮~ 1 8.6931 10–4 0.0020 proximation n given by Equation 6 differ from the ␮ 2 3 2.2554 10–3 0.0022 true value n by no more than O((10/512) ) ~ –3 4 10–4 at the edges of the computational domain. 5 3.9290 10 0.0024 ␮ ␮~ 5.005 0.03923 0.0024 I refer to the difference | n – n| as the figure of merit. The last column of Table 1 records the figures of merit estimated from Equation 16; from symme- try, those at the left end of the computational inter- val (n = N1) are nearly identical and thus omitted. parent boundary conditions to scattering problems These figures of merit are too large by a factor of by calculating the probability for particle transmis- five, yet they’re still good enough to get the station- sion across a square barrier, another instance in ary state energies about right. which exact results are available for comparison. Although we know that eigenvalues are notori- Again in units where 2 / 21m = , I took the barrier ously insensitive to details of the waveform, calculat- centered at the coordinate origin with unit height ing other physical quantities might require the extra and width w = 4. This time I calculated the wave- precision demanded by strictly applying the method. forms over the range [–10, +10] using the Numerov Indeed, we can obtain O(h2) figures of merit by en- scheme on a grid of 2,048 points. At the computa- larging the computational interval in this example by tional domain’s right-side edge, I applied discrete a factor of four (while quadrupling the number of transparent boundary conditions to generate a points to keep h fixed). Interestingly, the O(h4) ~ 10–7 rightward moving (transmitted) wave in this region. accuracy the Numerov method demands would re- Figure 3 displays the numerical solution for a quire in this example an interval size that’s impracti- particle with energy E = 0.5 (half the barrier cally large, which is no doubt because the oscillator height). (This waveform is complex valued;con- potential isn’t slowly varying by any realistic measure. forming to standard practice, color represents the I also checked the applicability of discrete trans- phase of the wave at each point.) The waveform at

MAY/JUNE 2006 53 2 ()R 2 yN yN T = 2 andR = 1 . y()I y()I N1 N1

Any elementary quantum physics text treats par- ticle transmission across a square barrier. In the units I adopted here, the exact result for the trans- mission coefficient T(E) is conveniently expressed as (for E < 1, or below the top of the barrier)7

1 1 2 =+1 sinh ()wE1− . TE()41 E |− E |

This formula remains valid for E > 1 (above the barrier) if the hyperbolic sine is replaced by the trigonometric sine. Table 2 compares exact and nu- merical results for particle transmission at several Figure 3. Scattering waveform for a particle incident from the left energies below and above the top of the barrier, in- on a square barrier when the particle energy is one-half the barrier cluding E = 0.5 for the waveform of Figure 3. (Be- height. The wave is complex valued, with the phase at each point cause g(x) is constant outside the barrier, figures of represented by plot color. The wave to the left of the barrier has merit for slow variation at both edges of the com- both incident and reflected components, and the one to the right putational domain are zero and, therefore, not tab- of the barrier describes pure transmission. The shaded rectangle in ulated.) T changes by four orders of magnitude the background is the square potential barrier. over this energy range, yet the agreement between the exact and numerical results is good throughout, with the largest relative error (approximately 1 per- cent) occurring for the smallest value of T. The the far left is a superposition of incident y(I) (right- right-most column shows the independently cal- ward traveling) and reflected y(R) (leftward travel- culated value for R added into T; because these are ing) waves; sorting out the contribution that each the only outcomes possible in a scattering event, makes to the total is a straightforward exercise in the sum should be unity. The results verify this ex- (I) ␽ (I) matrix algebra. Noting that yn+1= exp(i n)yn and pectation to 11-digit accuracy and indicate that R (R) ␽ (R) yn+1 = exp(–i n)yn , we can write at the left-side is calculated for every energy with a precision that endpoint n = N1 matches T.

⎛ ()I ⎞ ⎛ y ⎞ ⎛ 11⎞ y Discrete Radial Wave Equation N1 ⎜ N1 ⎟ ⎜ ⎟ = ⎜ ⎟ for Spherically Symmetric Potentials θθ− ⎜ ()R ⎟ ⎝ yN +1⎠ ⎝exp(iiNN ) exp( )⎠ 1 11⎝ yN ⎠ . A mass m subject to a central potential V(r) has sta- 1 m ␽ ␰ tionary states of the form R(r)Yl l( , ), where (r, ␽ ␰ m Inverting gives the incident and reflected wave , ) are the usual spherical coordinates, Yl l de- values at N1: notes the spherical harmonic, and R(r) is the radial . The related function rR(r) satisfies ⎛ ⎞ y()I ⎛ −−θ ⎞ ⎛ ⎞ N 1 exp(i N ) 1 yN a Schrödinger-like equation with an effective po- ⎜ 1 ⎟ = ⎜ 1 ⎟ ⎜ 1 ⎟ ⎜ ()R ⎟ θ θ − . 2i sin N ⎝ eexp(i N ) 1⎠ ⎝ yN +1⎠ tential that reflects the angular momentum state of ⎝ yN ⎠ 1 1 1 1 the orbiting particle (l = 0, 1, 2, is the orbital ): From these, we calculate transmission (T) and re- flection (R) coefficients, respectively, as = 2 =+ll()1 . (11) VrVreff () () 2mr 2

The machinery developed in the previous sec-

54 COMPUTING IN SCIENCE & ENGINEERING Table 2. Particle transmission across a square barrier.

Energy ET[exact] T [calculated] T + R [calculated] 0.1 7.2849 10–4 7.2044 10–4 1.000000000012 0.3 4.1567 10–3 4.1163 10–3 1.000000000001 0.5 1.3877 10–2 1.3763 10–2 0.999999999998 0.7 4.1302 10–2 4.1041 10–2 0.999999999998 0.9 0.11929 0.11884 1.000000000002 1.2 0.50178 0.50206 0.999999999999 1.5 0.96933 0.97009 0.999999999995 2.0 0.93319 0.93256 1.000000000000 3.0 0.98589 0.98620 0.999999999999 4.0 0.99253 0.99232 1.000000000000

tion also bears on this class of problems. With the the ordinate values at rM implies that the given identifications x r, y(x) y(r) = rR(r) and g(x) energy E isn’t allowed. =− 2 2 gr()2 mE [ Veff ()]/ r , Equation 1 re- For the case in which 0 < h gN < 4, the large r mains the equation of interest, with solutions solutions are oscillatory, and the computational confined to the domain of the spherical coordi- goal switches from locating eigenvalues to ex- nate r—that is, from 0 to . Accordingly, we now tracting partial-wave phase shifts. Starting with y0 take r rn nh and limit the computational do- = 0 and y1 = 1, we construct the solution y2, y3, main to 0 n N. We replace the “missing” half from Equation 2 as before. Now, however, the so- axis with the boundary condition y0 = 0, express- lution at the far right is a mixture of ingoing and ing the physical requirement that the radial wave outgoing radial waves, which we label y(in) and (out) (in) ␽ (in) at the origin R(0) must be finite, so y(r) must van- y , respectively. Noting that yn+1 = exp(–i n)yn (out) ␽ (out) ␽ ish there. (We must exercise special care with the and yn+1 = exp(i n)yn , where n is given by Numerov method because y0 = 0 doesn’t guaran- Equation 8, we can write at the right-side end- 2 tee that (1 + (h /12)g0)y0 = 0 if g0 is infinite. This point n = N is the case for the radial wave equation, where ⎛ ⎞ ⎛ ⎞ ⎛ ()in ⎞ V (r) is always singular at the origin for l > 0, and yN 11yN eff ⎜ ⎟ = ⎜ ⎟ ⎜ ⎟ . ⎝ yi−−−⎠ ⎝exp(θθ ) exp(− i )⎠ ⎝⎜ ()out ⎠⎟ even for l = 0 is singular for the Coulomb poten- NNN111yN tial and the Yukawa potential, among others. From a numerical perspective, the simplest rem- Inverting gives the unique decomposition into in- edy is to replace g with a model function that dif- going and outgoing waves of the solution that van- fers from the actual one only in having a finite ishes as required at the origin: value at the coordinate origin.) ⎛ ⎞ y()in ⎛ −−exp( iθ ) 1 ⎞ ⎛ y ⎞ Moreover, y1 becomes a mere scaling factor ⎜ N ⎟ = 1 N −1 N . ⎜ θ − ⎟ ⎜ ⎟ that we can take as unity; together with y0 = 0, ⎝⎜ ()out ⎠⎟ 2i sinθ − ⎝ exp(i −− ) 1⎠ ⎝ y ⎠ yN N 1 N 11N this is sufficient to obtain from Equation 2 the so- lution y2, y3, that behaves properly at the ori- Because yN and yN–1 must be real, we find that (in)* (out) gin. Discrete transparent boundary conditions yN = yN ; the solution in the outer region is an make their appearance at the other end of the equal mix of ingoing and outgoing waves—that is, computational interval and follow the rules of the a . The quantity of interest is the ␺ (out) preceding section. Specifically, if gN < 0 and gn is phase of this standing wave, = arg(yN ). With the monotonic in the exterior region n > N, then a so- help of Equation 8, we can write this as lution with the required accuracy that decays for ⎡ ⎤ yy−−− cosθ r can be constructed by taking yN–1 = (1 – χ = arctan ⎢ NNN11⎥ = ␮ ␮ θ N–1)yN, with N–1 found from Equation 6 and ⎣ yNNsin −1 ⎦ y , y , calculated recursively using Equa- ⎡ ∆ ⎤ N–2 N–3 2 − yN −1 tion 2. By adjusting the start value yN, we can ⎢ hgN −1 2 ⎥ ⎢ yN ⎥ match at some intermediate point (rM) the slope arcctan . (12) ⎢ 2 − 4 2 ⎥ of this decaying solution to the slope of the solu- ⎢ 4hgNN−−1 hg 1 ⎥ tion that vanishes at the origin. Any mismatch in ⎣ ⎦

MAY/JUNE 2006 55 Table 3. Some S-wave phase shifts for the spherical well. The numerical results agree well with the exact val- ␦ ␦ ues of Equation 13 over the whole range of ener- Energy E 0(E) [exact] 0(E) [calculated] gies I studied. In this example, the largest error 0.1 –0.77748 –0.77849 (approximately 0.2 percent) occurred for the inter- 0.5 –0.9416 –0.94348 mediate value E = 0.5, followed closely by the ~0.13 1.0 –1.3313 –1.3316 percent discrepancy observed for the smallest en- 5.0 0.82377 0.82370 ergy in this sample. 10 0.59401 0.59383 Slowly Varying Approximation This section investigates the validity of Equation 6 4 in exterior regions that aren’t force free. Because the arguments I present here are technical and of limited interest, the casual reader might want to skip them entirely. 2 Let’s return to Equation 2 and let y~denote the solution obtained using some trial g~ that differs from the actual g in the region of interest. We limit our remarks to the right exterior region n > N2; –4 –2 0 0 2 4 analogous arguments apply to the left exterior re- ~ gion n < N1. We assume that y and y satisfy identi- cal boundary conditions at infinity so that y~ ~ –2 coincides with the exact solution when g g. Now use the identity

2~ ~ 2 ~ ~ yn yn–1 – yn yn–1 yn yn–1 – yn yn–1) –4 together with Equation 2 to write Figure 4. The variation of ␮ (ordinate values) from Equation 6 with 2 ␮+ ~ ~ ~ ␮~ ␮ the (assumed continuous) variable h gn/2. The branch takes the yn yn–1 – yn yn–1) = ynyn( n–1 – n–1)] = ␮– 2 ~ ~ largest values in each of the plot intervals and is green; the branch h ( gn – gn)yn yn. is brown. The horizontal asymptote at ␮ = 1 is approached from below by ␮+ as g – and from above by ␮– as g +. The range For the right-side exterior, we sum this result from n n ~ ~ h2g /2 > 2 isn’t physical, but I include it here for completeness. N to and assume lim y y ( ␮ – ␮ ) van- n 2 ~n n n n–1 n–1 ishes to get (with yN2 = yN2 = 1):

Finally, we find the phase shift for the lth partial µµ−= NN−−11 wave ␦ by comparing this phase with the corre- 22 l ∞ sponding free particle result obtained by taking hggyy2 ∑ ()−  V(r) = 0 in the effective potential of Equation 11: nnnn. nN= ␦ ␺ ␺ 2 specifically, l = – (V = 0). Table 3 compares l = 0 (S-wave) phase shifts at 2~ several different energies calculated using Equa- In the slowly varying approximation we take h gn + ~␮ 2 ␮~ tion 12 with exact results for the spherical well. n–1 = h gn; then n is given exactly by Equation 6 2 ~ Again in units where  / 21m = , I took the well (with gn not gn, see Equation 5) and to have unit depth and radius a = 4. Exact values for this case are well known. In the units I adopted ∞ 8 µµ−=∆ µ here, S-wave phase shifts for the spherical well are NN−−11∑ nnn − 1yy. (14) 22= given by nN2

To be consistent, the sum on the right of Equation ⎛ EaEtan(+1 ) ⎞ ⎜ ⎟ 14 should converge to a function that vanishes as ⎜ −+EaE1 tan( ) ⎟ N . Then for a given value of h, we can, in prin- δ (E )= arctan . (13) 2 0 ⎜ ++ ⎟ ⎜ E 1 ⎟ ciple, always find an N2 large enough to make the ⎜ ⎟ right side O(h2) for central difference calculations ⎝ Eatan( EEaE+1)tan( )⎠ and O(h4) for Numerov work. Our goal, therefore,

56 COMPUTING IN SCIENCE & ENGINEERING is to establish the best possible upper bound for this 2 ∞ sum. To that end, recall that the exact solution yn is h µµ−−−= ∑ ∆gyy − bounded; accordingly, we assume subsequently that NN2211 nnn1 2 = nN2 N2 has been chosen to make |yn| yN = 1 for all n ␮~ 2 ∞ N2. Also, the definition of implies that we can i ⎛ 2 4 2 ⎞ ~ ~ ~ ~ ±∆∑ 4hg−−− hg yy write y~ = (1 – ␮ )(1 – ␮ ) … (1 – ␮ )y , whereas ⎝ nnn1 1 ⎠ nn. n n–1 n–2 N2 N2 2 nN= Equation 6 requires |1 – ␮~| 1 for each of the n – 2 2 N2 factors. The radical increases with gn for h gn < 2 and de- 2 2 Consider first the case in which gn < 0 (or h gn > creases for 2 < h gn < 4. In the simplest scenario, 4). If gn is monotonic for n N2, then both one or the other inequality holds throughout the ␮~ branches in Equation 6 define roots n that are real exterior region n N2, with the consequence that ␮~ and also monotonic for n N2. In fact, both n–1 the sums on the right are bounded by ␮~ and n are monotonic with gn (see Figure 4). More- ␮~ ∞ ∞ over, limn n exists if lim ngn also exists, but ∆≤∆=− ␮~ ∑∑gyynnn−111 gnN−∞ gg − even if gn diverges for n we find lim n n = 1 2 nN= nN= for the root of interest (the one for which |1 – ␮~ 2 2 ␮~ 1). In either case, lim n n–1 = 0, and Equa- ∞ tion 14 is bounded above by ∆−⎛ 2 4 2 ⎞  ≤ ∑ ⎝ 4hgnnnn−−1 hg1 ⎠ yy = nN2 ∞ nN− , 2 2422242 µµ−−−≤∆− µ −∑ 1 µ  4hg∞− hgghghg∞−−−−4 NN11 N 1 N NN221 1 22 2= 2 nN2 ∆µ N −1 assuming gn is monotonic for n N2. Straightfor- = 2 (15) −−µ . ward modifications are required if the exterior re- 11||N 2 2 gion includes the crossover point h gn = 2. Taken ␮~ together, these results again ensure that N2–1 dif- The simple bound Equation 15 is adequate to en- fers from the exact value by an arbitrarily small ␮~ ␮ sure that N –1 differs from the exact value N –1 by amount provided N2 is sufficiently large. 2 2 an arbitrarily small amount for large enough values If the oscillatory case applies for all n N2, then of N2, but it might be too crude for the more exact- limngn g must exist. If this limit doesn’t ex- ing task of deciding when the computational inter- ist—if gn diverges as n —then the exterior re- val is large enough. We can obtain a somewhat gion includes a critical point Nc (not necessarily better estimate (although not a strict upper bound) integer) defined by h2g = 4 and the estimate of Nc ~ by replacing y on the right side of Equation 14 with Equation 15 applies for N N . But y oscillates ~ n ~2 c n ~ y ; this gives wildly for n N (because ␮ > 1 for h2g > 4, y and n ~ c n n y have opposite sign) and bears no apparent re- ∆µ n+1 N −1 µµ−< 2 lation to the discretized version of the continuum NN−−11 22 −−µ 2 solution in this range. This unphysical behavior 11()N 2 isn’t a failure of the slowly varying approximation; ∆µ N −1 it stems from the inability of any discrete form on = 2 (16) µµ− . a uniform mesh to follow a continuum solution NN()2 22 that oscillates with ever-increasing rapidity. Evi- dently, the continuum limit h 0 is incompatible No better general estimates are likely in this case; with the discrete asymptotic limit n in such indeed, if we believe only that yn has the same sign cases. (A similar circumstance arises with the Nu- ~ as yn for all n N2, then the monotonic behavior of merov method if gn < 0 and is unbounded for n gn guarantees that all terms in Equation 14 are cu- . The Numerov renormalized value (see Equa- mulative, so the sum’s magnitude exceeds that of tion 4) becomes singular for that Ns (not necessar- ␮ 2 any one term. In particular, we can expect | N –1 – ily integer) that makes 1 + h /12gNs = 0 and ␮~ ␮~ 2 N2–1| > | N2–1|. changes sign for n > Ns, passing through the criti- Similar reasoning applies to the oscillatory cal point Nc to eventually saturate at the value 2 ~␮ 2 ~ case 0 < h gn < 4, but now n is complex with real 12/h . Again, the behavior of yn (and yn) is decid- and imaginary parts that we must handle sepa- edly unphysical for n Ns.). The dilemma is re- rately. Using Equation 6, we have in place of solved in practice by replacing gn with a constant տ Equation 1, in the asymptotic region n Nc, thereby render-

MAY/JUNE 2006 57 ␮~ ing n–1 0 there and truncating the sum in fields, and physics pedagogy. Moyer has a PhD in physics Equation 14 at some N < Nc. In effect, we first cap from the State University of New York at Stony Brook. He is the troublesome divergence at the continuum level a member of the American Physical Society, the American and then discretize the resulting model. Asociation of Physics Teachers, Phi Beta Kappa, and the So- Hence, so long as gn is asymptotically monotonic, ciety of Sigma Xi. Contact him at [email protected]. the slowly varying approximation of Equation 6 can—at least, in principle—be used to generate so- lutions to centered-difference or Numerov accuracy by adopting a suitably large computational interval.

n this article, I advocate using discrete trans- parent boundary conditions to solve eigen- value problems, notably those posed by the stationary state Schrödinger equations of Iquantum mechanics. The methods I outline here for calculating allowed particle energies, scattering coefficients, and partial wave phase shifts are used extensively in a software application, QMTools, that I authored to help beginning students visual- ize the abstract concepts of quantum physics. Visit the QMTools project Web site http://people.uncw. edu/moyerc/QMTools/ to download the software along with numerous examples illustrating its ped- agogical benefits.

Acknowledgment The US National Science Foundation, under grant number DUE-9972322, provided financial assistance for this project.

References 1. P.C. Chow, “Computer Solutions to the Schrödinger Equation,” American J. Physics, vol. 40, no. 5, 1972, pp. 730–734. 2. J.L.M. Quiroz Gonzalez and D. Thompson, “Getting Started with Numerov’s Method,” Computers in Physics, vol. 11, no. 5, 1997, pp. 514–515. 3. A. Arnold, “Numerically Absorbing Boundary Conditions for Quantum Evolution Equations,” VLSI Design, vol. 6, 1998, pp. 313–319. 4. M. Ehrhardt, “Discrete Transparent Boundary Conditions for General Schrödinger-Type Equations,” VLSI Design, vol. 9, no. 4, 1999, pp. 325–338. 5. C.A. Moyer, “Numerov Extension of Transparent Boundary Con- ditions for the Schrödinger Equation in One Dimension,” Amer- ican J. Physics, vol. 72, no. 3, 2004, pp. 351–358. 6. J.V. Noble, “The Right Angle: Precise Numerical Orthogonality in Eigenstates,” Computing in Science & Eng., vol. 4, no. 5, 2002, pp. 91–97. 7. R. Serway, C. Moses, and C. Moyer, Modern Physics, 3rd ed., Brooks/Cole-Thomson Learning, 2005. 8. S. Gasiorowicz, Quantum Physics, 2nd ed., John Wiley & Sons, 1996.

Curt A. Moyer is professor and chair of the Department of Physics and Physical Oceanography at the University of North Carolina, Wilmington. His research interests include ion-surface collisions, properties of matter in superstrong

58 COMPUTING IN SCIENCE & ENGINEERING