You are on page 1of 8

Numerical Solution of the One dimensional potential box problem

Hemanta Bhattarai CDP,TU October 18, 2012

Formulation of Problem:
h 2 d2 + V (x) = E 2m dx2

The time independent Schrodinger equation is: (1)

For simplicity let us assume h=m=1 The potential V (x) for the potential box problem is given as: V (x) = {0; 0x ; elsewhere (2)

The boundary conditions are: (0) = 0 (a) = 0 For simplicity let us assume that a=1. Now the Schrodinger equaiton for the potential (2) is: d2 = 2E dx2 (3)

The required wave function is the solution of the ODE (3) satisfying the boundary condition (0) = 0 (1) = 0 .

Methodology:

Since, the dierential equation (3) is the boundary value problem. We must rst determine the correct energy E that satises the boundary condition.And then nd the wave function In order to solve the equation here we are going to implement shooting method,secant method and 4th order Runge-Kutta method. Let us discuss each of them in brief:

2.1

Runge-Kutta method:

This is the method, which helps to determine the solution of the dierential equation with initial contitions. Here the 2nd order dierential equation is rstly converted in 1st order dierential equation. In the above problem let = y1 and d = y2 dx Then (3) can be written as: dy1 = y2 dx dy2 = 2Ey1 dx (4) (5)

Above equation can be easily solved if we know the initial value i.e y1 (0) and y2 (0). The method to determine the solution can be found in any book of numerical analysis.But I prefer Scarborough Numerical Mathematical Analysis 6th Edition Art.116 Pg 361

2.2

Shooting method:

In subsection 2.2 we knew that the solution of (4) and (5) can be found by using Runge-Kutta method if we know the initial values.But we only know y1 (0) = 0.So we assume y2 (0) = ,(a small number).But value of 1 wont aect nal solution because it will be normalized. Main problem that we will encounter here is to use the boundary condition y1 (1) = 0 to determine the value of the energy E. This can be done using Secant method.

2.3

Secant Method:

This technique is used to determine the root of the given equation.The detail of the method can be found in any books of numerical analysis.Here we assume E (any xed value), and use the Runge-Kutta method to solve the equation (4) and (5) using the initial condition that we assumed in shooting method and determine the equation:f (E) = y1E (1)Then we use the secant method to determine the value of E for which f(E)=0. Finally we will use value of E determined from secant method and the initial value from the shooting to solve (4) and (5) using Runge-Kutta method. 2

2.4

Code:

The link for the script le for the Runge-Kutta method is http://www.scribd.com/doc/110376218 The link for the script le for the Secant method is http://www.scribd.com/doc/110376225 The link for the main le to execute the above method is http://www.scribd.com/doc/110376221

Result:

The analytical solution for the wave funtion is given by n (x) = 2sin(nx) and the energy of the nth state is given by: En = n2 2 2

The comparison of the analytical result and the numerical result is given below:

3.1

Comparison of Energy levels;

For the no.of grids for Runge-Kutta method :n=10000 The analytical result of energy for n= 1 is : 4.9348022005 The numerical result of energy for n=1 is : 4.93480220051010

The analytical result of energy for n= 2 is : 19.7392088022 The numerical result of energy for n=2 is : 19.73920880221010

The analytical result of energy for n= 3 is : 44.4132198049 The numerical result of energy for n=3 is : 44.41321980491010

The analytical result of energy for n= 6 is : 177.6528792196 The numerical result of energy for n=6 is : 177.65287921961010

The analytical result of energy for n= 15 is : 1110.3304951226 The numerical result of energy for n=15 is : 1110.33049512601010

The analytical result of energy for n= 20 is : 1973.9208802179 The numerical result of energy for n=20 is : 1973.92088023711010

The analytical result of energy for n= 32 is : 5053.2374533578 The numerical result of energy for n=32 is : 5053.23745368031010

3.2

Comparison of the wavefunction:

Figure 1: Numerical and Analytical solution for n=1 state.

Figure 2: Numerical and Analytical solution for n=2 state.

Figure 3: Numerical and Analytical solution for n=3 state.

Figure 4: Numerical and Analytical solution for n=6 state.

Figure 5: Numerical and Analytical solution for n=15 state.

Figure 6: Numerical and Analytical solution for n=20 state.

Figure 7: Numerical and Analytical solution for n=32 state.

Conclusion:

The numerical solution matches the analytical solution.However, the energy level dosent match for all the decimal places which can be minimized by increasing the number of grids taken in the Runge-Kutta method

You might also like