WEBVTT

00:00:00.770 --> 00:00:02.500
GILBERT STRANG: OK.

00:00:02.500 --> 00:00:07.480
So can I begin with a few
words about the big picture

00:00:07.480 --> 00:00:11.010
of solving
differential equations?

00:00:11.010 --> 00:00:14.280
So if that was a
nonlinear equation,

00:00:14.280 --> 00:00:17.110
we would go to
computer solutions.

00:00:17.110 --> 00:00:22.500
And Cleve Moler is making
a parallel video series

00:00:22.500 --> 00:00:27.260
about the Matlab suite
of codes for solving

00:00:27.260 --> 00:00:29.420
differential equations.

00:00:29.420 --> 00:00:32.130
Then when that
equation is linear,

00:00:32.130 --> 00:00:36.930
as it is here, with constant
coefficients, as like the 1,

00:00:36.930 --> 00:00:40.610
minus 3, and the
2, we can always

00:00:40.610 --> 00:00:43.040
get a formula for the answer.

00:00:43.040 --> 00:00:45.210
Involves an integral.

00:00:45.210 --> 00:00:49.880
There's still one integral to do
involving the impulse response.

00:00:49.880 --> 00:00:51.690
And you'll see that.

00:00:51.690 --> 00:00:56.080
But there are few, the most
beautiful, the most simple

00:00:56.080 --> 00:01:00.670
equations when the right-hand
side has a special form.

00:01:00.670 --> 00:01:04.980
And that's one
possibility-- t, or t

00:01:04.980 --> 00:01:07.740
squared we could deal
with, or e to the t.

00:01:07.740 --> 00:01:09.390
We'll see all those.

00:01:09.390 --> 00:01:13.920
Then we know what the
solution looks like.

00:01:13.920 --> 00:01:16.910
For example-- first of all,
we know the null solutions,

00:01:16.910 --> 00:01:17.720
of course.

00:01:17.720 --> 00:01:19.840
That's when this is 0.

00:01:19.840 --> 00:01:25.880
And then I just wrote for e to
the st, and I find s could be 1

00:01:25.880 --> 00:01:27.240
or s could be 2.

00:01:27.240 --> 00:01:30.790
Those are two solutions
with right side 0.

00:01:30.790 --> 00:01:33.040
So we can match
initial conditions.

00:01:33.040 --> 00:01:36.040
But we need a
particular solution.

00:01:36.040 --> 00:01:40.040
And that's where this
one is especially simple.

00:01:40.040 --> 00:01:46.860
So the idea is to try the form
we know the solution will have.

00:01:46.860 --> 00:01:55.060
So I'm going to try a
particular solution.

00:01:55.060 --> 00:02:02.190
When I see a t there, I'll want
a t in the particular solution.

00:02:02.190 --> 00:02:04.580
But I also need
the constant term.

00:02:04.580 --> 00:02:09.500
So I'll try a plus bt.

00:02:09.500 --> 00:02:14.670
What I mean by try is put
that into the equation,

00:02:14.670 --> 00:02:16.670
match the left side
and the right side,

00:02:16.670 --> 00:02:18.790
and we have a solution.

00:02:18.790 --> 00:02:21.370
And I'll just go
ahead and do that.

00:02:21.370 --> 00:02:25.760
So there's several--
this video is mostly

00:02:25.760 --> 00:02:30.450
about the list of
possible nice functions.

00:02:30.450 --> 00:02:31.961
And that's one of them.

00:02:31.961 --> 00:02:32.460
OK.

00:02:32.460 --> 00:02:35.050
So if I put that
into the equation,

00:02:35.050 --> 00:02:38.250
the second derivative
is 0 for that.

00:02:38.250 --> 00:02:40.910
So I have minus 3.

00:02:40.910 --> 00:02:44.340
The first derivative is just b.

00:02:44.340 --> 00:02:49.656
Then I have plus 2 times y
itself, which is a plus bt.

00:02:53.080 --> 00:02:56.600
So the left side of the
equation is just this much.

