Physics 252 Homework

Due April 18, 1997

Solving Schrödinger's Equation for the Finite Square Well

The object of this homework assignment is to find out how to use Excel spreadsheets to solve the time-independent Schrödinger equation, and thereby gain insight into how the wave function behaves for various potentials - and getting ready for next week's pledged set!

We choose units so that , and denote the wave function by f(x) or just f.

We have:

To solve this using the spreadsheet, it is necessary to discretize the derivative. We replace the continuous variable x by a sequence of equally spaced points dx apart, such as 0, dx, 2dx, 3dx, … . Here dx is of course finite, we should really call it delta_x.

We approximate the second derivative by:

so the differential equation is replaced by the difference equation:


Notice that from this equation, if we know f(xj), f(xj-1) and V(xj) we can find f(xj+1). Of course, we do know V(xj), this is the potential we are trying to solve for. We can also specify E - the energy of the particle (although we shall find that some values of E do not correspond to stationary states with finite wave function everywhere).

A second-order differential equation like this needs two boundary conditions for the solution to be defined. We can specify the initial value of f and its derivative df/dx. But this is just equivalent to giving the first two members of the discrete series, f(x0) and f(x1), say. We can then use the difference equation to find f(x2), then use it again to find f(x3) and so on. This is what the spreadsheet does for us - we find f(xj+1) row by row using the difference equation above written:

Constructing the Spreadsheet

Give it a title, write your name, and a brief account of what it will do at the top (this can be revised later!).

Assign squares for the input: the energy E, and the values f(0) and f'(0), say, if we start at the origin (the spreadsheet will translate these into f(x0) and f(x1)). The other important physical parameters are the depth of the well D, and the width of the well (twice the distance from the origin to the wall) is W. Specify also the step size dx. This will have to be adjusted on changing E usually. (I put the values of E, f(0), f'(0), dx, D and W into B15, 16, 17, 18, 19 and 20 respectively.)

Insert Names: it's good practice to use Insert/Name.. to name the square where you type your energy value E, the well depth D, the step value square dx, and the width of the well W. Just give them the names E, D, etc. You can then use these names when you write formulas in other squares, and it's easier to follow what you're doing.

Assign three columns (I used D, E, F) to position x, V(x) - E, and f(x) respectively. Type 0 into D16, then the formula =D16+dx into D17 (you must have already typed some numerical value into the square named dx). If you see the appropriate value coming up in D17, select (highlight) D17, click copy, and drag downwards about 600 rows (this will go fast if you drag hard). When all the cells you're copying to are black, press Enter, and the whole column should be filled with numbers.

For the square well potential, I used the Excel SIGN function, which is equal to one for positive numbers, -1 for negative numbers. Therefore, my first entry in the V(x) - E column is =D*0.5* (1+SIGN(D16-0.5W))-E (this assumes you have assigned names, and there are some values in the named cells).

The function column: my column F. The first entry is just f(x0) = f(0), so enter =$B$16, or whatever cell you used for that input. The second entry f(x1) = f(0) + f'(0)dx, so put =$B$16 + dx*$B$17.

The third entry in the function column is the first to use the formula: in square F18, enter:

(2 + dx*dx*E18)*F17 - F16

This is the formula you will copy down 600 rows, and solve Schrodinger's equation.

Make a graph: plot the wave function and V(x)-E as functions of x on the same graph.

Exercises

1. Fix the width of the well by putting W = 2*3.14159, then vary D to try to find how many even bound states there are as a function of D, for a small number of bound states. See if you can find the well depth necessary for there to be more than one bound state. Then check out the well depth necessary for there to be an odd bound state, f(-x) = -f(x).

Look at wave functions for the energy greater than the well depth. Comment on how the phase and amplitude change at the boundary.

2. Make a copy of your spreadsheet and replace the potential with a simple harmonic oscillator potential, proportional to x2. Find the energies of the first four states (two even, two odd), sketch the wave functions. Now look at a very high energy state (many wiggles) and see if you can relate the probability distribution to a classical simple harmonic oscillator.

3. Make another copy and put in a roller coaster potential, one proportional to sine x. Look at the wave function for energy much greater than the potential, and see how the probability varies with position on the roller coaster. Then lower the energy so that the particle barely makes it over the hills. What happens to the wave function? What happens if the energy is not enough to make it over the hills?