RC step response - intuition

WEBVTT
Kind: captions
Language: en

00:00:02.834 --> 00:00:04.803
- [Voiceover] In this
video, we're gonna introduce

00:00:04.803 --> 00:00:07.271
the idea of a step response.

00:00:07.271 --> 00:00:09.867
This is one of the most common occurrences

00:00:09.867 --> 00:00:12.191
in all of electronics,
and it happens any time

00:00:12.191 --> 00:00:16.369
there's some resistance and
some capacitance in series,

00:00:16.369 --> 00:00:18.968
and in particular, it
happens billions of times

00:00:18.968 --> 00:00:21.655
a second inside every computer.

00:00:21.655 --> 00:00:24.500
So, that's why we want to
study this very carefully.

00:00:24.500 --> 00:00:26.635
So, the step response is
something that happens

00:00:26.635 --> 00:00:29.447
in a circuit when we drive the circuit

00:00:29.447 --> 00:00:31.114
with a step voltage.

00:00:32.039 --> 00:00:34.514
That's a step voltage shown right there,

00:00:34.514 --> 00:00:37.290
and this response is
gonna be related closely

00:00:37.290 --> 00:00:39.207
to the natural response

00:00:42.999 --> 00:00:44.416
of an RC circuit,

00:00:46.184 --> 00:00:48.080
and if you haven't seen that video yet,

00:00:48.080 --> 00:00:49.636
I want to encourage you to take a moment

00:00:49.636 --> 00:00:53.803
and go to watch the video
on the RC natural response,

00:00:56.081 --> 00:00:58.726
'cuz I'm gonna use that result right here.

00:00:58.726 --> 00:01:00.869
Now, in the RC natural response,

00:01:00.869 --> 00:01:03.484
what we had was no energy
going into a circuit,

00:01:03.484 --> 00:01:06.823
we had an RC circuit like this,

00:01:06.823 --> 00:01:09.433
and there was nothing connected here,

00:01:09.433 --> 00:01:11.636
so the source was removed,

00:01:11.636 --> 00:01:13.636
and we had a C and an R,

00:01:15.037 --> 00:01:19.733
and there was a voltage
on the original capacitor.

00:01:19.733 --> 00:01:23.742
There was some charge on
this capacitor right here,

00:01:23.742 --> 00:01:27.909
and we worked out what's the
response of the current here,

00:01:28.915 --> 00:01:31.977
and what's the response of the voltage,

00:01:31.977 --> 00:01:34.477
V of T, across this capacitor.

00:01:35.928 --> 00:01:38.511
And there, we found that V of T

00:01:40.521 --> 00:01:44.438
equals V naught times E
to the minus T over RC.

00:01:48.623 --> 00:01:52.629
So, this is the natural
response of an RC circuit,

00:01:52.629 --> 00:01:54.985
and now, what we're gonna
do in the step response

00:01:54.985 --> 00:01:58.408
is we're gonna actually kick
this circuit with a step.

00:01:58.408 --> 00:02:00.382
We're gonna make the circuit do something,

00:02:00.382 --> 00:02:03.350
add some sort of stimulus from the outside

00:02:03.350 --> 00:02:06.176
that pushes this RC
circuit in some direction,

00:02:06.176 --> 00:02:07.761
and we're gonna see what that means,

00:02:07.761 --> 00:02:10.384
and it's gonna be related
to the natural response.

00:02:10.384 --> 00:02:13.672
So, VS here starts at
some voltage V naught,

00:02:13.672 --> 00:02:16.761
then it times zero right here,

00:02:16.761 --> 00:02:18.680
it makes a step, a sharp step,

00:02:18.680 --> 00:02:22.287
up to some other voltage step, VS,

00:02:22.287 --> 00:02:23.937
and what we wanna do is we wanna see

00:02:23.937 --> 00:02:27.183
what this circuit does, and
again, we'll label this.

00:02:27.183 --> 00:02:29.683
We wanna find out this V of T.

00:02:31.043 --> 00:02:33.764
So, what's gonna happen is, in the past,

00:02:33.764 --> 00:02:37.374
before T equals zero, this
circuit will be in some state,

00:02:37.374 --> 00:02:39.115
and we'll figure out what that is,

00:02:39.115 --> 00:02:40.791
and then we're gonna disturb the circuit

00:02:40.791 --> 00:02:43.070
and it's gonna settle
down in some new state,

00:02:43.070 --> 00:02:46.720
and that's gonna be called the
step response of the circuit.

00:02:46.720 --> 00:02:49.247
So, our approach here is
gonna be to look at this,

00:02:49.247 --> 00:02:51.354
first, we're gonna do this intuitively,

00:02:51.354 --> 00:02:53.877
and we'll just look at a long time ago,

00:02:53.877 --> 00:02:57.731
we'll look at a long time
from now, well after the step,

00:02:57.731 --> 00:02:59.882
we'll see what the circuit's doing then,

00:02:59.882 --> 00:03:02.420
and then we'll guess at
what happens in between.

00:03:02.420 --> 00:03:04.227
So, first, we'll do this intuitively,

00:03:04.227 --> 00:03:08.212
and then we'll do it with
the formal mathematics.

00:03:08.212 --> 00:03:10.122
So, I said we're gonna break
it down into three things.

00:03:10.122 --> 00:03:14.122
The first thing we're
gonna look at is long ago.

00:03:19.984 --> 00:03:21.970
What was the circuit doing yesterday,

00:03:21.970 --> 00:03:24.364
when it was sitting here at V naught?

00:03:24.364 --> 00:03:27.281
Well, long ago, VS equals V naught,

00:03:30.953 --> 00:03:33.574
and what was gonna happen
is some sort of current

00:03:33.574 --> 00:03:35.301
was gonna flow out of here,

00:03:35.301 --> 00:03:37.930
and around into this capacitor,

00:03:37.930 --> 00:03:41.097
and it's gonna leave some charge here.

00:03:42.889 --> 00:03:46.876
That charge is gonna
pile up on the capacitor,

00:03:46.876 --> 00:03:48.975
and we know that it's related

00:03:48.975 --> 00:03:52.142
to the voltage on the capacitor by CV.

00:03:54.051 --> 00:03:56.118
One of the things we're gonna
do as we analyze this circuit

00:03:56.118 --> 00:03:58.427
is track what happens to this Q.

00:03:58.427 --> 00:04:00.457
That's a good approach to thinking

00:04:00.457 --> 00:04:03.186
about what's going on here.

00:04:03.186 --> 00:04:05.798
So, if a long time ago, VS was V zero,

00:04:05.798 --> 00:04:07.093
basically, what happened?

00:04:07.093 --> 00:04:11.093
Some current flowed until
V here reached V zero,

00:04:15.338 --> 00:04:16.921
so V equals V zero,

00:04:21.620 --> 00:04:23.016
at some time in the past,

00:04:23.016 --> 00:04:26.017
V became V naught, and what happened to I?

00:04:26.017 --> 00:04:30.090
Then, I went to zero, and the
reason we know I went to zero

00:04:30.090 --> 00:04:33.056
is because the voltage
across this resistor,

00:04:33.056 --> 00:04:36.723
let me label it like
this, we'll call it VR,

00:04:38.294 --> 00:04:40.659
eventually, this side was V naught,

00:04:40.659 --> 00:04:43.155
and this side became V naught,

00:04:43.155 --> 00:04:46.004
and that's zero volts across the resistor,

00:04:46.004 --> 00:04:48.428
so that means the current goes to zero,

00:04:48.428 --> 00:04:51.814
so this is the state a long time ago.

00:04:51.814 --> 00:04:54.231
I wanna start sketching this.

00:04:56.073 --> 00:04:58.823
We'll do some time plots of this,

00:05:03.703 --> 00:05:06.453
and we'll make this I and this V,

00:05:09.909 --> 00:05:12.491
and so, we decided a long time ago,

00:05:12.491 --> 00:05:13.741
V was V naught,

00:05:20.585 --> 00:05:24.431
and the current, we decided, was zero,

00:05:24.431 --> 00:05:27.514
so I can put that on there like that.

00:05:28.886 --> 00:05:31.367
So, that's our long time ago.

00:05:31.367 --> 00:05:33.917
Next, what we do is we
go to super long time.

00:05:33.917 --> 00:05:36.167
Let's let T go to infinity.

00:05:38.114 --> 00:05:40.417
That's a long time from now.

00:05:40.417 --> 00:05:42.362
And what's the state gonna be then?

00:05:42.362 --> 00:05:44.450
Well, the VS is gonna be--

00:05:44.450 --> 00:05:47.283
the source voltage is gonna be VS.

00:05:49.201 --> 00:05:51.700
Tell apart between capital letters

00:05:51.700 --> 00:05:53.436
and lowercase letters here.

00:05:53.436 --> 00:05:55.607
Capital letters is a fixed voltage,

00:05:55.607 --> 00:05:59.190
and VS is something
that changes with time,

00:06:01.317 --> 00:06:03.234
and we can do the same sort of analysis.

00:06:03.234 --> 00:06:05.491
There's gonna be some
current that will flow,

00:06:05.491 --> 00:06:09.658
Q will build up until the
voltage on the capacitor is...

00:06:10.784 --> 00:06:12.867
There'll be some current.

00:06:14.682 --> 00:06:18.265
The voltage on the
capacitor will go to VS,

00:06:19.201 --> 00:06:21.069
and the same story.

00:06:21.069 --> 00:06:24.184
The voltage across the resistor,
then, will be zero again,

00:06:24.184 --> 00:06:27.757
and that means that I will be zero again.

00:06:27.757 --> 00:06:30.507
This is for a long time from now.

00:06:32.753 --> 00:06:34.776
So, as we continue our intuition here,

00:06:34.776 --> 00:06:38.943
a long time from now, VS is
gonna be the step voltage,

00:06:40.781 --> 00:06:43.872
big V, S, and what's I gonna be?

00:06:43.872 --> 00:06:47.444
I, we decided, was gonna be zero.

00:06:47.444 --> 00:06:50.424
So, a long time from
now, out of the future,

00:06:50.424 --> 00:06:53.308
I is gonna be zero again.

00:06:53.308 --> 00:06:54.141
Okay.

00:06:57.001 --> 00:07:01.168
So now, let's go back and
look at what happens between.

00:07:04.824 --> 00:07:07.961
Okay, this is after the switch happens,

00:07:07.961 --> 00:07:10.354
and before a long time from now.

00:07:10.354 --> 00:07:12.350
And what we can guess,
what we can estimate,

00:07:12.350 --> 00:07:16.017
is that V naught is
gonna become VS somehow,

00:07:16.901 --> 00:07:19.181
and that the current's
gonna start at zero,

00:07:19.181 --> 00:07:20.609
and it's gonna do something,

00:07:20.609 --> 00:07:23.735
and it has to end up back at zero.

00:07:23.735 --> 00:07:25.424
Okay, let's get a little more detailed.

00:07:25.424 --> 00:07:28.110
Let's make some little better guesses.

00:07:28.110 --> 00:07:31.336
The moment after the step happens,

00:07:31.336 --> 00:07:34.336
the voltage on this side goes to VS,

00:07:36.169 --> 00:07:37.791
and the voltage on this side is what?

00:07:37.791 --> 00:07:40.322
Well, the charge, there's a
bunch of charge sitting here

00:07:40.322 --> 00:07:43.921
on the capacitor, and it
hasn't had time to go anywhere.

00:07:43.921 --> 00:07:47.295
So, if that's the case, then the voltage

00:07:47.295 --> 00:07:51.635
right after the switch changes
is gonna still be V naught.

00:07:51.635 --> 00:07:53.397
So, that's gonna be the
voltage right after here

00:07:53.397 --> 00:07:55.352
is not gonna jump anywhere,

