1
00:00:00,180 --> 00:00:05,790
The previous lecture, we have implemented the archival methods, and now we will go one step further

2
00:00:05,790 --> 00:00:11,760
and we will implement the archive for five methods, and for this, I will just copy the code of the

3
00:00:11,760 --> 00:00:18,840
Archive for Methods, and we will now update this to archive four or five and the archive for five methods

4
00:00:19,260 --> 00:00:21,960
in the general syntax is very, very similar.

5
00:00:22,260 --> 00:00:25,530
It's just that we have more of these additional points here.

6
00:00:25,830 --> 00:00:32,070
We do not only have one key one to care for, but we have even five and six and we have much more difficult

7
00:00:32,070 --> 00:00:33,090
coefficients here.

8
00:00:34,290 --> 00:00:37,860
So let's have a look at this link that I've opened in the new tap here.

9
00:00:38,280 --> 00:00:45,240
And you see, this is called also the fair back method or a new quota feedback methods, and it has

10
00:00:45,240 --> 00:00:49,980
two different version of of where the error is of order five and order four.

11
00:00:50,400 --> 00:00:57,150
So the coefficients have to be chosen a bit more in difficult manner so that certain arrows cancel out.

12
00:00:58,170 --> 00:01:04,920
And here we will use the upper description here because on Wikipedia, as written to first row of the

13
00:01:04,920 --> 00:01:11,060
coefficient, gives the fifth order accurate solution, so it has an higher accuracy than the fourth

14
00:01:11,070 --> 00:01:11,610
order one.

15
00:01:12,000 --> 00:01:20,250
So there's really no reason why we should bother using this other force or the solution, so it's always

16
00:01:20,250 --> 00:01:22,740
better to have the higher order solution in this case.

17
00:01:23,940 --> 00:01:26,010
So now we just have to read the table.

18
00:01:26,250 --> 00:01:31,830
So these here are the coefficients for our weighted average, for the key value.

19
00:01:32,400 --> 00:01:38,610
This one will be the coefficients for the update of each, and these ones will be the coefficients for

20
00:01:38,610 --> 00:01:40,650
the update of the key values.

21
00:01:41,730 --> 00:01:52,170
So we just have to add here New York, new and new terms k five and six.

22
00:01:53,640 --> 00:01:56,350
And here we have to also add new terms.

23
00:01:56,370 --> 00:02:05,100
So some coefficient times k five plus some coefficients time times six.

24
00:02:06,630 --> 00:02:09,840
So I will update now first to coefficients for K1.

25
00:02:10,229 --> 00:02:13,170
These will be, uh, these ones here.

26
00:02:14,160 --> 00:02:18,390
So it begins with sixteen over one hundred thirty five.

27
00:02:19,230 --> 00:02:19,740
So.

28
00:02:21,990 --> 00:02:28,590
Let me just update these ones, then the second one was zero that we have here two very difficult ones

29
00:02:28,590 --> 00:02:30,210
and in two shorter ones.

30
00:02:30,630 --> 00:02:39,450
So I have, of course, prepared this in a different notebook already six six five six over one to eight

31
00:02:39,450 --> 00:02:41,880
to five then for the K.

32
00:02:42,450 --> 00:02:47,490
We have two eight five six one over five six four three zero.

33
00:02:47,970 --> 00:02:52,140
Then here we have minus nine over 50.

34
00:02:52,650 --> 00:02:56,670
And here we have to over 55.

35
00:02:58,320 --> 00:03:04,890
So then we can next implement the update, which is a bit more simple.

36
00:03:04,890 --> 00:03:07,950
So if you have zero one over for three of eight and so on.

37
00:03:08,610 --> 00:03:10,320
So let's go ahead and do this.

38
00:03:10,710 --> 00:03:13,410
So for the first one, we just have one number.

39
00:03:13,520 --> 00:03:14,280
We had zero.

40
00:03:14,940 --> 00:03:16,260
Yeah, for the first one, we had zero.

41
00:03:16,260 --> 00:03:18,330
So we do not have to change anything for each.

42
00:03:18,870 --> 00:03:20,310
Then we have one over four.

43
00:03:21,000 --> 00:03:27,330
Then we had three over h them for the next one.

44
00:03:27,570 --> 00:03:29,460
We have 12 or 13.

45
00:03:31,890 --> 00:03:33,540
Then we have.

46
00:03:36,670 --> 00:03:39,760
One and we have one over two.

47
00:03:40,420 --> 00:03:41,920
Let's compare if that is correct.

48
00:03:42,190 --> 00:03:42,610
Yes.

49
00:03:43,480 --> 00:03:48,280
And now we have to implement the linear combinations of all of these terms here.

50
00:03:48,820 --> 00:03:51,040
So for the first one, we have one over four.

51
00:03:52,240 --> 00:03:53,650
So this will be here.

52
00:03:54,040 --> 00:03:54,280
OK.

53
00:03:54,320 --> 00:03:55,270
One over four.

54
00:03:55,840 --> 00:04:03,970
Then for the next one, we have three over 32 times K-1 and nine over 32 times K2.

55
00:04:04,750 --> 00:04:05,770
So.

56
00:04:09,080 --> 00:04:11,240
Nine over 32 times.

57
00:04:12,290 --> 00:04:16,190
And then we have also a K-1 term, which we didn't have before.

58
00:04:16,640 --> 00:04:25,850
So this is K one times three over thirty two and then we have also other terms here for K four, five

59
00:04:25,850 --> 00:04:27,590
and six, which are quite long.

60
00:04:27,620 --> 00:04:30,110
So I will just copy them for my separate notebook.

61
00:04:30,740 --> 00:04:38,420
If you really want to update this, you can of course compare this with Wikipedia, or you can just

62
00:04:38,420 --> 00:04:41,600
post a video here and just write along what I did.

63
00:04:42,170 --> 00:04:47,510
So you see, for the K for, for example, we have now really three different terms.

64
00:04:47,900 --> 00:04:54,170
So three additional terms linear combination of K one, two and three and four K six, we even have

65
00:04:54,170 --> 00:04:55,090
five terms.

66
00:04:55,130 --> 00:05:02,450
So yeah, this time all the coefficients are non zero for the K for the Why update, which is updated

67
00:05:02,450 --> 00:05:10,100
as a linear combination of the K values and the rest of the code can really stay as it is, the whole

68
00:05:10,100 --> 00:05:11,740
idea behind it is pretty similar.

69
00:05:11,750 --> 00:05:19,340
It's just that even higher order error terms cancel out since we have constructed this update of the

70
00:05:19,340 --> 00:05:23,300
Y value via the K in the more difficult way.

71
00:05:23,450 --> 00:05:32,330
So this is like when we have derived or when we have shown that there are higher order solutions for

72
00:05:32,330 --> 00:05:34,670
calculating a derivative that we had.

73
00:05:34,670 --> 00:05:44,510
Also, it was also necessary to consider more difficult coefficients and to superimpose several different

74
00:05:44,540 --> 00:05:47,390
terms so that certain arrows cancel out here.

75
00:05:47,390 --> 00:05:48,290
It's the same idea.

76
00:05:49,340 --> 00:05:52,610
So let me run this, so there is no error message.

77
00:05:52,970 --> 00:06:00,230
And so the next lecture, we can now compare our Euler methods with the R.K. four methods and the R.K.

78
00:06:00,230 --> 00:06:01,220
four five methods.

