1
00:00:00,060 --> 00:00:06,540
Won the previous two lectures, we have solved the differential equation for the time decay of radioactive

2
00:00:06,540 --> 00:00:11,550
substances, and you have seen that is a declining exponential function.

3
00:00:12,090 --> 00:00:21,270
And now we are going to use our newly defined function called Euler O the E to solve a other differential

4
00:00:21,270 --> 00:00:21,900
equation.

5
00:00:22,830 --> 00:00:27,470
So this differential equation is given by the change of Y.

6
00:00:27,480 --> 00:00:35,610
So why that is equal to minus the constant times y so pretty similar to the exponential decay times

7
00:00:35,610 --> 00:00:37,410
T, which is something new here.

8
00:00:38,550 --> 00:00:47,810
So basically, I called this time amplified decay, but it's a bit abstract and it's just generic.

9
00:00:47,820 --> 00:00:55,230
So not really a real physical phenomenon because here to change of the amount of the substance is given

10
00:00:55,230 --> 00:00:58,740
not only by the substance itself, but also by that time.

11
00:00:59,700 --> 00:01:00,330
So I don't know.

12
00:01:00,330 --> 00:01:08,610
Maybe you could imagine that for some reason, the rate of the decay would increase with time because

13
00:01:08,820 --> 00:01:11,370
some of some temperature changes or something.

14
00:01:12,030 --> 00:01:17,460
But yeah, this is just a quick example to show you that our method works also for other differential

15
00:01:17,460 --> 00:01:18,060
equations.

16
00:01:18,960 --> 00:01:25,200
And the important thing or the important distance difference here is that we now do not only have a

17
00:01:25,200 --> 00:01:32,160
function y dot that depends on Y, but also it depends on T, which was something that we did not have

18
00:01:32,160 --> 00:01:32,820
previously.

19
00:01:33,060 --> 00:01:39,870
But in general, you see here f depends not only on Y but also on T, which is why I decided to present

20
00:01:39,870 --> 00:01:42,120
to you this example where we have y in T.

21
00:01:43,470 --> 00:01:48,810
So when you look at this function and don't know the solution yet, then it's much more difficult to

22
00:01:48,810 --> 00:01:49,830
get a solution.

23
00:01:50,400 --> 00:01:56,220
So after some thinking, you may guess that the solution is such a Gaussian function, so exponential

24
00:01:56,220 --> 00:01:59,790
function of minus T squared time so constant.

25
00:02:00,330 --> 00:02:04,950
But maybe it is quite difficult to solve this analytically.

26
00:02:05,700 --> 00:02:10,979
So in any case, you could just take our code now and calculate the function numerically.

27
00:02:12,120 --> 00:02:16,950
So we, of course, we don't need to redefine the code because it is written in a general manner.

28
00:02:17,340 --> 00:02:19,860
We just need to change the function.

29
00:02:20,550 --> 00:02:26,490
So I will basically copy this cell here and just adapt to our new function.

30
00:02:27,330 --> 00:02:36,690
So instead of having to write him minus y, I write minus eight times y times T and A is equal to some

31
00:02:36,690 --> 00:02:37,170
number.

32
00:02:37,170 --> 00:02:41,700
And here we should take a pretty small number, maybe the zero point zero one.

33
00:02:42,120 --> 00:02:47,460
So I take your small value because when we increase T, then the rate will increase.

34
00:02:47,460 --> 00:02:51,450
So it's good to start with a smaller eight to see some interesting physics here.

35
00:02:53,010 --> 00:03:02,520
So then we basically just have to provide the T zero, the Y zero, the N Max and the H, and then we

36
00:03:02,520 --> 00:03:08,760
can just go ahead and solve the all an ordinary differential equation with the same line as we had before.

37
00:03:10,290 --> 00:03:12,480
So I run this and now it's plotted.

38
00:03:12,510 --> 00:03:14,790
I will also copy this code here.

39
00:03:15,360 --> 00:03:17,490
And I think this one, we don't even have to change.

40
00:03:17,490 --> 00:03:19,890
I can just run it and look at the solution.