00:07:55.352 --> 00:07:57.673
and that's because we
physically have some charge

00:07:57.673 --> 00:07:59.152
stored on this capacitor,

00:07:59.152 --> 00:08:02.452
and it hasn't had time to go anywhere yet.

00:08:02.452 --> 00:08:04.270
That means on this side of the resistor,

00:08:04.270 --> 00:08:08.916
just after the step happens,
this is gonna be V naught.

00:08:08.916 --> 00:08:10.201
Oh, look, now, see?

00:08:10.201 --> 00:08:12.609
Now, we have a voltage
difference across here,

00:08:12.609 --> 00:08:13.823
so there's gonna be a current.

00:08:13.823 --> 00:08:16.111
All of a sudden, there's
gonna be some current here.

00:08:16.111 --> 00:08:19.083
Let's scribble that in,
let's see what that does.

00:08:19.083 --> 00:08:22.903
There's gonna be some sort
of current that happens,

00:08:22.903 --> 00:08:24.606
and it's gonna be I is what?

00:08:24.606 --> 00:08:28.356
It's gonna be VS minus
V naught divided by R.

00:08:31.446 --> 00:08:33.363
That'll be the current.

00:08:37.180 --> 00:08:38.381
We'll label the current there.

00:08:38.381 --> 00:08:40.454
That's the current we're talking about.

00:08:40.454 --> 00:08:43.478
All right, so we got
our current to hop up,

00:08:43.478 --> 00:08:45.463
and now there's more charge,
there's charge flowing

00:08:45.463 --> 00:08:48.428
onto our capacitor, so
the capacitor voltage

00:08:48.428 --> 00:08:50.275
is gonna start changing.

00:08:50.275 --> 00:08:52.632
More charge, more voltage.

00:08:52.632 --> 00:08:53.876
And what's gonna happen?

00:08:53.876 --> 00:08:54.748
We can estimate this.

00:08:54.748 --> 00:08:57.921
It's gonna just do something like that.

00:08:57.921 --> 00:09:00.400
I can sketch that in.

00:09:00.400 --> 00:09:02.664
More and more charge will start flowing

00:09:02.664 --> 00:09:06.302
onto this capacitor, and the
voltage will gradually rise

00:09:06.302 --> 00:09:07.802
until V equals VS,

00:09:10.177 --> 00:09:12.495
'til the voltage across the resistor

00:09:12.495 --> 00:09:15.848
again is zero, and then
the current will stop.

00:09:15.848 --> 00:09:18.209
We had a sudden step of current

00:09:18.209 --> 00:09:20.777
caused by the change in
the step voltage input,

00:09:20.777 --> 00:09:25.280
and then it's gonna just fade
out, something like that,

00:09:25.280 --> 00:09:28.710
until the current goes back to zero.

00:09:28.710 --> 00:09:30.127
V will go from...

00:09:31.569 --> 00:09:32.863
How do I write this?

00:09:32.863 --> 00:09:37.030
It'll go from V naught, and
it'll eventually become VS,

00:09:39.227 --> 00:09:41.144
and I will have a step,

00:09:46.343 --> 00:09:48.510
and then, go back to zero.

00:09:51.822 --> 00:09:53.520
So, that's our intuitive understanding

00:09:53.520 --> 00:09:56.180
of how this step response will look

00:09:56.180 --> 00:09:58.180
for a driven RC circuit,

00:09:59.650 --> 00:10:02.752
and next what we'll do is
we'll work this out in detail,

00:10:02.752 --> 00:10:05.237
and we'll get mathematically accurate

00:10:05.237 --> 00:10:08.173
versions of what these
two currents look like.


A capacitor integrates current

WEBVTT
Kind: captions
Language: en

00:00:03.182 --> 00:00:04.779
- [Voiceover] So now I have
my two capacitor equations,

00:00:04.779 --> 00:00:06.513
the two forms of this equation.

00:00:06.513 --> 00:00:10.680
One is I, in terms of V, and
the other is V, in terms of I.

00:00:11.643 --> 00:00:13.858
Now, we're gonna basically
look at this equation here,

00:00:13.858 --> 00:00:18.025
and do a little exercise
with it, to see how it works.

00:00:21.164 --> 00:00:24.247
I'm gonna draw a little circuit here.

00:00:35.010 --> 00:00:38.273
It's gonna have a current
source, and a capacitor.

00:00:38.273 --> 00:00:42.023
The value of the capacitor
is one microfarad.

00:00:42.970 --> 00:00:46.601
The value of our current
source, we'll call it I.

00:00:46.601 --> 00:00:50.407
It's actually gonna look
like a pulse, like that.

00:00:50.407 --> 00:00:53.740
It will go from zero to three milliamps,

00:00:56.382 --> 00:00:59.053
and then back to zero, over here.

00:00:59.053 --> 00:01:01.479
The amount of time it
takes, that's gonna be,

00:01:01.479 --> 00:01:05.396
this time here is gonna
be, three milliseconds.

00:01:08.192 --> 00:01:12.109
The question I wanna
answer is, what is V of T?

00:01:14.208 --> 00:01:15.125
Right here.

00:01:16.614 --> 00:01:20.915
We're gonna use this integral
equation to figure that out.

00:01:20.915 --> 00:01:24.466
Over here is where we're
gonna put our answer.

00:01:24.466 --> 00:01:27.716
This is gonna be T, and this will be I.

00:01:29.990 --> 00:01:30.823
Here's I.

00:01:34.352 --> 00:01:38.519
Our plot, right down here,
will be T, and here's V of T.

00:01:43.230 --> 00:01:46.537
We'll plot I this way, on here, in time.

00:01:46.537 --> 00:01:47.494
It's zero.

00:01:47.494 --> 00:01:52.130
Then, it goes up, to some
value, and then it goes over.

00:01:52.130 --> 00:01:54.712
So it's a pulse of current.

00:01:54.712 --> 00:01:58.879
We said that that was zero,
this is three milliamps...

00:02:00.195 --> 00:02:02.778
And this is three milliseconds.

00:02:03.719 --> 00:02:07.802
Now, what we want to do,
is we wanna find V of T.

00:02:10.035 --> 00:02:11.930
One of the things we have to do,

00:02:11.930 --> 00:02:14.754
we have to make an
assumption about V, not here.

00:02:14.754 --> 00:02:16.788
We're gonna assume, for our problem here,

00:02:16.788 --> 00:02:20.054
that V naught, equals zero volts.

00:02:20.054 --> 00:02:21.873
What that means is, there's no charge.

00:02:21.873 --> 00:02:24.291
There's zero charge
stored on this capacitor,

00:02:24.291 --> 00:02:27.479
when we start the experiment.

00:02:27.479 --> 00:02:29.545
Now then, let's look at
three different time periods.

00:02:29.545 --> 00:02:31.516
Let's look at the period before the pulse,

00:02:31.516 --> 00:02:34.446
during the pulse, and after the pulse.

00:02:34.446 --> 00:02:38.385
We'll break the problem into three parts.

00:02:38.385 --> 00:02:40.919
Part one is before, and we'll do that,

00:02:40.919 --> 00:02:42.878
by just looking up here.

00:02:42.878 --> 00:02:47.039
We decided that V naught, was
zero, in the before state.

00:02:47.039 --> 00:02:48.740
Put a little zero there.

00:02:48.740 --> 00:02:51.157
We decided that I, I is zero,

00:02:52.951 --> 00:02:56.618
so that means that the term
inside the integral, is zero.

00:02:56.618 --> 00:03:01.501
What that means, zero plus
zero, is equal to V of T.

00:03:01.501 --> 00:03:05.239
Before the pulse, before the pulse,

00:03:05.239 --> 00:03:09.406
the capacitor equation tells
us, the voltage is zero.

00:03:11.756 --> 00:03:13.645
Okay, now let's go during the pulse.

00:03:13.645 --> 00:03:14.980
Let's do the second of period of time.

00:03:14.980 --> 00:03:17.528
Let's do during the pulse.

00:03:17.528 --> 00:03:19.169
Now, we have to be a little more careful.

00:03:19.169 --> 00:03:22.752
We have V equals one
over C, integral from,

00:03:25.273 --> 00:03:29.273
now time equals zero, to
time equals sub-time T.

00:03:33.430 --> 00:03:34.705
What's I during the pulse?

00:03:34.705 --> 00:03:35.612
Well, it's sitting right here.

00:03:35.612 --> 00:03:39.612
I is a constant, so we
write in three milliamps.

00:03:43.659 --> 00:03:44.492
D tau...

00:03:49.266 --> 00:03:51.304
Plus, don't forget the starting voltage.

00:03:51.304 --> 00:03:52.760
What's our starting voltage?

00:03:52.760 --> 00:03:56.080
Well, we look right here, and
the starting voltage is zero.

00:03:56.080 --> 00:03:56.913
Plus zero.

00:03:58.772 --> 00:04:00.308
Now, we can solve this.

00:04:00.308 --> 00:04:04.475
V equals one over C, times
three milliamps comes out...

00:04:11.073 --> 00:04:14.823
Times the integral, from
zero to T, of D tau.

00:04:17.998 --> 00:04:21.248
That equals, let's plug in C this time,

00:04:23.791 --> 00:04:27.374
three milliamps, divided
by one microfarad,

00:04:32.521 --> 00:04:35.593
times, what does this evaluate to?

00:04:35.593 --> 00:04:39.676
The integral from zero to
T of D tau, is, just T.

00:04:43.465 --> 00:04:46.076
Let's do a little bit of
arithmetic here, to reduce this.

00:04:46.076 --> 00:04:48.764
Milliamps is 10 to the minus three,

00:04:48.764 --> 00:04:52.097
and microfarads, is 10 to the minus six.

00:04:53.090 --> 00:04:54.757
Let me move this up.

00:04:58.279 --> 00:05:01.094
We'll keep our plots on there.

00:05:01.094 --> 00:05:04.261
What we end up with is V equals three,

00:05:07.823 --> 00:05:09.488
10 to the minus three,
10 to the minus six,

00:05:09.488 --> 00:05:13.655
so that's three times 10 to
the third, or 3,000 times time.

00:05:17.451 --> 00:05:18.794
What's that?

00:05:18.794 --> 00:05:22.961
That's the equation of a line,
and it has a slope of 3,000,

00:05:24.220 --> 00:05:25.128
what's the units here?

00:05:25.128 --> 00:05:27.711
This is 3,000 volts per second.

00:05:29.660 --> 00:05:31.772
I'll go over here, and
we'll sketch this in.

00:05:31.772 --> 00:05:33.960
This is gonna be a line,
that's a straight ramp,

00:05:33.960 --> 00:05:36.710
with a constant slope, like that.

00:05:37.813 --> 00:05:41.141
It's gonna be happening
all during this pulse.

00:05:41.141 --> 00:05:45.137
We can ask, what's this value right here?

00:05:45.137 --> 00:05:46.596
What's that voltage right there?

00:05:46.596 --> 00:05:48.066
Okay, let's work that out.

00:05:48.066 --> 00:05:50.066
T is three milliseconds.

00:05:52.673 --> 00:05:55.098
So let's plug in three
milliseconds, right here.

00:05:55.098 --> 00:05:59.181
V at three milliseconds,
equals 3,000 times three

00:06:04.003 --> 00:06:08.170
milliseconds, and that equals
three times three is nine.

00:06:11.052 --> 00:06:15.052
3,000 times, this is an
exponent of minus three.

00:06:16.929 --> 00:06:19.300
It's gonna be nine volts.

00:06:19.300 --> 00:06:23.467
This value, right here,
right there, is nine volts.

00:06:26.292 --> 00:06:29.380
That says the voltage on our capacitor,

00:06:29.380 --> 00:06:31.550
during the pulse, during
the current pulse,

00:06:31.550 --> 00:06:35.494
rises in a straight
line, up to nine volts.

