1
00:00:00,120 --> 00:00:03,360
So welcome back, and now let's discuss more about the physics.

2
00:00:03,750 --> 00:00:10,440
Previously, we have only found cases where the trajectory would be linear, and this was because these

3
00:00:10,470 --> 00:00:12,510
starting velocity was zero.

4
00:00:12,930 --> 00:00:14,470
And this is about to change now.

5
00:00:15,120 --> 00:00:19,050
So of course, we could just go ahead and change you the starting velocity.

6
00:00:19,380 --> 00:00:21,910
But I want to keep these results because they are quite nice.

7
00:00:21,940 --> 00:00:25,530
So let's just copy the content of these three cells.

8
00:00:26,040 --> 00:00:29,220
And actually, we can just copy all of this in the same cell.

9
00:00:29,580 --> 00:00:30,690
It's no problem at all.

10
00:00:31,830 --> 00:00:33,210
And then also the plots.

11
00:00:34,380 --> 00:00:41,010
So now we have everything in the same cell and then we can go ahead and just change the starting velocity.

12
00:00:41,310 --> 00:00:50,190
That could just change this one to, for example, this and then I will rerun the whole notebook just

13
00:00:50,190 --> 00:00:50,700
in case.

14
00:00:51,630 --> 00:00:58,200
And here you see the trajectory where it moves back and forth on a linear line.

15
00:00:58,270 --> 00:01:00,960
So just on a linear trajectory on the line.

16
00:01:01,740 --> 00:01:08,610
So to change this, we change the starting velocity and we will kick it along the y direction.

17
00:01:09,260 --> 00:01:10,110
I run this now.

18
00:01:10,500 --> 00:01:14,250
You see, we have now both of these coordinates that are different from zero.

19
00:01:14,610 --> 00:01:17,830
And you see the trajectory becomes such a spiral.

20
00:01:17,850 --> 00:01:19,500
It's an elliptical trajectory.

21
00:01:20,220 --> 00:01:24,180
And I think it's pretty clear from a physical point of view, you just take the ball.

22
00:01:24,540 --> 00:01:29,280
And if you would just leave it to roll and to relax, that would roll on this line.

23
00:01:29,610 --> 00:01:35,190
But if you would kick it in along this direction and it would spiral down to the center point of the

24
00:01:35,190 --> 00:01:35,550
ball.

25
00:01:36,960 --> 00:01:39,180
OK, so that was pretty nice, I think.

26
00:01:39,180 --> 00:01:45,060
But so far we could have solved probably both of these examples analytically.

27
00:01:45,450 --> 00:01:51,060
Now I want to show you a case where this is not possible, where we will get a really difficult trajectory,

28
00:01:51,360 --> 00:01:59,310
that we're really helpful to have these routines in Python to help us to solve these differential equations.

29
00:02:00,300 --> 00:02:08,070
So and for this, we will copy once again this whole code, but we will add here an external force.

30
00:02:08,850 --> 00:02:15,960
And to do this, we have to change the differential equation so that we copy this one as well.

31
00:02:17,070 --> 00:02:22,200
And we have to add here a term that corresponds to an external force.

32
00:02:23,130 --> 00:02:27,360
And so just for a second, let me scroll back to the very beginning of the notebook.

33
00:02:28,050 --> 00:02:31,170
So here we have introduced this external force already.

34
00:02:31,350 --> 00:02:32,700
We wrote the force.

35
00:02:33,000 --> 00:02:39,180
The total force on the ball is equal to the damping force, to the gradient of the potential and to

36
00:02:39,180 --> 00:02:41,910
an external force, which we disregarded so far.

37
00:02:42,630 --> 00:02:45,580
So no, we will keep it in to take it into account.

38
00:02:45,600 --> 00:02:51,750
So we will have to add a term to the X and to the Y coordinate that's equal to the external force divided

39
00:02:51,750 --> 00:02:52,290
by them.

40
00:02:53,760 --> 00:02:54,990
Let me scroll back down.

41
00:02:55,440 --> 00:03:00,540
So this means we have to add something here and here and let me just go ahead.

42
00:03:00,840 --> 00:03:04,080
I will add here something with an amplitude of A0.

43
00:03:04,500 --> 00:03:06,720
So we have to specify this A0.

44
00:03:07,230 --> 00:03:11,880
So we could, for example, say, I don't know, let's let's keep it equal to four.

45
00:03:13,140 --> 00:03:19,230
Then we have to add here a term that could, for example, be patriotic in time.

46
00:03:19,470 --> 00:03:29,120
So I will add here and p dot sign and then write two times pi times t divided by some periods.

47
00:03:29,850 --> 00:03:33,270
So to oversee the isolation period.

48
00:03:34,410 --> 00:03:36,570
So this could, for example, be 50 seconds.

49
00:03:36,930 --> 00:03:43,830
So I want to keep it here a bit larger than the period of the oscillation, which is maybe, I don't