00:02:56.600 --> 00:03:00.470
And it has to equal 4t.

00:03:00.470 --> 00:03:03.610
And that we can make happen.

00:03:03.610 --> 00:03:12.000
I see 2bt and 4t here,
so I want b equal to 2.

00:03:12.000 --> 00:03:16.660
And so when b is 2, then
I have 4t matching 4t.

00:03:16.660 --> 00:03:22.740
And then I have minus
3b plus 2a should be 0.

00:03:22.740 --> 00:03:27.280
Minus 3b plus 2a, the constant
part there we don't want,

00:03:27.280 --> 00:03:28.950
so that should be 0.

00:03:28.950 --> 00:03:33.820
We already know b is 2,
so that's minus 6 plus 2a.

00:03:33.820 --> 00:03:34.620
a is 3.

00:03:37.800 --> 00:03:39.810
a is 3.

00:03:39.810 --> 00:03:44.330
Now, that's perfectly satisfied
by b equal 2a equal 3,

00:03:44.330 --> 00:03:45.750
and that's the answer.

00:03:45.750 --> 00:03:53.770
Correct answer is
b was 2, a was 3,

00:03:53.770 --> 00:03:57.220
and we don't have
to say try anymore.

00:03:57.220 --> 00:03:58.321
We got it.

00:03:58.321 --> 00:03:58.820
Done.

00:04:01.800 --> 00:04:03.350
One other right-hand side.

00:04:03.350 --> 00:04:08.370
Once you get a nice one like
this, you look for more.

00:04:08.370 --> 00:04:10.770
If it was t squared,
we would assume--

00:04:10.770 --> 00:04:14.320
what would we assume if
it was a 4t squared there?

00:04:14.320 --> 00:04:19.160
We would assume a plus
bt plus ct squared.

00:04:19.160 --> 00:04:24.770
We want to match
the right-hand side.

00:04:24.770 --> 00:04:27.440
Now, a different type
of right-hand side

00:04:27.440 --> 00:04:28.840
we know already.

00:04:28.840 --> 00:04:38.520
What if this was e to
the-- say, e to the 3t?

00:04:38.520 --> 00:04:47.880
Or e to the st. Let me put any
exponent there for the moment.

00:04:47.880 --> 00:04:51.370
So now we have a
different right-hand side.

00:04:51.370 --> 00:04:52.730
A very nice function.

00:04:52.730 --> 00:04:55.690
The best function of
differential equations.

00:04:55.690 --> 00:05:03.080
And now what we will try
with this right-hand side,

00:05:03.080 --> 00:05:06.050
e to the st. We've
seen it before.

00:05:06.050 --> 00:05:12.340
The particular solution
is just y e to the st.

00:05:12.340 --> 00:05:18.570
The undetermined coefficients
were a and b in the first time.

00:05:18.570 --> 00:05:20.390
Here the undetermined
coefficient

00:05:20.390 --> 00:05:25.370
is capital Y. I'm just going
to plug that into the equation

00:05:25.370 --> 00:05:27.310
and match the left
side and right side.

00:05:27.310 --> 00:05:32.270
And I'll determine this
coefficient, capital Y.

00:05:32.270 --> 00:05:35.930
So what happens when I put
that into the equation?

00:05:35.930 --> 00:05:38.970
I get second
derivative brings down

00:05:38.970 --> 00:05:45.020
an s squared, and first
derivative, we have a minus 3.

00:05:45.020 --> 00:05:49.725
The first derivative brings
down an s, and I have plus 2.

00:05:52.990 --> 00:05:59.100
All that is Y e
to the st, right?

00:05:59.100 --> 00:06:02.230
I put in Y e to the
st. The derivatives

00:06:02.230 --> 00:06:07.280
brought down this
familiar polynomial.

00:06:07.280 --> 00:06:13.940
And it's all supposed
to match e to the st.

00:06:13.940 --> 00:06:14.830
We can do that.

00:06:14.830 --> 00:06:16.960
That's a perfect match.

00:06:16.960 --> 00:06:20.350
The left side has the same
form as the right side.