00:06:35.494 --> 00:06:38.124
We got that from this
integral that we did.

00:06:38.124 --> 00:06:40.039
The capacitor's integrating the current,

00:06:40.039 --> 00:06:41.339
adding up the current.

00:06:41.339 --> 00:06:46.176
It's integrating this pulse,
to get an ever-rising voltage.

00:06:46.176 --> 00:06:49.613
Okay, so now we've solved
the capacitor equation,

00:06:49.613 --> 00:06:51.030
during the pulse.

00:06:52.647 --> 00:06:55.690
Let's go back now, to what
happens after the pulse.

00:06:55.690 --> 00:06:59.357
We'll do that over in
the corner, over here.

00:07:02.178 --> 00:07:05.914
Now, let's solve what happens,
after the current pulse.

00:07:05.914 --> 00:07:07.814
What happens to this
voltage, from here on?

00:07:07.814 --> 00:07:08.647
Does it go down?

00:07:08.647 --> 00:07:09.480
Does it go up?

00:07:09.480 --> 00:07:10.757
Does it go straight sideways?

00:07:10.757 --> 00:07:12.089
Let's find out, and let's use our

00:07:12.089 --> 00:07:14.589
capacitor equation to do this.

00:07:15.946 --> 00:07:17.937
Now, what we're doing,
is we're gonna define,

00:07:17.937 --> 00:07:21.202
we're gonna do a new integral.

00:07:21.202 --> 00:07:25.369
We're gonna start at time
equals three milliseconds.

00:07:27.114 --> 00:07:29.128
What is our voltage at three milliseconds?

00:07:29.128 --> 00:07:30.613
What's V naught?

00:07:30.613 --> 00:07:33.863
V naught, in this case, equals nine volts.

00:07:36.791 --> 00:07:40.532
That's for this period of
time, after three milliseconds.

00:07:40.532 --> 00:07:42.949
We'll use our equation again.

00:07:44.023 --> 00:07:48.023
V is one over C, times
the integral of I of tau,

00:07:52.413 --> 00:07:53.913
D tau, plus V naught.

00:08:00.024 --> 00:08:01.691
It goes from time...

00:08:04.586 --> 00:08:08.669
It goes from time, three
milliseconds, to time T.

00:08:10.665 --> 00:08:15.484
Time T, now, is out here
somewhere on the time scale.

00:08:15.484 --> 00:08:17.928
We know the voltage right
here, we filled it in.

00:08:17.928 --> 00:08:20.993
There's the voltage right
there, we're gonna fill that in.

00:08:20.993 --> 00:08:22.592
We're gonna work out what's the voltage

00:08:22.592 --> 00:08:25.509
out here, after three milliseconds?

00:08:27.398 --> 00:08:29.013
To solve this integral, we look and see,

00:08:29.013 --> 00:08:30.485
"Well, what's I of tau?

00:08:30.485 --> 00:08:32.052
"What's I of tau, during this time?"

00:08:32.052 --> 00:08:33.288
Let's look at our chart.

00:08:33.288 --> 00:08:35.555
The pulse is at zero.

00:08:35.555 --> 00:08:36.427
Oh, look.

00:08:36.427 --> 00:08:38.927
So this whole term right here,

00:08:40.138 --> 00:08:43.138
this entire term right here is zero.

00:08:45.633 --> 00:08:46.664
What is V naught?

00:08:46.664 --> 00:08:48.487
V naught, we decided, was right there.

00:08:48.487 --> 00:08:50.679
V naught is nine volts.

00:08:50.679 --> 00:08:52.585
That's where we started from.

00:08:52.585 --> 00:08:55.078
The answer here, after the pulse

00:08:55.078 --> 00:08:57.911
goes away, is V equals nine volts.

00:09:00.565 --> 00:09:02.660
I can sketch that in
up here, and basically,

00:09:02.660 --> 00:09:06.827
it just goes straight
sideways, at the new voltage.

00:09:08.537 --> 00:09:10.929
That's how we solve a capacitor problem,

00:09:10.929 --> 00:09:12.546
a really simple one.

00:09:12.546 --> 00:09:16.803
It happens that we were
integrating a current pulse,

00:09:16.803 --> 00:09:19.803
and what we got was a voltage ramp.


Capacitor i-v equations

WEBVTT
Kind: captions
Language: en

00:00:01.981 --> 00:00:03.680
- [Voiceover] We're gonna
talk about the equations

00:00:03.680 --> 00:00:07.180
that describe how a capacitor
works, and then I'll give you

00:00:07.180 --> 00:00:10.764
an example of how these equations work.

00:00:10.764 --> 00:00:14.931
The basic equation of a capacitor,
says that the charge, Q,

00:00:15.892 --> 00:00:19.611
on a capacitor, is equal
to the capacitance value,

00:00:19.611 --> 00:00:22.592
times the voltage across the capacitor.

00:00:22.592 --> 00:00:24.841
Here's our capacitor over here.

00:00:24.841 --> 00:00:29.008
Let's say we have a voltage
on it, of plus or minus V.

00:00:31.433 --> 00:00:35.494
We say it has a capacitance value of C.

00:00:35.494 --> 00:00:38.457
That's a property of this device here.

00:00:38.457 --> 00:00:41.792
C is equal to, just looking
at the equation over there,

00:00:41.792 --> 00:00:43.939
C is equal to the ratio of the charge,

00:00:43.939 --> 00:00:45.967
stored in the capacitor, divided

00:00:45.967 --> 00:00:48.799
by the voltage of the capacitor.

00:00:48.799 --> 00:00:51.549
What we mean by stored charge is,

00:00:52.486 --> 00:00:54.437
if a current flows into this capacitor,

00:00:54.437 --> 00:00:57.521
it can leave some excess
charge on the top.

00:00:57.521 --> 00:00:59.524
I'll just mark that with plus signs.

00:00:59.524 --> 00:01:03.680
There will be a corresponding
set of minus charges,

00:01:03.680 --> 00:01:06.680
on the other plate of the capacitor.

00:01:07.786 --> 00:01:11.869
This collection of
excess charge will be Q ,

00:01:12.752 --> 00:01:15.067
and this down here will be Q-,

00:01:15.067 --> 00:01:17.215
and they're gonna be the same value.

00:01:17.215 --> 00:01:19.855
What we say here, is when the
capacitor's in this state,

00:01:19.855 --> 00:01:23.229
we say it's storing this much charge.

00:01:23.229 --> 00:01:25.303
We'll just name one of these numbers here.

00:01:25.303 --> 00:01:27.920
They're gonna be the
same, with opposite signs.

00:01:27.920 --> 00:01:32.087
That's what it means for a
capacitor to store charge.

00:01:33.026 --> 00:01:35.743
What I want to do now, is
develop some sort of expression

00:01:35.743 --> 00:01:39.260
that relates the current
through a capacitor,

00:01:39.260 --> 00:01:40.255
to the voltage.

00:01:40.255 --> 00:01:43.588
We want to develop an IV characteristic,

00:01:45.007 --> 00:01:46.508
so this will correspond, sort of like,

00:01:46.508 --> 00:01:48.482
Ohm's Law for a capacitor.

00:01:48.482 --> 00:01:51.917
What relates the current to the voltage.

00:01:51.917 --> 00:01:55.114
The way I'm gonna do that,
is to exercise this equation,

00:01:55.114 --> 00:01:56.842
by causing some changes.

00:01:56.842 --> 00:02:01.416
In particular, we'll change
the voltage on this capacitor,

00:02:01.416 --> 00:02:04.244
and we'll see what happens over here.

00:02:04.244 --> 00:02:06.394
When we say we're gonna
change a voltage, that means

00:02:06.394 --> 00:02:10.561
we're gonna create something,
a condition of DV, DT.

00:02:12.045 --> 00:02:15.295
A change in voltage per change in time.

00:02:16.461 --> 00:02:17.896
I can do that by taking the derivative

00:02:17.896 --> 00:02:21.087
of both sides of this equation here.

00:02:21.087 --> 00:02:23.208
I've already done it for this side.

00:02:23.208 --> 00:02:26.208
Over here, what I'll have is DQ, DT.

00:02:29.367 --> 00:02:31.950
I took the derivative of
both sides, just to be sure

00:02:31.950 --> 00:02:35.271
I treated both sides of
the equation, the same.

00:02:35.271 --> 00:02:37.689
Let's look at this little
expression right here.

00:02:37.689 --> 00:02:39.090
This is kind of interesting.

00:02:39.090 --> 00:02:43.521
This is change of charge,
with change of time.

00:02:43.521 --> 00:02:47.521
That's equal to, that's
what we mean by current.

00:02:49.861 --> 00:02:50.860
That is current.

00:02:50.860 --> 00:02:53.193
The symbol for current is I.

00:02:55.718 --> 00:03:00.126
DQ, DT is current, essentially,
by definition, we give

00:03:00.126 --> 00:03:04.293
it the symbol I, and that's
gonna be equal to C DV, DT.

00:03:12.411 --> 00:03:14.610
This is an important equation.

00:03:14.610 --> 00:03:17.860
That's, basically, the IV relationship,

00:03:18.709 --> 00:03:22.376
between current and
voltage, in a capacitor.

00:03:23.471 --> 00:03:25.395
What it tells us, that the current

00:03:25.395 --> 00:03:27.345
is actually proportional to,

00:03:27.345 --> 00:03:30.333
and the proportionality constant is C,

00:03:30.333 --> 00:03:33.138
the current's proportional to
the rate of change of voltage.

00:03:33.138 --> 00:03:34.278
Not the voltage itself,

00:03:34.278 --> 00:03:38.112
but to the rate of change of voltage.

00:03:38.112 --> 00:03:41.482
Now, what I want to do
is find a expression

00:03:41.482 --> 00:03:44.026
that expresses V, in terms of I.

00:03:44.026 --> 00:03:47.276
Here we have I, in terms of DV, DT.

00:03:47.276 --> 00:03:49.362
Let's figure out if we can express V,

00:03:49.362 --> 00:03:52.891
in terms of some expression containing I.

00:03:52.891 --> 00:03:53.724
The way I do that is, I need

00:03:53.724 --> 00:03:56.123
to eliminate this derivative here.

00:03:56.123 --> 00:03:59.505
I'm gonna do that by taking
the integral of this side

00:03:59.505 --> 00:04:01.925
of the equation, and at
the same time, I'll take

00:04:01.925 --> 00:04:03.117
the integral of the other side

00:04:03.117 --> 00:04:05.817
of the equation, to keep everything equal.

00:04:05.817 --> 00:04:09.567
What that looks like
is, the integral of I...

00:04:13.074 --> 00:04:16.907
With respect to time,
is equal to the integral

00:04:18.809 --> 00:04:21.976
of C DV, DT, with respect to time, DT.

00:04:29.017 --> 00:04:32.556
On this side, I have basically,
I do something like this.

00:04:32.556 --> 00:04:35.522
I have the integral of DV.

00:04:35.522 --> 00:04:37.873
This looks like an anti-derivative.

00:04:37.873 --> 00:04:41.155
This is an integral, acting
like an anti-derivative.

00:04:41.155 --> 00:04:44.238
What function has a derivative of DV?

00:04:46.109 --> 00:04:48.553
That would be just plain V.

00:04:48.553 --> 00:04:50.357
I can rewrite this side of the equation,

00:04:50.357 --> 00:04:53.013
constant C comes out of the expression,

00:04:53.013 --> 00:04:54.928
and we end up with V, on this side.

00:04:54.928 --> 00:04:56.406
Just plain V.

00:04:56.406 --> 00:04:59.156
That equals the integral of I DT.

00:05:06.346 --> 00:05:08.560
We're part way through,
we're developing what's gonna

