1
00:00:00,540 --> 00:00:01,500
Welcome back.
2
00:00:01,500 --> 00:00:05,370
Welcome back for week four
of Modeling Complex Systems.
3
00:00:05,370 --> 00:00:07,530
This week, we're gonna be looking
4
00:00:07,530 --> 00:00:09,840
at continuous dynamical systems,
5
00:00:09,840 --> 00:00:12,690
so instead of using discreet rules
6
00:00:12,690 --> 00:00:16,410
that we update for every hour of every day
7
00:00:16,410 --> 00:00:17,760
with some time window,
8
00:00:17,760 --> 00:00:19,740
we're gonna decrease those time window,
9
00:00:19,740 --> 00:00:22,080
so that we have infinitely
many small steps
10
00:00:22,080 --> 00:00:24,300
and effectively continuous time.
11
00:00:24,300 --> 00:00:26,280
That's gonna open the entire toolbox
12
00:00:26,280 --> 00:00:28,590
of calculus and differential equation
13
00:00:28,590 --> 00:00:30,720
to help us study these systems.
14
00:00:30,720 --> 00:00:32,970
So this is the bonus video,
15
00:00:32,970 --> 00:00:36,120
that I originally referred
to during week three
16
00:00:36,120 --> 00:00:38,760
that was unfortunately
recorded without sound,
17
00:00:38,760 --> 00:00:41,100
so you're getting it in week four.
18
00:00:41,100 --> 00:00:43,290
We're gonna be looking at
some mathematical tools
19
00:00:43,290 --> 00:00:47,883
that help us take those
limits of very small steps.
20
00:00:49,440 --> 00:00:52,200
The first tool we're gonna be
looking at are Taylor series,
21
00:00:52,200 --> 00:00:54,510
and here, I wanna highlight
22
00:00:54,510 --> 00:00:58,890
like three important part
of the name of this tool.
23
00:00:58,890 --> 00:01:00,690
First of all, that it's a series,
24
00:01:00,690 --> 00:01:02,550
so what that means is that
25
00:01:02,550 --> 00:01:05,100
formally, it's gonna be a power series.
26
00:01:05,100 --> 00:01:06,030
You just have to remember
27
00:01:06,030 --> 00:01:08,670
that we're looking at
polynomials essentially,
28
00:01:08,670 --> 00:01:10,800
where we're gonna use the
structure of a polynomial.
29
00:01:10,800 --> 00:01:12,330
And this is a trick we're gonna use again
30
00:01:12,330 --> 00:01:13,740
in a different context,
31
00:01:13,740 --> 00:01:15,990
we're gonna use the
structure of a polynomial,
32
00:01:15,990 --> 00:01:18,930
where it's easy to take
derivatives and all that
33
00:01:18,930 --> 00:01:21,840
to store important pieces of information.
34
00:01:21,840 --> 00:01:23,640
And here, we're gonna store information
35
00:01:23,640 --> 00:01:25,890
about a key function, f of X,
36
00:01:25,890 --> 00:01:30,180
which might simply be too
complicated to study efficiently.
37
00:01:30,180 --> 00:01:31,650
So if you have a function,
38
00:01:31,650 --> 00:01:32,610
you wanna take a limit
39
00:01:32,610 --> 00:01:34,560
and its behavior is sort of unknown,
40
00:01:34,560 --> 00:01:35,910
it's a weird function,
41
00:01:35,910 --> 00:01:38,130
then Taylor series can help you do that.
42
00:01:38,130 --> 00:01:40,140
They're gonna help you
summarize this function
43
00:01:40,140 --> 00:01:41,583
in a much easier way.
44
00:01:42,780 --> 00:01:44,070
And the last key part is that
45
00:01:44,070 --> 00:01:46,410
it's really valid around one given point,
46
00:01:46,410 --> 00:01:49,320
so if we wanna take a limit
of something going to zero,
47
00:01:49,320 --> 00:01:51,690
for example, well that's
gonna be convenient,
48
00:01:51,690 --> 00:01:55,020
'cause we know that for
power series for polynomial,
49
00:01:55,020 --> 00:01:57,420
if all coefficients go to zero,
50
00:01:57,420 --> 00:01:58,620
well, that's easy to deal with.
51
00:01:58,620 --> 00:02:02,940
We only care about the
smaller order terms.
52
00:02:02,940 --> 00:02:04,290
So that's really the key part.
53
00:02:04,290 --> 00:02:06,660
So to summarize here,
54
00:02:06,660 --> 00:02:08,660
we're gonna be looking for a polynomial,
55
00:02:13,020 --> 00:02:17,193
such that the value of a function,
56
00:02:18,840 --> 00:02:23,840
which I'm gonna write f
of X0 and all derivatives,
57
00:02:29,610 --> 00:02:32,043
which here, I'm gonna
write f superscript n.
58
00:02:32,910 --> 00:02:35,460
So f(1) would be the first derivative,
59
00:02:35,460 --> 00:02:38,460
the slope of that function at X0.
60
00:02:38,460 --> 00:02:42,310
F(2) would be the curvature
of that function at X0
61
00:02:45,210 --> 00:02:50,210
are respected or conserved or preserved
62
00:02:50,940 --> 00:02:54,750
at x = X0, okay.
63
00:02:54,750 --> 00:02:57,490
The insight really is that
64
00:02:58,650 --> 00:03:03,650
we're looking at a function,
f of X not f of X0, f of X,
65
00:03:05,460 --> 00:03:07,560
that might be very complicated.
66
00:03:07,560 --> 00:03:10,083
Let me just draw whatever,
but it's a function,
67
00:03:12,300 --> 00:03:14,820
sometimes very steep,
sometimes not at all.
68
00:03:14,820 --> 00:03:18,510
It's a weird function that
might be hard to deal with,
69
00:03:18,510 --> 00:03:20,100
and what we're saying is that,
70
00:03:20,100 --> 00:03:24,183
if I look at a particular value, X0,
71
00:03:26,160 --> 00:03:28,800
if I know where I am and I know the slope
72
00:03:28,800 --> 00:03:31,710
and the curvature and all the derivatives,
73
00:03:31,710 --> 00:03:33,990
I can get a really good local picture
74
00:03:33,990 --> 00:03:36,180
of that function, right,
even just the slope.
75
00:03:36,180 --> 00:03:37,770
If you know where you are at X0
76
00:03:37,770 --> 00:03:39,840
and you know in which
direction you're going
77
00:03:39,840 --> 00:03:42,510
and how steep you're going,
78
00:03:42,510 --> 00:03:44,490
then it's easy to project your position,
79
00:03:44,490 --> 00:03:47,520
like do a small step in
delta X times the slope,
80
00:03:47,520 --> 00:03:51,183
and you get your delta
Y kinda thing, right.
81
00:03:52,290 --> 00:03:54,300
So, that's the key insight,
82
00:03:54,300 --> 00:03:56,010
that's what we're looking for here,
83
00:03:56,010 --> 00:03:58,500
and often when people
present Taylor series,
84
00:03:58,500 --> 00:04:00,510
they're only gonna give you a formula.
85
00:04:00,510 --> 00:04:01,710
It's almost like a recipe,
86
00:04:01,710 --> 00:04:04,020
like apply this and you're
gonna get a polynomial
87
00:04:04,020 --> 00:04:08,130
that reflects your function
but is easier to deal with.
88
00:04:08,130 --> 00:04:10,770
The truth is it's super easy.
89
00:04:10,770 --> 00:04:12,660
Looking it up on Wikipedia is easy,
90
00:04:12,660 --> 00:04:16,500
but deriving the Taylor
series is almost just as easy.
91
00:04:16,500 --> 00:04:17,800
So we're looking for
92
00:04:18,990 --> 00:04:21,240
an approximation of f of X,
93
00:04:21,240 --> 00:04:23,403
so I'm gonna use this approximation here,
94
00:04:24,960 --> 00:04:27,210
such that if I plug X of X0,
95
00:04:27,210 --> 00:04:30,450
at least I want to to know
that I get the right value.
96
00:04:30,450 --> 00:04:32,700
So I'm gonna start with f of X0.
97
00:04:32,700 --> 00:04:36,930
If I plug X0 here, I get the right value.
98
00:04:36,930 --> 00:04:40,800
The problem is that right now,
if I plug any other value,
99
00:04:40,800 --> 00:04:42,628
I still get f of X0
100
00:04:42,628 --> 00:04:44,693
'cause I don't have any
derivatives right now.
101
00:04:45,690 --> 00:04:48,450
So as I just said, one thing you can do,
102
00:04:48,450 --> 00:04:51,633
lemme go back, back.
103
00:04:53,370 --> 00:04:57,450
One thing you can do is
just apply your derivatives,
104
00:04:57,450 --> 00:04:59,640
the first derivative at X0,
105
00:04:59,640 --> 00:05:04,290
so that's the slope of my
function, times a change in X,
106
00:05:04,290 --> 00:05:06,570
a delta X, to get a delta Y, right.
107
00:05:06,570 --> 00:05:08,340
That's what the derivative means.
108
00:05:08,340 --> 00:05:12,990
And now, if I plug anything other than X0,
109
00:05:12,990 --> 00:05:15,300
I'm using this first order slope
110
00:05:15,300 --> 00:05:17,850
to sort of project or
extrapolate from my position,
111
00:05:17,850 --> 00:05:19,440
so that's good.
112
00:05:19,440 --> 00:05:21,840
It's also good because,
if I take the derivative,
113
00:05:21,840 --> 00:05:25,230
this is just a constant,
so this goes away.
114
00:05:25,230 --> 00:05:27,240
The derivative of this term is one.
115
00:05:27,240 --> 00:05:30,960
So if I take the derivative
of my polynomial here,
116
00:05:30,960 --> 00:05:33,780
I know that I'm gonna get the
right value here, f prime,
117
00:05:33,780 --> 00:05:35,043
so we're doin' great.
118
00:05:37,830 --> 00:05:39,900
If we take the second derivative though,
119
00:05:39,900 --> 00:05:41,070
right now, we're at zero,
120
00:05:41,070 --> 00:05:43,530
'cause we don't have
any second order term,
121
00:05:43,530 --> 00:05:46,083
so we wanna introduce a second order term,
122
00:05:48,960 --> 00:05:53,343
oops, which is also
gonna be evaluated at X0.
123
00:06:00,210 --> 00:06:02,040
And now, this one is interesting.
124
00:06:02,040 --> 00:06:04,620
Here, I've made it a second order term.
125
00:06:04,620 --> 00:06:07,740
I respect the structure of my polynomial,
126
00:06:07,740 --> 00:06:11,793
so I got this little
square here, second power.
127
00:06:12,630 --> 00:06:16,500
But if I take the derivative of f of X,
128
00:06:16,500 --> 00:06:18,390
of my power series, what happens?
129
00:06:18,390 --> 00:06:20,190
The first term goes away, it's a constant.
130
00:06:20,190 --> 00:06:24,930
The second term gives me my
f(1) for the first derivative.
131
00:06:24,930 --> 00:06:27,453
I take a second derivative, it goes away.
132
00:06:29,280 --> 00:06:31,350
This term that I just wrote though,
133
00:06:31,350 --> 00:06:33,270
if I take two derivatives,
134
00:06:33,270 --> 00:06:35,550
the two is gonna fall in the front, right,
135
00:06:35,550 --> 00:06:40,290
so f prime prime or f(2)
of x is gonna give me
136
00:06:40,290 --> 00:06:43,763
two f(2) of X0, and that's it.
137
00:06:47,190 --> 00:06:49,683
So, I'm getting twice the derivative now,
138
00:06:51,060 --> 00:06:54,873
so really, I can just add
1/2 to control for that.
139
00:06:56,285 --> 00:06:57,840
And now I could add all derivatives,
140
00:06:57,840 --> 00:07:00,685
but if I have the term
that's like an X(n),
141
00:07:00,685 --> 00:07:01,980
then if I take n derivatives,
142
00:07:01,980 --> 00:07:05,400
I'm gonna get n times n
minus one times n minus two
143
00:07:05,400 --> 00:07:07,830
for all the derivatives of these powers.
144
00:07:07,830 --> 00:07:10,230
So the general form of this is really
145
00:07:10,230 --> 00:07:15,230
just that you include the nth
derivative with this form,
146
00:07:18,990 --> 00:07:22,710
which you divide by n factorial,
147
00:07:22,710 --> 00:07:25,112
to control for the fact
that your derivatives
148
00:07:25,112 --> 00:07:27,870
are adding factors in front
149
00:07:27,870 --> 00:07:30,630
of the true slope that you want.
150
00:07:30,630 --> 00:07:31,470
And that's it.
151
00:07:31,470 --> 00:07:36,470
The sum of all f(n) of X0
times x minus X0 to the n,
152
00:07:36,900 --> 00:07:40,050
normalize with this n factorial,
that's our power series.
153
00:07:40,050 --> 00:07:43,110
It's just a way to store the
value and all the derivatives
154
00:07:43,110 --> 00:07:44,850
in a way that makes sense,
155
00:07:44,850 --> 00:07:47,130
and that if you derive your approximation,
156
00:07:47,130 --> 00:07:48,930
you're gonna get the right function.
157
00:07:50,190 --> 00:07:52,203
Here's an example of why that's useful.
158
00:07:53,520 --> 00:07:56,940
So, we dealt a lot with
small probabilities,
159
00:07:56,940 --> 00:08:01,940
and I've played a little
loose with probabilities,
160
00:08:06,420 --> 00:08:10,313
with spelling probability, okay.
161
00:08:12,780 --> 00:08:14,830
I need more coffee, it's early right now.
162
00:08:16,980 --> 00:08:19,470
I've played a little loose
with some of those terms.
163
00:08:19,470 --> 00:08:22,410
Sometimes I would write, for example,
164
00:08:22,410 --> 00:08:24,453
in the case of an SIS model,
165
00:08:25,592 --> 00:08:26,767
I would do one step and I would say,
166
00:08:26,767 --> 00:08:30,937
"Well, to know who's susceptible
at time t plus delta t
167
00:08:30,937 --> 00:08:35,187
"or t plus one steps, I take
who's susceptible at time t,"
168
00:08:37,080 --> 00:08:38,580
and then I've had multiple version,
169
00:08:38,580 --> 00:08:43,580
but one of them was those
that are still susceptible
170
00:08:43,650 --> 00:08:45,390
are those that don't get infected.
171
00:08:45,390 --> 00:08:47,280
So a contact doesn't infect
172
00:08:47,280 --> 00:08:50,640
with probability one minus
beta transmission rate
173
00:08:50,640 --> 00:08:53,343
times delta t, the step
that we're considering,
174
00:08:54,240 --> 00:08:59,190
and I have I of t susceptible individuals.
175
00:08:59,190 --> 00:09:01,560
And let's say it's a
SI model, no recovery,
176
00:09:01,560 --> 00:09:04,770
so this is fine, this is a complete model.
177
00:09:04,770 --> 00:09:07,050
Now if delta, if beta times delta t,
178
00:09:07,050 --> 00:09:10,230
the probability of
transition is really small,
179
00:09:10,230 --> 00:09:11,890
really what I can say is that
180
00:09:14,160 --> 00:09:18,153
this is my one minus x
to I of t, let's say,
181
00:09:19,380 --> 00:09:20,917
and I can say like,
182
00:09:20,917 --> 00:09:24,757
"Well lemme do a Taylor
series around X equals zero,
183
00:09:24,757 --> 00:09:27,217
"so that I'm gonna know
what's the behavior
184
00:09:27,217 --> 00:09:30,687
"for very small probabilities,
for very small X."
185
00:09:31,590 --> 00:09:35,403
And so well, if you
evaluate that X equals zero,
186
00:09:36,420 --> 00:09:38,973
we're gonna get, I'm
just gonna write f of X,
187
00:09:41,190 --> 00:09:42,240
I'm just gonna get one.
188
00:09:42,240 --> 00:09:44,970
If I evaluate it at X0 equal to 2(0),
189
00:09:44,970 --> 00:09:47,850
'cause I have one to some
power, that's always one.
190
00:09:47,850 --> 00:09:49,893
Now I take my first derivative,
191
00:09:50,790 --> 00:09:55,670
and my first derivative is
simply gonna be X times I of t.
192
00:09:57,900 --> 00:09:59,760
And then usually, we would write,
193
00:09:59,760 --> 00:10:04,200
we got some other terms in X
square, and that's a big O,
194
00:10:04,200 --> 00:10:07,050
meaning we have terms of order X square,
195
00:10:07,050 --> 00:10:08,970
but because X is already really small,
196
00:10:08,970 --> 00:10:11,310
X square is even smaller,
197
00:10:11,310 --> 00:10:14,670
potentially so small
that we ignore it, right.
198
00:10:14,670 --> 00:10:16,170
So that's what we're gonna do.
199
00:10:17,220 --> 00:10:19,650
And what this means is that this equation
200
00:10:19,650 --> 00:10:21,160
could have been written
201
00:10:23,880 --> 00:10:28,880
simply as S of t times
one minus beta delta t I,
202
00:10:32,700 --> 00:10:34,953
I'm running out of
space here, I apologize.
203
00:10:37,710 --> 00:10:40,410
Let's just go back here.
204
00:10:40,410 --> 00:10:45,410
S of t times one minus
beta delta t times I of t.
205
00:10:48,330 --> 00:10:52,290
And sometimes I use this form
because it's easier, right,
206
00:10:52,290 --> 00:10:54,930
and the average is respected.
207
00:10:54,930 --> 00:10:57,390
But the important part here is that
208
00:10:57,390 --> 00:10:58,890
there is an approximation,
209
00:10:58,890 --> 00:11:00,060
so let me just highlight it here.
210
00:11:00,060 --> 00:11:02,490
This is approximately equal
211
00:11:02,490 --> 00:11:05,160
to the simulations we would
do with discrete time steps
212
00:11:05,160 --> 00:11:10,160
and discrete number of
infectious neighbors, okay.
213
00:11:14,040 --> 00:11:15,570
There was one that was even harder
214
00:11:15,570 --> 00:11:17,340
that showed up in a video we had.
215
00:11:17,340 --> 00:11:18,780
This, I just copy and pasted it.
216
00:11:18,780 --> 00:11:21,060
We had a cumulative distribution function
217
00:11:21,060 --> 00:11:23,160
for our Poisson process, right,
218
00:11:23,160 --> 00:11:26,850
and Poisson processes, like formally,
219
00:11:26,850 --> 00:11:29,610
and that was part of
the quiz in week three.
220
00:11:29,610 --> 00:11:30,900
They're defined by a rate,
221
00:11:30,900 --> 00:11:34,200
so by the expected time
until the next event.
222
00:11:34,200 --> 00:11:36,300
In fact, that's all they're defined by,
223
00:11:36,300 --> 00:11:37,590
so they don't have any memory.
224
00:11:37,590 --> 00:11:40,530
If all that matters is the expected rate
225
00:11:40,530 --> 00:11:43,380
at which the next event
occurs or the expected time,
226
00:11:43,380 --> 00:11:45,390
this is, time and rate
are just the same thing,
227
00:11:45,390 --> 00:11:47,730
one over the other until the next event,
228
00:11:47,730 --> 00:11:49,500
then it's a Poisson processes.
229
00:11:49,500 --> 00:11:52,683
But it is a continuous time process.
230
00:11:53,850 --> 00:11:56,880
And we were doing this
cumulative distribution function
231
00:11:56,880 --> 00:11:58,140
and then showing how,
232
00:11:58,140 --> 00:11:59,610
which we expect is an exponential
233
00:11:59,610 --> 00:12:03,810
or Poisson distribution of recovery time
234
00:12:03,810 --> 00:12:05,910
or of me leaving a building.
235
00:12:05,910 --> 00:12:08,250
And we took this derivative already,
236
00:12:08,250 --> 00:12:11,490
so when time steps get
really small, right.
237
00:12:11,490 --> 00:12:14,403
We took this limit, not
this derivative, this limit.
238
00:12:17,100 --> 00:12:19,470
Well, so you could play
with Taylor series,
239
00:12:19,470 --> 00:12:22,050
doing something similar here.
240
00:12:22,050 --> 00:12:25,920
The important part is that the
delta t occurs twice, right,
241
00:12:25,920 --> 00:12:27,600
so it is a complicated function.
242
00:12:27,600 --> 00:12:28,823
And what's interesting here is that
243
00:12:28,823 --> 00:12:33,823
there's one term that goes to
one, and that's the term here,
244
00:12:34,050 --> 00:12:36,360
but then the power goes to infinity.
245
00:12:36,360 --> 00:12:38,370
So as time gets really small,
246
00:12:38,370 --> 00:12:40,650
the probability of transition
247
00:12:40,650 --> 00:12:42,900
during every time step
is effectively zero.
248
00:12:42,900 --> 00:12:45,390
So nothing happens, the
argument goes to one,
249
00:12:45,390 --> 00:12:48,290
but the number of times steps
that we do becomes infinite.
250
00:12:49,350 --> 00:12:50,730
And there's a second tool
251
00:12:50,730 --> 00:12:54,033
that's really useful
for dealing with that,
252
00:12:56,760 --> 00:12:57,873
and that's the,
253
00:12:59,841 --> 00:13:02,010
I apologize, I have a hard
time saying this in English.
254
00:13:02,010 --> 00:13:06,210
So it's the L'Hospital
or the Hospital Rule.
255
00:13:11,370 --> 00:13:13,320
Okay, and this is gonna be our example,
256
00:13:13,320 --> 00:13:15,603
this CDF that we dealt with.
257
00:13:16,740 --> 00:13:20,583
Fun fact, a bonus trivia fact
as part of this bonus video,
258
00:13:21,600 --> 00:13:25,807
you will also see this
written as Hopital Rule.
259
00:13:31,170 --> 00:13:33,510
Basically, in Old French,
260
00:13:33,510 --> 00:13:35,970
we would add a lot of os and es,
261
00:13:35,970 --> 00:13:37,380
that are now, in Modern French,
262
00:13:37,380 --> 00:13:38,970
written with this circumflex
263
00:13:38,970 --> 00:13:41,640
or little hat on the vowel.
264
00:13:41,640 --> 00:13:43,803
So, it's the same in my name.
265
00:13:46,200 --> 00:13:50,340
My last name, Dufresne,
means from the Ash Tree,
266
00:13:50,340 --> 00:13:53,520
but in Modern French, we
would write so from, Du,
267
00:13:53,520 --> 00:13:57,033
and then Frene, which is Ash Tree.
268
00:13:58,230 --> 00:13:59,553
Okay, fun fact,
269
00:14:01,200 --> 00:14:02,940
but let me go back to Hospitals Rule.
270
00:14:02,940 --> 00:14:05,640
You can Google it with both
spelling, that's my point.
271
00:14:08,100 --> 00:14:09,870
So this works really well,
272
00:14:09,870 --> 00:14:12,900
when you have this idea of two terms
273
00:14:12,900 --> 00:14:14,460
that sort of fight each other, right.
274
00:14:14,460 --> 00:14:17,310
When you take the limit,
they fight each other.
275
00:14:17,310 --> 00:14:19,320
And the rule is best written
276
00:14:19,320 --> 00:14:21,090
when you're dealing with ratios.
277
00:14:21,090 --> 00:14:22,290
So when you wanna apply this rule,
278
00:14:22,290 --> 00:14:25,050
the first thing to do is
to write it as a ratio,
279
00:14:25,050 --> 00:14:27,720
and here, we're just gonna use
280
00:14:27,720 --> 00:14:29,853
a little dumb trick to do that.
281
00:14:32,940 --> 00:14:36,640
We're gonna take the exponential
282
00:14:39,847 --> 00:14:41,200
of the natural logarithm
283
00:14:44,010 --> 00:14:45,450
of our expression.
284
00:14:45,450 --> 00:14:48,210
So taking the exponential
of the natural logarithm
285
00:14:48,210 --> 00:14:50,673
means doing nothing, right,
286
00:14:52,290 --> 00:14:55,830
but here, that means that
the limit of an exponential,
287
00:14:55,830 --> 00:14:56,663
what you care about
288
00:14:56,663 --> 00:14:59,250
is what the argument of the
exponential is going to.
289
00:14:59,250 --> 00:15:04,143
So we can say we're taking
the exponential, the limit,
290
00:15:05,010 --> 00:15:08,640
of a logarithm, then logarithm
of something to some power,
291
00:15:08,640 --> 00:15:09,990
you can take the power out,
292
00:15:09,990 --> 00:15:12,900
and it applies a multiplicative factor.
293
00:15:12,900 --> 00:15:15,753
So now we get L over delta t,
294
00:15:18,150 --> 00:15:22,323
and then the logarithm,
one minus L delta t.
295
00:15:25,080 --> 00:15:30,080
And now we have what we want,
so as delta t goes to zero,
296
00:15:31,440 --> 00:15:34,410
the denominator here is
delta t goes to zero,
297
00:15:34,410 --> 00:15:36,570
so that makes the whole thing blow up.
298
00:15:36,570 --> 00:15:38,700
But we also get the logarithm,
299
00:15:38,700 --> 00:15:43,700
which goes to one as L
times delta t goes to zero,
300
00:15:43,920 --> 00:15:45,960
and logarithm of one goes to zero.
301
00:15:45,960 --> 00:15:49,320
So we have one term, well, we
have two terms going to zero,
302
00:15:49,320 --> 00:15:51,090
the numerator and the denominator,
303
00:15:51,090 --> 00:15:52,410
so they're sort of fighting.
304
00:15:52,410 --> 00:15:54,697
And then what L'Hospital's
Rule is saying is,
305
00:15:54,697 --> 00:15:57,577
"Well, if you can look at how fast
306
00:15:57,577 --> 00:16:00,330
"they're both going to zero,
you're gonna know who win."
307
00:16:00,330 --> 00:16:04,890
If the tops goes, if the
numerator goes to zero faster,
308
00:16:04,890 --> 00:16:06,630
the whole thing is going to zero.
309
00:16:06,630 --> 00:16:08,580
If the denominator goes to zero faster,
310
00:16:08,580 --> 00:16:09,840
the whole thing might blow up,
311
00:16:09,840 --> 00:16:11,790
and then you're not only
gonna know where they go
312
00:16:11,790 --> 00:16:13,173
but how fast they're going.
313
00:16:14,430 --> 00:16:15,750
So that's the idea.
314
00:16:15,750 --> 00:16:19,230
So more formally saying what
L'Hospital's Rule says is
315
00:16:19,230 --> 00:16:21,000
when you have a ratio like this,
316
00:16:21,000 --> 00:16:23,310
take the derivative of the numerator
317
00:16:23,310 --> 00:16:25,380
and the derivative of the denominator,
318
00:16:25,380 --> 00:16:27,573
and then reevaluate your limit.
319
00:16:35,220 --> 00:16:38,610
So if I do exactly that here,
320
00:16:38,610 --> 00:16:43,610
I'm simply gonna get the
exponential of the limit
321
00:16:43,920 --> 00:16:46,293
when delta t goes to zero.
322
00:16:48,990 --> 00:16:50,670
The derivative of my denominator,
323
00:16:50,670 --> 00:16:55,670
which is my first term
here, is simply one delta t,
324
00:16:55,770 --> 00:16:58,953
it's derivative as a function
of delta t goes to one,
325
00:17:01,740 --> 00:17:06,397
and then, I have minus L over
326
00:17:12,810 --> 00:17:17,810
one minus L delta t here at the bottom.
327
00:17:20,970 --> 00:17:23,103
So then if I apply my limit,
328
00:17:32,280 --> 00:17:34,203
my denominator goes to one,
329
00:17:36,900 --> 00:17:39,783
and I get my derivative of minus LL,
330
00:17:41,460 --> 00:17:43,803
which is what we had
in the previous video.
331
00:17:45,150 --> 00:17:46,440
So those two rules,
332
00:17:46,440 --> 00:17:48,639
sometimes they give you the same results,
333
00:17:48,639 --> 00:17:51,240
well, they always give
you the same result,
334
00:17:51,240 --> 00:17:52,650
but basically is that,
335
00:17:52,650 --> 00:17:54,630
sometimes one is gonna
be easier to deal with.
336
00:17:54,630 --> 00:17:56,880
Here we didn't have to
do a lot of derivatives,
337
00:17:56,880 --> 00:17:59,820
we just took the derivatives
of logarithm term
338
00:17:59,820 --> 00:18:02,010
and the derivative of a linear term,
339
00:18:02,010 --> 00:18:03,180
so that was easy.
340
00:18:03,180 --> 00:18:04,500
And dealing with a function,
341
00:18:04,500 --> 00:18:07,410
like one minus X to some power over X,
342
00:18:07,410 --> 00:18:11,220
would've been a little
harder with Taylor series.
343
00:18:11,220 --> 00:18:13,530
So Taylor series is the more general tool,
344
00:18:13,530 --> 00:18:14,970
but L'Hospital's Rule is really good,
345
00:18:14,970 --> 00:18:16,830
when you notice that there's the structure
346
00:18:16,830 --> 00:18:18,880
of two terms fighting against each other.
347
00:18:19,740 --> 00:18:21,000
So that's it for now.
348
00:18:21,000 --> 00:18:22,650
In the next few videos for this week,
349
00:18:22,650 --> 00:18:24,180
we're gonna be applying
some of these rules
350
00:18:24,180 --> 00:18:28,530
to show how discrete models
and continuous models
351
00:18:28,530 --> 00:18:32,100
are connected mathematically
352
00:18:32,100 --> 00:18:33,630
in a way that's very quantifiable,
353
00:18:33,630 --> 00:18:37,110
so that we're gonna be able
to use discrete simulations
354
00:18:37,110 --> 00:18:40,440
to compare with continuous
equations and vice versa,
355
00:18:40,440 --> 00:18:41,610
as long as we know
356
00:18:41,610 --> 00:18:44,580
what approximations we're
making mathematically.
357
00:18:44,580 --> 00:18:46,770
So that's why these tools
358
00:18:46,770 --> 00:18:49,020
are gonna be super useful going forward.
359
00:18:49,020 --> 00:18:51,423
So, I'll see you in the next one.