WEBVTT
00:00:00.250 --> 00:00:01.290
GILBERT STRANG: OK?
00:00:01.290 --> 00:00:04.710
I want to talk about a
slightly different way
00:00:04.710 --> 00:00:09.560
to solve a linear
first-order equation.
00:00:09.560 --> 00:00:13.020
And if you look at the
equation-- I'll do an example.
00:00:13.020 --> 00:00:13.850
That's the best.
00:00:13.850 --> 00:00:19.380
Do you notice what's different
from our favorite equation?
00:00:19.380 --> 00:00:21.790
The change is 2t.
00:00:21.790 --> 00:00:26.960
The interest rate a is
increasing with time,
00:00:26.960 --> 00:00:28.590
changing with time.
00:00:28.590 --> 00:00:32.659
So we still have a linear
equation, still just y.
00:00:32.659 --> 00:00:36.350
But the coefficient is varying.
00:00:36.350 --> 00:00:39.860
We have a variable
coefficient 2t.
00:00:39.860 --> 00:00:46.240
And if we think here of
applications to economy,
00:00:46.240 --> 00:00:50.965
to banks, that would
be rampant inflation,
00:00:50.965 --> 00:00:55.440
the interest rate 2t climbing
and climbing forever.
00:00:55.440 --> 00:01:00.150
But we want to see that
this is a class of equations
00:01:00.150 --> 00:01:02.070
that we can solve.
00:01:02.070 --> 00:01:02.850
OK.
00:01:02.850 --> 00:01:08.820
And the new method is called
an integrating factor.
00:01:08.820 --> 00:01:14.370
It's a magic factor that
makes the equation simple.
00:01:14.370 --> 00:01:17.790
So that's another
nice way to solve
00:01:17.790 --> 00:01:21.340
all the problems that
we've dealt with so far,
00:01:21.340 --> 00:01:23.050
plus this new one.
00:01:23.050 --> 00:01:24.930
So what is this factor?
00:01:24.930 --> 00:01:32.080
Well, for this 2t
problem, the right factor
00:01:32.080 --> 00:01:36.070
is e to the minus t squared.
00:01:36.070 --> 00:01:38.790
And why is that
the right factor?
00:01:38.790 --> 00:01:40.370
This is the factor
that I'm going
00:01:40.370 --> 00:01:44.190
to multiply the equation
by and make it simple.
00:01:44.190 --> 00:01:46.590
And the reason that's
the right choice
00:01:46.590 --> 00:01:51.180
is that the derivative
of this-- you
00:01:51.180 --> 00:01:53.720
remember how to take the
derivative by the chain rule?
00:01:53.720 --> 00:01:56.660
The derivative will be
the same e to the minus t
00:01:56.660 --> 00:02:03.940
squared, the same I, times the
derivative of the exponent.
00:02:03.940 --> 00:02:08.690
And the derivative of
that exponent is minus 2t.
00:02:08.690 --> 00:02:11.570
Minus t squared
becomes minus 2t.
00:02:11.570 --> 00:02:19.330
So it's that little device that
gives us an integrating factor
00:02:19.330 --> 00:02:21.450
that makes the equation simple.
00:02:21.450 --> 00:02:24.350
And now I'm going to
look at the equation.
00:02:24.350 --> 00:02:28.440
What I want to look at is
the derivative of I times y.
00:02:28.440 --> 00:02:31.160
Instead of just
dy dt, let me look
00:02:31.160 --> 00:02:33.210
at the derivative of I times y.
00:02:33.210 --> 00:02:35.770
So I have a product here.
00:02:35.770 --> 00:02:38.170
Got to use the product rule.
00:02:38.170 --> 00:02:43.350
So that will be I-- so I dy dt.
00:02:49.350 --> 00:02:50.420
OK.
00:02:50.420 --> 00:02:57.580
dy dt is-- we can take dy
dt from the equation, I
00:02:57.580 --> 00:03:04.865
times 2ty plus q of t.
00:03:11.390 --> 00:03:17.810
And now I have to
add on dI dt y.
00:03:22.310 --> 00:03:24.310
Good.
00:03:24.310 --> 00:03:27.950
So it's the product rule--
I times the derivative of y
00:03:27.950 --> 00:03:30.490
plus the derivative
of I times y.
00:03:30.490 --> 00:03:32.180
But now look.
00:03:32.180 --> 00:03:36.166
dI dt we know is minus 2tI.
00:03:36.166 --> 00:03:41.190
So that dI dt, now I'm
using the key fact about I,
00:03:41.190 --> 00:03:43.015
that that's minus 2tIy.
00:03:46.200 --> 00:03:52.570
Look, minus 2tIy cancels 2tIy.
00:03:52.570 --> 00:03:55.060
So I have a nice equation now.
00:03:55.060 --> 00:04:00.940
The derivative of Iy is Iq.
00:04:00.940 --> 00:04:03.470
The derivative of Iy is Iq.
00:04:03.470 --> 00:04:07.110
I can just integrate both sides.
00:04:07.110 --> 00:04:08.540
And that's the key.
00:04:08.540 --> 00:04:09.730
That's the key.
00:04:09.730 --> 00:04:13.880
If I integrate the
left-hand side--
00:04:13.880 --> 00:04:18.050
so I'll just move
this up-- integrate
00:04:18.050 --> 00:04:20.610
the derivative-- of course,
the integral of the derivative
00:04:20.610 --> 00:04:31.110
is the function-- at time t, Iy
at time t minus Iy at time 0,
00:04:31.110 --> 00:04:32.530
y of 0.
00:04:32.530 --> 00:04:36.780
Because notice that
I at t equals 0-- can
00:04:36.780 --> 00:04:42.004
I just mention
that-- I at 0 is 1.
00:04:42.004 --> 00:04:47.900
When t is 0, I of e to
the 0 power, which is 1.
00:04:47.900 --> 00:04:50.110
So that I of 0 is 1.
00:04:50.110 --> 00:04:52.490
So that's the integral
of the derivative.
00:04:52.490 --> 00:04:56.130
And on the right-hand side,
I have the integral from 0
00:04:56.130 --> 00:05:02.470
to t of I times q.
00:05:02.470 --> 00:05:12.790
So I'll put in-- yeah, e to
the minus s squared q of s ds.
00:05:12.790 --> 00:05:16.870
I've introduced a
variable of integration
00:05:16.870 --> 00:05:21.240
s going from 0 to t.
00:05:21.240 --> 00:05:24.550
You remember this
type of formula?
00:05:24.550 --> 00:05:29.000
The input is
continuous over time,
00:05:29.000 --> 00:05:33.200
and I'm looking at the
resulting output at time t.
00:05:33.200 --> 00:05:35.280
So all the inputs go in.
00:05:35.280 --> 00:05:38.540
They're all multiplied
by some factor
00:05:38.540 --> 00:05:44.500
and integrated gives the total
result from those inputs.
00:05:44.500 --> 00:05:46.290
OK.
00:05:46.290 --> 00:05:47.770
I'm almost here.
00:05:47.770 --> 00:05:53.950
I just want to remember I
want to divide by I of t
00:05:53.950 --> 00:05:55.915
so I have a formula for y.
00:05:55.915 --> 00:05:56.415
OK.
00:05:56.415 --> 00:05:59.640
So my formula for y.
00:05:59.640 --> 00:06:04.960
When I divide by I of t--
don't forget what I of t is.
00:06:04.960 --> 00:06:06.850
Let me put it again here.
00:06:06.850 --> 00:06:08.190
Let me remind myself.
00:06:08.190 --> 00:06:12.400
I of t is e to the
minus t squared.
00:06:12.400 --> 00:06:15.470
That was the magic
integrating factor.
00:06:15.470 --> 00:06:15.970
OK.
00:06:15.970 --> 00:06:18.370
So I'm going to
divide by that, which
00:06:18.370 --> 00:06:22.210
means I'll multiply
by e to the t squared.
00:06:22.210 --> 00:06:26.140
So that will knock
out the I here.
00:06:26.140 --> 00:06:30.500
I'll put this on the other
side of the equation, y of 0,
00:06:30.500 --> 00:06:33.130
y of 0, and it will
be multiplied by the e
00:06:33.130 --> 00:06:34.520
to the t squared.
00:06:34.520 --> 00:06:37.900
And this thing will
be multiplied by e
00:06:37.900 --> 00:06:38.700
to the t squared.
00:06:38.700 --> 00:06:43.370
The integral from 0 to t
of e to the t squared minus
00:06:43.370 --> 00:06:48.510
s squared q of s ds.
00:06:48.510 --> 00:06:51.254
That's my answer.
00:06:51.254 --> 00:06:53.640
Well, let's look at it.
00:06:53.640 --> 00:06:56.630
I have y of t.
00:06:56.630 --> 00:06:59.260
This is what comes
out of y of 0.
00:06:59.260 --> 00:07:04.370
You see that the growth factor
has changed from our old e
00:07:04.370 --> 00:07:09.230
to the at-- that was the
growth at constant rate,
00:07:09.230 --> 00:07:12.760
interest rate a-- to
e to the t squared.
00:07:12.760 --> 00:07:18.220
That's our growth from an
increasing interest rate.
00:07:18.220 --> 00:07:23.270
And over here, I'm seeing
the result, the output,
00:07:23.270 --> 00:07:29.770
from the input q, from all
the inputs between 0 and t.
00:07:29.770 --> 00:07:34.510
Each input is multiplied
by now that factor
00:07:34.510 --> 00:07:38.600
is the growth not from 0 to t.
00:07:38.600 --> 00:07:41.000
This is the growth from 0 to t.
00:07:41.000 --> 00:07:45.250
This is the growth from s to
t, because the input went in
00:07:45.250 --> 00:07:49.560
at time s, and it had the
shorter time, t minus s,
00:07:49.560 --> 00:07:50.750
to grow.
00:07:50.750 --> 00:07:53.740
So that's the formula
for the answer.
00:07:53.740 --> 00:08:00.010
If you give me any particular
q of s, I just do the integral,
00:08:00.010 --> 00:08:03.210
and I find the solution to
the differential equation.
00:08:03.210 --> 00:08:07.760
So that integrating factor
has made things work.
00:08:07.760 --> 00:08:10.930
Maybe I should say what
the integrating factor
00:08:10.930 --> 00:08:13.800
would be in general.
00:08:13.800 --> 00:08:23.350
So let me take a moment to
see-- this was an example.
00:08:23.350 --> 00:08:27.855
This was an example
with a of t equal to 2t.
00:08:30.590 --> 00:08:32.915
What's the general
integrating factor?
00:08:36.870 --> 00:08:39.695
So we always want the
integrating factor.
00:08:42.740 --> 00:08:46.280
Our construction rule
is that it should
00:08:46.280 --> 00:08:51.585
give us-- the derivative should
be minus a of t times I itself.
00:08:54.210 --> 00:08:59.640
That's how we chose the
e to the minus t squared.
00:08:59.640 --> 00:09:02.390
Then a of t was 2t.
00:09:02.390 --> 00:09:04.210
Now I want to give
the general rule.
00:09:04.210 --> 00:09:07.650
The general rule for
the integrating factor
00:09:07.650 --> 00:09:12.490
is the solution
to that equation.
00:09:12.490 --> 00:09:15.540
The solution to that
equation is giving us the e
00:09:15.540 --> 00:09:18.130
to the t squared in the example.
00:09:18.130 --> 00:09:19.620
This was the example.
00:09:19.620 --> 00:09:26.110
But now I want a formula just
to close off the entire case
00:09:26.110 --> 00:09:28.570
of varying interest rate.
00:09:28.570 --> 00:09:31.280
I want to find the
solution to that equation.
00:09:31.280 --> 00:09:34.340
And it is-- so here's
the integrating factor.
00:09:34.340 --> 00:09:39.590
It's e to the minus
because of that minus sign.
00:09:39.590 --> 00:09:45.750
Now I'm wanting a to come
down when I take a derivative.
00:09:45.750 --> 00:09:51.774
So what I'll put up here,
the integral of a of t
00:09:51.774 --> 00:09:57.050
dt, say, from 0 to t.
00:09:57.050 --> 00:10:01.700
Now, let me just do again
this example just to see.
00:10:01.700 --> 00:10:09.470
I have e to the minus
the integral of 2t,
00:10:09.470 --> 00:10:12.540
which is e to minus t squared.
00:10:16.420 --> 00:10:19.690
That's how I get t squared
as the right choice
00:10:19.690 --> 00:10:21.060
for our example.
00:10:21.060 --> 00:10:24.310
And the general rule is there.
00:10:24.310 --> 00:10:27.270
That's the integrating factor.
00:10:27.270 --> 00:10:32.680
And finally, finally, if
a is a constant, which
00:10:32.680 --> 00:10:35.220
is the most common case--
the only case we've
00:10:35.220 --> 00:10:39.990
had until this video--
if a is a constant,
00:10:39.990 --> 00:10:44.380
then the integral of a from
0 to t is just a times t.
00:10:44.380 --> 00:10:48.100
So number one example,
number zero example,
00:10:48.100 --> 00:10:51.580
would be e to the minus at.
00:10:51.580 --> 00:10:55.370
That would be the correct
integrating factor
00:10:55.370 --> 00:10:57.987
if we had constant a.
00:10:57.987 --> 00:11:03.300
And I'll create some
examples, some problems,
00:11:03.300 --> 00:11:07.030
just to go through
the steps in that best
00:11:07.030 --> 00:11:10.030
case of all with constant
integrating factor.
00:11:10.030 --> 00:11:15.780
But now we can solve it with
a varying interest rate.
00:11:15.780 --> 00:11:16.570
Good.
00:11:16.570 --> 00:11:18.390
Thank you.