The previous lecture, we have implemented the archival methods, and now we will go one step further
and we will implement the archive for five methods, and for this, I will just copy the code of the
Archive for Methods, and we will now update this to archive four or five and the archive for five methods
in the general syntax is very, very similar.
It's just that we have more of these additional points here.
We do not only have one key one to care for, but we have even five and six and we have much more difficult
coefficients here.
So let's have a look at this link that I've opened in the new tap here.
And you see, this is called also the fair back method or a new quota feedback methods, and it has
two different version of of where the error is of order five and order four.
So the coefficients have to be chosen a bit more in difficult manner so that certain arrows cancel out.
And here we will use the upper description here because on Wikipedia, as written to first row of the
coefficient, gives the fifth order accurate solution, so it has an higher accuracy than the fourth
order one.
So there's really no reason why we should bother using this other force or the solution, so it's always
better to have the higher order solution in this case.
So now we just have to read the table.
So these here are the coefficients for our weighted average, for the key value.
This one will be the coefficients for the update of each, and these ones will be the coefficients for
the update of the key values.
So we just have to add here New York, new and new terms k five and six.
And here we have to also add new terms.
So some coefficient times k five plus some coefficients time times six.
So I will update now first to coefficients for K1.
These will be, uh, these ones here.
So it begins with sixteen over one hundred thirty five.
So.
Let me just update these ones, then the second one was zero that we have here two very difficult ones
and in two shorter ones.
So I have, of course, prepared this in a different notebook already six six five six over one to eight
to five then for the K.
We have two eight five six one over five six four three zero.
Then here we have minus nine over 50.
And here we have to over 55.
So then we can next implement the update, which is a bit more simple.
So if you have zero one over for three of eight and so on.
So let's go ahead and do this.
So for the first one, we just have one number.
We had zero.
Yeah, for the first one, we had zero.
So we do not have to change anything for each.
Then we have one over four.
Then we had three over h them for the next one.
We have 12 or 13.
Then we have.
One and we have one over two.
Let's compare if that is correct.
Yes.
And now we have to implement the linear combinations of all of these terms here.
So for the first one, we have one over four.
So this will be here.
OK.
One over four.
Then for the next one, we have three over 32 times K-1 and nine over 32 times K2.
So.
Nine over 32 times.
And then we have also a K-1 term, which we didn't have before.
So this is K one times three over thirty two and then we have also other terms here for K four, five
and six, which are quite long.
So I will just copy them for my separate notebook.
If you really want to update this, you can of course compare this with Wikipedia, or you can just
post a video here and just write along what I did.
So you see, for the K for, for example, we have now really three different terms.
So three additional terms linear combination of K one, two and three and four K six, we even have
five terms.
So yeah, this time all the coefficients are non zero for the K for the Why update, which is updated
as a linear combination of the K values and the rest of the code can really stay as it is, the whole
idea behind it is pretty similar.
It's just that even higher order error terms cancel out since we have constructed this update of the
Y value via the K in the more difficult way.
So this is like when we have derived or when we have shown that there are higher order solutions for
calculating a derivative that we had.
Also, it was also necessary to consider more difficult coefficients and to superimpose several different
terms so that certain arrows cancel out here.
It's the same idea.
So let me run this, so there is no error message.
And so the next lecture, we can now compare our Euler methods with the R.K. four methods and the R.K.
four five methods.