WEBVTT
00:00:01.399 --> 00:00:02.940
GILBERT STRANG: OK,
this is the video
00:00:02.940 --> 00:00:06.350
about two neat functions--
the step function
00:00:06.350 --> 00:00:09.430
and its derivative
the delta function.
00:00:09.430 --> 00:00:11.840
So if I can just introduce
you to those functions
00:00:11.840 --> 00:00:15.130
and show you that
they're very natural
00:00:15.130 --> 00:00:18.700
inputs to a
differential equation.
00:00:18.700 --> 00:00:22.290
They happen all the
time in real life.
00:00:22.290 --> 00:00:27.340
And so we need to understand
how to compute these formulas
00:00:27.340 --> 00:00:28.830
and compute with them.
00:00:28.830 --> 00:00:33.650
OK, so the first one is the step
function and it's-- I'll call
00:00:33.650 --> 00:00:38.600
it h after its inventor who was
an engineer named Heaviside,
00:00:38.600 --> 00:00:41.940
started with an H.
And the step function,
00:00:41.940 --> 00:00:43.790
let me write the formula.
00:00:43.790 --> 00:00:54.990
h of t is 0 for t negative and
1 for t greater or equal to 0.
00:00:54.990 --> 00:00:56.260
OK.
00:00:56.260 --> 00:00:58.200
So, that's the step function.
00:00:58.200 --> 00:01:01.450
It just has two values
and it has a jump.
00:01:01.450 --> 00:01:03.740
You could say jump
function also.
00:01:03.740 --> 00:01:06.050
Jump function, step function.
00:01:06.050 --> 00:01:06.840
All right.
00:01:06.840 --> 00:01:12.680
And notice I've also graphed
the shifted step function.
00:01:12.680 --> 00:01:16.580
What happens to any
function including this one
00:01:16.580 --> 00:01:23.670
if I change from t, which
jumps at 0, to h of t minus t?
00:01:23.670 --> 00:01:33.400
If I put in t minus some fixed
number t as the variable, then
00:01:33.400 --> 00:01:35.940
the jump happens.
00:01:35.940 --> 00:01:38.930
So the jump will
happen when this is 0.
00:01:38.930 --> 00:01:41.210
Step functions
jump when that's 0.
00:01:41.210 --> 00:01:44.500
And that's 0 at t equal to t.
00:01:44.500 --> 00:01:46.470
So the jump in dotted line.
00:01:46.470 --> 00:01:54.140
So the shifted step function
will just shift over.
00:01:54.140 --> 00:01:57.360
That's the complete
effect of changing from t
00:01:57.360 --> 00:02:01.260
to t minus a capital T, is
just to shift the whole thing
00:02:01.260 --> 00:02:03.740
by capital T. OK.
00:02:03.740 --> 00:02:09.520
So you keep your eye on the
standard step function, which
00:02:09.520 --> 00:02:11.455
jumps at t equals 0.
00:02:11.455 --> 00:02:13.750
It jumps by 1.
00:02:13.750 --> 00:02:16.120
And take its derivative.
00:02:16.120 --> 00:02:18.490
So what's the derivative
of this step function?
00:02:18.490 --> 00:02:22.760
Well, the function is 0 along
there, so the derivative is 0.
00:02:22.760 --> 00:02:25.390
The function is
constant along here,
00:02:25.390 --> 00:02:27.640
so the derivative is again 0.
00:02:27.640 --> 00:02:31.470
It's just at this one
point everything happens.
00:02:31.470 --> 00:02:34.700
So now this is the
delta function.
00:02:34.700 --> 00:02:43.190
The delta function runs
along at 0, continues at 0,
00:02:43.190 --> 00:02:49.440
but at t at 0, the
whole thing explodes.
00:02:49.440 --> 00:02:52.590
The derivative is infinite.
00:02:52.590 --> 00:02:54.710
You see an infinite slope there.
00:02:54.710 --> 00:03:01.410
And the point is infinity is
not a sufficiently precise word
00:03:01.410 --> 00:03:03.940
to tell you exactly
what's happening.
00:03:03.940 --> 00:03:07.840
So we don't have really--
this graph of a delta function
00:03:07.840 --> 00:03:11.180
is not fully satisfactory.
00:03:11.180 --> 00:03:15.220
It's perfect for all the
uninteresting boring part.
00:03:15.220 --> 00:03:19.310
But at the moment of
truth, when something
00:03:19.310 --> 00:03:25.490
happens in an instant,
we need to say more.
00:03:25.490 --> 00:03:28.500
We need to say more,
not just its infinite.
00:03:28.500 --> 00:03:32.560
And again, if it's shifted,
then the infinite slope
00:03:32.560 --> 00:03:37.310
happens at t equal a
capital T. So the infinity
00:03:37.310 --> 00:03:39.230
is just shifted over.
00:03:39.230 --> 00:03:41.200
And that'd be the
delta function there.
00:03:41.200 --> 00:03:43.410
So this is what I would use.
00:03:43.410 --> 00:03:47.160
If that was the source term
in my differential equation,
00:03:47.160 --> 00:03:48.700
what would that mean?
00:03:48.700 --> 00:03:52.020
If this was the q of
t in the differential
00:03:52.020 --> 00:03:58.870
equation reflecting
input at different times,
00:03:58.870 --> 00:04:04.150
that function would say no input
except at one moment and one
00:04:04.150 --> 00:04:08.890
instant, capital T. At
that instant of time,
00:04:08.890 --> 00:04:12.050
you put 1 in, over
in an instant.
00:04:12.050 --> 00:04:15.020
And remember, that
otherwise q of t
00:04:15.020 --> 00:04:18.000
has been a continuous input.
00:04:18.000 --> 00:04:24.020
Put in $1.00 per year
over the whole year.
00:04:24.020 --> 00:04:27.980
This one puts in
$1.00 at one moment.
00:04:27.980 --> 00:04:30.880
But of course, you see that
that's really what we do.
00:04:30.880 --> 00:04:35.070
So, you see that that's
a function we need
00:04:35.070 --> 00:04:37.450
to do things in an instant.
00:04:37.450 --> 00:04:44.910
And as I took the example of a
golf club hitting a golf ball,
00:04:44.910 --> 00:04:47.590
well, it's not quite 0 time.
00:04:47.590 --> 00:04:51.790
But it's so close to zero time
that the two are connected.
00:04:51.790 --> 00:04:53.680
And then the ball takes off.
00:04:53.680 --> 00:04:57.300
And so a simple model,
a workable model
00:04:57.300 --> 00:05:02.660
is to say it happens in 0
time with a delta function.
00:05:02.660 --> 00:05:07.230
So I really want to
use delta functions.
00:05:07.230 --> 00:05:10.070
And they're not
difficult to use.
00:05:10.070 --> 00:05:13.010
They're just not quite
perfect for calculus
00:05:13.010 --> 00:05:18.530
because the derivative
of the step function
00:05:18.530 --> 00:05:24.670
is not quite
legitimate at the jump.
00:05:24.670 --> 00:05:25.590
OK.
00:05:25.590 --> 00:05:33.350
But what you can do, the part
of calculus that works correctly
00:05:33.350 --> 00:05:34.990
is integration.
00:05:34.990 --> 00:05:38.360
Integration tends to
make things smoother.
00:05:38.360 --> 00:05:42.210
The delta function--
sorry, the step function
00:05:42.210 --> 00:05:44.120
is the integral of
the delta function.
00:05:44.120 --> 00:05:45.040
Right?
00:05:45.040 --> 00:05:47.020
We're going in the
opposite direction.
00:05:47.020 --> 00:05:50.890
We take derivatives,
we get craziness.
00:05:50.890 --> 00:05:54.420
If we take integrals
to go from delta--
00:05:54.420 --> 00:05:57.120
so the integral of the
delta is the step function.
00:05:57.120 --> 00:05:59.820
And that's really how you
know a delta function.
00:05:59.820 --> 00:06:03.860
That's the math way to
describe more exactly
00:06:03.860 --> 00:06:08.540
than this arrow that just fires
off what the delta function is
00:06:08.540 --> 00:06:09.250
doing.
00:06:09.250 --> 00:06:11.750
So the key property
of the delta function
00:06:11.750 --> 00:06:13.920
is to know what
it's integral is.
00:06:13.920 --> 00:06:19.520
The integral of
the delta function
00:06:19.520 --> 00:06:22.910
is the total deposit
over, let's say,
00:06:22.910 --> 00:06:27.090
it started-- time could have
started even at minus infinity,
00:06:27.090 --> 00:06:30.560
and it could go on
forever to plus infinity.
00:06:30.560 --> 00:06:33.900
So that's the total
deposit, the total input
00:06:33.900 --> 00:06:37.330
coming from this
source term delta of t.
00:06:37.330 --> 00:06:39.330
And what is the answer?
00:06:39.330 --> 00:06:45.080
Well, the integral of delta
should be the step function.
00:06:45.080 --> 00:06:47.820
The step function
out in infinity is 1.
00:06:47.820 --> 00:06:50.100
Back at minus infinity it's 0.
00:06:50.100 --> 00:06:51.850
Do you see what I'm saying here?
00:06:51.850 --> 00:06:58.300
This would be h of t evaluated
between t equal minus
00:06:58.300 --> 00:07:02.270
infinity and plus
infinity because those
00:07:02.270 --> 00:07:04.400
are the limits of integration.
00:07:04.400 --> 00:07:07.220
And what do I get?
00:07:07.220 --> 00:07:10.900
At plus infinity the
step function is 1.
00:07:10.900 --> 00:07:12.440
This is 0.
00:07:12.440 --> 00:07:14.120
So I get 1.
00:07:14.120 --> 00:07:17.900
And everybody catches
on to that key fact
00:07:17.900 --> 00:07:22.960
that the total integral of
the delta function is 1.
00:07:22.960 --> 00:07:25.750
Again, you only made the
deposit at one moment,
00:07:25.750 --> 00:07:29.560
but that deposit
was a full dollar.
00:07:29.560 --> 00:07:35.880
And that, adding up all
deposits is just that $1.00.
00:07:35.880 --> 00:07:41.330
So, that's the integral
of the delta function.
00:07:41.330 --> 00:07:43.740
Now actually, to use
delta functions I
00:07:43.740 --> 00:07:48.520
need to give you a slight
generalization of that.
00:07:48.520 --> 00:07:52.640
So as I say, delta
functions are really
00:07:52.640 --> 00:07:55.510
known-- we don't like to
take their derivative.
00:07:55.510 --> 00:07:57.490
The derivative of
a delta function
00:07:57.490 --> 00:08:00.515
is a truly crazy function.
00:08:00.515 --> 00:08:03.165
It shoots up to
infinity and then
00:08:03.165 --> 00:08:04.920
it shoots down the
minus infinity,
00:08:04.920 --> 00:08:07.650
the slope of that arrow.
00:08:07.650 --> 00:08:12.010
But it's integrals that we want.
00:08:12.010 --> 00:08:15.780
So now let me integrate
from minus infinity
00:08:15.780 --> 00:08:19.370
to infinity my
delta function times
00:08:19.370 --> 00:08:23.495
any other function,
say f of t dt.
00:08:26.970 --> 00:08:29.670
That's something we'll
need to be able to compute.
00:08:29.670 --> 00:08:32.840
What's the right
integral for that?
00:08:32.840 --> 00:08:35.659
And again, delta
is doing everything
00:08:35.659 --> 00:08:38.730
at one moment at t equals 0.
00:08:38.730 --> 00:08:42.750
At that moment t equals 0,
at that moment when t is 0
00:08:42.750 --> 00:08:46.510
and that's the only place any
action is happening, f of t
00:08:46.510 --> 00:08:48.230
is f of 0.
00:08:48.230 --> 00:08:52.910
It's whatever value it has
at that point t equals 0.
00:08:52.910 --> 00:08:54.870
And that's the answer.
00:08:54.870 --> 00:08:58.250
f of 0.
00:08:58.250 --> 00:09:01.810
So if f of t was the
constant function 1,
00:09:01.810 --> 00:09:04.770
then we're back to
our integral up there.
00:09:04.770 --> 00:09:07.770
If that's just 1, I'm
integrating delta of t.
00:09:07.770 --> 00:09:10.670
My function is 1, I get 1.
00:09:10.670 --> 00:09:16.990
But if that function is,
suppose that function is sine t.
00:09:16.990 --> 00:09:21.820
What's the integral of
delta of t times sine t dt?
00:09:21.820 --> 00:09:27.650
Well, sine t happens to
disappear just at the moment
00:09:27.650 --> 00:09:32.460
when the delta function is
ready to turn on at t equals 0.
00:09:32.460 --> 00:09:41.300
So the integral of delta of
t sine t is sine of 0 is 0.
00:09:41.300 --> 00:09:47.440
You have one term turned on,
but the other term turned off.
00:09:47.440 --> 00:09:49.990
So nothing happened altogether.
00:09:49.990 --> 00:09:53.240
Whereas the integral of
delta t e to the t-- yeah,
00:09:53.240 --> 00:09:54.340
tell me that one.
00:09:54.340 --> 00:09:57.920
The integral of
delta t e to the t dt
00:09:57.920 --> 00:10:00.930
is-- well e to the t is
doing all sorts of stuff
00:10:00.930 --> 00:10:02.230
for all time.
00:10:02.230 --> 00:10:05.470
But the delta function
is 0 all that time,
00:10:05.470 --> 00:10:07.390
except at t equals 0.
00:10:07.390 --> 00:10:10.960
So, the integral of
delta t e to the t dt
00:10:10.960 --> 00:10:16.380
would be 1 because at
that moment, t equals 0,
00:10:16.380 --> 00:10:23.080
the only important moment
would be e to the t function
00:10:23.080 --> 00:10:25.360
is e to the 0, and it's just 1.
00:10:25.360 --> 00:10:28.210
Let me ask you for
another example.
00:10:28.210 --> 00:10:32.200
The integral of minus infinity
to infinity of delta--
00:10:32.200 --> 00:10:38.930
let me use the shifted
delta e to the t dt.
00:10:38.930 --> 00:10:41.430
Can you compute that integral.
00:10:41.430 --> 00:10:46.790
Well again, that function
is 0 almost all the time.
00:10:46.790 --> 00:10:50.990
The only time that impulse, the
moment that impulse hits is t
00:10:50.990 --> 00:10:54.560
equals capital T.
At that moment,
00:10:54.560 --> 00:10:57.320
this is equal to e
to the capital T.
00:10:57.320 --> 00:11:00.260
And that's all that matters.
00:11:00.260 --> 00:11:01.480
OK.
00:11:01.480 --> 00:11:09.290
So now, let me use a delta
function as the source term
00:11:09.290 --> 00:11:11.690
in our differential equation.
00:11:11.690 --> 00:11:14.990
So we are seeing one
last time one more--
00:11:14.990 --> 00:11:18.200
I still call it a
nice function, even
00:11:18.200 --> 00:11:21.710
though it's not legitimately
a function at all, the delta.
00:11:21.710 --> 00:11:27.250
But let me solve
the equation dy dt
00:11:27.250 --> 00:11:33.160
equals ay plus the
delta function turned on
00:11:33.160 --> 00:11:38.095
at capital T. And let
me start it from 0.
00:11:41.280 --> 00:11:44.810
So I don't make an initial
deposit to my account.
00:11:44.810 --> 00:11:49.380
I don't make any deposit at all,
except at one moment t equal
00:11:49.380 --> 00:11:54.180
capital T. And in that moment,
I deposit $1.00 because delta--
00:11:54.180 --> 00:11:55.490
this is the unit delta.
00:11:55.490 --> 00:11:59.610
If I was depositing $10,
I would make it 10 delta.
00:11:59.610 --> 00:12:00.410
OK.
00:12:00.410 --> 00:12:07.290
So we know what the solution
is from a deposit of $1.00 made
00:12:07.290 --> 00:12:11.980
at one time, t equal to capital
T. What is the solution?
00:12:11.980 --> 00:12:23.405
y of t, we have 0 up to t
equal to T. Nothing whatever
00:12:23.405 --> 00:12:25.530
has happened.
00:12:25.530 --> 00:12:32.540
And at capital T time t, in
goes the $1.00 and it grows.
00:12:32.540 --> 00:12:38.120
It grows so that it
grows over the remaining
00:12:38.120 --> 00:12:43.430
time e to the t
minus capital T. This
00:12:43.430 --> 00:12:50.420
is for t larger than T. t larger
than or equal I could say.
00:12:50.420 --> 00:12:54.060
When t and capital T are
equal, that's e to the 0.
00:12:54.060 --> 00:12:58.470
That's our $1.00 just gone in.
00:12:58.470 --> 00:13:06.670
When t minus capital T is a year
later, our dollar is worth e.
00:13:06.670 --> 00:13:11.120
When t minus capital T, when
it's been in there for a year,
00:13:11.120 --> 00:13:15.050
that $1.00 has
increased to-- well,
00:13:15.050 --> 00:13:18.880
that was if the interest
rate was 100% you may feel.
00:13:18.880 --> 00:13:20.800
You'd be fortunate to get that.
00:13:20.800 --> 00:13:22.330
But let's suppose you do.
00:13:22.330 --> 00:13:27.520
At 100% interest,
after one year, you
00:13:27.520 --> 00:13:30.270
might say, well, my
money just doubled
00:13:30.270 --> 00:13:32.970
because I got the interest
equaled the original.
00:13:32.970 --> 00:13:33.860
So I got twice it.
00:13:33.860 --> 00:13:38.610
But not true because that
money went in-- was growing.
00:13:38.610 --> 00:13:41.180
Interest was being
added, compounded
00:13:41.180 --> 00:13:44.970
through the whole year
so that after one year,
00:13:44.970 --> 00:13:50.980
starting with 1, you
have e at a is 100%.
00:13:50.980 --> 00:13:52.280
Oh, OK.
00:13:52.280 --> 00:13:57.630
My formula isn't incorrect
here because I had an a here
00:13:57.630 --> 00:13:58.860
and it belongs here.
00:13:58.860 --> 00:14:00.940
So let me fix that.
00:14:00.940 --> 00:14:09.270
It's e to the a t minus T.
That's the growth factor.
00:14:09.270 --> 00:14:11.780
That's the growth
factor up to time t
00:14:11.780 --> 00:14:15.940
starting from the
earlier time capital T.
00:14:15.940 --> 00:14:18.210
So you see that
we were able just
00:14:18.210 --> 00:14:22.580
to write down the solution
to the differential equation
00:14:22.580 --> 00:14:29.900
even though it's entirely new
or different or non-standard
00:14:29.900 --> 00:14:31.620
input.
00:14:31.620 --> 00:14:36.780
The step function input--
so we're finding here
00:14:36.780 --> 00:14:39.440
the impulse response.
00:14:39.440 --> 00:14:41.800
That's a very, very
important concept
00:14:41.800 --> 00:14:45.410
in engineering, the
impulse response,
00:14:45.410 --> 00:14:48.020
the response to an impulse.
00:14:48.020 --> 00:14:51.420
And for second order
differential equations,
00:14:51.420 --> 00:14:56.100
this is going to be-- it's
really a crucial function
00:14:56.100 --> 00:14:58.300
in the subject.
00:14:58.300 --> 00:15:03.540
So this is the
response to an impulse.
00:15:03.540 --> 00:15:08.140
It's the impulse response
from our standard first order
00:15:08.140 --> 00:15:10.700
equation that we've
been dealing with.
00:15:10.700 --> 00:15:14.020
Now we've got just
to remember one more
00:15:14.020 --> 00:15:18.230
step is still linear would
be to allow the interest
00:15:18.230 --> 00:15:19.780
rate to change.
00:15:19.780 --> 00:15:22.920
That's one lecture,
the next one.
00:15:22.920 --> 00:15:26.220
And then we get
non-linear equations.
00:15:26.220 --> 00:15:27.630
So that's what's coming.
00:15:27.630 --> 00:15:32.340
But here is delta functions
for the first time and not
00:15:32.340 --> 00:15:34.250
for the last time.
00:15:34.250 --> 00:15:36.000
Thank you.