Schrödinger 1D Equation Solver

Introduction

The goal of this project is to create an easily usable numerical solver for the 1D time independent Schrödinger equation which has the following form:

The numerical solver will produce a list of quantized Energy values for any potential, , function. Where the potential function represents the potential energy of the surroundings. The resulting probability distributions are graphed along with the energy values. This can be used to gather intuition about the quantum-mechanical properties of small particles along with demonstrating phenomenon such as tunneling.

Instruction of Use

When first launched two graphs will be visible. To view this document the About button is pressed. To edit the potential function and the integration settings press Settings.

Settings

When settings is first opened the following menu will open.

Currently only 1D graphing is supported.

Potential Equations

Functions can be added or removed using the "+" and "-".

Note: when adding or removing functions all the function data is cleared.

Note: the program assumes wave function only exists within the integration range. Thus it is important to keep this in mind and use potentials and integration ranges that sufficiently contain the wavefunction.

Integration Parameters

Note: Using a small step size and a large integration range can cause the webpage to become unresponsive.

Buttons

Interpretation of Results

The following is a example function that approximates a infinite square well using a sufficiently large finite square well.

Settings

Results

As can be seen two energy values were found between . and . These two are then graphed in the top graph. The legend relates which is which and the shaded portions of the graph represent the potential function.

Both graphs can be interacted with by clicking and hovering will reveal accurate data information. In the upper right hand corner of both graphs there is also options to save each plot for future reference.

Following quantum mechanical principles the graphs can be interpreted according to the following equation.

In other words larger the area is under a specific energy graph the more likely it is to find a particle in that location. In addition, the energy trend in the lower graph can be used to predict a overall trend.

Methodology

This section will focus on the techniques used to numerical integrate the Schrödinger equation.

Initial Considerations

A few considerations were initially made to simplify the process. The main such consideration is that:

This simplified calculations and does not alter the result beside with scaling. Additionally the solver is written to be able to assign to any value. However, this was omitted from the settings to increase simplicity.

Also to obtain definitive boundary conditions it is assumed the wavefunction only exists within the integration range.

Numerical Method

Many numerical methods could be used to solve the differential equation as it is only a second order. Despite the Numerov method being a common choice the 4th order Runge-Kutta method was chosen instead because if its increased flexibility.

Conversion Into a System of Equations

For use with the Runge-Kutta method the Schrödinger equation is converted into a system of differential equations. Carrying out the calculations and using:

yields:

Now the Runge-Kutta method can be applied.

Then to compute the next terms:

Initial Value Considerations

Now that the numerical method is defined it is important to consider the initial values that must be used in the calculations.

Using the property the wave function:

Now since it was assumed the wavefunction only exits within the integration range the above equation can be modified.

This implies:

and similarly:

Now there are initial values and boundary conditions for both extremes of the integration range.

Conversion to a Boundary Condition Problem

Despite having initial conditions and boundary conditions for both extremes, Runge-Kutta only solves differential equations using starting initial conditions. To solve this a new function was defined.

In other words given an energy level , returns the value of at . This is then used in conjunction with the bisection method to find the roots such that:

When a root is found it signified the energy value used satisfies the initial conditions and boundary conditions. Thus it is one of the quantized energy states.

Normalization

For each energy value the wavefunction is normalized according the following equation:

However, a trapezoidal Reimann sum was used in place of the integration in the numerical calculations.

Validation

In order to validate the numerical accuracy the program was compared against known exact solutions.

Infinite Square Well

A infinite Square Well has an exact solution and can be approximated in the program as a finite square will with sufficient size. The exact solution is of the form:

For a well with a length, of 5 units.

Program Settings
Results

Energy Levels of Numerical vs Exact for Infinite Square Well

n 0 1 2 3 4 5
Numerical 0.095 0.379 0.854 1.518 2.371 3.414
Exact 0.099 0.394 0.888 1.579 2.467 3.55
Absolute Difference 0.004 0.016 0.034 0.061 0.096 0.139
Percent Difference 3.816% 4.080% 3.933% 3.948% 3.985% 3.992%
Conclusion

As can be seen above the numerical method is not exact but only has an error of about . The error can also be explained through approximating an infinite square wall with a large finite square wall. In either case the numerical solver is representative of the exact solution to a high degree of accuracy.

Tunneling

One of the most interesting applications of the program is to show a wavefunction that tunnels through a high barrier. For example take the following example:

Graph

As can be seen the waveform starts on the left side of the potential and tunnels through.