00:06:20.350 --> 00:06:23.270
I can cancel the e
to the st's, and I

00:06:23.270 --> 00:06:34.750
discover that Y is 1 over
s squared minus 3s plus 2.

00:06:34.750 --> 00:06:37.420
Good.

00:06:37.420 --> 00:06:41.620
That's the coefficient,
1 over that.

00:06:41.620 --> 00:06:42.230
Let's see.

00:06:42.230 --> 00:06:45.310
I have to make two comments.

00:06:45.310 --> 00:06:52.540
One comment is that s-- we're
totally golden if that s

00:06:52.540 --> 00:06:54.240
is imaginary.

00:06:54.240 --> 00:06:58.920
If s is i omega,
well, minus i omega,

00:06:58.920 --> 00:07:01.770
or both, both
possibilities, those

00:07:01.770 --> 00:07:05.530
will give us sine and cosine.

00:07:05.530 --> 00:07:08.190
So we'll add those
to the nice function.

00:07:08.190 --> 00:07:13.310
So the nice functions
are t, polynomials.

00:07:13.310 --> 00:07:18.730
E to the st, exponentials.

00:07:18.730 --> 00:07:20.860
Sines and cosines.

00:07:20.860 --> 00:07:24.240
And you see this
worked perfectly.

00:07:24.240 --> 00:07:28.330
Well, perfectly except
we have to be sure

00:07:28.330 --> 00:07:30.720
that we don't have 1/0.

00:07:30.720 --> 00:07:32.770
When would we have 1/0?

00:07:32.770 --> 00:07:38.090
If s is 1, this would be 1 minus
3 plus 2, that would be 1/0.

00:07:40.650 --> 00:07:48.700
I can't deal with s equal
1 with that assumption.

00:07:48.700 --> 00:07:50.230
Doesn't work.

00:07:50.230 --> 00:07:51.750
Also, s equal 2.

00:07:51.750 --> 00:07:55.290
What's special about s
equal 1 and s equal 2?

00:07:55.290 --> 00:07:58.240
Those make that 0.

00:07:58.240 --> 00:08:01.680
They give the null solutions.

00:08:01.680 --> 00:08:06.330
And I know that if this
happened to be e to the t,

00:08:06.330 --> 00:08:10.430
and a null solution
was also e to the t,

00:08:10.430 --> 00:08:13.930
I have to fix the particular
solution by giving it

00:08:13.930 --> 00:08:15.330
an extra factor t.

00:08:15.330 --> 00:08:17.800
Let me do that at the
end of the lecture.

00:08:17.800 --> 00:08:21.950
That's the resonance idea,
where my null solution

00:08:21.950 --> 00:08:25.980
is the same as what I hope
for the particular solution.

00:08:25.980 --> 00:08:28.740
So I have to change
that particular solution

00:08:28.740 --> 00:08:30.650
with an extra factor t.

00:08:30.650 --> 00:08:33.360
Let me keep going
here to be sure we

00:08:33.360 --> 00:08:35.559
get all the possibilities.

00:08:35.559 --> 00:08:42.250
Again, we're getting a very
small set of nice functions.

00:08:42.250 --> 00:08:47.120
But fortunately, they appear
quite often in applications.

00:08:47.120 --> 00:08:52.120
Constants, linear like
4t, exponentials like e

00:08:52.120 --> 00:08:58.200
to the 5t, oscillation
like e to the i omega t.

00:08:58.200 --> 00:09:00.790
So let me make a list.

00:09:00.790 --> 00:09:08.670
So polynomials, like the
forcing function could be t,

00:09:08.670 --> 00:09:10.920
could be 1.

00:09:10.920 --> 00:09:14.000
Constant, that would
be like a ramp.

00:09:14.000 --> 00:09:19.890
That would be like
a step function.

00:09:19.890 --> 00:09:26.490
They could be 3 to
the st, but not s

00:09:26.490 --> 00:09:30.250
equals 1 and 2 in this problem.

00:09:30.250 --> 00:09:35.210
They could be e to
the i omega t, and e

