1
00:00:00,480 --> 00:00:06,090
So in the previous lecture, we have solved the differential equation, and we have found that the first

2
00:00:06,090 --> 00:00:08,730
look at the result seems to be reasonable.

3
00:00:08,910 --> 00:00:10,560
So it makes sense what we get here.

4
00:00:11,190 --> 00:00:14,500
But also we didn't really see what's going on here in detail.

5
00:00:14,530 --> 00:00:21,180
We just see that basically Earth and Moon are both rotating on a circular trajectory around the Sun.

6
00:00:22,020 --> 00:00:24,450
So let's look at all three objects in detail.

7
00:00:25,250 --> 00:00:26,580
Let's start with the Sun.

8
00:00:26,580 --> 00:00:35,490
So I copy these three lines here, and we have now the trajectory of the sun and to see a bit more.

9
00:00:35,670 --> 00:00:38,940
Let me increase here to simulation time to 10 years.

10
00:00:39,750 --> 00:00:44,490
So let's rerun and let's rerun this.

11
00:00:45,090 --> 00:00:47,490
And you see, this is no the trajectory of the Sun.

12
00:00:48,090 --> 00:00:49,770
So the axes are a bit distorted.

13
00:00:51,600 --> 00:00:55,790
So here you have to multiply this with 10 to the power of seven.

14
00:00:55,800 --> 00:01:03,210
And here you see we have quantities and the magnitude of 10 to the power of five.

15
00:01:03,810 --> 00:01:08,820
So these are still some kilometers that the Sun is moving here.

16
00:01:09,540 --> 00:01:17,670
And at first, this may look surprising because we have to find that the Sun is starting at the center

17
00:01:17,670 --> 00:01:21,690
of our coordinate system and that the Sun does not have a velocity at the beginning.

18
00:01:22,560 --> 00:01:29,460
However, of course, the Sun is also affected by the other two objects, so actually it would be better

19
00:01:29,460 --> 00:01:34,590
if we would plot in the following all of our solutions with respect to the Sun.

20
00:01:34,620 --> 00:01:40,020
So basically subtracting here the values from the Sun and from the Moon.

21
00:01:40,800 --> 00:01:46,710
But still, you see this changes in the magnitude of 10 to the power of seven, and here we have magnitude

22
00:01:46,710 --> 00:01:48,270
tended to part of 11.

23
00:01:48,270 --> 00:01:54,030
So I will just neglect the small motion here and we will consider it basically to zero.

24
00:01:54,060 --> 00:02:00,000
But if we want to be precise, you would have to take these two values here and subtract them here from

25
00:02:00,000 --> 00:02:00,720
these values.

26
00:02:02,070 --> 00:02:04,590
So now let's go ahead and discuss the Earth.

27
00:02:05,250 --> 00:02:07,860
And first of all, I want to plot the motion

28
00:02:10,440 --> 00:02:12,990
basically like this without the Moon.

29
00:02:14,970 --> 00:02:21,330
And you see, I mean, it's pretty clear the blue trajectory was underneath the moon trajectory.

30
00:02:21,330 --> 00:02:24,240
So it's really circulating around the sun.

31
00:02:24,990 --> 00:02:30,550
But what we can also do is we can go one step further and we can plot something else.

32
00:02:30,630 --> 00:02:38,620
So let me add a new cell here, and I will plot now on the x axis the time T in here.

33
00:02:40,350 --> 00:02:49,170
And on the y axis, I will plot the distance, sun and Earth.

34
00:02:51,950 --> 00:03:01,010
So now I will basically plot the blue curve here, and I will plot for the X values solution, but T

35
00:03:01,460 --> 00:03:09,230
and since we want to plot it in years, I have to divide by this factor here, which are 60 seconds,

36
00:03:09,230 --> 00:03:13,550
60 minutes, 24 hours, 365 dots, two five days.

37
00:03:14,930 --> 00:03:20,540
So I go back here and divide by these values.

38
00:03:22,610 --> 00:03:30,470
So now we have here at a time, in years and for the y axis, I plotted the distance between Earth and

39
00:03:30,470 --> 00:03:30,800
Sun.

40
00:03:31,430 --> 00:03:35,120
So I right and p dots within Arc thought no.

