Skip to main content
Library homepage
 

Text Color

Text Size

 

Margin Size

 

Font Type

Enable Dyslexic Font
Physics LibreTexts

7.3: Higher Dimensions

( \newcommand{\kernel}{\mathrm{null}\,}\)

We can work out the finite-difference equations for higher dimensions in a similar manner. In two dimensions, for example, the wavefunction ψ(x,y) is described with two indices:

ψmnψ(xm,yn).

The discretization of the derivatives is carried out in the same way, using the mid-point rule for first partial derivatives in each direction, and the three-point rule for the second partial derivative in each direction. Let us suppose that the discretization spacing is equal in both directions:

h=xm+1xm=yn+1yn.

Then, for the second derivative, the Laplacian operator

2ψ(x,y)2ψx2+2ψy2

can be approximated by a five-point rule, which involves the value of the function at (m,n) and its four nearest neighbors:

2ψ(xm,yn)ψm+1,n+ψm,n+14ψmn+ψm1,n+ψm,n1h2+O(h2).

For instance, the finite-difference equations for the 2D Schrödinger wave equation is

12h2[ψm+1,n+ψm,n+14ψmn+ψm1,n+ψm,n1]+Vmnψmn=Eψmn.

7.3.1 Matrix Reshaping

Higher-dimensional differential equations introduce one annoying complication: in order to convert between the finite-difference equation and the matrix equation, the indices have to be re-organized. For instance, the matrix form of the 2D Schrödinger wave equation should have the form

νHμνψν=Eψμ,

where the wavefunctions are organized into a 1D array labeled by a "point index" μ. Each point index corresponds to a pair of "grid indices", (m,n), representing spatial coordinates on a 2D grid. We have to be careful not to mix up the two types of indices.

We will adopt the following conversion scheme between point indices and grid indices:

μ(m,n)=mN+n,wherem{0,,M1},n{0,,N1}.

One good thing about this conversion scheme is that Scipy provides a reshape function which can convert a 2D array with grid indices (m,n) into a 1D array with the point index μ:

>>> a = array([[0,1,2],[3,4,5],[6,7,8]])
>>> a
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])
>>> b = reshape(a, (9))     # Reshape a into a 1D array of size 9
>>> b
array([0, 1, 2, 3, 4, 5, 6, 7, 8])

The reshape function can also convert a 1D back into the 2D array, in the right order:

>>> c = reshape(b, (3,3))   # Reshape b into a 2D array of size 3x3
>>> c
array([[0, 1, 2],
       [3, 4, 5],
       [6, 7, 8]])

Under point indices, the discretized derivatives take the following forms:

ψx(rμ)12h(ψμ+NψμN)

ψy(rμ)12h(ψμ+1ψμ1)

2ψ(rμ)1h2(ψμ+N+ψμ+14ψμ+ψμN+ψμ1).

The role of boundary conditions is left as an exercise. There are now two sets of boundaries, at m{0,M1} and n{0,N1}. By examining the finite-difference equations along each boundary, we can (i) assign the right discretization coordinates and (ii) modify the finite-difference matrix elements to fit the boundary conditions. The details are slightly tedious to work out, but the logic is essentially the same as in the previously-discussed 1D cases.


This page titled 7.3: Higher Dimensions is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by Y. D. Chong via source content that was edited to the style and standards of the LibreTexts platform.

Support Center

How can we help?