00:09:35.210 --> 00:09:42.530
to the minus i omega t, which
leads me directly to cosine

00:09:42.530 --> 00:09:47.870
of omega t and sine of omega t.

00:09:47.870 --> 00:09:52.290
I'm creating here a list
of the nice functions--

00:09:52.290 --> 00:09:56.810
polynomials, exponentials,
cosine and sine,

00:09:56.810 --> 00:09:59.310
because those come
from exponentials,

00:09:59.310 --> 00:10:03.550
and finally, I can
multiply these.

00:10:03.550 --> 00:10:11.670
I could have, for example, t e
to the st. I could allow that.

00:10:11.670 --> 00:10:13.760
And now, all I have
to do is tell you,

00:10:13.760 --> 00:10:19.300
what form do I try to plug-in?

00:10:19.300 --> 00:10:22.520
The form will have
undetermined coefficients.

00:10:22.520 --> 00:10:24.590
I'll substitute in
the equation, and I'll

00:10:24.590 --> 00:10:26.520
determine the coefficients.

00:10:26.520 --> 00:10:29.740
So here we saw a plus bt.

00:10:29.740 --> 00:10:31.680
That was good.

00:10:31.680 --> 00:10:39.480
That was the Y. Here we saw
Y e to the st. That was good.

00:10:39.480 --> 00:10:40.840
Here, what will I have?

00:10:43.880 --> 00:10:48.050
If I have cosine, I need
the sine there also.

00:10:48.050 --> 00:10:50.940
So I'll have to allow
a combination of those.

00:10:50.940 --> 00:10:56.230
Say M on this plus N of that.

00:10:56.230 --> 00:10:58.470
If I tried to do
cosines alone, I

00:10:58.470 --> 00:11:02.470
would be in danger of taking
the derivative, getting a sine,

00:11:02.470 --> 00:11:04.740
and having nothing to match.

00:11:04.740 --> 00:11:06.740
So I'll take that.

00:11:06.740 --> 00:11:11.340
Now, final question,
or next question

00:11:11.340 --> 00:11:16.130
is, if I multiply two of these,
the product rule is still

00:11:16.130 --> 00:11:19.480
going to tell me that
derivatives of that

00:11:19.480 --> 00:11:21.830
have the same form as that.

00:11:21.830 --> 00:11:24.230
Derivatives of
this t e to the st

00:11:24.230 --> 00:11:28.910
have the same-- they also
involve t or e to the st,

00:11:28.910 --> 00:11:31.860
with factors s, from
the product rule.

00:11:31.860 --> 00:11:34.070
So what do I assume here?

00:11:34.070 --> 00:11:38.770
Well, when I see t
there, I have to include,

00:11:38.770 --> 00:11:44.290
as I did up there,
also constants.

00:11:44.290 --> 00:11:47.940
And if I saw a t squared,
I would go up to t squared.

00:11:47.940 --> 00:11:49.870
I'd have three coefficients.

00:11:49.870 --> 00:11:53.330
Now, that e to the
st, I can keep.

00:11:56.290 --> 00:11:58.480
So what I've put on
the right-hand side

00:11:58.480 --> 00:12:00.600
is the right form to assume.

00:12:00.600 --> 00:12:03.130
It's just like good advice.

00:12:03.130 --> 00:12:06.490
Put that into the
differential equation when

00:12:06.490 --> 00:12:08.280
this is the right-hand side.

00:12:08.280 --> 00:12:10.700
Match left side
with the right side.

00:12:10.700 --> 00:12:13.980
That will tell you a and b.

00:12:13.980 --> 00:12:15.830
And you have the answer.

00:12:15.830 --> 00:12:17.650
You have the
particular solution.

00:12:17.650 --> 00:12:21.520
You have a particular solution,
and that's what you wanted.

00:12:21.520 --> 00:12:23.370
OK.

00:12:23.370 --> 00:12:27.215
And if I had t
cosine omega t, do

00:12:27.215 --> 00:12:29.340
you want to see in
the whole business?

