# Solving Schrodinger’s Equation

### Introduction

Among the most important discoveries of the 20th century, the Schrodinger Equation is an extraordinarily powerful mathematical model that can be used to derive many interesting properties of quantum mechanical systems. Given the volume of information that is available on this subject, I will concentrate more on explaining what I did and less on explaining the basics of the equation.

The goal of this project was to write a computer program that would be able to numerically evaluate time-independent particle wavefunctions given various potentials. It was submitted as my 9th grade computer programming final project in June 2010.

### Design

The layout of the program was designed to be as simple and straightforward as possible while still being usable. There are no fancy graphics (mainly this was because I didn’t know how to code them back then!) and the interface consists only of buttons for selecting settings and three 2D graphical displays, one for the normalized probability distribution, one for the potential function, and one for the original wavefunction.

### Construction

The programming language I used for this project was Java.

The program used a numerical approximation called Numerov’s method to plot wavefunction solution curves given basic parameters like total system energy and angular momentum, with the latter only in the case of hydrogen orbitals. Due to the quantized natures of these systems, solutions do not come in continuous slope curves as with ordinary differential equations (pardon the pun), but are more discrete – only certain values for each parameter will generate solutions that are physically possible (normalizable).

Essentially, Numerov’s method is a recursive formula that works by using a pair of starting points, sort of like initial conditions, to repeatedly extrapolate consecutive data points. The best part about it is that as long as your first point is the origin, the second point can be completely random so long as it is one step away in the x-direction; once the curve is plotted, we normalize the probability distribution (because we are considering only one particle) so the absolute positions of the initial points don’t matter. The first point was set to the origin because this constraint suited all of the potentials that I considered. For example, in the case of a particle in the box, the wavefunction must go to zero at the edges of the box because the particle cannot have infinite potential energy and in the case of a hydrogenic wavefunction, it must go to zero at the origin because angular momentum would not be conserved if the proton and electron were in the same spot.

That said, the actual code is not very difficult. The starting points are stored in a 2xn array and a for loop (we know how large the graph is, so we can calculate the number of steps in the domain before we use Numerov’s method) recursively calculates and stores the remaining points. Finally, the axes and the connections between the data points are made using the drawLine function. A set of buttons at the top of the applet control parameters, including the potential function. Because setting the parameters to incorrect values can cause the wavefunction to diverge wildly, I decided not to automate normalization. There is a subroutine that uses a Riemann approximation to calculate the total area under the curve so that the user can manually set the normalization coefficient.

### Results

Several hundred lines of code later, it works! Here are some interesting solutions to various potentials:

#### 1. Free particle #### 2. Particle in a box #### 3. Quantum tunneling (finite potential barrier) #### 4. Hydrogen orbitals

1s orbital: 2s orbital: 2p orbital: …..and on and on and on!

Advertisements

## One thought on “Solving Schrodinger’s Equation”

1. vishvanath chaudhari says:

it’s realy gud…..i also doing project on schrodinger equation based on fortran language…so this one quite help ful to me….