41
00:03:21,030 --> 00:03:27,750
So here we cannot really see that much because we have still our analytical results present.

42
00:03:27,750 --> 00:03:32,760
So yeah, first of all, I should maybe change the analytical results.

43
00:03:33,390 --> 00:03:37,550
So I right here y zero times.

44
00:03:37,620 --> 00:03:47,730
So I have to write this one year terms and it's P minus T square times eight over two.

45
00:03:49,380 --> 00:03:52,530
And now it looks pretty, pretty decent.

46
00:03:53,400 --> 00:03:58,770
So it's still decreasing and it's only at zero point nine eight yet.

47
00:03:58,770 --> 00:04:05,460
So maybe I should increase the total simulation time and I could do this, for example, by decreasing

48
00:04:05,470 --> 00:04:08,100
or so by increasing the value of H.

49
00:04:08,790 --> 00:04:11,670
And then I could also increase here the value of and max.

50
00:04:13,590 --> 00:04:21,630
And then you see, that's first of all, our numerical solution represents the analytical solution quite

51
00:04:21,630 --> 00:04:25,020
well, even though we have increased the step size.

52
00:04:25,020 --> 00:04:32,490
And I think this is due to the fact that the function here a y t is pretty small since we have two small

53
00:04:32,490 --> 00:04:33,300
constant here.

54
00:04:34,620 --> 00:04:43,320
So you see there is not really a unique or an appropriate best choice for H, which is able to solve

55
00:04:43,350 --> 00:04:45,330
all the problems equally well.

56
00:04:45,840 --> 00:04:50,100
So you always have to think about if your function changes fastly or not.

57
00:04:50,430 --> 00:04:56,970
For example, here it was changing quite briefly, going from one to 0.5 and under a second.

58
00:04:57,720 --> 00:04:59,670
So when we when we.

59
00:04:59,740 --> 00:05:05,470
Used equal to zero point one before the solution was not so good and we had to decrease to zero point

60
00:05:05,470 --> 00:05:06,070
zero one.

61
00:05:06,730 --> 00:05:13,120
However, here after one second, we are still very close to one, so the function doesn't change too

62
00:05:13,130 --> 00:05:15,320
briefly, so we get a good result.

63
00:05:15,340 --> 00:05:18,910
Also, with a larger value of h equal to zero point one.

64
00:05:20,230 --> 00:05:26,620
So we see we have this nice agreement and also we see this trend of this Gaussian function.

65
00:05:27,160 --> 00:05:33,640
And I think when you consider this differential equation and put it in the physical context, it makes

66
00:05:33,640 --> 00:05:34,150
sense.

67
00:05:34,930 --> 00:05:42,700
So the rate at which the Y value decreases is given by the product of white itself and the time T.

68
00:05:43,690 --> 00:05:51,220
So if we only consider the influence of T, then the decrease would just get faster and faster with

69
00:05:51,220 --> 00:05:52,090
increasing time.

70
00:05:52,090 --> 00:05:53,590
And this is what we see in the beginning.

71
00:05:54,130 --> 00:06:00,850
So here the value of Y doesn't change much and all the influence comes basically from T, so it decreases

72
00:06:00,850 --> 00:06:02,830
and it decreases faster and faster.

73
00:06:03,730 --> 00:06:10,750
But then at some point, the value of Y will be quite small already, so this will then compensate the

74
00:06:10,750 --> 00:06:12,330
effect of the increasing T.

75
00:06:12,670 --> 00:06:21,160
And so overall, the decay will slow down and it will still then be very close to zero and it will never

76
00:06:21,160 --> 00:06:22,270
go below zero.

77
00:06:23,620 --> 00:06:29,290
So this means we have now tested our function for a new differential equation, which was a bit more

78
00:06:29,290 --> 00:06:36,250
difficult because it does not only include Y but also T, but in the way we have programmed this function,

79
00:06:36,250 --> 00:06:37,270
it still worked.

80
00:06:37,360 --> 00:06:43,780
And it's a nice thing that we have such a function available now and we can now solve basically any

81
00:06:43,780 --> 00:06:46,780
ordinary differential equation of First Order.

