OK, so we'll come back in the previous lecture, we have determined the EIGEN system for a particle
in the box where the potential was infinitely large.
So here we had some advantages that we typically don't have.
So what we could consider here is we could consider a box which only have a width, has a width of a
so starting from zero going to eight.
And at the left edge, we had the wave function that was zero.
And also, we had a very clear and very well-defined condition how our ion functions should look like.
So we had here the wave function that goes back to zero so we could use a condition for our second while
loop where we could say the wave function has to be close to zero so that while loop stops.
Now, when we use some other potential, we cannot use these features anymore.
And this is what I want to show you in this demonstration.
So this is about the harmonic oscillator.
And actually, I'm showing you this example because it is actually very difficult to determine the ion
energies of this system analytically.
And even more difficult is the determination of the EIGEN functions.
So in fact, in one of the next main sections, I will show you how you can solve the harmonic oscillator
analytically.
But in this lecture, we are only able to solve the ion energies.
And still, it's very difficult to do it, and it will take quite a long time.
We have to write on many, many formulas and have to transform our trading equation until we finally
end up with the solvable form.
So here I want to show you how you can solve this system numerically.
I wouldn't say it's easy because it is actually more difficult than the previous example, but still,
you can really manage to do it and you will see the eigenvalues, A.I. and functions.
So let us start with the first part of our previous program because actually, we don't have to change
so much here.
So what we have to change is, first of all, the potential so previously we had here in our trading
equation to potential V, which was zero inside of the box.
So now what we have is we have V Times X Square.
So this is exactly the same as in classical mechanics.
You have some force that is some constant times minus the change of the coordinate, which we call X..
So the corresponding potential would be x squared times the prefect.
So now we cannot use any.
He are prefecture of zero.
But instead we will use a prefecture of actually.
The potential would be one half times this constant times square.
So let's use one half.
Um, and the next step we also have to consider it is this constant a here because we do not have a
well-defined box anymore.
Now we would really have to solve the wave function in all of the one dimensional space.
So basically, we would have to propagate our wave function starting from minus infinity going to positive
infinity.
But obviously, we cannot do this.
So we would have we have to select some value, which is quite small and then have to propagate our
system until the value is quite large.
So what I'm going to do now is I will actually use this one here, so I will say, OK, our starting
point is, I don't know, maybe let's use let's use as a starting point minus 10 and then the increment
let's let's make it make it like this, OK?
We could also use eight times this, but OK, let's let's just let's just ride it like this because
maybe later we want to change a and then we would have to change this one as well.
So we have we fix it here to the value of 0.01.
What?
We can change it afterwards.
OK, now we start our propagation at some value minus 10, which is actually for low energy use outside
of this of this parabola.
So the potential sort of solar energy is 10 below the potential and we get a declining wave function,
a declining exponential function for our way function.
So this means the wave function will decrease quite fast because of this exponential behavior.
So I think it's OK if we start from from minus 10, at least for the low energies.
So now let's use for the wave function, some smaller value, because previously we could say, OK,
we start at the left end of the box or we function must be zero.
But as we know also from the finite potential, the wave function is now not zero anymore because the
electron can tunnel.
It can really penetrate into the energy barrier.
And the same is true also for this harmonic oscillator potential.
So we have now a value for wave function, which we could have set basically to any volume.
But let's say, OK, it's quite small.
Let's use 0.01.
And for deep sigh, I would say, because we have this exponential increase would not be such a good
idea to use one because then our wave function would inflate drastically and we would strike.
We would get gigantic values.
So let's use zero here because even in the first step, the wave function may not change.
Already, the second step, it will then finally change because we will have it as deep ci as zero plus
this second derivative.
So that's really not an issue here.
I think we can do this now.
We will use some energy.
Let's go back to one as we had previously.
And I think now we can just propagate this whole system.
OK, then let me restart the kernel and run all cells.
OK, now welcome to the world of numerics.
This is our resulting wave function, actually for a equal to attend the wave function goes to tend
to the power of th8.
So this is why it looks so strange.
So this is, I would say, some numerical artifact.
Maybe the wave function looks physical in this area, but then at the end, it just explodes and goes
to such large values so that we cannot use it for anything.
And the reason that I found out is that what is happening here is we are starting from a to small value
of A.
So we are starting.
Very far for the case where the wave function, by the way, function evolves exponentially for quite
a long distance of X, so we start way too far on the left.
So let's decrease to value of and try again.
OK, still pretty large.
10 to the power of six.
OK.
Yeah, this looks now much better.
So now we have really already here some kind of physical wave function.
But as you can see, um.
It it does not go back to a similar value to zero.
So we know that when we approach X equals two or three, it should go back to a value that is similar
to our starting value, which was zero point zero one, but instead you can see here that we have a
zero.
So this means actually we are already past our first eigen energy.
So what we have to do now is we have to try the lower test energy case now we are here at minus two
at this position.
So you see already you need some some um yeah, physical knowledge already to be able to solve something
like this, which makes it already already quite difficult.
OK, now you see the value decreases a bit and OK.
Oh, that was lucky.
OK, now we we have the energy with zero point five.
So you can see here we have now a reasonable wave function, which is actually symmetric to the position
X equal to zero.
And the energy so looks like to be zero point five.
OK.
And the next step, we will automatically generate these energies and I can functions for the different
quantum numbers.
So here we have the first state and we will determine the second, third and so on.