So why come back to this numerical lecture in the previous lectures?
I wanted to show you that you can really solve the stationary shooting equation for some examples.
And what we have used is the so-called shooting method, and you have seen that it's actually quite
delicate and quite unstable because we always had to find the perfect art, some some some good value
for our propagation border that we called a.
So if a was too large, then this exponential behavior of a whole wave function became a real problem
so that the solution exploded.
And this was basically because we have used a very simple approach for calculating derivatives.
We have just used the old value, plus some delta of the wave function, for example.
And of course, they are much, much better ways to do this.
For example, you can use a whole McWhirter algorithm to propagate the wave function.
If you would do this, the whole shooting method would work much better, and you wouldn't have to be
so careful about the choice of eight.
So this is something that you can do on your own if you want just Google, only Qatar.
But also, here's something that I want to show you.
So in case you have access to Mathematica.
But it has to be version ten point two or higher.
You can use the command called and the EIGEN system so he can see all the commands that are needed to
calculate the EIGEN system of the harmonic oscillator, as we have done previously.
So we again define some value h just our Planck constant bar.
We defined the potential which is basically x squared times a prefecture.
And this is our our tweeting equation.
And then we just solve the eigen spectrum of this Hamiltonian.
So actually, we don't really have the shooting equation.
We only have the Hamiltonian.
And then there is there, there's a command and the eigen system that just determines the eigenvalues
and diegan functions of this Hamiltonian.
So of course, when you used his methods, you don't really learn anything about the methods.
So you don't know how the computer solves this problem, but you get to solutions very, very fast.
And as you can see, the ion energies are again 0.5, 1.5 and so on.
So it just increments of one as we have previously.
And you can also see here we can plot these wave functions on top of the eigenvalues.
So this is a much simpler and much faster way to solve such problems.
But of course, I think it was worth the effort to show you that you can also do it by yourself and
Python using really basic concepts like using the most easy method for Celtic calculating the derivative.
So as I told you, this is not really very, not really stable, and you have to be very careful with
the choice of some parameters.
But the purpose of this lecture was just to show you that it's still possible.
Now, when you want to become more professional, you have to find more elaborate algorithms or you
could use tools like this.