1
00:00:00,060 --> 00:00:06,270
So before we get started with solving our first example of a differential equation, let me tell you

2
00:00:06,270 --> 00:00:07,620
a bit about the background.

3
00:00:08,460 --> 00:00:14,520
So the first method that we will discuss here and that we will program ourself is called the Arla Method.

4
00:00:15,060 --> 00:00:21,420
And it's basically the most simple approach on numerically solving a first order differential equation.

5
00:00:22,590 --> 00:00:24,750
So what's the first order differential equation?

6
00:00:25,080 --> 00:00:34,140
Well, we have a function Y, for example, which depends on T, and the derivative of this function

7
00:00:35,940 --> 00:00:42,870
is equal to another function, which has terms depending on T and terms, depending on the function

8
00:00:42,870 --> 00:00:43,320
itself.

9
00:00:43,890 --> 00:00:50,370
So basically, we have T, we have Y, and we have a first derivative of Y and no ion derivatives.

10
00:00:50,700 --> 00:00:53,610
This characterizes the first or that differential equation.

11
00:00:54,810 --> 00:00:59,430
And what's the idea behind it to solve it numerically?

12
00:00:59,910 --> 00:01:06,180
Well, we can just think about how would we express the derivative of Y with respect to T.

13
00:01:07,080 --> 00:01:11,490
So of course, there are different possibilities that we can write down now.

14
00:01:11,820 --> 00:01:19,920
But one of them is that we take the value of Y at the position T and add a small value h, then subtract

15
00:01:19,920 --> 00:01:22,500
the value at the position T and divide by H.

16
00:01:23,340 --> 00:01:30,630
So this is if if H is small, if so, basically here we would have to write the limit of h goes to zero,

17
00:01:30,990 --> 00:01:39,930
then this would also be equal to y of T minus y of T minus H or also y of T plus minus y of T minus

18
00:01:39,930 --> 00:01:43,720
h divided by two h and the limit of h to zero.

19
00:01:43,740 --> 00:01:45,570
This all gives the same value.

20
00:01:46,500 --> 00:01:49,170
So here this is only approximately true.

21
00:01:50,160 --> 00:01:56,010
However, if we say OK, we consider that h a small and we say this is true, then we can solve this

22
00:01:56,010 --> 00:02:00,840
equation for this term here y at the time, T plus h.

23
00:02:01,230 --> 00:02:05,460
So we write times h and then plus y of T.

24
00:02:05,730 --> 00:02:12,930
So we get this expression here, which means when we know the value of Y at the time T, we also know

25
00:02:13,230 --> 00:02:19,800
the value of Y at the time T plus h because we can just calculate the derivative at the time T and then

26
00:02:19,800 --> 00:02:22,770
multiply with h and added to the initial value.

27
00:02:23,550 --> 00:02:24,810
And this is the whole idea.

28
00:02:25,440 --> 00:02:32,550
We will repeat this step here over and over again to propagate in time zero two, we can repetitively

29
00:02:32,550 --> 00:02:34,860
iterate this propagation process.

30
00:02:36,270 --> 00:02:41,760
So if we want to write this down a bit more in terms of programming, then we should write this down

31
00:02:41,760 --> 00:02:44,760
with indices and not with time arguments here.

32
00:02:45,240 --> 00:02:55,620
So we know that at the end plus one time step, which basically corresponds to the value Y and plus

33
00:02:55,620 --> 00:03:05,130
one and at time T plus h, we can express this value as the value before, which is why n at this step

34
00:03:05,130 --> 00:03:10,980
and corresponding to a time T and then plus the derivative, which is actually the function here.

35
00:03:11,370 --> 00:03:15,660
So you see from this expression and times h.

36
00:03:17,460 --> 00:03:18,870
So this is the whole idea.

37
00:03:18,870 --> 00:03:21,720
We will repeat this step over and over again.

38
00:03:22,410 --> 00:03:27,210
So maybe you see, now that this is not so difficult, it's difficult at all because this is just the

39
00:03:27,210 --> 00:03:30,060
function that we have provided that we will program.

40
00:03:30,420 --> 00:03:36,990
And then we just have to iterate this process where we will add to the initial value, the value of

41
00:03:36,990 --> 00:03:39,780
the function times, some small step size.

42
00:03:40,050 --> 00:03:45,600
And then we repeat this and we will look at then y and plus one y and plus two and so on.

43
00:03:46,530 --> 00:03:52,950
So in the next lecture, we are going to solve a first example, which will be the radioactive decay.

44
00:03:53,340 --> 00:03:58,880
And you see, this is the differential equation and we will use this method and programme it ourselves.