00:12:29.340 --> 00:12:34.640
If I had t cosine
omega t-- oh dear,

00:12:34.640 --> 00:12:36.593
it's getting a little messy.

00:12:36.593 --> 00:12:47.180
I'd need an a plus bt
to deal with the t.

00:12:47.180 --> 00:12:50.025
And I'd need a cosine
to deal with the cosine.

00:12:53.020 --> 00:12:57.290
And then, just to make the
problem a little messier, can't

00:12:57.290 --> 00:13:00.020
be helped, I'd need the sine.

00:13:00.020 --> 00:13:03.660
So I need a sine omega t.

00:13:03.660 --> 00:13:10.430
And I'm going to need
a c plus dt there.

00:13:10.430 --> 00:13:11.130
OK.

00:13:11.130 --> 00:13:17.460
I'm up to four coefficients
to determine by plugging in.

00:13:17.460 --> 00:13:21.020
It uses more ink, but it
doesn't use more thinking.

00:13:21.020 --> 00:13:24.240
You just put it in,
match all terms,

00:13:24.240 --> 00:13:27.790
and you discover A, B, C, and D.

00:13:27.790 --> 00:13:31.480
Finally, I have to say
that word about resonance

00:13:31.480 --> 00:13:33.370
that I mentioned earlier.

00:13:33.370 --> 00:13:41.560
The possibility that if
s happened to be 1 or 2

00:13:41.560 --> 00:13:46.380
on the right-hand side,
that's also a null solution.

00:13:46.380 --> 00:13:51.830
This method would give me
1/0, infinite answer, no good.

00:13:51.830 --> 00:13:54.260
And we know what to do.

00:13:54.260 --> 00:13:57.170
We know how to deal
with resonance.

00:13:57.170 --> 00:14:00.890
So with resonance-- so could
I just finally complete

00:14:00.890 --> 00:14:02.030
the whole story.

00:14:02.030 --> 00:14:02.530
Resonance.

00:14:07.390 --> 00:14:12.020
In this example, s equal 1 or 2.

00:14:15.080 --> 00:14:22.190
What would I do with f
of t equals e to the t?

00:14:22.190 --> 00:14:26.540
If that was the right-hand side,
that would give me resonance.

00:14:26.540 --> 00:14:30.520
It's got the exponent
s equal 1, which

00:14:30.520 --> 00:14:35.730
is also in the null
solution, e to the t.

00:14:35.730 --> 00:14:37.420
So what do I try?

00:14:37.420 --> 00:14:42.960
So I try-- everybody knows what
happens when there's resonance.

00:14:42.960 --> 00:14:45.110
When you have this doubling up.

00:14:45.110 --> 00:14:48.470
You need an extra
factor t to rescue.

00:14:48.470 --> 00:14:51.810
So you would try y of t.

00:14:51.810 --> 00:14:55.100
y, this is the particular
solution I'm looking for.

00:14:55.100 --> 00:15:02.790
You would try t e
to the t, with a Y.

00:15:02.790 --> 00:15:06.650
And you would plug that in.

00:15:06.650 --> 00:15:10.170
You would find the right
number for capital Y.

00:15:10.170 --> 00:15:12.940
And you'd have the
particular solution.

00:15:12.940 --> 00:15:16.220
Only, I think, doing a
few examples of this,

00:15:16.220 --> 00:15:19.970
you get the knack of
assume the right form,

00:15:19.970 --> 00:15:24.130
put it into the equation, match
left side with right side,

00:15:24.130 --> 00:15:27.660
and that reveals the
undetermined coefficients.

00:15:27.660 --> 00:15:32.590
It tells you what a and b
and capital Y and c and d,

00:15:32.590 --> 00:15:34.740
tells you what they
all have to be.

00:15:34.740 --> 00:15:37.420
So this is a really
good method that

00:15:37.420 --> 00:15:42.560
applies to really
nice right-hand sides.

00:15:42.560 --> 00:15:43.060
Good.

00:15:43.060 --> 00:15:44.610
Thanks.