00:05:08.560 --> 00:05:13.362
be called an integral form
of the capacitor IV equation.

00:05:13.362 --> 00:05:14.602
What I need to look at next is,

00:05:14.602 --> 00:05:17.624
what are the bounds, on this integral?

00:05:17.624 --> 00:05:21.326
The bounds on this integral
are basically minus time,

00:05:21.326 --> 00:05:25.866
equals minus infinity, to
time equals sub-time T,

00:05:25.866 --> 00:05:28.272
which is sort of like the time now.

00:05:28.272 --> 00:05:31.367
That equals capacitance times voltage.

00:05:31.367 --> 00:05:34.058
Let me take this C,
over on the other side,

00:05:34.058 --> 00:05:37.418
and actually, I'm gonna move
V over here, onto the left.

00:05:37.418 --> 00:05:40.335
Then, I can write this, one over C.

00:05:42.489 --> 00:05:45.744
This is the normal looking
version of this equation.

00:05:45.744 --> 00:05:48.411
I DT, minus infinity to time, T.

00:05:52.973 --> 00:05:55.556
Time, big T, is time right now.

00:05:56.807 --> 00:05:59.476
What this says, it says that
the voltage on a capacitor

00:05:59.476 --> 00:06:01.726
has something to do with the summation,

00:06:01.726 --> 00:06:05.552
or the integral, of the
current, over its entire life,

00:06:05.552 --> 00:06:09.154
all the way back to T
equals minus infinity.

00:06:09.154 --> 00:06:11.182
This is not so convenient.

00:06:11.182 --> 00:06:15.674
What we're gonna do instead,
is we're gonna pick a time.

00:06:15.674 --> 00:06:18.115
We'll pick a time called T equals zero,

00:06:18.115 --> 00:06:20.385
and we'll say that the
voltage on the capacitor

00:06:20.385 --> 00:06:24.385
was equal to, let's say,
V not, with some value.

00:06:26.755 --> 00:06:28.690
Then, what we'll do, is we're gonna change

00:06:28.690 --> 00:06:30.813
the limit on our integral here,

00:06:30.813 --> 00:06:34.141
from minus infinity, to
time, T, equals zero.

00:06:34.141 --> 00:06:37.301
Then, we'll use the
integral from, instead,

00:06:37.301 --> 00:06:40.184
zero to the time, we're interested in.

00:06:40.184 --> 00:06:41.369
That equation looks like this.

00:06:41.369 --> 00:06:45.536
We're just gonna change
the limits on the integral.

00:06:55.385 --> 00:06:57.305
We have the integral now, but
we have to actually account

00:06:57.305 --> 00:07:00.543
for all the time, before T equals zero.

00:07:00.543 --> 00:07:05.139
What we do there, is we
just basically add V not.

00:07:05.139 --> 00:07:07.316
Whatever V not is, that's
the starting point,

00:07:07.316 --> 00:07:10.104
at time equals zero, and
then the integral takes us,

00:07:10.104 --> 00:07:12.604
from time zero until time now.

00:07:15.571 --> 00:07:17.976
This is the integral form
of the capacitor equation.

00:07:17.976 --> 00:07:21.893
I want to actually make
one more little change.

00:07:26.425 --> 00:07:30.175
This is the current at
V, as a function of T.

00:07:31.571 --> 00:07:33.037
What we really want to write here,

00:07:33.037 --> 00:07:35.719
is we wanna write V of a little T.

00:07:35.719 --> 00:07:38.152
This is just stylistically,
this is what we like

00:07:38.152 --> 00:07:40.766
this equation to look like.

00:07:40.766 --> 00:07:45.508
I want the limits on my
integral, to be zero to t.

00:07:45.508 --> 00:07:49.473
Now, I need to sort of
make a new replacement

00:07:49.473 --> 00:07:51.311
for this T that's inside here.

00:07:51.311 --> 00:07:52.992
I can call it something else.

00:07:52.992 --> 00:07:56.075
I can call it I of, I'll call it tau.

00:07:59.262 --> 00:08:01.556
This is basically just
a little fake variable.

00:08:01.556 --> 00:08:02.973
D tau plus V not.

00:08:07.278 --> 00:08:09.518
This is, now, we finally have it,

00:08:09.518 --> 00:08:13.685
this is the integral form
of the capacitor equation.

00:08:15.469 --> 00:08:17.914
We have the other form of the
equation that goes with this,

00:08:17.914 --> 00:08:20.247
which was I equals C DV, DT.

00:08:29.831 --> 00:08:33.663
There's the two forms of
the capacitor equation.

00:08:33.663 --> 00:08:36.417
Now, I want to do an
example with this one here,

00:08:36.417 --> 00:08:40.495
just to see how it works, when
we have a capacitor circuit.


Conventional current

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:01.401
- [Voiceover] When we
start to study electricity,

00:00:01.401 --> 00:00:03.554
we need to get an idea of what is Current

00:00:03.554 --> 00:00:06.157
and what is Voltage and

00:00:06.157 --> 00:00:07.466
in two earlier videos,

00:00:07.466 --> 00:00:11.383
I talked about the idea
of current and voltage,

00:00:12.995 --> 00:00:16.745
current and voltage and,
and what they meant.

00:00:19.551 --> 00:00:21.738
And when we talked about current,

00:00:21.738 --> 00:00:24.383
it's easiest to describe current
when we talk about wires.

00:00:24.383 --> 00:00:27.050
Let's say we have a copper wire.

00:00:31.231 --> 00:00:33.550
We talked about a copper
wire and inside it was,

00:00:33.550 --> 00:00:34.709
there was electrons in it,

00:00:34.709 --> 00:00:36.293
and they have a negative charge, we know

00:00:36.293 --> 00:00:37.993
they have a negative charge,

00:00:37.993 --> 00:00:40.055
and if we put a voltage on them,

00:00:40.055 --> 00:00:43.795
those electrons would move
in some direction like that.

00:00:43.795 --> 00:00:46.453
So if I put a plus voltage over here

00:00:46.453 --> 00:00:47.993
and a minus voltage over here,

00:00:47.993 --> 00:00:49.293
the electrons are repelled

00:00:49.293 --> 00:00:51.226
by the minus voltage and they're attracted

00:00:51.226 --> 00:00:53.294
to the positive voltage.

00:00:53.294 --> 00:00:56.211
That is called an Electron Current.

00:01:03.273 --> 00:01:04.779
So talking about current

00:01:04.779 --> 00:01:07.895
in terms of what's actually
happening inside a wire

00:01:07.895 --> 00:01:10.203
makes some sense, it's easier
to understand current and

00:01:10.203 --> 00:01:12.160
that these electrons are moving around.

00:01:12.160 --> 00:01:13.668
And whenever we talk about this,

00:01:13.668 --> 00:01:15.853
we'll talk about it specifically

00:01:15.853 --> 00:01:19.192
that there's an electron
current going on here.

00:01:19.192 --> 00:01:21.519
Now at the same time,
what I said in that video,

00:01:21.519 --> 00:01:23.028
and I'll say again,

00:01:23.028 --> 00:01:26.467
is the convention for
describing current is this.

00:01:26.467 --> 00:01:30.634
This is called the
Conventional Current Direction.

00:01:40.665 --> 00:01:43.287
The convention we've had
for hundreds of years

00:01:43.287 --> 00:01:44.595
is that current is the direction

00:01:44.595 --> 00:01:47.059
that a positive charge would move

00:01:47.059 --> 00:01:49.432
if there was a positive charge there.

00:01:49.432 --> 00:01:51.881
So, whenever we talk
about current from now on,

00:01:51.881 --> 00:01:54.416
it'll always be conventional current,

00:01:54.416 --> 00:01:55.613
and in fact, we don't even need to mention

00:01:55.613 --> 00:01:58.844
conventional any more, it's just current.

00:01:58.844 --> 00:02:01.879
Current is the direction that
positive charges would move.

00:02:01.879 --> 00:02:04.511
If we ever talk about electron
current then we'll use

00:02:04.511 --> 00:02:07.266
the word, electron current.

00:02:07.266 --> 00:02:10.849
Now, as a reminder, when
we talked about voltage,

00:02:10.849 --> 00:02:12.779
uh, this was built up by analogy

00:02:12.779 --> 00:02:17.586
and the analogy was to electrons
rolling down a mountaintop,

00:02:17.586 --> 00:02:20.427
so here's our mountain, remember this?

00:02:20.427 --> 00:02:21.897
And I built a

00:02:21.897 --> 00:02:26.260
battery or another
voltage source like this,

00:02:26.260 --> 00:02:28.804
and we said, that what
a battery does is it

00:02:28.804 --> 00:02:31.304
pumps out energetic electrons,

00:02:32.892 --> 00:02:35.454
and they go down a hill.

00:02:35.454 --> 00:02:38.371
Roll downhill and go back into the,

00:02:39.694 --> 00:02:42.010
back into the positive
terminal of the battery.

00:02:42.010 --> 00:02:45.371
And when we design
circuits, what we do, is we,

00:02:45.371 --> 00:02:47.647
we put stuff in the
way of this electron on

00:02:47.647 --> 00:02:51.582
its path, and this is where
we build our circuits.

00:02:51.582 --> 00:02:53.540
So the, the electron current is

00:02:53.540 --> 00:02:55.465
going in this direction
here down the hill.

00:02:55.465 --> 00:02:57.513
The conventional current direction or

00:02:57.513 --> 00:03:00.346
the current direction is this way.

00:03:02.074 --> 00:03:04.644
So now, I'm gonna redraw
my circuit and my battery.

00:03:04.644 --> 00:03:06.124
I'm gonna flip the battery around it

00:03:06.124 --> 00:03:09.624
until the positive terminal is on the top,

00:03:10.972 --> 00:03:13.055
and I'll put my circuit

00:03:13.055 --> 00:03:16.138
over on the side over here like this.

00:03:18.759 --> 00:03:20.419
There's my circuit that I just built.

00:03:20.419 --> 00:03:23.919
Let's connect those circuits up like that.

00:03:25.089 --> 00:03:26.754
This is the plus side of the battery,

00:03:26.754 --> 00:03:28.188
this is the minus side.

00:03:28.188 --> 00:03:30.463
The plus side goes with the long bar

00:03:30.463 --> 00:03:33.141
and the minus side goes
with the short bar there.

00:03:33.141 --> 00:03:34.456
And the current direction here,

00:03:34.456 --> 00:03:35.863
the conventional current direction,

00:03:35.863 --> 00:03:38.753
or just plain current direction,

00:03:38.753 --> 00:03:39.586
is in that direction.

00:03:39.586 --> 00:03:43.172
Out of the positive and
back into the negative.

00:03:43.172 --> 00:03:44.904
From now on, this is
what we mean by current.

00:03:44.904 --> 00:03:47.712
And we know that the
electrons are in here.

00:03:47.712 --> 00:03:50.475
They're heading around this
way, like that, but that's okay.

00:03:50.475 --> 00:03:53.171
This is the, this is the nomenclature

00:03:53.171 --> 00:03:56.445
for conventional current
or just plain current.


Quadratic approximation formula, part 2

WEBVTT
Kind: captions
Language: en

00:00:00.398 --> 00:00:03.789
- [Voiceover] ♫ Line things
up a little bit right here. ♫

00:00:03.789 --> 00:00:04.622
All right.

00:00:05.648 --> 00:00:07.953
So in the last video I
set up the scaffolding

00:00:07.953 --> 00:00:09.825
for the quadratic approximation which

00:00:09.825 --> 00:00:12.263
I'm calling Q of a function,

00:00:12.263 --> 00:00:15.119
an arbitrary two variable
function which I'm calling f,

00:00:15.119 --> 00:00:17.252
and the form that we have right now

00:00:17.252 --> 00:00:18.496
looks like quite a lot actually.

