Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf ·...

13
Numerical Solution of the time-independent 1-D Schrodinger equation. Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve the stationary Schrodinger equation that uses the Numerov Al- gorithm, the code is built upon by employing a minimisation procedure to find the eigenstates of 3 potentials: the infinite square well, the step potential and the linear potential. Rescaling the potential, the acceptable error achieved for the computational energy eigenvalues is found to be O(10 -9 ) by comparing to the analytical solutions of the infinite square well. Simpson’s rule is then utilised to normalise the wavefunction,and verified by comparision to the analytical normalisation of the infinte square well. Hence, the probability of a particle being in the right hand side of the step potential well is found to be 0.05 for the ground state, demonstrating the principle of quantum tunnelling; approaching 0.5 for higher energy levels. The orthogonaility of the eigenstates is verified up to an error of O(10 -7 ) given for a tolerance of 0.0000001. The eigenstates of all 3 potentials are plotted, comparing the normalised case to the unnormalised case for the infinite sqaure well. 1

Transcript of Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf ·...

Page 1: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Numerical Solution of the time-independent 1-D Schrodinger

equation.

Evan Sheridan11367741

October 29th 2013

Abstract

Given a template to solve the stationary Schrodinger equation that uses the Numerov Al-gorithm, the code is built upon by employing a minimisation procedure to find the eigenstatesof 3 potentials: the infinite square well, the step potential and the linear potential. Rescalingthe potential, the acceptable error achieved for the computational energy eigenvalues is foundto be O(10−9) by comparing to the analytical solutions of the infinite square well. Simpson’srule is then utilised to normalise the wavefunction,and verified by comparision to the analyticalnormalisation of the infinte square well. Hence, the probability of a particle being in the righthand side of the step potential well is found to be ≈ 0.05 for the ground state, demonstrating theprinciple of quantum tunnelling; approaching ≈ 0.5 for higher energy levels. The orthogonailityof the eigenstates is verified up to an error of O(10−7) given for a tolerance of 0.0000001. Theeigenstates of all 3 potentials are plotted, comparing the normalised case to the unnormalisedcase for the infinite sqaure well.

1

Page 2: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

1 Introduction and Theory

The time-independent 1-D Schrodinger equation is given by

Eψ(x) =h̄2

2m

d2ψ

dx2+ V (x)ψ(x) (1)

In Quantum Mechanics there is the idea of wave-particle duality. That is, a particle can exhibitproperties of waves and vice versa. Developing this idea further the Schrodinger Equation can bederived, an equation that has ψ(x), the wavefunction, that details the behaviour of a quantumsytem. If ψ(x) is solved for in (1) for a given potential then by taking |ψ(x)|2 gives the probabilityof a the particle of mass m being at position x subject to a potential V (x). As well as this (1) is aneigenvalue equation meaning that only certain values of E will satisfy (1), these are the eigenvalueenergies and ψn(x) are the eigenstates.

In order to solve (1) it can be dealt with as a 2nd Order ODE. In most cases the potential that isdealt with is too complicated to give an analytical solution so in this experiment the solution ψ(x)for 3 different potentials is calculated numerically using the Numerov algorithm.

The numerov algorithm integrates equations of the form :

d2y

dx2+ k2y(x) = 0

To go about deriving the Numerov integration scheme one must take Taylor expansions of y(x+ l)and y(x− l) which are added to elimate all odd powers of l. From these equations and some similararguments involving the elimation of higher order derivatives to get an error term to be O(l4) the3 point Numerov formula is found to be :

yn+1 =2(1− 5

12 l2k2n)yn − (1 + 1

12 l2k2n−1)yn−1

1 + 112 l

2k2n+1