50
00:03:43,830 --> 00:03:44,820
know, five seconds.

51
00:03:45,420 --> 00:03:50,670
So here it's much larger period, so that we can nicely distinguish both of these periods and.

52
00:03:51,700 --> 00:03:59,890
Now I will do this at an angle, so I will write this down in terms of polar coordinates, I just write

53
00:03:59,890 --> 00:04:01,740
and pilot call sign of fire.

54
00:04:02,650 --> 00:04:06,730
And so I would be the angle along which the force is applied periodically.

55
00:04:07,210 --> 00:04:12,730
So fi is equal to all its, I don't know, 45 degrees.

56
00:04:12,730 --> 00:04:13,900
So that's the diagonal.

57
00:04:15,040 --> 00:04:22,720
Of course, we have to transform to radiance, so I divide my 180 degree and I multiply by PI.

58
00:04:24,460 --> 00:04:27,910
So this would be for the X coordinate and for the Y coordinates.

59
00:04:27,910 --> 00:04:29,230
We do a very similar thing.

60
00:04:29,890 --> 00:04:37,660
But due to the polar coordinates, it's now and pitot sign for the fire, but the rest is the same.

61
00:04:39,290 --> 00:04:44,890
And now we can run both of these cells and we see this is our trajectory.

62
00:04:45,580 --> 00:04:47,230
So it looks pretty complicated.

63
00:04:47,770 --> 00:04:53,860
But if we look at the time evolution of these coordinates, it becomes pretty clear what's happening

64
00:04:54,580 --> 00:04:55,150
in the beginning.

65
00:04:55,150 --> 00:04:57,560
We have some very brief oscillations.

66
00:04:57,580 --> 00:05:00,760
This is basically the same thing as this one here.

67
00:05:01,450 --> 00:05:09,430
So this is what give rise to this and optical spiral trajectory with a period of approximately five

68
00:05:09,430 --> 00:05:11,200
seconds that we can also see here.

69
00:05:12,460 --> 00:05:19,090
However, on top of this, we have another very strong oscillation, which happens on a much slower

70
00:05:19,090 --> 00:05:19,810
timescale.

71
00:05:20,440 --> 00:05:25,660
This corresponds to the external force that we have just implemented with an amplitude of four, which

72
00:05:25,660 --> 00:05:30,970
is quite strong, and we have the period t o c, which is equal to 50.

73
00:05:31,630 --> 00:05:33,910
This is exactly the period that we see here.

74
00:05:35,420 --> 00:05:39,530
And so you see in the beginning, it starts to spiral here.

75
00:05:40,190 --> 00:05:48,440
But due to our periodically changing force, in the end it will just be moving on this linear trajectory

76
00:05:48,440 --> 00:05:49,310
back and forth.

77
00:05:49,880 --> 00:05:56,870
And you can imagine this if you would take a bow in such a ball, put it here and kick it along this

78
00:05:56,870 --> 00:05:57,440
direction.

79
00:05:57,440 --> 00:06:04,010
But now additionally, you take the ball and you tilt it back and forth in this direction.

80
00:06:04,580 --> 00:06:10,010
Then the ball would first move a bit chaotically, but then after a bit of time, it would just move

81
00:06:10,010 --> 00:06:13,610
along with the direction in which you are tilting back and forth.

82
00:06:14,300 --> 00:06:20,210
And this is exactly what we see here, and I think this is really cool example because it's just such

83
00:06:20,210 --> 00:06:22,040
a simple and intuitive system.

84
00:06:22,040 --> 00:06:28,160
And still, it gives rise to such a complicated solution which would have never been able to get analytically.

85
00:06:28,940 --> 00:06:35,780
However, with our methods integrated solve on the IVP from non-paid module, this is pretty easy to

86
00:06:35,780 --> 00:06:41,150
establish because to be honest, the only thing that we have to do is to define such a function here.

87
00:06:41,750 --> 00:06:46,820
Where even this one was optional is just basically a single line of code, just this one.

88
00:06:47,420 --> 00:06:51,440
And then we would just have to call this command and the rest is really just plotting.

89
00:06:52,280 --> 00:06:56,870
So I think it's pretty easy, pretty useful and just a nice tool.

90
00:06:57,680 --> 00:07:02,390
And now, for the first time, we have solved a two dimensional system in a physical way.

91
00:07:02,810 --> 00:07:05,750
But as we have learned, this is a four dimensional system.

92
00:07:06,020 --> 00:07:11,690
Mathematically speaking and previously, we have already considered the one dimensional harmonic oscillator,

93
00:07:11,690 --> 00:07:15,350
which was a two dimensional system in terms of mathematics.

94
00:07:15,890 --> 00:07:22,490
This is at least if you would transform the second order differential equation to to first order differential

95
00:07:22,490 --> 00:07:26,030
equations, as we have done to be able to use this method.