00:00:18.496 --> 00:00:20.029
We have six different terms.

00:00:20.029 --> 00:00:22.283
Now the first three were
just basically stolen

00:00:22.283 --> 00:00:24.606
from the local linearization formula

00:00:24.606 --> 00:00:26.212
and written in their full abstractness.

00:00:26.212 --> 00:00:27.791
It almost makes it seem a little bit more

00:00:27.791 --> 00:00:29.393
complicated than it is.

00:00:29.393 --> 00:00:31.065
And then these next three terms

00:00:31.065 --> 00:00:32.946
are basically the quadratic parts.

00:00:32.946 --> 00:00:35.512
We have what is basically X squared.

00:00:35.512 --> 00:00:37.859
We take it as X minus X naught squared

00:00:37.859 --> 00:00:39.757
so that we don't mess
with anything previously

00:00:39.757 --> 00:00:42.357
once we plug in X equals X naught,

00:00:42.357 --> 00:00:44.446
but basically we think
of this as X squared.

00:00:44.446 --> 00:00:46.537
And then this here is basically X times Y,

00:00:46.537 --> 00:00:48.650
but of course we're
matching each one of them

00:00:48.650 --> 00:00:51.181
with the corresponding X naught Y naught,

00:00:51.181 --> 00:00:52.969
and then this term is the Y squared.

00:00:52.969 --> 00:00:54.625
And the question at hand is

00:00:54.625 --> 00:00:55.888
how do we fill in these constants?

00:00:55.888 --> 00:00:57.955
The coefficients in front of each one

00:00:57.955 --> 00:00:59.873
of these quadratic terms to make it

00:00:59.873 --> 00:01:02.821
so that this guy Q hugs the graph of f

00:01:02.821 --> 00:01:04.191
as closely as possible.

00:01:04.191 --> 00:01:05.546
And I showed that in the very first video,

00:01:05.546 --> 00:01:07.828
kind of what that hugging means.

00:01:07.828 --> 00:01:09.755
Now in formulas, the goal here,

00:01:09.755 --> 00:01:10.847
I should probably state,

00:01:10.847 --> 00:01:13.307
what it is that we want is for the second

00:01:13.307 --> 00:01:15.700
partial derivatives of Q,

00:01:15.700 --> 00:01:17.696
so for example if we take
the partial derivative

00:01:17.696 --> 00:01:19.855
with respect to X twice in a row,

00:01:19.855 --> 00:01:22.195
we want it to be the case
that if you take that guy

00:01:22.195 --> 00:01:24.935
and you evaluate it at
the point of interest,

00:01:24.935 --> 00:01:27.164
the point about which
we are approximating,

00:01:27.164 --> 00:01:28.953
it should be the same as when you take

00:01:28.953 --> 00:01:30.672
the second partial derivative of f

00:01:30.672 --> 00:01:32.598
or the corresponding
second partial derivative

00:01:32.598 --> 00:01:34.701
I should say since
there's multiple different

00:01:34.701 --> 00:01:36.164
second partial derivatives,

00:01:36.164 --> 00:01:39.136
and you evaluate it at that same point.

00:01:39.136 --> 00:01:40.634
And of course we want this to be true

00:01:40.634 --> 00:01:42.991
not just with the second
partial derivative

00:01:42.991 --> 00:01:44.640
with respect to X twice in a row,

00:01:44.640 --> 00:01:45.870
but if we did it with the other ones.

00:01:45.870 --> 00:01:46.939
Like for example,

00:01:46.939 --> 00:01:48.982
let's say we took the partial derivative

00:01:48.982 --> 00:01:50.631
first with respect to X,

00:01:50.631 --> 00:01:52.093
and then with respect to Y.

00:01:52.093 --> 00:01:54.044
This is called the mixed
partial derivative.

00:01:54.044 --> 00:01:56.146
We want it to be the case
that when we evaluate that

00:01:56.146 --> 00:01:59.206
at the point of interest
it's the same as taking

00:01:59.206 --> 00:02:04.073
the mixed partial derivative
of f with respect to X,

00:02:04.073 --> 00:02:05.791
and then with respect to Y,

00:02:05.791 --> 00:02:08.958
and we evaluate it at that same point.

00:02:11.390 --> 00:02:14.137
And remember, for almost all
functions that you deal with,

00:02:14.137 --> 00:02:16.975
when you take this
second partial derivative

00:02:16.975 --> 00:02:20.048
where we mix two of the variables,

00:02:20.048 --> 00:02:21.765
it doesn't matter the order in which

00:02:21.765 --> 00:02:22.598
you take them, right?

00:02:22.598 --> 00:02:24.774
You could take it first
with respect to X then Y

00:02:24.774 --> 00:02:26.980
or you could it first with respect to Y,

00:02:26.980 --> 00:02:28.514
and then with respect to X.

00:02:28.514 --> 00:02:29.929
Usually these guys are equal.

00:02:29.929 --> 00:02:32.042
There are some functions
for which this isn't true,

00:02:32.042 --> 00:02:33.286
but we're going to basically assume that

00:02:33.286 --> 00:02:35.120
we're dealing with
functions where this is.

00:02:35.120 --> 00:02:37.536
So, that's the only
mixed partial derivative

00:02:37.536 --> 00:02:39.207
that we have to take into account.

00:02:39.207 --> 00:02:42.353
And I'll just kind of get
rid of that guy there.

00:02:42.353 --> 00:02:44.720
And then, of course, the final one,

00:02:44.720 --> 00:02:46.265
just to have it on record here,

00:02:46.265 --> 00:02:48.541
is that we want the partial derivative

00:02:48.541 --> 00:02:50.792
when we take it with respect to Y

00:02:50.792 --> 00:02:51.908
two times in a row

00:02:51.908 --> 00:02:54.252
and we evaluate that at the same point,

00:02:54.252 --> 00:02:55.720
there's kind of a lot,

00:02:55.720 --> 00:02:56.904
there's a lot of writing that goes on

00:02:56.904 --> 00:02:59.480
with these things and that's just kind of

00:02:59.480 --> 00:03:00.469
par for the course when it comes

00:03:00.469 --> 00:03:01.839
to multi-variable calculus,

00:03:01.839 --> 00:03:03.984
but you take the partial derivative

00:03:03.984 --> 00:03:05.998
with respect to Y, add both of them,

00:03:05.998 --> 00:03:09.086
and you want it to be the
same value at this point.

00:03:09.086 --> 00:03:10.387
So even though there's
a lot going on here,

00:03:10.387 --> 00:03:12.476
all I'm basically saying is all the second

00:03:12.476 --> 00:03:14.690
to partial differential
information should be the same

00:03:14.690 --> 00:03:17.199
for Q as it is for f.

00:03:17.199 --> 00:03:19.126
So, let's actually go up and take a look

00:03:19.126 --> 00:03:21.542
at our function and start thinking about

00:03:21.542 --> 00:03:22.832
what it's partial derivatives are.

00:03:22.832 --> 00:03:26.315
What it's first and second
partial derivatives are.

00:03:26.315 --> 00:03:27.148
And to do that,

00:03:27.148 --> 00:03:29.264
let me first just kind of clear up

00:03:29.264 --> 00:03:31.097
some of the board here

00:03:32.190 --> 00:03:33.932
just to make it so we can actually start

00:03:33.932 --> 00:03:37.670
computing what this second
partial derivative is.

00:03:37.670 --> 00:03:38.809
So let's go ahead and do it.

00:03:38.809 --> 00:03:41.830
First, this partial derivative
with respect to X twice,

00:03:41.830 --> 00:03:43.856
what we'll do is I'll
take one of those out

00:03:43.856 --> 00:03:46.085
and think partial derivative
with respect to X.

00:03:46.085 --> 00:03:47.409
And then on the inside I'm going to put

00:03:47.409 --> 00:03:50.439
what the partial derivative
of this entire expression

00:03:50.439 --> 00:03:52.424
with respect to X is.

00:03:52.424 --> 00:03:54.315
But we just take it one term at a time.

00:03:54.315 --> 00:03:56.232
This first term here is a constant,

00:03:56.232 --> 00:03:58.065
so that goes to zero.

00:03:58.065 --> 00:04:01.757
The second term here actually
has the variable X in it.

00:04:01.757 --> 00:04:03.429
And when we take it's partial derivative,

00:04:03.429 --> 00:04:05.247
since this is a linear term,

00:04:05.247 --> 00:04:07.540
it's just going to be that
constant sitting in front of it.

00:04:07.540 --> 00:04:09.862
So it will be that
constant which is the value

00:04:09.862 --> 00:04:13.249
of the partial derivative
of f with respect to X

00:04:13.249 --> 00:04:16.166
evaluated at the point of interest.

00:04:17.172 --> 00:04:18.632
And that's just a constant.

00:04:18.632 --> 00:04:20.093
All right, so that's there.

00:04:20.093 --> 00:04:21.616
This next term has no Xs in it,

00:04:21.616 --> 00:04:23.311
so that's just going to go to zero.

00:04:23.311 --> 00:04:27.254
This term is interesting
because it's got an X in it.

00:04:27.254 --> 00:04:29.530
So when we take its
derivative with respect to X,

00:04:29.530 --> 00:04:30.900
that two comes down.

00:04:30.900 --> 00:04:32.988
So this will be two times a,

00:04:32.988 --> 00:04:34.748
whatever the constant a is,

00:04:34.748 --> 00:04:37.331
multiplied by X minus X naught.

00:04:39.091 --> 00:04:40.925
That's what the derivative
of this component is

00:04:40.925 --> 00:04:42.434
with respect to X.

00:04:42.434 --> 00:04:43.758
Then this over here,

00:04:43.758 --> 00:04:45.315
this also has an X,

00:04:45.315 --> 00:04:47.372
but it's just showing up
basically as a linear term.

00:04:47.372 --> 00:04:48.858
And when we treat Y as a constant,

00:04:48.858 --> 00:04:50.414
since we're taking the partial derivative

00:04:50.414 --> 00:04:51.923
with respect to X,

00:04:51.923 --> 00:04:55.939
what that ends up being
is b multiplied by that,

00:04:55.939 --> 00:04:58.632
what looks like a constant
as far as X is concerned,

00:04:58.632 --> 00:05:00.543
Y minus Y naught.

00:05:00.543 --> 00:05:02.866
And then the last term
doesn't have any Xs in it.

00:05:02.866 --> 00:05:05.791
So that is the first partial derivative

00:05:05.791 --> 00:05:07.327
with respect to X.

00:05:07.327 --> 00:05:08.186
And now we do it again.

00:05:08.186 --> 00:05:10.834
Now we take the partial
derivative with respect to X,

00:05:10.834 --> 00:05:12.273
and I'll hmm,

00:05:12.273 --> 00:05:14.085
maybe I should actually clear up

00:05:14.085 --> 00:05:15.802
even more of this guy.

00:05:15.802 --> 00:05:17.195
And now when we take
the partial derivative

00:05:17.195 --> 00:05:19.959
of this expression with respect to X,

00:05:19.959 --> 00:05:21.561
f of X of X naught, Y naught,

00:05:21.561 --> 00:05:22.653
that's just a constant,

00:05:22.653 --> 00:05:24.324
so that goes to zero.

00:05:24.324 --> 00:05:27.727
Two times a times X, that's going to,

00:05:27.727 --> 00:05:29.190
we take the derivative with respect to X

00:05:29.190 --> 00:05:31.652
and we're just going to get two times a.

00:05:31.652 --> 00:05:33.254
And this last term
doesn't have an Xs in it,

00:05:33.254 --> 00:05:34.834
so that also goes to zero.

00:05:34.834 --> 00:05:35.994
So conveniently,

00:05:35.994 --> 00:05:38.502
when we take the second partial derivative

00:05:38.502 --> 00:05:40.198
of Q with respect to X,

