1
00:00:00,000 --> 00:00:07,300
2
00:00:07,300 --> 00:00:08,500
PROFESSOR: Hi.
3
00:00:08,500 --> 00:00:10,380
Well, today's the chain rule.
4
00:00:10,380 --> 00:00:15,630
Very, very useful rule, and it's
kind of neat, natural.
5
00:00:15,630 --> 00:00:18,650
Can I explain what a chain
of functions is?
6
00:00:18,650 --> 00:00:21,810
There is a chain of functions.
7
00:00:21,810 --> 00:00:26,360
And then we want to know the
slope, the derivative.
8
00:00:26,360 --> 00:00:28,600
So how does the chain work?
9
00:00:28,600 --> 00:00:32,250
So there x is the input.
10
00:00:32,250 --> 00:00:35,000
It goes into a function
g of x.
11
00:00:35,000 --> 00:00:39,000
We could call that inside
function y.
12
00:00:39,000 --> 00:00:46,290
So the first step
is y is g of x.
13
00:00:46,290 --> 00:00:51,690
So we get an output
from g, call it y.
14
00:00:51,690 --> 00:00:57,250
That's halfway, because that y
then becomes the input to f.
15
00:00:57,250 --> 00:00:59,160
That completes the chain.
16
00:00:59,160 --> 00:01:03,850
It starts with x, produces
y, which is the inside
17
00:01:03,850 --> 00:01:05,470
function g of x.
18
00:01:05,470 --> 00:01:09,830
And then let me call
it z is f of y.
19
00:01:09,830 --> 00:01:13,870
And what I want to know
is how quickly does
20
00:01:13,870 --> 00:01:16,920
z change as x changes?
21
00:01:16,920 --> 00:01:18,740
That's what the chain
rule asks.
22
00:01:18,740 --> 00:01:22,260
It's the slope of that chain.
23
00:01:22,260 --> 00:01:24,900
Can I maybe just tell
you the chain rule?
24
00:01:24,900 --> 00:01:27,970
And then we'll try it
on some examples.
25
00:01:27,970 --> 00:01:30,170
You'll see how it works.
26
00:01:30,170 --> 00:01:32,120
OK, here it is.
27
00:01:32,120 --> 00:01:44,180
The derivative, the slope of
this chain dz dx, notice I
28
00:01:44,180 --> 00:01:47,830
want the change in the whole
thing when I change the
29
00:01:47,830 --> 00:01:49,530
original input.
30
00:01:49,530 --> 00:01:54,040
Then the formula is that
I take-- it's nice.
31
00:01:54,040 --> 00:02:04,800
You take dz dy times dy dx.
32
00:02:04,800 --> 00:02:08,539
So the derivative that we're
looking for, the slope, the
33
00:02:08,539 --> 00:02:14,160
speed, is a product of two
simpler derivatives that we
34
00:02:14,160 --> 00:02:16,200
probably know.
35
00:02:16,200 --> 00:02:20,100
And when we put the chain
together, we multiply those
36
00:02:20,100 --> 00:02:21,460
derivatives.
37
00:02:21,460 --> 00:02:28,310
But there's one catch
that I'll explain.
38
00:02:28,310 --> 00:02:31,620
I can give you a hint
right away.
39
00:02:31,620 --> 00:02:38,710
dz dy, this first factor,
depends on y.
40
00:02:38,710 --> 00:02:43,170
But we're looking for the change
due to the original
41
00:02:43,170 --> 00:02:46,150
change in x.
42
00:02:46,150 --> 00:02:51,110
When I find dz dy, I'm going
to have to get back to x.
43
00:02:51,110 --> 00:02:54,180
Let me just do an example
with a picture.
44
00:02:54,180 --> 00:02:56,480
You'll see why I
have to do it.
45
00:02:56,480 --> 00:03:02,350
So let the chain be cosine
of-- oh, sine.
46
00:03:02,350 --> 00:03:02,940
Why not?
47
00:03:02,940 --> 00:03:04,520
Sine of 3x.
48
00:03:04,520 --> 00:03:07,500
Let me take sine of 3x.
49
00:03:07,500 --> 00:03:15,520
So that's my sine of 3x.
50
00:03:15,520 --> 00:03:19,405
I would like to know if that's
my function, and I can draw it
51
00:03:19,405 --> 00:03:23,700
and will draw it, what
is the slope?
52
00:03:23,700 --> 00:03:26,720
OK, so what's the
inside function?
53
00:03:26,720 --> 00:03:28,340
What's y here?
54
00:03:28,340 --> 00:03:30,420
Well, it's sitting there
in parentheses.
55
00:03:30,420 --> 00:03:33,740
Often it's in parentheses so
we identify it right away.
56
00:03:33,740 --> 00:03:35,790
y is 3x.
57
00:03:35,790 --> 00:03:37,590
That's the inside function.
58
00:03:37,590 --> 00:03:40,775
And then the outside function
is the sine of y.
59
00:03:40,775 --> 00:03:44,870
60
00:03:44,870 --> 00:03:47,330
So what's the derivative
by the chain rule?
61
00:03:47,330 --> 00:03:49,810
I'm ready to use the chain rule,
because these are such
62
00:03:49,810 --> 00:03:53,630
simple functions, I know their
separate derivative.
63
00:03:53,630 --> 00:03:57,230
So if this whole thing
is z, the chain rule
64
00:03:57,230 --> 00:04:03,780
says that dz dx is--
65
00:04:03,780 --> 00:04:05,000
I'm using this rule.
66
00:04:05,000 --> 00:04:09,040
I first name dz dy, the
derivative of z with respect
67
00:04:09,040 --> 00:04:13,820
to y, which is cosine of y.
68
00:04:13,820 --> 00:04:17,560
And then the second factor is
dy dx, and that's just a
69
00:04:17,560 --> 00:04:22,820
straight line with slope
3, so dy dx is 3.
70
00:04:22,820 --> 00:04:24,580
Good.
71
00:04:24,580 --> 00:04:29,190
Good, but not finished, because
I'm getting an answer
72
00:04:29,190 --> 00:04:32,530
that's still in terms of y, and
I have to get back to x,
73
00:04:32,530 --> 00:04:34,430
and no problem to do it.
74
00:04:34,430 --> 00:04:36,750
I know the link from y to x.
75
00:04:36,750 --> 00:04:38,630
So here's the 3.
76
00:04:38,630 --> 00:04:41,550
I can usually write it out here,
and then I wouldn't need
77
00:04:41,550 --> 00:04:42,550
parentheses.
78
00:04:42,550 --> 00:04:44,250
That's just that 3.
79
00:04:44,250 --> 00:04:48,520
Now the part I'm caring
about: cosine of 3x.
80
00:04:48,520 --> 00:04:52,900
81
00:04:52,900 --> 00:04:57,000
Not cosine x, even though
this was just sine.
82
00:04:57,000 --> 00:05:00,870
But it was sine of y, and
therefore, we need cosine 3x.
83
00:05:00,870 --> 00:05:05,480
Let me draw a picture of this
function, and you'll see
84
00:05:05,480 --> 00:05:08,420
what's going on.
85
00:05:08,420 --> 00:05:10,580
If I draw a picture of--
86
00:05:10,580 --> 00:05:15,570
I'll start with a picture of
sine x, maybe out to 180
87
00:05:15,570 --> 00:05:18,310
degrees pi.
88
00:05:18,310 --> 00:05:21,140
This direction is now x.
89
00:05:21,140 --> 00:05:25,000
And this direction is going to
be-- well, there is the sine
90
00:05:25,000 --> 00:05:27,500
of x, but that's not
my function.
91
00:05:27,500 --> 00:05:32,800
My function is sine of 3x, and
it's worth realizing what's
92
00:05:32,800 --> 00:05:33,750
the difference.
93
00:05:33,750 --> 00:05:39,720
How does the graph change if
I have 3x instead of x?
94
00:05:39,720 --> 00:05:42,420
Well, things come sooner.
95
00:05:42,420 --> 00:05:45,310
Things are speeded up.
96
00:05:45,310 --> 00:05:49,680
Here at x equal pi, 180 degrees,
is when the sine
97
00:05:49,680 --> 00:05:51,360
goes back to 0.
98
00:05:51,360 --> 00:05:56,510
But for 3x, it'll be back to
0 already when x is 60
99
00:05:56,510 --> 00:05:58,290
degrees, pi over 3.
100
00:05:58,290 --> 00:06:05,520
So 1/3 of the way along, right
there, my sine 3x is this one.
101
00:06:05,520 --> 00:06:11,700
It's just like the sine
curve but faster.
102
00:06:11,700 --> 00:06:15,940
That was pi over 3 there,
60 degrees.
103
00:06:15,940 --> 00:06:23,080
So this is my z of x curve, and
you can see that the slope
104
00:06:23,080 --> 00:06:26,220
is steeper at the beginning.
105
00:06:26,220 --> 00:06:27,890
You can see that the slope--
106
00:06:27,890 --> 00:06:30,700
things are happening
three times faster.
107
00:06:30,700 --> 00:06:33,200
Things are compressed by 3.
108
00:06:33,200 --> 00:06:37,300
This sine curve is
compressed by 3.
109
00:06:37,300 --> 00:06:44,190
That makes it speed up so the
slope is 3 at the start, and I
110
00:06:44,190 --> 00:06:47,300
claim that it's 3
cosine of 3x.
111
00:06:47,300 --> 00:06:49,320
Oh, let's draw the slope.
112
00:06:49,320 --> 00:06:52,350
All right, draw the slope.
113
00:06:52,350 --> 00:06:55,140
All right, let me start with
the slope of sine-- so this
114
00:06:55,140 --> 00:06:58,280
was just old sine x.
115
00:06:58,280 --> 00:07:04,400
So its slope is just
cosine x along to--
116
00:07:04,400 --> 00:07:04,980
right?
117
00:07:04,980 --> 00:07:11,850
That's the slope starts at 1.
118
00:07:11,850 --> 00:07:14,560
This is now cosine x.
119
00:07:14,560 --> 00:07:18,290
But that's going out
to pi again.
120
00:07:18,290 --> 00:07:21,050
That's the slope of the original
one, not the slope of
121
00:07:21,050 --> 00:07:23,660
our function, of our chain.
122
00:07:23,660 --> 00:07:27,290
So the slope of our
chain will be--
123
00:07:27,290 --> 00:07:29,160
I mean, it doesn't
go out so far.
124
00:07:29,160 --> 00:07:35,500
It's all between here and
pi over 3, right?
125
00:07:35,500 --> 00:07:38,580
Our function, the one
we're looking at, is
126
00:07:38,580 --> 00:07:40,680
just on this part.
127
00:07:40,680 --> 00:07:45,690
And the slope starts out at 3,
and it's three times bigger,
128
00:07:45,690 --> 00:07:47,760
so it's going to be--
well, I'll just
129
00:07:47,760 --> 00:07:49,200
about get it on there.
130
00:07:49,200 --> 00:07:50,450
It's going to go down.
131
00:07:50,450 --> 00:07:54,980
132
00:07:54,980 --> 00:07:58,880
I don't know if that's great,
but it maybe makes the point
133
00:07:58,880 --> 00:08:05,700
that I started up here at 3, and
I ended down here at minus
134
00:08:05,700 --> 00:08:12,840
3 when x was 60 degrees
because then--
135
00:08:12,840 --> 00:08:18,830
you see, this is a picture
of 3 cosine of 3x.
136
00:08:18,830 --> 00:08:21,410
137
00:08:21,410 --> 00:08:27,270
I had to replace y by
3x at this point.
138
00:08:27,270 --> 00:08:32,039
OK, let me do two or three
more examples,
139
00:08:32,039 --> 00:08:33,929
just so you see it.
140
00:08:33,929 --> 00:08:36,620
Let's take an easy one.
141
00:08:36,620 --> 00:08:42,510
Suppose z is x cubed squared.
142
00:08:42,510 --> 00:08:45,170
143
00:08:45,170 --> 00:08:47,500
All right, here is the
inside function.
144
00:08:47,500 --> 00:08:54,350
y is x cubed, and z is--
do you see what z is?
145
00:08:54,350 --> 00:08:58,890
z is x cubed squared.
146
00:08:58,890 --> 00:09:02,080
So x cubed is the
inside function.
147
00:09:02,080 --> 00:09:04,910
What's the outside function?
148
00:09:04,910 --> 00:09:06,220
It's a function of y.
149
00:09:06,220 --> 00:09:07,400
I'm not going to write--
150
00:09:07,400 --> 00:09:10,020
it's going to be the
squaring function.
151
00:09:10,020 --> 00:09:11,710
That's what we do outside.
152
00:09:11,710 --> 00:09:13,610
I'm not going to write
x squared.
153
00:09:13,610 --> 00:09:15,310
It's y squared.
154
00:09:15,310 --> 00:09:16,170
This is y.
155
00:09:16,170 --> 00:09:18,380
It's y squared that
gets squared.
156
00:09:18,380 --> 00:09:26,010
Then the derivative dz dx by
the chain rule is dz dy.
157
00:09:26,010 --> 00:09:27,640
Shall I remember
the chain rule?
158
00:09:27,640 --> 00:09:32,350
dz dy, dy dx.
159
00:09:32,350 --> 00:09:37,810
Easy to remember because in the
mind of everybody, these
160
00:09:37,810 --> 00:09:42,530
dy's, you see that they're
sort of canceling.
161
00:09:42,530 --> 00:09:45,100
So what's dz dy?
162
00:09:45,100 --> 00:09:49,300
z is y squared, so this
is 2y, that factor.
163
00:09:49,300 --> 00:09:51,320
What's dy dx?
164
00:09:51,320 --> 00:09:52,650
y is x cubed.
165
00:09:52,650 --> 00:09:54,740
We know the derivative
of x cubed.
166
00:09:54,740 --> 00:09:58,050
It's 3x squared.
167
00:09:58,050 --> 00:10:04,210
There is the answer, but it's
not final because I've got a y
168
00:10:04,210 --> 00:10:05,830
here that doesn't belong.
169
00:10:05,830 --> 00:10:07,130
I've got to get it back to.
170
00:10:07,130 --> 00:10:12,630
X So I have all together 2 times
3 is making 6, and that
171
00:10:12,630 --> 00:10:17,420
y, I have to go back and see
what was y in terms of x.
172
00:10:17,420 --> 00:10:18,950
It was x cubed.
173
00:10:18,950 --> 00:10:22,150
So I have x cubed there, and
here's an x squared,
174
00:10:22,150 --> 00:10:25,460
altogether x to the fifth.
175
00:10:25,460 --> 00:10:28,340
Now, is that the right answer?
176
00:10:28,340 --> 00:10:33,110
In this example, we can
certainly check it because we
177
00:10:33,110 --> 00:10:37,350
know what x cubed squared is.
178
00:10:37,350 --> 00:10:42,430
So x cubed is x times x times
x, and I'm squaring that.
179
00:10:42,430 --> 00:10:43,850
I'm multiplying by itself.
180
00:10:43,850 --> 00:10:45,820
There's another x
times x times x.
181
00:10:45,820 --> 00:10:52,360
Altogether I have x to
the sixth power.
182
00:10:52,360 --> 00:10:54,230
Notice I don't add those.
183
00:10:54,230 --> 00:10:59,990
When I'm squaring x cubed,
I multiply the 2 by
184
00:10:59,990 --> 00:11:02,310
the 3 and get 6.
185
00:11:02,310 --> 00:11:06,040
So z is x to the sixth, and of
course, the derivative of x to
186
00:11:06,040 --> 00:11:10,390
the sixth is 6 times x to the
fifth, one power lower.
187
00:11:10,390 --> 00:11:14,170
188
00:11:14,170 --> 00:11:17,630
OK, I want to do two
more examples.
189
00:11:17,630 --> 00:11:23,600
Let me do one more right away
while we're on a roll.
190
00:11:23,600 --> 00:11:30,310
I'll bring down that board and
take this function, just so
191
00:11:30,310 --> 00:11:32,580
you can spot the
inside function
192
00:11:32,580 --> 00:11:34,070
and the outside function.
193
00:11:34,070 --> 00:11:39,760
So my function z is going to be
1 over the square root of 1
194
00:11:39,760 --> 00:11:43,490
minus x squared.
195
00:11:43,490 --> 00:11:47,480
Such things come up pretty often
so we have to know its
196
00:11:47,480 --> 00:11:47,950
derivative.
197
00:11:47,950 --> 00:11:50,640
We could graph it.
198
00:11:50,640 --> 00:11:55,920
That's a perfectly reasonable
function, and
199
00:11:55,920 --> 00:11:59,100
it's a perfect chain.
200
00:11:59,100 --> 00:12:03,610
The first point is to identify
what's the inside function and
201
00:12:03,610 --> 00:12:04,950
what's the outside.
202
00:12:04,950 --> 00:12:08,370
So inside I'm seeing this
1 minus x squared.
203
00:12:08,370 --> 00:12:14,440
That's the quantity that it'll
be much simpler if I just give
204
00:12:14,440 --> 00:12:17,330
that a single name y.
205
00:12:17,330 --> 00:12:19,150
And then what's the
outside function?
206
00:12:19,150 --> 00:12:21,290
What am I doing to this y?
207
00:12:21,290 --> 00:12:26,480
I'm taking its square root,
so I have y to the 1/2.
208
00:12:26,480 --> 00:12:29,870
But that square root is
in the denominator.
209
00:12:29,870 --> 00:12:33,520
I'm dividing, so it's
y to the minus 1/2.
210
00:12:33,520 --> 00:12:38,800
So z is y to the minus 1/2.
211
00:12:38,800 --> 00:12:42,150
OK, those are functions I'm
totally happy with.
212
00:12:42,150 --> 00:12:44,355
The derivative is what?
213
00:12:44,355 --> 00:12:48,310
214
00:12:48,310 --> 00:12:51,210
dz dy, I won't repeat
the chain rule.
215
00:12:51,210 --> 00:12:53,090
You've got that clearly
in mind.
216
00:12:53,090 --> 00:12:54,490
It's right above.
217
00:12:54,490 --> 00:12:56,970
Let's just put in
the answer here.
218
00:12:56,970 --> 00:13:01,140
dz dy, the derivative, that's
y to some power, so I get
219
00:13:01,140 --> 00:13:05,306
minus 1/2 times y
to what power?
220
00:13:05,306 --> 00:13:08,210
221
00:13:08,210 --> 00:13:10,560
I always go one power lower.
222
00:13:10,560 --> 00:13:12,355
Here the power is minus 1/2.
223
00:13:12,355 --> 00:13:17,490
If I go down by one, I'll
have minus 3/2.
224
00:13:17,490 --> 00:13:22,630
And then I have to have
dy dx, which is easy.
225
00:13:22,630 --> 00:13:25,430
dy dx, y is 1 minus x squared.
226
00:13:25,430 --> 00:13:31,030
The derivative of that
is just minus 2x.
227
00:13:31,030 --> 00:13:37,490
And now I have to assemble
these, put them together, and
228
00:13:37,490 --> 00:13:39,660
get rid of the y.
229
00:13:39,660 --> 00:13:42,490
So the minus 2 cancels
the minus 1/2.
230
00:13:42,490 --> 00:13:43,600
That's nice.
231
00:13:43,600 --> 00:13:50,560
I have an x still here, and
I have y to the minus 3/2.
232
00:13:50,560 --> 00:13:52,310
What's that?
233
00:13:52,310 --> 00:13:58,660
I know what y is, 1 minus x
squared, and so it's that to
234
00:13:58,660 --> 00:14:01,220
the minus 3/2.
235
00:14:01,220 --> 00:14:02,760
I could write it that way.
236
00:14:02,760 --> 00:14:05,960
x times 1 minus x squared--
237
00:14:05,960 --> 00:14:07,410
that's the y--
238
00:14:07,410 --> 00:14:11,370
to the power minus 3/2.
239
00:14:11,370 --> 00:14:13,470
Maybe you like it that way.
240
00:14:13,470 --> 00:14:15,870
I'm totally OK with that.
241
00:14:15,870 --> 00:14:19,250
Or maybe you want
to see it as--
242
00:14:19,250 --> 00:14:28,310
this minus exponent
down here as 3/2.
243
00:14:28,310 --> 00:14:30,440
Either way, both good.
244
00:14:30,440 --> 00:14:34,650
OK, so that's one
more practice.
245
00:14:34,650 --> 00:14:37,970
and I've got one more in mind.
246
00:14:37,970 --> 00:14:42,310
But let me return to this board,
the starting board,
247
00:14:42,310 --> 00:14:50,060
just to justify where did this
chain rule come from.
248
00:14:50,060 --> 00:14:53,160
OK, where do derivatives
come from?
249
00:14:53,160 --> 00:15:00,280
Derivative always start with
small finite steps, with delta
250
00:15:00,280 --> 00:15:01,530
rather than d.
251
00:15:01,530 --> 00:15:05,160
252
00:15:05,160 --> 00:15:09,630
So I start here, I make a change
in x, and I want to
253
00:15:09,630 --> 00:15:13,660
know the change in z.
254
00:15:13,660 --> 00:15:23,320
These are small, but not
zero, not darn small.
255
00:15:23,320 --> 00:15:30,860
OK, all right, those are true
quantities, and for those, I'm
256
00:15:30,860 --> 00:15:41,870
perfectly entitled to divide and
multiply by the change in
257
00:15:41,870 --> 00:15:44,170
y because there will
be a change in y.
258
00:15:44,170 --> 00:15:49,070
When I change x, that produces
a change in g of x.
259
00:15:49,070 --> 00:15:50,840
You remember this was the y.
260
00:15:50,840 --> 00:15:54,000
261
00:15:54,000 --> 00:15:56,760
So this factor--
262
00:15:56,760 --> 00:16:00,310
well, first of all, that's
simply a true
263
00:16:00,310 --> 00:16:02,840
statement for fractions.
264
00:16:02,840 --> 00:16:05,720
265
00:16:05,720 --> 00:16:07,080
But it's the right way.
266
00:16:07,080 --> 00:16:09,070
It's the way we want it.
267
00:16:09,070 --> 00:16:14,190
Because now when I show it, and
in words, it says when I
268
00:16:14,190 --> 00:16:19,130
change x a little, that produces
a change in y, and
269
00:16:19,130 --> 00:16:22,520
the change in y produces
a change in z.
270
00:16:22,520 --> 00:16:26,920
And it's the ratio that we're
after, the ratio between the
271
00:16:26,920 --> 00:16:29,190
original change and
the final change.
272
00:16:29,190 --> 00:16:32,130
So I just put the
inside change up
273
00:16:32,130 --> 00:16:34,020
and divide and multiply.
274
00:16:34,020 --> 00:16:37,490
OK, what am I going to do?
275
00:16:37,490 --> 00:16:41,940
What I always do, whatever body
does with derivatives at
276
00:16:41,940 --> 00:16:44,740
an instant, at a point.
277
00:16:44,740 --> 00:16:47,510
Let delta x go to 0.
278
00:16:47,510 --> 00:16:51,270
Now as delta x goes to 0, delta
y will go to 0, delta z
279
00:16:51,270 --> 00:16:55,650
will go to 0, and we get
a lot of zeroes over 0.
280
00:16:55,650 --> 00:16:59,870
That's what calculus is
prepared to live with.
281
00:16:59,870 --> 00:17:03,040
Because it keeps this ratio.
282
00:17:03,040 --> 00:17:05,780
283
00:17:05,780 --> 00:17:13,050
It doesn't separately think
about 0 and then later 0.
284
00:17:13,050 --> 00:17:17,230
It's looking at the ratio
as things happen.
285
00:17:17,230 --> 00:17:19,619
And that ratio does
approach that.
286
00:17:19,619 --> 00:17:22,119
That was the definition
of the derivative.
287
00:17:22,119 --> 00:17:26,460
This ratio approaches that,
and we get the answer.
288
00:17:26,460 --> 00:17:31,490
This ratio approaches the
derivative we're after.
289
00:17:31,490 --> 00:17:34,370
That in a nutshell
is the thinking
290
00:17:34,370 --> 00:17:36,470
behind the chain rule.
291
00:17:36,470 --> 00:17:41,390
OK, I could discuss it further,
but that's the
292
00:17:41,390 --> 00:17:42,430
essence of it.
293
00:17:42,430 --> 00:17:51,730
OK, now I'm ready to do one more
example that isn't just
294
00:17:51,730 --> 00:17:52,470
so made up.
295
00:17:52,470 --> 00:17:55,750
It's an important one.
296
00:17:55,750 --> 00:18:00,090
And it's one I haven't
tackled before.
297
00:18:00,090 --> 00:18:10,960
My function is going to be e to
the minus x squared over 2.
298
00:18:10,960 --> 00:18:13,670
That's my function.
299
00:18:13,670 --> 00:18:16,670
Shall I call it z?
300
00:18:16,670 --> 00:18:19,080
That's my function of x.
301
00:18:19,080 --> 00:18:23,790
So I want you to identify the
inside function and the
302
00:18:23,790 --> 00:18:27,850
outside function in that change,
take the derivative,
303
00:18:27,850 --> 00:18:30,290
and then let's look at the
graph for this one.
304
00:18:30,290 --> 00:18:34,430
The graph of this one is a
familiar important graph.
305
00:18:34,430 --> 00:18:37,770
But it's quite an interesting
function.
306
00:18:37,770 --> 00:18:41,140
OK, so what are you
going to take?
307
00:18:41,140 --> 00:18:42,560
This often happens.
308
00:18:42,560 --> 00:18:47,550
We have e to the something,
e to some function.
309
00:18:47,550 --> 00:18:50,760
So that's our inside
function up there.
310
00:18:50,760 --> 00:18:56,390
Our function y, inside function,
is going to be minus
311
00:18:56,390 --> 00:19:01,310
x squared over 2, that quantity
312
00:19:01,310 --> 00:19:03,060
that's sitting up there.
313
00:19:03,060 --> 00:19:06,980
And then z, the outside
function, is
314
00:19:06,980 --> 00:19:11,550
just e to the y, right?
315
00:19:11,550 --> 00:19:15,650
So two very, very simple
functions have gone into this
316
00:19:15,650 --> 00:19:18,900
chain and produced this
e to the minus x
317
00:19:18,900 --> 00:19:20,830
squared over 2 function.
318
00:19:20,830 --> 00:19:24,940
OK, I'm going to ask you for
the derivative, and you're
319
00:19:24,940 --> 00:19:25,760
going to do it.
320
00:19:25,760 --> 00:19:27,500
No problem.
321
00:19:27,500 --> 00:19:32,430
So dz dx, let's use
the chain rule.
322
00:19:32,430 --> 00:19:36,420
Again, it's sitting
right above.
323
00:19:36,420 --> 00:19:41,450
dz dy, so I'm going to take the
slope, the derivative of
324
00:19:41,450 --> 00:19:46,550
the outside function dz dy,
which is e to the y.
325
00:19:46,550 --> 00:19:51,380
And that has that remarkable
property, which is why we care
326
00:19:51,380 --> 00:19:55,230
about it, why we named it,
why we created it.
327
00:19:55,230 --> 00:19:56,940
The derivative of
that is itself.
328
00:19:56,940 --> 00:19:59,940
329
00:19:59,940 --> 00:20:03,670
And the derivative of minus
x squared over 2 is--
330
00:20:03,670 --> 00:20:05,920
that's a picnic, right?--
331
00:20:05,920 --> 00:20:07,510
is a minus.
332
00:20:07,510 --> 00:20:09,580
x squared, we'll
bring down a 2.
333
00:20:09,580 --> 00:20:12,640
Cancel that 2, it'll
be minus x.
334
00:20:12,640 --> 00:20:15,720
That's the derivative of
minus x squared over 2.
335
00:20:15,720 --> 00:20:18,240
Notice the result is negative.
336
00:20:18,240 --> 00:20:21,390
This function is at
least out where--
337
00:20:21,390 --> 00:20:25,460
if x is positive, the whole
slope is negative, and the
338
00:20:25,460 --> 00:20:27,650
graph is going downwards.
339
00:20:27,650 --> 00:20:29,290
And now what's--
340
00:20:29,290 --> 00:20:31,230
everybody knows this
final step.
341
00:20:31,230 --> 00:20:33,360
I can't leave the answer
like that because
342
00:20:33,360 --> 00:20:34,870
it's got a y in it.
343
00:20:34,870 --> 00:20:39,890
I have to put in what
y is, and it is--
344
00:20:39,890 --> 00:20:42,590
can I write the minus x first?
345
00:20:42,590 --> 00:20:47,090
Because it's easier to write it
in front of this e to the
346
00:20:47,090 --> 00:20:51,640
y, which is e to the minus
x squared over 2.
347
00:20:51,640 --> 00:20:54,360
So that's the derivative
we wanted.
348
00:20:54,360 --> 00:20:58,000
Now I want to think about
that function a bit.
349
00:20:58,000 --> 00:21:05,570
OK, notice that we started
with an e to the minus
350
00:21:05,570 --> 00:21:10,520
something, and we ended with
an e to the minus something
351
00:21:10,520 --> 00:21:12,320
with other factors.
352
00:21:12,320 --> 00:21:15,200
This is typical for
exponentials.
353
00:21:15,200 --> 00:21:20,080
Exponentials, the derivative
stays with that exponent.
354
00:21:20,080 --> 00:21:23,800
We could even take the
derivative of that, and we
355
00:21:23,800 --> 00:21:26,660
would again have some
expression.
356
00:21:26,660 --> 00:21:30,470
Well, let's do it in a minute,
the derivative of that.
357
00:21:30,470 --> 00:21:36,230
OK, I'd like to graph these
functions, the original
358
00:21:36,230 --> 00:21:42,690
function z and the slope
of the z function.
359
00:21:42,690 --> 00:21:45,910
OK, so let's see.
360
00:21:45,910 --> 00:21:48,000
x can have any sign.
361
00:21:48,000 --> 00:21:50,780
362
00:21:50,780 --> 00:21:53,430
x can go for this--
363
00:21:53,430 --> 00:21:54,760
now, I'm graphing this.
364
00:21:54,760 --> 00:21:58,590
365
00:21:58,590 --> 00:22:00,420
OK, so what do I expect?
366
00:22:00,420 --> 00:22:05,220
I can certainly figure out
the point x equals 0.
367
00:22:05,220 --> 00:22:12,030
At x equals 0, I have e
to the 0, which is 1.
368
00:22:12,030 --> 00:22:16,170
So at x equals 0, it's 1.
369
00:22:16,170 --> 00:22:20,830
OK, now at x equals to 1, it
has dropped to something.
370
00:22:20,830 --> 00:22:23,660
371
00:22:23,660 --> 00:22:28,520
And also at x equals minus
1, notice the symmetry.
372
00:22:28,520 --> 00:22:32,800
This function is going to be--
this graph is going to be
373
00:22:32,800 --> 00:22:39,650
symmetric around the y-axis
because I've got x squared.
374
00:22:39,650 --> 00:22:42,010
The right official name
for that is we
375
00:22:42,010 --> 00:22:43,660
have an even function.
376
00:22:43,660 --> 00:22:48,950
It's even when it's same
for x and for minus x.
377
00:22:48,950 --> 00:22:51,830
OK, so what's happening
at x equal 1?
378
00:22:51,830 --> 00:22:54,920
That's e to the minus 1/2.
379
00:22:54,920 --> 00:22:55,690
Whew!
380
00:22:55,690 --> 00:22:57,720
I should have looked
ahead to figure out
381
00:22:57,720 --> 00:23:00,460
what that number is.
382
00:23:00,460 --> 00:23:01,540
Whatever.
383
00:23:01,540 --> 00:23:05,620
It's smaller than 1, certainly,
because it's e to
384
00:23:05,620 --> 00:23:07,210
the minus something.
385
00:23:07,210 --> 00:23:11,890
So let me put it there, and
it'll be here, too.
386
00:23:11,890 --> 00:23:16,740
And now rather than a particular
value, what's your
387
00:23:16,740 --> 00:23:18,240
impression of the whole graph?
388
00:23:18,240 --> 00:23:23,060
389
00:23:23,060 --> 00:23:24,590
The whole graph is--It's
symmetric, so it's going to
390
00:23:24,590 --> 00:23:28,230
start like this, and it's
going to start sinking.
391
00:23:28,230 --> 00:23:30,200
And then it's going to sink.
392
00:23:30,200 --> 00:23:31,950
Let me try to get through
that point.
393
00:23:31,950 --> 00:23:35,570
394
00:23:35,570 --> 00:23:36,870
Look here.
395
00:23:36,870 --> 00:23:43,150
As x gets large, say x is even
just 3 or 4 or 1000, I'm
396
00:23:43,150 --> 00:23:47,170
squaring it, so I'm getting
9 or 16 or 1000000.
397
00:23:47,170 --> 00:23:48,890
And then divide by 2.
398
00:23:48,890 --> 00:23:49,700
No problem.
399
00:23:49,700 --> 00:23:53,600
And then e to the minus is--
400
00:23:53,600 --> 00:23:57,590
I mean, so e to the thousandth
would be off
401
00:23:57,590 --> 00:24:00,780
that board by miles.
402
00:24:00,780 --> 00:24:06,560
e to the minus 1000 is a very
small number and getting
403
00:24:06,560 --> 00:24:11,560
smaller fast. So this is going
to get-- but never touches 0,
404
00:24:11,560 --> 00:24:13,240
so it's going to--
405
00:24:13,240 --> 00:24:17,550
well, let's see.
406
00:24:17,550 --> 00:24:22,490
I want to make it symmetric, and
then I want to somehow I
407
00:24:22,490 --> 00:24:27,870
made it touch because this
darn finite chalk.
408
00:24:27,870 --> 00:24:31,750
I couldn't leave
a little space.
409
00:24:31,750 --> 00:24:35,320
But to your eye it touches.
410
00:24:35,320 --> 00:24:41,100
If we had even fine print, you
couldn't see that distance.
411
00:24:41,100 --> 00:24:50,370
So this is that curve, which was
meant to be symmetric, is
412
00:24:50,370 --> 00:24:55,610
the famous bell-shaped curve.
413
00:24:55,610 --> 00:24:58,320
414
00:24:58,320 --> 00:25:07,160
It's the most important curve
for gamblers, for
415
00:25:07,160 --> 00:25:10,740
mathematicians who work
in probability.
416
00:25:10,740 --> 00:25:15,000
That bell-shaped curve will come
up, and you'll see in a
417
00:25:15,000 --> 00:25:20,150
later lecture a connection
between how calculus enters in
418
00:25:20,150 --> 00:25:23,110
probability, and it enters
for this function.
419
00:25:23,110 --> 00:25:25,790
OK, now what's this slope?
420
00:25:25,790 --> 00:25:28,170
What's the slope of
that function?
421
00:25:28,170 --> 00:25:32,650
Again, symmetric, or maybe
anti-symmetric, because I have
422
00:25:32,650 --> 00:25:33,960
this factor x.
423
00:25:33,960 --> 00:25:35,290
So what's the slope?
424
00:25:35,290 --> 00:25:37,660
The slope starts at 0.
425
00:25:37,660 --> 00:25:40,000
So here's x again.
426
00:25:40,000 --> 00:25:45,270
I'm graphing now the slope,
so this was z.
427
00:25:45,270 --> 00:25:48,660
Now I'm going to graph
the slope of this.
428
00:25:48,660 --> 00:25:55,200
OK, the slope starts out at 0,
as we see from this picture.
429
00:25:55,200 --> 00:25:59,570
Now we can see, as I go forward
here, the slope is
430
00:25:59,570 --> 00:26:01,540
always negative.
431
00:26:01,540 --> 00:26:03,480
The slope is going down.
432
00:26:03,480 --> 00:26:09,380
Here it starts out--
433
00:26:09,380 --> 00:26:13,710
yeah, so the slope is 0 there.
434
00:26:13,710 --> 00:26:16,085
The slope is becoming more
and more negative.
435
00:26:16,085 --> 00:26:19,545
436
00:26:19,545 --> 00:26:20,400
Let's see.
437
00:26:20,400 --> 00:26:23,260
The slope is becoming more and
more negative, maybe up to
438
00:26:23,260 --> 00:26:25,660
some point.
439
00:26:25,660 --> 00:26:29,460
Actually, I believe it's
that point where
440
00:26:29,460 --> 00:26:31,220
the slope is becoming--
441
00:26:31,220 --> 00:26:32,990
then it becomes less negative.
442
00:26:32,990 --> 00:26:33,990
It's always negative.
443
00:26:33,990 --> 00:26:43,030
I think that the slope goes down
to that point x equals 1,
444
00:26:43,030 --> 00:26:46,570
and that's where the slope
is as steep as it gets.
445
00:26:46,570 --> 00:26:51,110
And then the slope comes
up again, but the slope
446
00:26:51,110 --> 00:26:53,740
never gets to 0.
447
00:26:53,740 --> 00:26:57,430
We're always going downhill,
but very slightly.
448
00:26:57,430 --> 00:27:02,170
Oh, well, of course, I expect
to be close to that line
449
00:27:02,170 --> 00:27:04,600
because this e to the minus
x squared over 2
450
00:27:04,600 --> 00:27:06,930
is getting so small.
451
00:27:06,930 --> 00:27:12,470
And then over here, I think
this will be symmetric.
452
00:27:12,470 --> 00:27:15,040
Here the slopes are positive.
453
00:27:15,040 --> 00:27:16,210
Ah!
454
00:27:16,210 --> 00:27:17,980
Look at that!
455
00:27:17,980 --> 00:27:22,890
Here we had an even function,
symmetric across 0.
456
00:27:22,890 --> 00:27:26,350
Here its slope turns
out to be--
457
00:27:26,350 --> 00:27:28,550
and this could not
be an accident.
458
00:27:28,550 --> 00:27:32,470
Its slope turns out to
be an odd function,
459
00:27:32,470 --> 00:27:34,660
anti-symmetric across 0.
460
00:27:34,660 --> 00:27:36,080
Now, it just was.
461
00:27:36,080 --> 00:27:39,480
This is an odd function, because
if I change x, I
462
00:27:39,480 --> 00:27:41,740
change the sign of
that function.
463
00:27:41,740 --> 00:27:48,140
OK, now if you will give me
another moment, I'll ask you
464
00:27:48,140 --> 00:27:49,910
about the second derivative.
465
00:27:49,910 --> 00:27:52,180
Maybe this is the first time
we've done the second
466
00:27:52,180 --> 00:27:54,040
derivative.
467
00:27:54,040 --> 00:27:56,760
What do you think the second
derivative is?
468
00:27:56,760 --> 00:28:00,990
The second derivative is the
derivative of the derivative,
469
00:28:00,990 --> 00:28:04,440
the slope of the slope.
470
00:28:04,440 --> 00:28:09,210
My classical calculus problem
starts with function one,
471
00:28:09,210 --> 00:28:14,130
produces function two,
height to slope.
472
00:28:14,130 --> 00:28:17,910
Now when I take another
derivative, I'm starting with
473
00:28:17,910 --> 00:28:23,440
this function one, and over here
will be a function two.
474
00:28:23,440 --> 00:28:31,910
So this was dz dx, and now here
is going to be the second
475
00:28:31,910 --> 00:28:32,050
derivative.
476
00:28:32,050 --> 00:28:33,300
Second derivative.
477
00:28:33,300 --> 00:28:35,680
478
00:28:35,680 --> 00:28:42,940
And we'll give it a nice
notation, nice symbol.
479
00:28:42,940 --> 00:28:47,040
It's not dz dx, all squared.
480
00:28:47,040 --> 00:28:48,880
That's not what I'm doing.
481
00:28:48,880 --> 00:28:52,530
I'm taking the derivative
of this.
482
00:28:52,530 --> 00:28:54,240
So I'm taking--
483
00:28:54,240 --> 00:29:00,050
well, the derivative
of that, I could--
484
00:29:00,050 --> 00:29:05,090
I'm going to give a whole
return to the second
485
00:29:05,090 --> 00:29:05,530
derivative.
486
00:29:05,530 --> 00:29:07,700
It's a big deal.
487
00:29:07,700 --> 00:29:14,250
I'll just say how I write
it: dz dx squared.
488
00:29:14,250 --> 00:29:15,780
That's the second derivative.
489
00:29:15,780 --> 00:29:18,760
It's the slope of
this function.
490
00:29:18,760 --> 00:29:23,110
And I guess what I want is would
you know how to take the
491
00:29:23,110 --> 00:29:26,360
slope of that function?
492
00:29:26,360 --> 00:29:29,000
Can we just think what
would go into that,
493
00:29:29,000 --> 00:29:30,540
and I'll put it here?
494
00:29:30,540 --> 00:29:32,430
Let me put that function here.
495
00:29:32,430 --> 00:29:37,500
minus x e to the minus
x squared over 2.
496
00:29:37,500 --> 00:29:40,750
Slope of that, derivative
of that.
497
00:29:40,750 --> 00:29:42,990
What do I see there?
498
00:29:42,990 --> 00:29:44,500
I see a product.
499
00:29:44,500 --> 00:29:47,760
I see that times that.
500
00:29:47,760 --> 00:29:50,580
So I'm going to use
the product rule.
501
00:29:50,580 --> 00:29:55,280
But then I also see that in this
factor, in this minus x
502
00:29:55,280 --> 00:29:58,330
squared over 2, I see a chain.
503
00:29:58,330 --> 00:30:01,530
In fact, it's exactly
my original chain.
504
00:30:01,530 --> 00:30:03,790
I know how to deal
with that chain.
505
00:30:03,790 --> 00:30:05,710
So I'm going to use
the product rule
506
00:30:05,710 --> 00:30:08,060
and the chain rule.
507
00:30:08,060 --> 00:30:14,430
And that's the point that once
we have our list of rules,
508
00:30:14,430 --> 00:30:19,800
these are now what we might
call four simple rules.
509
00:30:19,800 --> 00:30:25,270
We know those guys: sum,
difference, product, quotient.
510
00:30:25,270 --> 00:30:28,390
And now we're doing the chain
rule, but we have to be
511
00:30:28,390 --> 00:30:33,070
prepared as here for a product,
and then one of these
512
00:30:33,070 --> 00:30:34,400
factors is a chain.
513
00:30:34,400 --> 00:30:36,510
All right, can we do it?
514
00:30:36,510 --> 00:30:38,185
So the derivative, slope.
515
00:30:38,185 --> 00:30:41,300
516
00:30:41,300 --> 00:30:46,890
Well, slope of slope, because
this was the original slope.
517
00:30:46,890 --> 00:30:52,580
OK, so it's the first factor
times the derivative of the
518
00:30:52,580 --> 00:30:55,100
second factor.
519
00:30:55,100 --> 00:30:57,990
And that's the chain,
but that's the one
520
00:30:57,990 --> 00:30:59,410
we've already done.
521
00:30:59,410 --> 00:31:03,530
So the derivative of that is
what we already computed, and
522
00:31:03,530 --> 00:31:04,680
what was it?
523
00:31:04,680 --> 00:31:06,870
It was that.
524
00:31:06,870 --> 00:31:10,980
So the second factor was minus
x e to the minus x
525
00:31:10,980 --> 00:31:12,930
squared over 2.
526
00:31:12,930 --> 00:31:15,130
So this is--
527
00:31:15,130 --> 00:31:20,030
can I just like remember
this is f dg dx
528
00:31:20,030 --> 00:31:21,210
in the product rule.
529
00:31:21,210 --> 00:31:23,040
And the product, this is--
530
00:31:23,040 --> 00:31:26,330
here is a product
of f times g.
531
00:31:26,330 --> 00:31:36,500
So f times dg dx, and
now I need g times--
532
00:31:36,500 --> 00:31:41,850
this was g, and this is
df dx, or it will be.
533
00:31:41,850 --> 00:31:44,070
What's df dx?
534
00:31:44,070 --> 00:31:46,970
Phooey on this old example.
535
00:31:46,970 --> 00:31:48,220
Gone.
536
00:31:48,220 --> 00:31:49,650
537
00:31:49,650 --> 00:31:55,880
OK, df dx, well, f is minus
x. df dx is just minus 1.
538
00:31:55,880 --> 00:31:56,980
Simple.
539
00:31:56,980 --> 00:32:00,230
All right, put the
pieces together.
540
00:32:00,230 --> 00:32:04,370
We have, as I expected we would,
everything has this
541
00:32:04,370 --> 00:32:08,490
factor e to the minus
x squared over 2.
542
00:32:08,490 --> 00:32:11,780
That's controlling everything,
but the question is what's
543
00:32:11,780 --> 00:32:16,330
it-- so here we have a minus
1; is that right?
544
00:32:16,330 --> 00:32:19,240
And here, we have a
plus x squared.
545
00:32:19,240 --> 00:32:25,050
So I think we have x squared
minus 1 times that.
546
00:32:25,050 --> 00:32:35,504
OK, so we computed a
second derivative.
547
00:32:35,504 --> 00:32:36,754
Ha!
548
00:32:36,754 --> 00:32:40,380
549
00:32:40,380 --> 00:32:42,990
Two things I want to do,
one with this example.
550
00:32:42,990 --> 00:32:45,750
551
00:32:45,750 --> 00:32:51,630
The second derivative
will switch sign.
552
00:32:51,630 --> 00:32:56,570
If I graph the darn thing--
suppose I tried to graph that?
553
00:32:56,570 --> 00:32:59,900
When x is 0, this thing
is negative.
554
00:32:59,900 --> 00:33:01,530
What is that telling me?
555
00:33:01,530 --> 00:33:03,230
So this is the second group.
556
00:33:03,230 --> 00:33:10,990
This is telling me that
the slope is going
557
00:33:10,990 --> 00:33:13,830
downwards at the start.
558
00:33:13,830 --> 00:33:16,440
I see it.
559
00:33:16,440 --> 00:33:22,140
But then at x equal 1, that
second derivative, because of
560
00:33:22,140 --> 00:33:26,700
this x squared minus 1
factor, is up to 0.
561
00:33:26,700 --> 00:33:30,910
It's going to take time with
this second derivative.
562
00:33:30,910 --> 00:33:33,350
That's the slope of the slope.
563
00:33:33,350 --> 00:33:36,840
That's this point here.
564
00:33:36,840 --> 00:33:38,430
Here is the slope.
565
00:33:38,430 --> 00:33:44,350
Now, at that point,
its slope is 0.
566
00:33:44,350 --> 00:33:48,460
And after that point, its
slope is upwards.
567
00:33:48,460 --> 00:33:50,410
We're getting something
like this.
568
00:33:50,410 --> 00:33:59,470
The slope of the slope, and
it'll go evenly upwards, and
569
00:33:59,470 --> 00:34:00,636
then so on.
570
00:34:00,636 --> 00:34:02,100
Ha!
571
00:34:02,100 --> 00:34:07,730
You see that we've got the
derivative code, the slope,
572
00:34:07,730 --> 00:34:11,110
but we've got a little more
thinking to do for the slope
573
00:34:11,110 --> 00:34:16,440
of the slope, the rate of change
of the rate of change.
574
00:34:16,440 --> 00:34:18,870
Then you really have
calculus straight.
575
00:34:18,870 --> 00:34:27,739
And a challenge that I don't
want to try right now would be
576
00:34:27,739 --> 00:34:31,370
what's the chain rule for
the second derivative?
577
00:34:31,370 --> 00:34:32,170
Ha!
578
00:34:32,170 --> 00:34:41,750
I'll leave that as a challenge
for professors who might or
579
00:34:41,750 --> 00:34:43,469
might not be able to do it.
580
00:34:43,469 --> 00:34:49,040
OK, we've introduced the second
derivative here at the
581
00:34:49,040 --> 00:34:51,179
end of a lecture.
582
00:34:51,179 --> 00:34:58,240
The key central idea of the
lecture was the chain rule to
583
00:34:58,240 --> 00:34:59,790
give us that derivative.
584
00:34:59,790 --> 00:35:00,290
Good!
585
00:35:00,290 --> 00:35:02,610
Thank you.
586
00:35:02,610 --> 00:35:04,420
NARRATOR: This has been
a production of MIT
587
00:35:04,420 --> 00:35:06,810
OpenCourseWare and
Gilbert Strang.
588
00:35:06,810 --> 00:35:09,080
Funding for this video was
provided by the Lord
589
00:35:09,080 --> 00:35:10,300
Foundation.
590
00:35:10,300 --> 00:35:13,430
To help OCW continue to provide
free and open access
591
00:35:13,430 --> 00:35:16,510
to MIT courses, please
make a donation at
592
00:35:16,510 --> 00:35:18,070
ocw.mit.edu/donate.
593
00:35:18,070 --> 00:35:20,190