41
00:03:36,170 --> 00:03:38,170
And now we must subtract it two vectors.

42
00:03:38,180 --> 00:03:39,820
So basically the position vectors.

43
00:03:39,820 --> 00:03:50,090
So this would be solution dot y and then the first three components for the sun and then minus solution

44
00:03:51,650 --> 00:03:55,670
thought y three to six for the Earth.

45
00:03:56,510 --> 00:03:59,030
And now when I run this, it gives me probably an error.

46
00:03:59,450 --> 00:04:05,000
Yes, because when we scroll down here, there are many error messages, but the lowest one is probably

47
00:04:05,000 --> 00:04:06,110
the one that's reasonable.

48
00:04:07,070 --> 00:04:14,420
The problem is that X and Y, which are our two lists, so the T list and the value list must have the

49
00:04:14,420 --> 00:04:15,290
same dimension.

50
00:04:15,290 --> 00:04:18,170
And the T list has, of course, 100000.

51
00:04:18,170 --> 00:04:24,170
And one point as we have defined and our value list here, this one only has a single point now.

52
00:04:24,710 --> 00:04:30,410
That's the problem of the total in our norm because it basically flattens all of these arrays.

53
00:04:30,470 --> 00:04:37,310
So these are now three components for one hundred thousand and one points of time, and then that calculates

54
00:04:37,310 --> 00:04:39,260
the norm of all of these components.

55
00:04:39,980 --> 00:04:46,760
So we must tell only calculate the norm with respect to these X, Y and Z components and do this forever

56
00:04:46,760 --> 00:04:49,970
point of time and then construct an area out of this.

57
00:04:50,570 --> 00:04:53,930
We can do this by writing axes equal to zero.

58
00:04:54,740 --> 00:05:01,400
If you would write X is equal to one, then we would get a three component vector here, where the norm

59
00:05:01,400 --> 00:05:04,340
is calculated with respect to all the points of time.

60
00:05:05,330 --> 00:05:06,950
So like this, I think should work.

61
00:05:07,250 --> 00:05:14,030
And indeed, we see now that we have to distance on the Earth and the time ten years and from zero to

62
00:05:14,030 --> 00:05:21,380
ten years, we see all of these fluctuations and obviously the periods of these fluctuations is one

63
00:05:21,380 --> 00:05:21,800
year.

64
00:05:22,160 --> 00:05:29,330
So our values are constants are correct and the algorithm is correct, and it takes one year for the

65
00:05:29,330 --> 00:05:31,490
Earth to move around the sun.

66
00:05:32,480 --> 00:05:39,860
So in our 10 years, we have a total of 10 installations, so now we can go ahead and discuss the Moon.

67
00:05:40,670 --> 00:05:45,830
And you see the trajectory of the Moon is the same as the Earth basically on this length scale.

68
00:05:45,840 --> 00:05:51,890
But of course, if we would zoom in, then we would see that the Earth surrounded the moon circles around

69
00:05:51,890 --> 00:05:52,340
the Earth.

70
00:05:53,510 --> 00:06:00,470
So I want to plot first the motion or the moon orbits around the Earth.

71
00:06:02,550 --> 00:06:09,840
So I basically what should I take, I think a copy this one and then changed his cell so that I don't

72
00:06:09,840 --> 00:06:11,190
have to start from zero here.

73
00:06:12,390 --> 00:06:16,350
So we have here a plot that has an aspect ratio of one.

74
00:06:16,830 --> 00:06:29,280
And here we have the coordinates X and Y and I just right here X of the Moon with respect to Earth and

75
00:06:29,280 --> 00:06:31,110
Y of Moon with respect to Earth.

76
00:06:32,700 --> 00:06:39,660
So we have now only a single plot, which we plot in green because we want to have the Moon and I want

77
00:06:39,660 --> 00:06:41,120
to plot it with respect to the Earth.

78
00:06:41,130 --> 00:06:46,710
So I write you minus solution called y comma or two component is three.

79
00:06:47,280 --> 00:06:50,670
And here are eight minus solution y component four.

80
00:06:52,230 --> 00:06:53,460
And this is what we get.