00:05:40.198 --> 00:05:41.520
We just get a constant.

00:05:41.520 --> 00:05:44.190
It's this constant to a.

00:05:44.190 --> 00:05:46.025
And since we want it to be the case,

00:05:46.025 --> 00:05:49.608
we want that this entire
thing is equal to,

00:05:51.644 --> 00:05:52.666
well what do we want?

00:05:52.666 --> 00:05:54.570
We want it to be the
second partial derivative

00:05:54.570 --> 00:05:57.055
of f both times with respect to X.

00:05:57.055 --> 00:05:59.029
So here I'm going to use
the subscript notation.

00:05:59.029 --> 00:06:00.909
Over here I'm using the
kind of Leibniz notation,

00:06:00.909 --> 00:06:02.375
but here just second partial derivative

00:06:02.375 --> 00:06:03.815
with respect to X,

00:06:03.815 --> 00:06:06.067
we want it to match
whatever that looks like

00:06:06.067 --> 00:06:09.295
when we evaluate it at
the point of interest.

00:06:09.295 --> 00:06:10.782
So what we could do to make that happen,

00:06:10.782 --> 00:06:13.170
to make sure that two
a is equal to this guy,

00:06:13.170 --> 00:06:16.253
is we set a equal to one half of that

00:06:19.555 --> 00:06:21.621
second partial derivative evaluated

00:06:21.621 --> 00:06:23.704
at the point of interest.

00:06:24.943 --> 00:06:26.651
Okay. So this is something
we kind of tuck away.

00:06:26.651 --> 00:06:28.318
We remember this is,

00:06:29.971 --> 00:06:31.991
we have solved for one of the constants.

00:06:31.991 --> 00:06:33.872
So now let's start thinking
about another one of them.

00:06:33.872 --> 00:06:35.219
Well I guess actually I
don't have to scroll off

00:06:35.219 --> 00:06:37.099
because let's say we just want to take

00:06:37.099 --> 00:06:39.677
the mixed partial derivative here where

00:06:39.677 --> 00:06:41.999
if instead of taking it
with respect to X twice,

00:06:41.999 --> 00:06:44.623
we wanted to, let's see
I'll kind of erase this,

00:06:44.623 --> 00:06:47.665
we wanted to first do
it with respect to X,

00:06:47.665 --> 00:06:49.754
and then do it with respect to Y.

00:06:49.754 --> 00:06:50.789
Then we can kind of just edit what

00:06:50.789 --> 00:06:52.136
we have over here and we say,

00:06:52.136 --> 00:06:53.991
"we already took it with respect to X,

00:06:53.991 --> 00:06:56.824
"so now as our second go we're going to be

00:06:56.824 --> 00:06:59.028
"taking it with respect to Y."

00:06:59.028 --> 00:07:00.189
So in that case,

00:07:00.189 --> 00:07:03.068
instead of getting two a
let's kind of figure out

00:07:03.068 --> 00:07:04.508
what it is that we get.

00:07:04.508 --> 00:07:06.250
When we take the derivative
of this whole guy

00:07:06.250 --> 00:07:07.875
with respect to Y,

00:07:07.875 --> 00:07:10.034
well this looks like a constant.

00:07:10.034 --> 00:07:11.753
This here also looks like a constant

00:07:11.753 --> 00:07:13.169
since we're doing it with respect to Y

00:07:13.169 --> 00:07:14.539
and no Ys show up.

00:07:14.539 --> 00:07:16.025
And the partial derivative of this

00:07:16.025 --> 00:07:17.604
just ends up being b.

00:07:17.604 --> 00:07:19.485
So again, we just get a constant.

00:07:19.485 --> 00:07:22.178
This time it's b not two,

00:07:22.178 --> 00:07:23.363
previously it was two a,

00:07:23.363 --> 00:07:24.826
but now it's just b.

00:07:24.826 --> 00:07:26.451
And this time we want it to equal

00:07:26.451 --> 00:07:28.076
the mixed partial derivative.

00:07:28.076 --> 00:07:30.445
So instead of saying f sub XX,

00:07:30.445 --> 00:07:32.813
I'm going to f XY which basically says

00:07:32.813 --> 00:07:34.452
you take the partial derivative first

00:07:34.452 --> 00:07:36.799
with respect to X and
then with respect to Y.

00:07:36.799 --> 00:07:39.817
We want this guy to
equal the value of that

00:07:39.817 --> 00:07:42.464
mixed partial derivative
evaluated at that point.

00:07:42.464 --> 00:07:43.300
So that gives us another fact.

00:07:43.300 --> 00:07:47.208
That means we can just
basically set b equal to that.

00:07:47.208 --> 00:07:48.914
And this is another fact,

00:07:48.914 --> 00:07:51.120
another constant that we can record.

00:07:51.120 --> 00:07:52.287
And now for C,

00:07:53.254 --> 00:07:55.192
when we're trying to figure
out what that should be,

00:07:55.192 --> 00:07:56.956
the reasoning is almost identical.

00:07:56.956 --> 00:07:58.025
It's pretty much symmetric.

00:07:58.025 --> 00:08:00.742
We did everything that
we did for the case X,

00:08:00.742 --> 00:08:03.331
and instead we do it for
taking the partial derivative

00:08:03.331 --> 00:08:05.406
with respect to Y twice in a row,

00:08:05.406 --> 00:08:06.939
and I encourage you to
do that for yourself.

00:08:06.939 --> 00:08:08.944
It'll definitely solidify everything that

00:08:08.944 --> 00:08:10.801
we're doing here because it can seem

00:08:10.801 --> 00:08:12.868
kind of like a lot and
a lot of computations.

00:08:12.868 --> 00:08:14.623
But you're going to get
basically the same conclusion

00:08:14.623 --> 00:08:16.241
you did for the constant a.

00:08:16.241 --> 00:08:18.726
It's going to be the case
that you have the constant c

00:08:18.726 --> 00:08:22.836
is equal to one half of the
second partial derivative

00:08:22.836 --> 00:08:24.577
of f with respect to Y,

00:08:24.577 --> 00:08:26.899
so you're differentiating
with respect to Y twice

00:08:26.899 --> 00:08:30.243
evaluated at the point of interest.

00:08:30.243 --> 00:08:33.494
So this is going to be
kind of the third fact.

00:08:33.494 --> 00:08:35.537
And the way that you get
to that conclusion again,

00:08:35.537 --> 00:08:37.418
it's going to be almost
identical to the way

00:08:37.418 --> 00:08:39.252
that we found this one for X.

00:08:39.252 --> 00:08:41.760
Now when you plug in these
values for a, b and c,

00:08:41.760 --> 00:08:42.898
and these are constants,

00:08:42.898 --> 00:08:44.686
even though we've written them as formulas

00:08:44.686 --> 00:08:45.963
they are constants,

00:08:45.963 --> 00:08:48.958
when you plus those in
to this full formula,

00:08:48.958 --> 00:08:51.118
you're going to get the
quadratic approximation.

00:08:51.118 --> 00:08:52.697
It'll have six separate terms.

00:08:52.697 --> 00:08:54.554
One that corresponds to the constant,

00:08:54.554 --> 00:08:56.807
two that correspond to the linear fact,

00:08:56.807 --> 00:08:58.150
and then three which correspond to

00:08:58.150 --> 00:08:59.868
the various quadratic terms.

00:08:59.868 --> 00:09:01.447
And if you wanted to dig into more details

00:09:01.447 --> 00:09:03.844
and kind of go through an
example or two on this,

00:09:03.844 --> 00:09:06.584
I do have an article on
quadratic approximations

00:09:06.584 --> 00:09:08.139
and hopefully you can kind of step through

00:09:08.139 --> 00:09:11.009
and do some of the computations
yourself as you go.

00:09:11.009 --> 00:09:12.357
But in all of this,

00:09:12.357 --> 00:09:14.145
even though there's a
lot of formulas going on,

00:09:14.145 --> 00:09:15.863
it can be pretty notationly heavy.

00:09:15.863 --> 00:09:16.990
I want you to think back to that

00:09:16.990 --> 00:09:19.140
original graphical intuition, here,

00:09:19.140 --> 00:09:22.135
let me actually pull up the
graphical intuition here.

00:09:22.135 --> 00:09:23.551
So if you're approximating a function

00:09:23.551 --> 00:09:25.130
near a specific point,

00:09:25.130 --> 00:09:27.221
the quadratic approximation looks like

00:09:27.221 --> 00:09:29.521
this curve where if you were to chop it

00:09:29.521 --> 00:09:32.445
in any direction it would be a parabola,

00:09:32.445 --> 00:09:34.419
but it's hugging the graph pretty closely.

00:09:34.419 --> 00:09:36.440
So it gives up a pretty
close approximation.

00:09:36.440 --> 00:09:37.948
So even though there's a lot of formulas

00:09:37.948 --> 00:09:39.273
that go on to get us that,

00:09:39.273 --> 00:09:41.515
the ultimate visual and I
think the ultimate intuition

00:09:41.515 --> 00:09:43.277
is actually a pretty sensible one.

00:09:43.277 --> 00:09:44.439
You're just hoping to find something that

00:09:44.439 --> 00:09:46.808
hugs the function nice and closely.

00:09:46.808 --> 00:09:49.272
And with that, I will see you next video.


Quadratic approximation formula, part 1

WEBVTT
Kind: captions
Language: en

00:00:00.000 --> 00:00:03.141
- [Voiceover] So, our setup is
that we have some kind of two

00:00:03.141 --> 00:00:05.014
variable function f of x, y,

00:00:05.014 --> 00:00:06.628
who has a scaler output,

00:00:06.628 --> 00:00:08.316
and the goal is to approximate it

00:00:08.316 --> 00:00:10.372
near a specific input point,

00:00:10.372 --> 00:00:11.950
and this is something
I've already talked about

00:00:11.950 --> 00:00:14.446
in context of a local linearization,

00:00:14.446 --> 00:00:16.275
and I've written out the full local,

00:00:16.275 --> 00:00:19.978
the full local linearization,
hard words to say,

00:00:19.978 --> 00:00:22.116
local linearization in its most

00:00:22.116 --> 00:00:24.012
abstract and general form,

00:00:24.012 --> 00:00:25.496
and it looks like quite the beast,

00:00:25.496 --> 00:00:27.018
but once you actually break it apart,

00:00:27.018 --> 00:00:27.854
which I'll do in a moment, it's, it's

00:00:27.854 --> 00:00:29.458
not actually that bad.

00:00:29.458 --> 00:00:30.862
And the goal of this video is gonna be

00:00:30.862 --> 00:00:33.219
to extend this idea and it'll literally be

00:00:33.219 --> 00:00:35.634
just adding terms onto this formula

00:00:35.634 --> 00:00:37.739
to get a quadratic approximation.

00:00:37.739 --> 00:00:38.701
And what that means is,

00:00:38.701 --> 00:00:40.533
we're starting to allow
ourselves to use terms

00:00:40.533 --> 00:00:44.563
like x squared, x times y, and y squared.

00:00:44.563 --> 00:00:46.123
And quadratic basically just means

00:00:46.123 --> 00:00:48.979
any time you have two
variables multiplied together.

00:00:48.979 --> 00:00:51.260
So here you have two
Xs multiplied together,

00:00:51.260 --> 00:00:53.538
here it's an x multiplied with a y,

00:00:53.538 --> 00:00:56.121
and here y squared, that kind of thing.

00:00:56.121 --> 00:00:58.401
So let's take a look at
this local linearization.

00:00:58.401 --> 00:00:59.347
It seems like a lot,

00:00:59.347 --> 00:01:00.674
but once you actually
kind of go through term

00:01:00.674 --> 00:01:02.614
by term, um, you realize

00:01:02.614 --> 00:01:04.337
it's a relatively simple function,

