So welcome back to this lecture about the harmonic oscillator in the previous lecture, we have determined
the first ion energy and the first ion function.
And also, we have realized that the methods that we are using to so-called shooting methods is quite
unstable in terms of the starting conditions.
So here we have to find some value a which we use as the starting point.
We will start from minus three in this case, and we have seen that when we go to even even smaller
values or even larger values in absolute value, let's say eight.
We can see that the wave function just explodes due to this exponential behavior here.
So that's something we definitely have to avoid.
So we make we have to make a sufficiently small.
But then there is another problem because when our energy is very large, then our parabola for the
potential will be larger and x direction as well.
So then maybe it is a is equal to three will be way too low or for the higher energies.
So what I found out, what I just want to tell you here is that we want to use a certain conditions
that we want to make this value of a energy dependent.
So we want to say that our parabola f potential is equal to be times x squared is supposed to be the
or is equal to the energy.
But what we want is actually that the energy is much, much smaller than this value.
So let's say, yeah, let's say you buy such a factor of 10 in terms of the size of this B.
So now if we solve this with respect to A, we get to square root piece square root 10 plus he will
v OK.
So this is now our energy dependent value for.
So of course, we need to
do it like this.
OK, so this I tested before that it works.
OK, so we still get our same value.
You can see for the energy of zero point five, the value is just slightly larger than this three that
we had previously.
But if we do something like this, you can see now the value is quite different.
So, yeah, OK, and actually, it turns out that we have found already here another I function.
OK, but what do you want to do next?
Like we did previously is we want to find this eigenvalues and eigen functions automatically.
So again, we are going to use a loop as we had before, and this time since it's basically exactly
the same thing as we had before.
I will just copy some code.
So this is exactly the same thing we had in the previous example where we had the particle inside of
the box.
But here with this modified potential and also with this modified a border, and then we have to increase
here.
Our energy by D, E and D and D is equal to zero point zero five.
So as it turns out, this solution here is much slower because we are integrating starting from much
larger values.
So here we have to integrate four minus three to three, and previously in the box, we only had to
integrate from zero to one.
So I will make the energy steps a bit larger this time so that it doesn't take forever.
So let's see what comes out.
The energy value is basically zero point five and we get the same wave function as here.
So it works very well.
So it's the same algorithm as before.
The only thing that is changed is the potential this value for a and of course, here this condition,
um, we had to make this this critical value here a bit larger because actually our wave function will
never go back to zero, even in the ideal analytical case.
But since we are inside of the potential here, it will be quite small.
But I gave it here some tolerance and made it a bit larger.
0.02.
OK, now and the next step, we want to go one step further and want to determine the some more eigenvalues
and ion energies.
So I will copy again the code from before.
And so this is again the same principle procedure as we had in the end, the example for the particle
in the box.
So we have here three while loops.
So basically what was added here is this while loop where we add where we loop over a counter and then
whenever we found an eigen system, we will add we will save it here and this list ion functions and
eigen energies and in the X values list as before.
And we also use here this trick, which avoids double counting of the same eigenvalue so we can now
run this.
I was really fast, actually.
And now we can look at the eye and energies.
OK, so that's actually really interesting and you can see here the iron values, the iron energies
of 0.5 1.5 2.5.
So we have equidistant energy levels and this is in fact true.
We will see this and one of the following sections where we will dissolve the system analytically.
Maybe we will have spent quite some time achieving this result that the energy level is actually one
half plus and where end starts from zero to one, two, three to four and so on.
And of course, we will have done the prefecture, but because we will determine in the analytical case.
So now let's look at the eigen functions.
So let us loop over the counter and plot every single X value list versus the EIGEN function list.
So this is what it looks like here.
Actually, I have used and max equal to 10.
Maybe that's a bit extreme.
Let's use five so that we can see something.
OK, so we have here our lowest energy level and blue, which does not have a zero.
Then the next one will be the orange one with one zero.
Then there will be the green one and the red one and then the purple one with one two three four zeros.
That's the fifth eigenvalue.
So this is, as I told you in general statement, that's always gonna be true.
Now we will normalize our way function as we did previously.
So let's test again.
OK.
Different from different from one.
So this is because basically, yeah, we have just assumed some value for the wave function at some
position here at the very left.
And of course, this value is not correct.
So we have to find the correct amplitude in order to make the statement true that the absolute screw
after wave function represents the probability density for the electron and it has to integrate to one
because the electron has to be somewhere.
So what we are going to do is we are going to loop over a counter of all of our away functions.
So now we determine norm for each of the wave functions and we will divide divide each value in the
list of design functions by the square root of the norm.
And then we can check again.
Yes, no, it's normalized to one.
And we can plot everything again, and you can see now they will have different amplitudes.
And this is not released.
Or it could be surprising for you because in the previous example, all of the way functions had the
same amplitude.
But as I told you already there, this is not a general statement.
So in general, the amplitudes for the wave functions can be different.
And as you see, here, they are, in fact different.
So now another thing that we want to do is we want to look at the absolute square plotted over X.
So this is the probability density.
So we will plot now the X values of the wave function versus the absolute square, which we have used
some non pi and p square squares every single element in this list so we can plot this now.
And so, yeah, this is what it is.
What you can see is the yeah, the probability density.
So basically, you can estimate here for this blue curve, it goes up to zero point five or something,
and here it goes from minus two to two.
So it really has the area of one.
Now, before we use this alternative way of plotting the wave functions, I want to show you something
pretty cool that I really liked.
So first of all, let's calculate a few more energy levels.
So let's go to 10.
OK, now we have your 10 eigen functions.
Um, let's normalize them again.
OK, so now we have here.
Ten functions, and we can also plot this one.
OK.
Good.
Now what I want to show you is that we can actually compare this.
This probability density, let's say off the level, the highest level that we have calculated so and
maximum minus one which looks like this, we can actually compare this to the to the classical case.
So this is quantum mechanics and the probability here.
And we can compare this to the classical probability.
OK, so classically when you have a harmonic oscillator, for example, you have a pendulum, then you
will have as a solution something like this.
You will have, for example, a cosine or a sign function of T times some frequency band that say,
we have cosine of two.
You
know, the classical probability is actually one over the velocity, because if you think about it,
when our pendulum spins or when your pendulum has the highest velocity, it will spend the least amount
of time at a certain position.
So when we look at the pendulum at a random point of time, it will be what the other, the possibility
of finding the pendulum in a certain state will be largest when the velocity is zero.
So I think to extrema and in the middle, where the velocity is highest, the probability is smallest
for finding the pendulum in this state.
So we can now use this equation to determine the the velocity.
So this is actually the of T is equal to minus sine of T.
And also, we want to express this velocity not in terms of T, but in terms of X.
So actually, we want to have this one here.
So what we use here is T of X is the inverse function, of course.
So we have our cosine of X.
So we can just write minus sine or we can can do it like this or the of X is equal to minus sign of
Orcus cosine of X.
So this is now the classical solution for the velocity.
And now we calculate this probability.
So P of X is one over the velocity, so it's basically a minus one.
We have X is minus one over the sign of the R because cosine of X.
And actually, when you use some, some basic trigonometry, you can find that this is actually equal
to.
Two minus one over the square root of one minus x squared.
And now for the probability since it's always the absolute value, we can just do it like this.
What's happening here?
OK?
Um, so we will get this one here.
So this is the equation for the classical probability that we are now going to plot.
So let us do this.
No, let's plot this classical equation on top of this quantum mechanical result.
First of all, we need some X values for this plot.
So we have it and p range.
Um, let's say, you know, let's let's let's we scale it later minus one to one, and we use 100 points.
Now let's let's just plot it pretty plots.
And we start with this x one.
That's for a moment not care about the scaling on the x axis.
We just write down what we had here.
So this is one minus x one squared.
OK.
OK, this looks pretty large, let's.
OK.
Still pretty large, 20.
Mm hmm.
OK.
And now we can scale the X coordinate properly, probably.
So he we need to square roots of the energy that we are using and then G's.
And yes, this is the eigenen energy that we're using, and we just divide it by the value of the potential
because then we get our proper X value.
OK, so we have no wind blew the probability of finding the particle in the quantum mechanical case
and in orange, we have to probability for finding the classical particle.
Actually, I would have to normalize this function here because yeah, if just arbitrarily divided by
20.
But that's that's not so important, I would say for the moment.
Let's see.
You can you can really see how the classical distribution resembles the quantum mechanical distribution
here.
So you can see how similar quantum mechanics is to classical mechanics in a way.
So these maxima really follow the same curve, but additionally, you will have these quantum oscillations.
And this is again very typical, very typical observation on how classical physics and quantum physics
relate to each other.
And especially, you will notice that this will become more and more similar when you go to larger length
scales so that quantum effects are not that relevant anymore.
OK, so this was just a short course that we will also discuss later again when we will solve the harmonic
oscillator analytically.
But now the only thing that's left to do is we use our alternative plotting scheme.
So as before we used wave function, it is already normalized and now we add on top our energy will
use the ion energies.
So this will just shift these functions a year or better, say these functions here away from each other.
So let's do this and then let's just re plot these functions.
OK.
So that looks pretty cool.
Now, additionally, what I want to do is I want to plot the potential
just to show you some things.
So we have again our X1 range and this time we plot
this is X range over just about potential.
So that's just three times x squared.
OK.
Yeah.
Of course, we have to plot from minus eight to a because otherwise it will just give this.
OK, so here you can really see how use you get such an oscillating behavior inside of the potential.
So basically, strictly speaking, in a physical sense, this means that when the energy is larger than
your potential, then our electrons behave a bit like free electrons, so they start to oscillate.
So we will get some cosine like function.
We will see later in the analytical case that it's not actually a sign or co-sign, but it's much,
much more difficult solution.
But here, especially in the middle, it looks like just a sign function.
And then when we come close to the case where the energy is equal to the potential, or even when the
energy is lowered and the potential, then we will again see our decaying exponential function.
So this is because, classically speaking, the particle would be forbidden to be in such a state.
But quantum mechanically, the particle can tunnel or it can penetrate into this potential barrier,
and therefore we will have a very small probability density inside of two potential.