81
00:06:54,180 --> 00:07:02,130
So we see if we calculate the motion of the moon versus back to the Earth, it's once again a circular

82
00:07:02,130 --> 00:07:02,850
trajectory.

83
00:07:03,660 --> 00:07:06,150
However, the lines here are pretty thick.

84
00:07:06,390 --> 00:07:09,300
And this comes, of course, from many, many constellations here.

85
00:07:09,720 --> 00:07:13,950
And it turns out that this oscillation is not always on the same point.

86
00:07:14,490 --> 00:07:17,520
So maybe here or starting values were a bit inaccurate.

87
00:07:17,880 --> 00:07:21,930
Or maybe our accuracy of the RJ 45 was not high enough.

88
00:07:23,280 --> 00:07:26,460
So, yeah, we could, of course, improve here the method.

89
00:07:26,460 --> 00:07:31,680
But the general result stands, and I think it's reasonable that we have this circular motion of the

90
00:07:31,680 --> 00:07:38,310
Moon around the Earth, even though in the beginning of our simulation, the radius changes a bit so

91
00:07:38,730 --> 00:07:40,380
we can check this, of course.

92
00:07:41,670 --> 00:07:44,780
Maybe it has also a different origin.

93
00:07:44,790 --> 00:07:47,270
I'm just thinking now so we can check this.

94
00:07:47,280 --> 00:07:52,920
Maybe my expectation was wrong and it has a different origin.

95
00:07:53,640 --> 00:07:54,150
Let's see.

96
00:07:54,930 --> 00:07:59,250
I a copy this one from the Sun Earth distance and now we use distance.

97
00:07:59,970 --> 00:08:00,990
Earth Moon.

98
00:08:03,590 --> 00:08:10,430
So we can leave everything as it is, we just have to change these indices, and we take three six two

99
00:08:10,700 --> 00:08:17,240
six nine, which means Earth minus Moon and of course, in green.

100
00:08:20,870 --> 00:08:24,860
And yes, OK, I first had a wrong assumption.

101
00:08:25,530 --> 00:08:33,830
It is not ethical line because the radius changes, it is a thick line because the moon moves actually

102
00:08:33,830 --> 00:08:41,210
on an oval trajectory around the Earth, and this oval trajectory changes all of the time.

103
00:08:41,240 --> 00:08:42,260
Let me show you what I mean.

104
00:08:43,039 --> 00:08:46,130
So this is something I wanted to prepare anyway.

105
00:08:46,880 --> 00:08:55,010
What I want to do next is I want to plot once again this one here, but I want to exaggerate the basically

106
00:08:55,010 --> 00:08:56,450
the moon orbit radius.

107
00:08:57,350 --> 00:09:00,560
So it sounds a bit artificial and it is indeed artificial.

108
00:09:00,560 --> 00:09:01,460
But you will.

109
00:09:01,820 --> 00:09:04,940
I think you will realize in the second what I'm trying to do here.

110
00:09:06,080 --> 00:09:15,170
So I will go ahead and basically copy our starting plots.

111
00:09:16,890 --> 00:09:17,490
Where is it?

112
00:09:18,810 --> 00:09:19,380
Here it is.

113
00:09:19,470 --> 00:09:28,230
Our starting plot with all three objects, and I will delete this one, this was not the one I wanted.

114
00:09:28,770 --> 00:09:35,850
And now I will just change the line for the Moon and I will exaggerate the radius between Earth and

115
00:09:35,850 --> 00:09:36,150
Moon.

116
00:09:37,200 --> 00:09:40,950
So I will start with this one with the position of the Earth.

117
00:09:41,940 --> 00:09:48,210
And then in reference to this Earth Point, I will add the change of solution.

118
00:09:49,230 --> 00:09:49,860
Why?

119
00:09:51,400 --> 00:10:00,630
Sorry, thought y components six minus solution y component three the distance of the Moon to the Earth

120
00:10:00,630 --> 00:10:01,800
and the X component.

121
00:10:02,190 --> 00:10:04,500
And here we do the same thing for the light component.

122
00:10:04,720 --> 00:10:08,470
So this will be seven minus four.

123
00:10:09,210 --> 00:10:15,690
So basically, I start from the position of the Earth and then at the change or the distance between