00:01:04.337 --> 00:01:06.024
and if you were to plug in numbers

00:01:06.024 --> 00:01:07.204
for the constant terms,

00:01:07.204 --> 00:01:09.500
it would come out as
something relatively simple.

00:01:09.500 --> 00:01:10.627
Cause this right here

00:01:10.627 --> 00:01:12.106
where you're evaluating the function

00:01:12.106 --> 00:01:13.537
at this specific input point,

00:01:13.537 --> 00:01:15.251
that's just gonna be
some kind of constant.

00:01:15.251 --> 00:01:17.656
That's just gonna output
some kind of number.

00:01:17.656 --> 00:01:19.821
And similarly, when you do that to the,

00:01:19.821 --> 00:01:22.283
the partial derivative, this little f of x

00:01:22.283 --> 00:01:24.120
means partial derivative at that point,

00:01:24.120 --> 00:01:25.783
you're just getting another number.

00:01:25.783 --> 00:01:28.077
And over here, this is
also just another number,

00:01:28.077 --> 00:01:29.802
but we've written it in
the abstract form so that

00:01:29.802 --> 00:01:32.494
ah, you can see what you
would need to plug-in

00:01:32.494 --> 00:01:35.129
for any function and for
any possible input point.

00:01:35.129 --> 00:01:36.935
And the reason for having it like this,

00:01:36.935 --> 00:01:38.891
the reason that it comes out to this form

00:01:38.891 --> 00:01:40.893
is because of a few important properties

00:01:40.893 --> 00:01:42.586
that this linearization has.

00:01:42.586 --> 00:01:44.847
Let me move this stuff out of the way.

00:01:44.847 --> 00:01:46.452
We'll get back to it in a moment, um, but

00:01:46.452 --> 00:01:47.823
I just wanna emphasize

00:01:47.823 --> 00:01:49.174
a few properties that this has

00:01:49.174 --> 00:01:50.710
because it's gonna be
properties that we want

00:01:50.710 --> 00:01:53.154
our quadratic approximation
to have as well.

00:01:53.154 --> 00:01:56.396
First of all, when you
actually evaluate this function

00:01:56.396 --> 00:01:59.979
at the desired point, at x knot, y knot,

00:02:01.260 --> 00:02:02.868
what do you get?

00:02:02.868 --> 00:02:05.124
Well, this constant term isn't influenced

00:02:05.124 --> 00:02:08.261
by the variable, so you'll just get that f

00:02:08.261 --> 00:02:10.314
evaluated at those points

00:02:10.314 --> 00:02:11.564
x knot, y knot.

00:02:12.429 --> 00:02:14.260
And now the rest of the terms.

00:02:14.260 --> 00:02:15.093
When we plug-in x here,

00:02:15.093 --> 00:02:16.837
this is the only place where
you actually see the variable.

00:02:16.837 --> 00:02:18.380
Maybe that's worth pointing out, right?

00:02:18.380 --> 00:02:19.646
We've got two variables here

00:02:19.646 --> 00:02:20.816
and there's a lot going on,

00:02:20.816 --> 00:02:23.082
but the only places where you
actually see those variables

00:02:23.082 --> 00:02:25.442
show up where you have
to plug-in anything, um,

00:02:25.442 --> 00:02:27.222
is over here and over here.

00:02:27.222 --> 00:02:30.098
When you plug-in x knot
for our, our initial input,

00:02:30.098 --> 00:02:33.527
this entire term goes to zero, right?

00:02:33.527 --> 00:02:36.300
And then similarly when you
plug in y knot over here,

00:02:36.300 --> 00:02:38.935
this entire term is gonna go to zero,

00:02:38.935 --> 00:02:41.260
which multiplies out
to zero for everything.

00:02:41.260 --> 00:02:42.271
So what you end up with,

00:02:42.271 --> 00:02:43.656
you don't have to add anything else.

00:02:43.656 --> 00:02:45.357
This is just a fact,

00:02:45.357 --> 00:02:46.294
and this is an important fact

00:02:46.294 --> 00:02:47.332
cause it tells you your,

00:02:47.332 --> 00:02:49.339
your approximation for the function

00:02:49.339 --> 00:02:51.557
at the point about which
you are approximating,

00:02:51.557 --> 00:02:53.669
actually equals the value of
the function at that point.

00:02:53.669 --> 00:02:54.709
So that's very good.

00:02:54.709 --> 00:02:56.451
But we have a couple
other important facts also

00:02:56.451 --> 00:02:58.556
because this isn't just
a constant approximation,

00:02:58.556 --> 00:03:00.426
this is doing a little bit more for us.

00:03:00.426 --> 00:03:02.457
If you were to take the partial derivative

00:03:02.457 --> 00:03:06.305
of this linearization
with respect to x, um,

00:03:06.305 --> 00:03:07.948
what do you get?

00:03:07.948 --> 00:03:08.781
What do you get when you actually

00:03:08.781 --> 00:03:10.957
take this partial derivative?

00:03:10.957 --> 00:03:13.030
Well, if you look up at
the original function

00:03:13.030 --> 00:03:14.369
this constant term is nothing,

00:03:14.369 --> 00:03:16.524
so that just corresponds to a zero.

00:03:16.524 --> 00:03:18.772
Over here, this entire thing

00:03:18.772 --> 00:03:22.440
looks like a constant
multiplied by x minus something,

00:03:22.440 --> 00:03:23.736
and if you differentiate this

00:03:23.736 --> 00:03:25.190
with respect to x,

00:03:25.190 --> 00:03:27.368
what you're gonna get
is that constant term,

00:03:27.368 --> 00:03:29.215
which is the partial derivative of f

00:03:29.215 --> 00:03:32.298
evaluated at our, our specific point.

00:03:34.632 --> 00:03:36.699
And then the other term has no Xs in it,

00:03:36.699 --> 00:03:39.327
it's just a y, which as far
as x concerned is a constant.

00:03:39.327 --> 00:03:41.430
So this whole thing would be zero.

00:03:41.430 --> 00:03:42.791
Which means the partial derivative

00:03:42.791 --> 00:03:45.959
with respect to x is equal to the value

00:03:45.959 --> 00:03:48.070
of the partial derivative
of our original function

00:03:48.070 --> 00:03:49.947
with respect to x at that point.

00:03:49.947 --> 00:03:51.535
Now notice, this is not saying

00:03:51.535 --> 00:03:54.375
that our linearization has
the same partial derivative

00:03:54.375 --> 00:03:56.734
as f everywhere, it's just saying that

00:03:56.734 --> 00:03:59.304
its partial derivative
happens to be a constant

00:03:59.304 --> 00:04:00.731
and the constant that it is,

00:04:00.731 --> 00:04:02.860
is the value of the
partial derivative of f

00:04:02.860 --> 00:04:04.905
at that specific input point.

00:04:04.905 --> 00:04:06.509
And you can do pretty much the same thing,

00:04:06.509 --> 00:04:08.505
and you'll, you'll see that
the partial derivative of the

00:04:08.505 --> 00:04:11.852
linearization with respect
to y is a constant,

00:04:11.852 --> 00:04:13.683
and the constant that it happens to be

00:04:13.683 --> 00:04:15.959
is the value of the
partial derivative of f

00:04:15.959 --> 00:04:18.534
evaluated at that desired point.

00:04:18.534 --> 00:04:19.718
So these are three facts.

00:04:19.718 --> 00:04:21.190
You know the, the value of the

00:04:21.190 --> 00:04:22.579
linearization at the point,

00:04:22.579 --> 00:04:25.175
and the value of its two
different partial derivatives.

00:04:25.175 --> 00:04:27.918
And these kind of define
the linearization itself.

00:04:27.918 --> 00:04:30.264
Now what we're gonna do for
the quadratic approximation

00:04:30.264 --> 00:04:31.986
is take this entire formula,

00:04:31.986 --> 00:04:34.132
and I'm just literally gonna copy it here,

00:04:34.132 --> 00:04:35.415
and then we're gonna add to it

00:04:35.415 --> 00:04:37.909
so that the second partial
differential information

00:04:37.909 --> 00:04:41.638
of our approximation matches
that of the original function.

00:04:41.638 --> 00:04:42.696
Okay, that's kind of a mouthful,

00:04:42.696 --> 00:04:44.951
but it'll become clear as I actually, um,

00:04:44.951 --> 00:04:46.411
as I actually work it out.

00:04:46.411 --> 00:04:48.762
Now, let me just kinda clean it up

00:04:48.762 --> 00:04:50.363
at least a little bit here.

00:04:50.363 --> 00:04:51.783
Um, so what we're gonna do is we're gonna

00:04:51.783 --> 00:04:53.610
extend this, and I'm gonna change its name

00:04:53.610 --> 00:04:56.084
because I don't want it to
be a linear function anymore.

00:04:56.084 --> 00:04:58.623
What I want is for this to
be a quadratic function,

00:04:58.623 --> 00:05:01.704
so instead, I'm gonna call it q of x, y.

00:05:01.704 --> 00:05:03.447
And now we're gonna add some terms,

00:05:03.447 --> 00:05:05.567
and what I could do, what I could do

00:05:05.567 --> 00:05:07.228
is add, you know, a constant

00:05:07.228 --> 00:05:09.641
times x squared, since that's
something we're allowed,

00:05:09.641 --> 00:05:12.490
plus some kind of constant times x, y

00:05:12.490 --> 00:05:16.119
and then another constant times y squared.

00:05:16.119 --> 00:05:17.356
But the problem there, is that,

00:05:17.356 --> 00:05:19.761
if I just add these as they are,

00:05:19.761 --> 00:05:21.208
then it might mess things up when I

00:05:21.208 --> 00:05:23.143
plug-in x knot and y knot, right?

00:05:23.143 --> 00:05:23.976
Well it was very important
that when you plug-in

00:05:23.976 --> 00:05:26.770
those values, that you get the

00:05:26.770 --> 00:05:28.179
original value of the function,

00:05:28.179 --> 00:05:29.644
and that the partial derivatives

00:05:29.644 --> 00:05:32.243
of the approximation also
match that of the function.

00:05:32.243 --> 00:05:33.444
And that could mess things up,

00:05:33.444 --> 00:05:34.538
because once you start plugging in

00:05:34.538 --> 00:05:36.019
x knot and y knot over here,

00:05:36.019 --> 00:05:38.303
that might actually mess with the value.

00:05:38.303 --> 00:05:39.725
So we're basically gonna do the same thing

00:05:39.725 --> 00:05:41.198
we did with the linearization,

00:05:41.198 --> 00:05:42.629
where we put in,

00:05:42.629 --> 00:05:44.892
every time we have an
x we kind of attach it,

00:05:44.892 --> 00:05:46.339
we say x minus x knot,

00:05:46.339 --> 00:05:48.016
just to make sure that
we don't mess things up

00:05:48.016 --> 00:05:49.811
when we plug-in x knot.

00:05:49.811 --> 00:05:53.360
So instead, instead of
what I had written there,

00:05:53.360 --> 00:05:57.551
what we're gonna add as
our quadratic approximation

00:05:57.551 --> 00:05:58.683
is some kind of constant,

00:05:58.683 --> 00:06:00.196
and we'll fill in that
constant in a moment,

00:06:00.196 --> 00:06:03.113
times x minus x knot squared,

00:06:04.978 --> 00:06:06.718
and then we're gonna add

00:06:06.718 --> 00:06:08.666
another constant multiplied by

00:06:08.666 --> 00:06:10.083
x minus x knot

00:06:11.674 --> 00:06:13.341
times y minus y knot

00:06:16.151 --> 00:06:18.482
and then that times yet another constant,

00:06:18.482 --> 00:06:21.358
which I'll call c multiplied by

00:06:21.358 --> 00:06:23.275
y minus y knot squared.