and thus by fixing yn and yn−1 we can solve for yn+1 with kn = γ2(ε − f(xn) in the case of theSchrodinger equation and l being the step size.

As well as the Numerov Algorithm, in this experiment the familiar method of Simpson’s rule isapplied to normalise the wavefunction where a function is broke down into parabolic segments withthe integral given by :

∫ xn

xo

f(x)dx ≈ l

3

f0 + 2

n2−1∑j=1

f2j + 4

n2∑j=1

f2j−1 + fn

which can be coded with the implementation of two for loops. For all numerical integration in thisexperiment Simpson’s Rule will be used, except for when we solve for ψ(x) using the NumerovAlgorithm.

2 The Experiment

Since the program solves (1) numerically we must first non-dimensionalise the equation as thecomputer does not work in the conventional units. Scaling each variable appropraitely and makingan ansatz coupled with the boundary conditions imposed by the infinte square well potentionalwith V (x) = −V0 inside the well. Taking these considerations into account an expression for ε, thenon-dimensional energy, can be found in terms of γ2

Now if the inputted trial energy into the program isn’t an eigenvalue then the slope will be dis-continous at the matching point. Implementing the Euler Difference into the the FindEigenstate

1

Page 3: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

function the slope difference at the matching point can be found.Moreover, constructing a while loop into the FindEigenstate function that uses this slope differencesuch when we put an arbitrary trial energy into the program will give us the closest energy eigen-value is used. Within the loop we increment the energy until the difference in the slopes changessign then decrease then increment and iterate until the desired accuarcy is obtained.

The minimisation procedure to find the energy eigenvalues will not work for the first excited state,or any even eigenstate for that matter with the current program. The Numerov algorithm shootsfrom the left starting at 0.0001 and from the right at 0.0001. The superficial way to obtain the firstexcited state is to negate the initial value when it shoots from the right. The more formal way isto scale the function within the Numerov Algorithm for each ψ.

The wavefunction satisifies the normalisation condition∫ 1

0|ψ(x̃)|2dx̃ = 1

Thus far we have not taken this normalisation into account, the normalisation is essential to theproblem, ensuring that the probability of finding the particle in the well is a certainty. In order todo this we utilise Simpson’s rule for numerical integration and write such a function to act on ψand solve for B, the normalisation constant. By plotting the normalised and unnormalised graphsthe difference will be appartent.

In the InitPotential program there are two other potentials: the step potential and the linear po-tential. Uncommenting the step potential the ground state can be found using the minimisationand scaling procedure that has been developed for the infinite potential. Once the gorund stateis found the first few eigenstates can be found and graphed, bearing in mind the choice of thematchpoint must be outside the bump due to the step.

Furthermore, by using the normalisation function as a basis for an integration program the proba-bility of the particle being in the right side of the step potential well can be calculated by solvingthe integral ∫ 1

0.5|ψn(x)|2dx = Pn(0.5 ≤ x ≤ 1)

which can be expressed numerically using Simpson’s Rule as

∫ xn

xn2

f(x)dx ≈ l

3

fn2

+ 2

n4−1∑j=1

f2j + 4

n4∑j=1

f2j−1 + fn

and going to higher energy levels the asymptotic value that the probabilty approaches can be found.

The last function to be added to the code will be an orthogonality function that will check whethertwo eigenstates are orthogonal. To implement this two trial energies must be asked and two datafiles must be output and as opposed to integrating the wavefunction against itself as we did for theprobability the two wavefunctions will be integrated against each other.

Lastly uncomment the linear potential in the IntPotential function and find as well as plot the firstfew eigenstates using the code that has been built up on.

3 Results and Analysis

Non-dimensionalising (1) we make the ansatz :

2

Page 4: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

ψ(x̃) = A cos(kx̃) +B sin(kx̃)

where x̃ = xL . Using the boundary conditions that ψ(0) = ψ(1) = 0 it’s found that A = 0 and

B sin(k) = 0, B 6= 0

⇒ k = nπ, k = γ√ε− f(x̃)

letting V (x̃) = −V0 and equating the k’s

γ√

1 + ε = nπ

which enables us to find an expression for the dimensionless energy given by:

εn =n2π2

γ2− 1

Using this formula we find analyitically that the first 6 Energy eigenvalues are :

n εn1 -0.901303956

2 -0.605215824

3 -0.1117356039

4 0.5791367042

5 1.4674011000

6 2.553057584

Plotting ψ(x̃) above and below the ground state energy given by n = 1 gives the wavefunctionsin Fig.1. As expected at the matching point the wave function is discontinous since it is not aneigenfunction.

Knowing that if the trial energies are not eigenvalues then there will be a discontinuity at thematching point we see that the slope difference at the matching point is minimized at the matchingpoint for the ground state

ε Slope Left Slope Right Difference

-0.901303956 -0.0010332 +0.0010332 0.0020664

+0.5 0.0986344 -0.0986344 0.197269

+3 -0.0838264 0.0838264. 0.167655

+10 -0.0640321 0.0640321 0.128064

-1.5 1.7154 -1.7154 3.43079

-5 1100.17 -1100.17 2200.33

-10 163269 -163269 326538

For energies less than the ground state we see quite a drastic discontinity which is illustrated inFig.1.

After implementing the while loop into the Eigenstate function and setting , we get the followingaccuracy(setting dE = 0.1) :

3

Page 5: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Tolerance εanalytical εcomputational Difference

0.01 -0.901303956 -0.912500000000 0.011196044

0.001 -0.901303956 -0.900000000000 1.303956 x 10−3

0.0001 -0.901303956 -0.901367187500 6.32315 x 10−5

0.00001 -0.901303956 -0.901306152344 2.196344 x 10−6

0.000001 -0.901303956 -0.901303100586 8.55414 x 10−7

0.0000001 -0.901303956 -0.901304054260 9.836 x 10−8

0.00000001 -0.901303956 -0.901303958893 2.893 x 10−9

So by upping the tolerance of the condition in the while loop we can get the difference between theanalytical ground state and computational ground state of the order 10−9. Obviously, upping thetolerance increases the accuracy of the calculation, though by increasing even further it can leadto a longer run time of the program and the order 10−9 seemed the best balance between the two.

Trying to find the first excited state using the minimisation procedure proved unsuccessful. Thereason for this is that the the Numerov Algorithm shoots both from the left and right starting at0.0001. Though for the first excited state it should shoot at -0.0001 from the right initially becausethis is the form of the wavefunction. Though we can find both even and odd eigenstates using thismethod it is superficial and not general.

In order to successfully get the first 6 eigenstates we must scale the function appropriately by thescaling factor within the Numerov Algorithm:

y =ψleft(MP )

ψright(MP )

Now the function scales approprately and matches at the matchpoint, taking into considerationthat if ψ(x) is a solution to (1) then so is cψ(x) where c is a constant. Though it is found that forenergy level Ei then the MatchPoint MP 6= N

i . It is because at MP = Ni is an inflection point of

ψ(x) and one must be aware of it to obtain the correct values. It was found that εcomputational wasa good approximation to εanalytical. The non-normalised wavefunctions are illustrated in Fig.2.

n εanalytical εcomputational Difference

1 -0.901303956 -0.901304054260 9.826 x 10−8

2 -0.605215824 -0.605215835571 1.1571 x 10−8

3 -0.1117356039 -0.111735725403 1.21503 x 10−7

4 0.5791367042 0.579136657715 4.6485 x 10−8

5 1.4674011000 1.467400932312 1.67688 x 10−7

6 2.553057584 2.553057479858 1.04142 x 10−7

By taking the tolerance to be 0.0000001 an acceptable accuracy with error of order 10−7 is achievedfor the computational solutions.

After the implementation of the normalisation function it’s noteworthy that the maximum of eacheigenstate occurs such that

n ψmax1 1.41421

2 1.41421

3 1.41421

4 1.41421

5 1.41421

6 1.41421

4

Page 6: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Thus due to the normalisation we get

ψmax(x) ≈ 1.41421 ≈√

2

which can also be read off the normalised graphs in Fig.3.

If we impose the normalisation condition on the analytical solution we get

B2

∫ 1

0sin2(nπx̃)dx = 1

⇒ B =√

2

⇒ ψ(x) =√

2 sin(nπx̃)

is the general analytical expression and from this ψmax =√

2 indicating that the computationalnormalisation of the wave function is correct.

The first 6 eigenstates for the step potential are given by :

n εn1 -0.731329536438

2 -0.023988723755

3 0.436729530334

4 1.152688026428

5 1.959921646118

6 3.095349502563

and are illustrated in Fig.4.

Implementing the probability function into the code that calculates the probabilty that the particlewill be found in the right hand side of the well gives the following results:

Energy P(0.5 ≤ x ≤ 1)

-0.731329536438 0.0517193

-0.023988723755 0.35863

0.436729530334 0.739263

1.152688026428 0.582026

1.959921646118 0.522497

3.095349502563 0.567106

11.436141014099 0.492804

100.566489982605 0.503613

1006.253493881227 0.499913

10061.190494728311 0.498058

The first probability for the ground state energy corresponds to the phenomena of quantum tun-nelling whereby the particle has a non-zero probability of being found in a region where classicallyit should be zero. The second one also demonstrates this, but in a less drastic manner due to thefact that the energy is now approaching the amount of energy needed to overcome the potentialbarrier.

Going to higher energy levels the Probability that the particle is in the right hand side of the wellis such that P(0.5 ≤ x ≤ 1) → 0.5. Essentially this means that there is a 50% chance that the

5

Page 7: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

particle will be found in the right hand side of the well at high energies.

The effect of the normalisation of the wavefunction can be seen here, if say we omit the normalisationfunction in the program we get the following probabilities

Energy P(0.5 ≤ x ≤ 1)

-0.731329536438 9.24541 x 10−6

-0.023988723755 1.16882 x 10−5

0.436729530334 5.07387 x 10−5

1.152688026428 1.71603 x 10−5

1.959921646118 1.11582 x 10−5

3.095349502563 6.53973e x 10−6

11.436141014099 1.10966 x 10−6

100.566489982605 3.07101 x 10−7

1006.253493881227 1.30309 x 10−7

10061.190494728311 2.29549 x 10−8

Obviously in order to obtain correct results we must normalise the function. Without the normal-isation it can be seen that even as we approach higher energies the probability does not approachany discernible asymptotic value, as well as the fact of it being incorrect.

Using the following notation: ∫ 1

0ψi(x̃)ψj(x̃)dx̃ = i ∧ j

the orthogonaility of the eigenfunctions was checked:

1 ∧ 1 1

1 ∧ 2 −3.46079 x 10−9

2 ∧ 3 4.75648 x 10−8

3 ∧ 4 7.00496 x 10−8

4 ∧ 5 9.10195 x 10−7

5 ∧ 6 1.20518 x 10−6

6 ∧ 6 1

Accepting that 10−7 is an appropriate accuracy then it illustrates∫ 1

0ψi(x̃)ψj(x̃)dx̃ = δij

i.e the set of all eigenfunctions ψn(x) form a complete orthogonal set on 0 ≤ x ≤ L which meansthat any function between 0 and L can be written as a sum of the functions in the orthogonal setwith sutible,unique coefficients.

The Linear potential was investigated the the first 6 eigenstates are given by:

n εn1 -0.200371093750

2 0.401537513733

3 0.951191406250

4 1.626015625000

5 2.499160156250

6 3.575583839417

6

Page 8: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

which are illustrated in Fig.5.

It is noted that these bear a similar resemblance to the eigenstates of the step potential. The Linearpotential is given by

V (i) =2i

998

with i running from 0 → 999 which means the potential varies linearly from 0 →≈ 2 . The steppotential is 0 for the right hand side of the well but the first energy eigenvalue for the linear potentialis greater than the step potential. Since the linear potential actually varies throughout the well,and the eigenstates are different, it is this combined effect that introduces a similarity between thetwo potentials.

4 Discussion

The analytical solution for the non-dimensionalised Schrodinger Equation, in the case of the infinitesquare well, is given by ψ(x̃) =

√2 sin(nπx̃) which is indeed dimensionless, and bearing similarity

to the normal solution given by ψ(x) =√

2L sin

(nπxL

). This is a subtlety that can be ignored and

will give skewed results. Bearing in mind that a computer works with numbers, in our case anyhow,and not units, it is noteworthy then, that one must incorporate how the computer works as well ashow the physical system is described. Ultimately meaning that the dimensionless results found inthe experiment such as energy eigenvalues are meaningless until we convert them back to physicalresults by an appropriate transformation.

A lot could be said for choice of numerical integration schemes in the program. By this, there area quite a number to choose from, each having their advantages and disadvantages. For instance,ψ(x̃) could equally be solved using a 4th order Runge-Kutta method which wouldn’t exploit thelinearity of (1) or the fact that there is no first derivative in (1) which the Numerov Algorithm doesexploit. The same goes for Simpson’s rule which has a leading error of O(l5) which could be im-proved by employing higher order rules such as Boole’s rule that has a leading error of O(l7) but isa bit more involved and Simpson’s rule is quite intuitive and easy to apply, thus suiting our purposes.

Throughout the experiment it became tedious that in order to obtain each energy eigenvalue anew trial energy above the previous eigenvalue had to be inputted. Perhaps a modification to thecode that would make it less cumbersome would be to repeat the minimisation procedure after theground state is found with a new trial energy above the ground state up until, say, the 6th eigen-value is found, and print out each value. In essence it would just require a repitition of the programwithin itself and different output files so that each seperate eigenstate could then be plotted. Apipe into gnuplot would then make the code even more efficient and would mean an entire taskcould be done at the touch of a button.

5 Appendix

7

Page 9: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Figure 1: Infinite Square Well Above and Below Ground State

8

Page 10: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Figure 2: Non-normalised Eigenstates of the Infinite Square Well

9

Page 11: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Figure 3: Normalised Eigenstates of the Infinite Square Well

10

Page 12: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Figure 4: Normalised Eigenstates of The Step Potential

11

Page 13: Numerical Solution of the time-independent 1-D Schrodinger …sheridev/labs/Schrod.pdf · 2013-12-14 · Evan Sheridan 11367741 October 29th 2013 Abstract Given a template to solve

Figure 5: Normalised Eigenstates of The Linear Potential

12