124
00:10:15,690 --> 00:10:17,710
Earth and Moon so that I arrive at the Moon.

125
00:10:18,390 --> 00:10:20,850
So far, it will give us the same result as before.

126
00:10:21,540 --> 00:10:27,930
However, now I can add here eFFECTOR and I will add to your factor of 100, which artificially just

127
00:10:27,930 --> 00:10:34,860
for visualization increases the radius between Earth and Moon by a factor of 100.

128
00:10:36,090 --> 00:10:38,040
And you see, now this is what happens here.

129
00:10:38,730 --> 00:10:45,060
The moon moves around the Earth, and at the same time, the Earth moves around the Sun, so the moon

130
00:10:45,060 --> 00:10:45,840
will be shifted.

131
00:10:46,260 --> 00:10:49,170
And so you get this nice spiral trajectory.

132
00:10:49,680 --> 00:10:56,310
And then the other plot, this one here, basically, it looked as if there wasn't convergence reached

133
00:10:56,310 --> 00:11:01,890
yet or that there was some error, but it is just yeah, due to the spiral trajectory.

134
00:11:02,970 --> 00:11:05,310
OK, so that's pretty nice.

135
00:11:05,310 --> 00:11:10,920
I think even though, of course, this plot here is not really correct because I have artificially increased

136
00:11:10,920 --> 00:11:18,300
the radius and it doesn't follow know the correct laws of physics, but we can see how much better what's

137
00:11:18,300 --> 00:11:18,930
going on here.

138
00:11:18,940 --> 00:11:22,920
So that's just a nice trick for the visualization and for understanding what's going on.

139
00:11:24,330 --> 00:11:27,510
OK, so this was the whole first part.

140
00:11:27,750 --> 00:11:30,570
This the solution of the three body problem.

141
00:11:31,350 --> 00:11:38,940
We have introduced the equations of motion considering Sun, Earth and Moon, and we have 18 variables,

142
00:11:39,390 --> 00:11:44,400
18 differential equations, and we have pretty easily solved this.

143
00:11:44,910 --> 00:11:52,500
The only problem was that we had to tune here the tolerance, basically the accuracy of our methods

144
00:11:52,500 --> 00:11:56,310
because by using the starting values, we did not get the correct solution.

145
00:11:56,820 --> 00:12:02,940
The Earth was not moving on a circular trajectory, but was spiraling towards the sun and then crashing

146
00:12:02,940 --> 00:12:03,660
into the Sun.

147
00:12:04,290 --> 00:12:07,380
That would, of course, be a very bad simulation.

148
00:12:08,160 --> 00:12:14,460
However, it was pretty easy to just decrease the tolerance, so make the calculation more strict.

149
00:12:15,060 --> 00:12:18,330
And this slowed down, of course, the simulation.

150
00:12:18,330 --> 00:12:23,910
But in the end, we got a nice result, and we have analyzed the motion of the Sun, which is actually

151
00:12:23,910 --> 00:12:30,120
not fixed because it is pushed around also a bit by the Earth and by the Moon.

152
00:12:30,900 --> 00:12:34,800
And we have analyzed the motion of the Earth and the distance to the Sun.

153
00:12:34,800 --> 00:12:36,630
And you see, there's a nice period.

154
00:12:36,630 --> 00:12:44,250
So you see the Earth is moving a bit on an oval trajectory is slightly oval and the period is one year.

155
00:12:44,250 --> 00:12:44,940
Exactly.

156
00:12:45,750 --> 00:12:51,420
And then we have the same thing for the Moon, but with respect to the Earth, and we see here that

157
00:12:51,420 --> 00:12:57,900
it's also moving on an all the trajectory and that we can exaggerate the moon radius and then get such

158
00:12:57,900 --> 00:12:59,100
a nice plot as here.

159
00:13:00,390 --> 00:13:06,600
So now in the next lecture, we will go ahead and further complicate our problem and we will add here

160
00:13:06,600 --> 00:13:09,660
a fourth body, a rocket or spaceship.

161
00:13:09,810 --> 00:13:10,590
So stay tuned.

162
00:13:10,620 --> 00:13:13,020
It's a really exciting topic, and let's go ahead.