00:06:26.157 --> 00:06:27.877
All right, this is quite a lot going on.

00:06:27.877 --> 00:06:29.186
This is a heck of a function

00:06:29.186 --> 00:06:30.727
and these are three
different constants that

00:06:30.727 --> 00:06:32.353
we're gonna try to fill in, um,

00:06:32.353 --> 00:06:33.651
to figure out what they should be

00:06:33.651 --> 00:06:37.058
to most closely approximate
the original function f.

00:06:37.058 --> 00:06:38.980
Now the important part of making this

00:06:38.980 --> 00:06:41.257
x minus x knot and y minus y knot

00:06:41.257 --> 00:06:42.442
is that when we plug-in here,

00:06:42.442 --> 00:06:43.999
when we plug-in, you know,

00:06:43.999 --> 00:06:46.755
x knot for our variable x

00:06:46.755 --> 00:06:49.666
and when we plug-in y
not for our variable y,

00:06:49.666 --> 00:06:51.477
all of this stuff is just gonna go to zero

00:06:51.477 --> 00:06:52.692
and it's gonna cancel out.

00:06:52.692 --> 00:06:55.067
And moreover, when we take
the partial derivatives,

00:06:55.067 --> 00:06:57.051
all of it's gonna go to zero as well.

00:06:57.051 --> 00:06:58.101
And, and we'll see that in a moment,

00:06:58.101 --> 00:07:01.583
maybe I'll just actually
show that right now.

00:07:01.583 --> 00:07:03.711
Or rather, I think I'll
call the video done here

00:07:03.711 --> 00:07:04.544
and then start talking about

00:07:04.544 --> 00:07:07.505
how we fill in these
constants in the next video.

00:07:07.505 --> 00:07:08.869
So I will see you then.


What do quadratic approximations look like

WEBVTT
Kind: captions
Language: en

00:00:00.292 --> 00:00:02.261
- [Voiceover] In the last
couple videos I talked about

00:00:02.261 --> 00:00:04.354
the local linearization of a function.

00:00:04.354 --> 00:00:07.096
And in terms of graphs, there's
a nice interpretation here

00:00:07.096 --> 00:00:09.023
where if you imagine a graph of a function

00:00:09.023 --> 00:00:11.246
and you want to approximate
it near a specific point,

00:00:11.246 --> 00:00:13.706
you picture that point
somewhere on the graph,

00:00:13.706 --> 00:00:14.986
and it doesn't have to be there,

00:00:14.986 --> 00:00:18.263
you know I can choose to be
anywhere else along the graph,

00:00:18.263 --> 00:00:20.175
but if you have some sort
of point and you want

00:00:20.175 --> 00:00:22.063
to approximate the function near there

00:00:22.063 --> 00:00:24.169
you can have another function whose graph

00:00:24.169 --> 00:00:25.913
is just a flat plane,

00:00:25.913 --> 00:00:27.839
and specifically a plane
which is tangent to

00:00:27.839 --> 00:00:29.865
your original graph at that point.

00:00:29.865 --> 00:00:31.496
And that's kind of visually how you

00:00:31.496 --> 00:00:33.311
think about the local linearization.

00:00:33.311 --> 00:00:35.152
And what I'm going to
start doing here in this

00:00:35.152 --> 00:00:36.898
next video and in the ones following,

00:00:36.898 --> 00:00:39.470
is talking about quadratic approximations.

00:00:39.470 --> 00:00:43.303
So quadratic approximations,

00:00:46.037 --> 00:00:49.010
and these, these basically
take these to the next level.

00:00:49.010 --> 00:00:51.508
And first I'll show what
they look like graphically

00:00:51.508 --> 00:00:53.444
and then I'll show you what
it actually means in formulas.

00:00:53.444 --> 00:00:55.990
But graphically instead of
having a plane that's flat,

00:00:55.990 --> 00:00:57.762
you have a few more
parameters to deal with,

00:00:57.762 --> 00:01:00.321
and you can give yourself
some kind of surface that

00:01:00.321 --> 00:01:02.726
hugs the graph a little bit more closely.

00:01:02.726 --> 00:01:04.568
It's still going to be
simpler in terms of formulas,

00:01:04.568 --> 00:01:07.240
it can still be notably simpler
than the original function,

00:01:07.240 --> 00:01:09.282
but this actually hugs it closely.

00:01:09.282 --> 00:01:11.178
And as we move around the point

00:01:11.178 --> 00:01:12.598
that it's approximating here,

00:01:12.598 --> 00:01:14.890
the way that it hugs it
can look pretty different.

00:01:14.890 --> 00:01:17.605
And if you want to
think graphically what a

00:01:17.605 --> 00:01:19.489
quadratic approximation is,

00:01:19.489 --> 00:01:22.414
you can basically say if
you slice this surface,

00:01:22.414 --> 00:01:25.185
this kind of ghostly white
surface in any direction

00:01:25.185 --> 00:01:28.027
it'll look like a parabola of some kind.

00:01:28.027 --> 00:01:29.702
And notice that given that
we're dealing in multiple

00:01:29.702 --> 00:01:32.431
dimensions that can make
things look pretty complicated,

00:01:32.431 --> 00:01:35.271
like this right here, you know
if you slice it kind of in

00:01:35.271 --> 00:01:39.420
this direction, whoa, if you
look at it from this angle

00:01:39.420 --> 00:01:41.881
it kind of looks like
a concave up parabola,

00:01:41.881 --> 00:01:43.330
but if you were looking at it from another

00:01:43.330 --> 00:01:45.453
direction it kind of looks concave down,

00:01:45.453 --> 00:01:46.903
and all-in-all you get
a surface that actually

00:01:46.903 --> 00:01:49.364
has quite a bit of
information carried within it.

00:01:49.364 --> 00:01:52.752
And you can see that by
hugging the graph very closely

00:01:52.752 --> 00:01:55.185
this approximation is going to be,

00:01:55.185 --> 00:01:56.788
well, it's going to be even closer,

00:01:56.788 --> 00:01:59.038
because near the point
where you're approximating

00:01:59.038 --> 00:02:00.262
you can go out, you know,

00:02:00.262 --> 00:02:01.767
you can take a couple steps away

00:02:01.767 --> 00:02:03.071
and the approximation is still going to

00:02:03.071 --> 00:02:04.702
be very close to what the graph is,

00:02:04.702 --> 00:02:06.249
and it's only when you
step really far away from

00:02:06.249 --> 00:02:08.431
the original point that the approximation

00:02:08.431 --> 00:02:11.059
starts to deviate away
from the graph itself.

00:02:11.059 --> 00:02:12.662
So this is going to be
something that although

00:02:12.662 --> 00:02:14.237
it takes more information to describe than

00:02:14.237 --> 00:02:15.842
a local linearization it gives

00:02:15.842 --> 00:02:17.824
us a much closer approximation.

00:02:17.824 --> 00:02:19.764
So a linear function which, you know,

00:02:19.764 --> 00:02:22.042
one that just draws a plane like this,

00:02:22.042 --> 00:02:23.660
in terms of actual
function what this means,

00:02:23.660 --> 00:02:25.327
so kind of a linear,

00:02:27.007 --> 00:02:31.423
this is going to be some
kind of function of x and y,

00:02:31.423 --> 00:02:33.697
and what it looks like
is some kind of constant,

00:02:33.697 --> 00:02:37.888
which I'll say a plus another
constant times the variable x,

00:02:37.888 --> 00:02:40.504
plus another constant
times the variable y,

00:02:40.504 --> 00:02:43.148
this is sort of the basic
form of linear functions.

00:02:43.148 --> 00:02:44.947
And technically this isn't
linear if one is going

00:02:44.947 --> 00:02:46.677
to be really pedantic
and they would say that

00:02:46.677 --> 00:02:50.024
that's actually affine,
because I'm strictly speaking

00:02:50.024 --> 00:02:52.106
linear functions shouldn't
have this constant term,

00:02:52.106 --> 00:02:54.004
it should be purely x's and y's,

00:02:54.004 --> 00:02:55.650
but in the context of approximations

00:02:55.650 --> 00:02:58.969
people would usually
call this a linear term.

00:02:58.969 --> 00:03:01.528
So quadratic term, what
this is going to look like,

00:03:01.528 --> 00:03:04.482
quadratic,

00:03:04.482 --> 00:03:07.055
we are allowed to have all
the same terms as that linear

00:03:07.055 --> 00:03:09.123
one, so you can have constant,

00:03:09.123 --> 00:03:12.540
you can have these two
linear terms bx and cy,

00:03:12.540 --> 00:03:14.509
and then you're allowed
to have anything that

00:03:14.509 --> 00:03:16.843
has two variables multiplied into it.

00:03:16.843 --> 00:03:20.823
So maybe I'll have d times x squared,

00:03:20.823 --> 00:03:23.763
and then you can also
have something times xy,

00:03:23.763 --> 00:03:25.394
this is considered a quadratic term.

00:03:25.394 --> 00:03:26.463
Which is a little bit weird at first,

00:03:26.463 --> 00:03:28.263
because usually we think
of quadratics as associated

00:03:28.263 --> 00:03:29.992
with that exponent two,

00:03:29.992 --> 00:03:31.553
but really it's just saying any time

00:03:31.553 --> 00:03:33.691
you have two variables multiplied in,

00:03:33.691 --> 00:03:35.759
and then we can add some other constants,

00:03:35.759 --> 00:03:38.038
say f times y squared.

00:03:38.038 --> 00:03:40.666
Where, you know, now we're
multiplying two y's into it.

00:03:40.666 --> 00:03:42.635
So all of these guys,
these are what you would

00:03:42.635 --> 00:03:44.422
call your quadratic terms.

00:03:44.422 --> 00:03:47.178
Things that either x squared,
y squared, or x times y,

00:03:47.178 --> 00:03:48.936
anything that has two variables in it.

00:03:48.936 --> 00:03:50.441
So you can see this gives
us a lot more control

00:03:50.441 --> 00:03:53.183
because previously, as
we tweaked the constants

00:03:53.183 --> 00:03:56.428
a, b, and c, you're able to give yourself,

00:03:56.428 --> 00:03:58.475
you know, that gives you
control over all sorts

00:03:58.475 --> 00:04:00.472
of planes in space, and
if you choose the most

00:04:00.472 --> 00:04:02.314
optimal one you'll get
one that's tangent to

00:04:02.314 --> 00:04:04.283
your curve at this specific point,

00:04:04.283 --> 00:04:06.294
and kind of, it'll depend
on where that point is,

00:04:06.294 --> 00:04:08.208
you'll get different planes,
but they're all tangent.

00:04:08.208 --> 00:04:10.781
So what we're going to do in
the next couple of videos,

00:04:10.781 --> 00:04:13.241
is talk about how you tweak all of these

00:04:13.241 --> 00:04:16.125
six different constants so
that you can get functions

00:04:16.125 --> 00:04:18.909
that really closely hug the curve, right?

00:04:18.909 --> 00:04:20.619
And as you, and they're
all going to depend on the

00:04:20.619 --> 00:04:22.708
original point because as
you move that point around,

00:04:22.708 --> 00:04:25.394
what it takes to hug the curve
is going to be different.

00:04:25.394 --> 00:04:27.547
It's going to have to do
with partial differential

00:04:27.547 --> 00:04:29.880
information about your original function,

00:04:29.880 --> 00:04:31.455
the function whose graph this is,

00:04:31.455 --> 00:04:33.114
and it's going to look pretty similar to

00:04:33.114 --> 00:04:34.619
the local linearization case,

00:04:34.619 --> 00:04:36.504
just you know, added complexity so we have

00:04:36.504 --> 00:04:38.543
to add a few more steps in there.

00:04:38.543 --> 00:04:40.911
And I'll see you next
video talking about that.