WEBVTT
00:00:00.000 --> 00:00:01.458
INTRODUCTION: The
following content
00:00:01.458 --> 00:00:04.420
is provided by MIT
OpenCourseWare under a Creative
00:00:04.420 --> 00:00:06.090
Commons license.
00:00:06.090 --> 00:00:08.200
Additional information
about our license
00:00:08.200 --> 00:00:10.490
and MIT OpenCourseWare
in general
00:00:10.490 --> 00:00:11.930
is available at OCW.MIT.edu.
00:00:17.840 --> 00:00:18.880
PROFESSOR: OK.
00:00:18.880 --> 00:00:23.740
So I'll start now with
the third lecture.
00:00:23.740 --> 00:00:26.600
And we're into partial
differential equations.
00:00:26.600 --> 00:00:29.590
So we had two on ordinary
differential equations,
00:00:29.590 --> 00:00:33.560
and the idea of stability came
up, and the order of accuracy
00:00:33.560 --> 00:00:34.420
came up.
00:00:34.420 --> 00:00:39.160
And those will be the
key questions today --
00:00:39.160 --> 00:00:42.990
accuracy and stability.
00:00:42.990 --> 00:00:46.740
We do get beyond that, actually.
00:00:46.740 --> 00:00:54.030
I mean, to look at the contour,
at the output from a difference
00:00:54.030 --> 00:00:54.530
method.
00:00:54.530 --> 00:00:58.390
Once you've decided, yes, it's
stable, yes it's accurate,
00:00:58.390 --> 00:00:59.890
you still have to
look at the output
00:00:59.890 --> 00:01:02.930
and see, you know, how good
is it, where is it weak,
00:01:02.930 --> 00:01:06.440
where is it on target.
00:01:06.440 --> 00:01:11.830
But first come the accuracy
and stability questions.
00:01:11.830 --> 00:01:15.620
And beginning with
this equation.
00:01:15.620 --> 00:01:20.160
So this will be the
simplest initial value
00:01:20.160 --> 00:01:23.950
problem we can think of.
00:01:23.950 --> 00:01:26.230
I call it a one-way
wave equation.
00:01:26.230 --> 00:01:30.720
Notice the two-way wave
equation, which we'll get too,
00:01:30.720 --> 00:01:33.890
would have second
derivatives there.
00:01:33.890 --> 00:01:38.250
And that will send waves
in both directions.
00:01:38.250 --> 00:01:41.350
This, we'll see, sends a
wave only in one direction,
00:01:41.350 --> 00:01:43.530
so it's a nice scalar problem.
00:01:43.530 --> 00:01:46.100
First-order,
constant coefficient,
00:01:46.100 --> 00:01:47.610
that's the velocity.
00:01:47.610 --> 00:01:49.670
Perfect.
00:01:49.670 --> 00:01:55.840
The model problem
for wave equations.
00:01:59.440 --> 00:02:02.730
Because it's just
first order, I just
00:02:02.730 --> 00:02:10.270
begin it with the
function at time 0.
00:02:10.270 --> 00:02:16.050
So I'm looking for the solution
at time t to this equation.
00:02:16.050 --> 00:02:17.270
OK.
00:02:17.270 --> 00:02:19.770
So that will not
be hard to find.
00:02:19.770 --> 00:02:26.640
And I want to do it first
for pure exponentials.
00:02:26.640 --> 00:02:30.230
When u of x_0, the
initial function,
00:02:30.230 --> 00:02:32.650
is a pure exponential
e to the i*k*x.
00:02:32.650 --> 00:02:40.070
Because it really pays, to
-- Fourier is always around.
00:02:40.070 --> 00:02:46.380
And to see what happens, suppose
this is given, for example --
00:02:46.380 --> 00:02:51.390
so this will be my
example, e to the i*k*x.
00:02:51.390 --> 00:02:52.020
OK.
00:02:52.020 --> 00:02:53.760
Now what's special
about e to the i*k*x?
00:02:56.600 --> 00:02:59.830
The special thing is that with
constant coefficients and no
00:02:59.830 --> 00:03:05.710
boundaries, the solution will
be a multiple of e to the i*k*x.
00:03:05.710 --> 00:03:11.000
In other words, we can
separate variables.
00:03:11.000 --> 00:03:12.340
Maybe I'll put it here.
00:03:12.340 --> 00:03:22.880
I can then look for the solution
u to be a function times --
00:03:22.880 --> 00:03:26.990
a number really, but it
will depend on the time,
00:03:26.990 --> 00:03:34.430
on the frequency k, and the
time t -- times e to the i*k*x.
00:03:34.430 --> 00:03:36.580
You see how that
separated variables?
00:03:36.580 --> 00:03:44.960
x is separated from t, and
the frequency controls what
00:03:44.960 --> 00:03:48.970
this growth factor will be.
00:03:48.970 --> 00:03:53.410
So this growth factors is
a key quantity to compute.
00:03:53.410 --> 00:03:56.330
And we compute it
just by substituting
00:03:56.330 --> 00:04:00.130
that hope for a solution
into the equation.
00:04:00.130 --> 00:04:04.720
And getting an equation for
G, because e to the i*k*x will
00:04:04.720 --> 00:04:05.250
cancel.
00:04:05.250 --> 00:04:08.950
That's the key point,
that everything
00:04:08.950 --> 00:04:14.660
remains a pure harmonic with
that single frequency k.
00:04:14.660 --> 00:04:21.710
So if I plug it
in, I get dG/dt --
00:04:21.710 --> 00:04:26.270
I'm taking the time derivative
of u -- times e to the i*k*x,
00:04:26.270 --> 00:04:27.290
right?
00:04:27.290 --> 00:04:28.630
That's du/dt.
00:04:28.630 --> 00:04:33.100
Because t was separate
from x, that's what
00:04:33.100 --> 00:04:35.400
I get when I plug in this u.
00:04:35.400 --> 00:04:38.380
So I'm always
plugging in this u.
00:04:38.380 --> 00:04:42.810
What do I get on the right-hand
side? c, the x derivative.
00:04:42.810 --> 00:04:47.240
So that's just G. The x
derivative will bring down i*k,
00:04:47.240 --> 00:04:49.120
e to the i*k*x.
00:04:53.000 --> 00:04:58.010
No surprise that I can cancel e
to the i*k*x, which is never 0.
00:04:58.010 --> 00:05:03.010
And I have a simple
equation for G. Linear,
00:05:03.010 --> 00:05:05.650
constant coefficients,
but the coefficient
00:05:05.650 --> 00:05:07.700
depends on k, of course.
00:05:07.700 --> 00:05:14.300
The coefficient is i*c*k, and
of course the solution is G is
00:05:14.300 --> 00:05:19.860
equal to -- we're back to our
simplest model of an ordinary
00:05:19.860 --> 00:05:21.760
differential equation.
00:05:21.760 --> 00:05:25.590
Now the coefficient
a is now i*k*c,
00:05:25.590 --> 00:05:30.070
so it's e to the i*k*c*t, right?
00:05:32.910 --> 00:05:38.340
That shows us what happens
to the e to the i*k*x.
00:05:38.340 --> 00:05:42.020
So now I'll put that here,
because now we know it.
00:05:42.020 --> 00:05:47.790
So we have altogether e to
the i*k*c*t, and here's an x.
00:05:47.790 --> 00:05:51.340
So let's put those
together as x plus c*t,
00:05:51.340 --> 00:05:57.030
because that's a guide
to what's coming.
00:05:57.030 --> 00:06:01.360
So that's the solution:
separated variables, looked
00:06:01.360 --> 00:06:05.630
for the growth factor,
tried an exponential.
00:06:05.630 --> 00:06:08.770
And we'll do exactly the same
thing for difference method.
00:06:08.770 --> 00:06:11.870
So this was von
Neumann's brilliant idea,
00:06:11.870 --> 00:06:15.590
watch exponentials,
watch every frequency,
00:06:15.590 --> 00:06:20.850
and see what happens to the
multiple of e to the i*k*x.
00:06:20.850 --> 00:06:25.950
Now here is very special,
because all frequencies are
00:06:25.950 --> 00:06:31.600
producing this
combination x plus c*t.
00:06:31.600 --> 00:06:36.670
So when we combine frequencies
-- that's what Fourier said,
00:06:36.670 --> 00:06:40.920
take combinations
of these things --
00:06:40.920 --> 00:06:45.010
the solution will be a
combination of these things.
00:06:45.010 --> 00:06:48.350
And what do we get?
00:06:48.350 --> 00:06:51.910
If our original function
was u of x and 0,
00:06:51.910 --> 00:06:55.860
it's a combination of
these, e to the i*k*x's.
00:06:55.860 --> 00:07:01.740
And at later time, we
have the same combination,
00:07:01.740 --> 00:07:03.930
by linearity of these guys.
00:07:06.720 --> 00:07:12.560
All that's happening is x is
getting changed to x plus c*t.
00:07:15.320 --> 00:07:17.300
So, I'm getting the answer.
00:07:21.120 --> 00:07:26.440
Here was the answer
for one exponential.
00:07:26.440 --> 00:07:29.030
But now I'm going to do
the answer for a general u,
00:07:29.030 --> 00:07:31.810
and it's going to
be easy to pick off.
00:07:31.810 --> 00:07:36.080
It's just like picking
off this x plus c*t.
00:07:36.080 --> 00:07:41.710
It will be u at x
plus c*t at time 0.
00:07:41.710 --> 00:07:44.950
That's the solution.
00:07:44.950 --> 00:07:47.990
For every u, not just
for the exponentials,
00:07:47.990 --> 00:07:49.960
but for all
combinations of them,
00:07:49.960 --> 00:07:52.480
which give us any u of x and 0.
00:07:52.480 --> 00:07:56.535
So u of x and 0 was
a combination of e
00:07:56.535 --> 00:08:01.350
to the i*k*x's, and then
the solution is the same
00:08:01.350 --> 00:08:04.200
combination of these guys.
00:08:04.200 --> 00:08:10.420
Well, we can understand
what that solution is.
00:08:10.420 --> 00:08:13.920
It's what I call a one-way wave.
00:08:13.920 --> 00:08:17.520
Let me understand
what's happening here.
00:08:17.520 --> 00:08:19.480
So here's the key picture now.
00:08:25.370 --> 00:08:29.460
I want to a draw a
picture in the xt-plane.
00:08:29.460 --> 00:08:31.960
So I'm not graphing u here.
00:08:31.960 --> 00:08:39.710
This is a picture in the
xt-plane that will show us
00:08:39.710 --> 00:08:41.510
what this formula means.
00:08:41.510 --> 00:08:45.630
Because this is the
solution that we then
00:08:45.630 --> 00:08:48.561
want to approximate
by difference method.
00:08:48.561 --> 00:08:49.060
OK.
00:08:49.060 --> 00:08:51.490
So what does this mean?
00:08:51.490 --> 00:08:56.620
This means that the value,
for example, u of 0, 0 --
00:08:56.620 --> 00:08:57.990
so there's the point (0, 0).
00:09:05.830 --> 00:09:10.870
Here's what's happening, at
a later time, say up here,
00:09:10.870 --> 00:09:14.210
some later time,
the value of u --
00:09:14.210 --> 00:09:21.820
this is the line x
plus ct equals 0;
00:09:21.820 --> 00:09:25.480
x plus ct equals
0 along that line.
00:09:25.480 --> 00:09:27.510
And what's the point?
00:09:27.510 --> 00:09:32.300
On that line, the solution is
the same all the way along.
00:09:32.300 --> 00:09:35.120
So whatever the
initial value is here,
00:09:35.120 --> 00:09:42.150
it travels, so that u at this
point is u at this point.
00:09:42.150 --> 00:09:47.020
So let me to call that point
P, and say what I mean now.
00:09:47.020 --> 00:09:52.750
I mean that u of P is
the same as u at 0, 0.
00:09:52.750 --> 00:10:00.790
Because x plus c*t is
the same here and here.
00:10:00.790 --> 00:10:09.240
Let me take another point, let's
say x_0, another initial value.
00:10:09.240 --> 00:10:12.610
Then, again, along
the line like this --
00:10:12.610 --> 00:10:17.880
this will be the line x
plus c*t equals capital X,
00:10:17.880 --> 00:10:23.360
because it's the line where
x plus c*t is a constant,
00:10:23.360 --> 00:10:30.340
and the constant is chosen so
that it starts at this point,
00:10:30.340 --> 00:10:35.490
at t equals 0, X is big
X. So now -- let's see --
00:10:35.490 --> 00:10:42.570
I better make clear -- that
this line carries this initial
00:10:42.570 --> 00:10:43.370
value.
00:10:43.370 --> 00:10:47.500
This line carries
this initial value.
00:10:47.500 --> 00:10:48.810
You see it?
00:10:48.810 --> 00:10:51.730
The value of u all
along this line
00:10:51.730 --> 00:10:54.950
is the value it started
with right there.
00:10:54.950 --> 00:10:58.500
And you know the
name for those lines?
00:10:58.500 --> 00:11:03.100
So these are lines, they
happen to be straight here
00:11:03.100 --> 00:11:07.290
because we got constant
coefficients, straight
00:11:07.290 --> 00:11:09.840
and even parallel.
00:11:09.840 --> 00:11:13.090
And they're the lines on
which the information travels.
00:11:13.090 --> 00:11:17.640
Whatever the information
was at times 0.
00:11:17.640 --> 00:11:20.460
By information, I
mean the value of u
00:11:20.460 --> 00:11:25.120
at 0, 0, or the value
of u at this point.
00:11:25.120 --> 00:11:27.520
That information
travels along that line
00:11:27.520 --> 00:11:30.030
to give this solution
all along the line.
00:11:30.030 --> 00:11:33.180
And the name of the
line, anybody know it?
00:11:33.180 --> 00:11:34.820
Characteristic.
00:11:34.820 --> 00:11:45.005
So this is a characteristic
line, they all are.
00:11:45.005 --> 00:11:45.660
This too.
00:11:45.660 --> 00:11:49.370
All these line are
characteristic lines.
00:11:49.370 --> 00:11:50.655
Can you read characteristic?
00:11:50.655 --> 00:11:54.830
I should of have written
it a little better.
00:11:54.830 --> 00:12:02.580
So this is like a key
feature of wave equations.
00:12:02.580 --> 00:12:04.460
It's a key feature
of wave equations
00:12:04.460 --> 00:12:09.200
that we will not see
for heat equations.
00:12:09.200 --> 00:12:17.810
And so let me just say it
again, because it will bear also
00:12:17.810 --> 00:12:21.430
on the stability question
for difference equations.
00:12:21.430 --> 00:12:23.630
The information, the
true information,
00:12:23.630 --> 00:12:27.410
for the true solution, travels
along characteristic lines.
00:12:30.370 --> 00:12:33.480
We're in one
dimension here, which
00:12:33.480 --> 00:12:36.590
is a major simplification.
00:12:36.590 --> 00:12:42.970
In two dimensions we'll
have characteristic cones.
00:12:42.970 --> 00:12:46.450
In three dimension certainly
we'd call it a cone.
00:12:46.450 --> 00:12:48.170
And actually, I
guess what I'm saying
00:12:48.170 --> 00:12:54.540
is that if I speak
a word, you know,
00:12:54.540 --> 00:13:00.270
my voice or the sound waves
solve the 3D wave equation.
00:13:00.270 --> 00:13:04.710
So when I snap my
fingers, that sound
00:13:04.710 --> 00:13:14.450
travels from this point
out along characteristics.
00:13:17.670 --> 00:13:19.930
And of course it travels
in all directions,
00:13:19.930 --> 00:13:25.250
so we've got a more interesting,
more complicated picture
00:13:25.250 --> 00:13:28.220
in higher dimensions,
but we really
00:13:28.220 --> 00:13:30.370
see it here in one dimension.
00:13:30.370 --> 00:13:31.630
OK.
00:13:31.630 --> 00:13:39.120
Now, I should also include
a graph of the solution.
00:13:39.120 --> 00:13:41.000
What does the
solution look like?
00:13:41.000 --> 00:13:46.010
Maybe I'll find a spot
here for that graph.
00:13:49.210 --> 00:13:51.140
Now I'm going to graph u.
00:13:54.180 --> 00:13:56.270
This is still x.
00:13:56.270 --> 00:13:59.950
So I'll graph u at maybe
two different times.
00:13:59.950 --> 00:14:01.650
So the starting time.
00:14:01.650 --> 00:14:04.280
Suppose we have a wall of water.
00:14:07.270 --> 00:14:14.710
So this will be u of x and 0,
a step function, maybe at 0.
00:14:14.710 --> 00:14:20.970
So u of x and 0 is 1 and then 0.
00:14:20.970 --> 00:14:21.500
OK.
00:14:24.150 --> 00:14:29.060
So there's a typical
starting initial value.
00:14:32.260 --> 00:14:34.220
Well, I don't know
if it's typical.
00:14:34.220 --> 00:14:36.640
Pretty special to
have 1 and then 0,
00:14:36.640 --> 00:14:38.650
a perfect step function.
00:14:38.650 --> 00:14:40.530
But this will illustrate --
00:14:40.530 --> 00:14:43.660
Now I want to ask, what's
the solution to the equation?
00:14:43.660 --> 00:14:47.600
What is u of x and t?
00:14:47.600 --> 00:14:50.370
I want to graph u of x and t.
00:14:50.370 --> 00:14:52.580
What what happens?
00:14:52.580 --> 00:14:57.640
You have to assemble, sort
of, this picture, which
00:14:57.640 --> 00:15:03.910
is in the xt-plane, into a
graph here of u of x and t.
00:15:03.910 --> 00:15:05.390
What happens?
00:15:05.390 --> 00:15:10.980
Well all these zero
starting values travel along
00:15:10.980 --> 00:15:15.520
characteristics, and tell
us that u is 0 along all
00:15:15.520 --> 00:15:16.450
these characteristics.
00:15:16.450 --> 00:15:20.650
So along all these
characteristics, u is 0.
00:15:20.650 --> 00:15:23.740
This here, the
starting value is 1.
00:15:23.740 --> 00:15:31.180
So along these characteristics
we're starting with a 1,
00:15:31.180 --> 00:15:32.290
we end with a 1.
00:15:32.290 --> 00:15:33.780
Do you see what happens?
00:15:37.340 --> 00:15:38.580
How do I graph it?
00:15:38.580 --> 00:15:40.530
The wave is moving.
00:15:40.530 --> 00:15:44.930
The wall of water is moving
that way, moving to the left.
00:15:44.930 --> 00:15:48.080
Because I'm taking c to
be a positive number.
00:15:48.080 --> 00:15:54.690
So u of x and t is a wall,
or a wave you could say,
00:15:54.690 --> 00:16:04.270
moving left with speed c.
00:16:06.780 --> 00:16:10.960
Every solution to the
equation is doing this.
00:16:10.960 --> 00:16:16.050
And in this particular
case it's a wall of water
00:16:16.050 --> 00:16:18.290
and it stays a wall of water.
00:16:18.290 --> 00:16:19.350
That the point.
00:16:19.350 --> 00:16:22.370
Shapes are not changed as we go.
00:16:22.370 --> 00:16:29.370
There's no -- dispersion would
be the right word, I think.
00:16:29.370 --> 00:16:32.510
We would expect, in
a general equation,
00:16:32.510 --> 00:16:41.060
that the shape of the wave would
change a little as it travels.
00:16:41.060 --> 00:16:43.920
In this equation
it doesn't change.
00:16:43.920 --> 00:16:47.680
The shape stays the same.
00:16:47.680 --> 00:16:51.820
See, again I'm thinking of
this wave as a combination
00:16:51.820 --> 00:16:53.660
of pure exponentials.
00:16:53.660 --> 00:16:56.240
And they all travel
with the same speed c,
00:16:56.240 --> 00:16:58.520
so the whole wave
travels with speed c.
00:16:58.520 --> 00:17:05.980
And at a later time, that's
the graph of the solution.
00:17:05.980 --> 00:17:08.280
OK.
00:17:08.280 --> 00:17:15.900
So that much is all we have
to do, all we can do really,
00:17:15.900 --> 00:17:18.310
in solving the
differential equations.
00:17:21.140 --> 00:17:22.530
It's a simple model, certainly.
00:17:22.530 --> 00:17:25.680
But now I come to the
difference equation.
00:17:25.680 --> 00:17:27.710
Well, when I say the
difference equation,
00:17:27.710 --> 00:17:30.720
I should say equations plural.
00:17:30.720 --> 00:17:35.800
Because here I've written
four possibilities.
00:17:40.990 --> 00:17:45.870
Three of them are actually
used, and one is a disaster.
00:17:52.640 --> 00:17:56.860
But none of the four is perfect.
00:17:56.860 --> 00:17:59.460
Most people would
say Lax-Wendroff
00:17:59.460 --> 00:18:04.330
is the best of these
four, because it has
00:18:04.330 --> 00:18:06.250
one extra order of accuracy.
00:18:09.500 --> 00:18:11.100
Oh yeah, yeah.
00:18:11.100 --> 00:18:14.350
I guess these all have
only first-order accuracy.
00:18:17.160 --> 00:18:19.200
But Lax-Wendroff
moves up to second.
00:18:19.200 --> 00:18:23.930
So that's a method
that everybody knows,
00:18:23.930 --> 00:18:25.650
because it gets up to second.
00:18:25.650 --> 00:18:29.860
But actually upwind is the
first one to start with.
00:18:29.860 --> 00:18:32.120
Let me start with that one.
00:18:32.120 --> 00:18:33.060
OK.
00:18:33.060 --> 00:18:37.850
So I've multiplied up by
the delta t that should be
00:18:37.850 --> 00:18:42.410
in the denominator there,
especially so that you would
00:18:42.410 --> 00:18:48.620
see -- so upwind, or
forward difference --
00:18:48.620 --> 00:18:51.580
I'm taking the standard
forward difference in time --
00:18:51.580 --> 00:18:55.330
all these methods are
going to be explicit,
00:18:55.330 --> 00:19:01.370
so they're all going to be
solvable in a simple way for u
00:19:01.370 --> 00:19:03.400
at the new time.
00:19:03.400 --> 00:19:07.780
So a forward difference
in time for du/dt,
00:19:07.780 --> 00:19:12.450
and c times a forward
difference in space for du/dx.
00:19:12.450 --> 00:19:15.180
So that's the first idea
that would occur to you,
00:19:15.180 --> 00:19:19.980
and it's pretty reasonable.
00:19:19.980 --> 00:19:24.480
We can check its accuracy, but
you can guess what it would be.
00:19:24.480 --> 00:19:29.070
What's your guess on the
accuracy of this method?
00:19:29.070 --> 00:19:31.220
You're seeing a
forward difference
00:19:31.220 --> 00:19:34.360
in time, a forward
difference in space.
00:19:34.360 --> 00:19:37.680
The odds are those finite
differences give you
00:19:37.680 --> 00:19:43.400
an accuracy p -- if we use p
as the measure of accuracy --
00:19:43.400 --> 00:19:50.580
which would be probably
1, first-order accurate.
00:19:50.580 --> 00:19:55.500
So we'll see the accuracy
as only p equal to 1.
00:19:55.500 --> 00:19:57.680
OK.
00:19:57.680 --> 00:20:00.290
What about the stability?
00:20:00.290 --> 00:20:02.090
I'm looking at
this first method.
00:20:05.130 --> 00:20:07.800
So one comment
about the method is
00:20:07.800 --> 00:20:12.180
that this ratio c
delta t over delta x,
00:20:12.180 --> 00:20:20.830
let me call it r,
that's a key number.
00:20:20.830 --> 00:20:28.350
it's called the
Courant number by some.
00:20:32.010 --> 00:20:35.290
So in the literature you
might see the phrase Courant
00:20:35.290 --> 00:20:38.000
number for that ratio r.
00:20:38.000 --> 00:20:43.420
And maybe my first
point is, stability
00:20:43.420 --> 00:20:47.020
is going to put a bound on r.
00:20:47.020 --> 00:20:50.580
We can tell right away,
for this explicit method
00:20:50.580 --> 00:20:58.030
and for any explicit method,
that r can't be unlimited.
00:20:58.030 --> 00:21:02.230
There's going to be
a bound on r, which
00:21:02.230 --> 00:21:04.180
it means a bound on delta t.
00:21:04.180 --> 00:21:09.700
It's telling us that delta t has
to be less than some constant
00:21:09.700 --> 00:21:12.820
times delta x.
00:21:12.820 --> 00:21:17.240
And stability is the
job find that constant.
00:21:17.240 --> 00:21:20.060
How small does
delta t have to be?
00:21:20.060 --> 00:21:25.780
Now let me sort of understand
this forward difference method
00:21:25.780 --> 00:21:28.210
in this picture.
00:21:30.740 --> 00:21:37.180
So I'm going to do the forward
difference, delta t of u
00:21:37.180 --> 00:21:44.630
equals that ratio times the
forward difference of the space
00:21:44.630 --> 00:21:47.900
difference, so time differences
is that ratio times this space
00:21:47.900 --> 00:21:48.620
difference.
00:21:48.620 --> 00:21:49.440
OK.
00:21:49.440 --> 00:21:51.850
Method 1.
00:21:51.850 --> 00:21:53.520
OK.
00:21:53.520 --> 00:22:01.510
So I guess somehow, you
want to see that the --
00:22:01.510 --> 00:22:04.200
you want to see a picture
like this for the difference
00:22:04.200 --> 00:22:07.880
equation, So the
difference equation,
00:22:07.880 --> 00:22:16.965
we imagine we've got steps delta
x, all these steps are delta x.
00:22:16.965 --> 00:22:19.420
Let's suppose that's 0.
00:22:19.420 --> 00:22:20.710
OK.
00:22:20.710 --> 00:22:22.390
So what happening now?
00:22:22.390 --> 00:22:27.460
And time going this way and
I'm solving this equation.
00:22:27.460 --> 00:22:28.460
What's happening here?
00:22:36.390 --> 00:22:42.650
Let me copy this method,
u at a position j --
00:22:42.650 --> 00:22:47.950
so this might be the
point j delta x --
00:22:47.950 --> 00:22:54.590
at time n plus 1 is -- I want to
write this equation, as always,
00:22:54.590 --> 00:22:56.640
in the most convenient way.
00:22:56.640 --> 00:22:58.120
So what am I going to do?
00:22:58.120 --> 00:23:00.370
I'm going to take
this u of x and t
00:23:00.370 --> 00:23:03.450
and put it on the
right-hand side.
00:23:03.450 --> 00:23:09.650
So then my equation looks
like that ratio r times u
00:23:09.650 --> 00:23:13.790
at j plus 1 at time n.
00:23:13.790 --> 00:23:16.640
That's this.
00:23:16.640 --> 00:23:24.120
I'm one position over,
but I'm at the given time.
00:23:24.120 --> 00:23:30.160
And then what's the
coefficient of u_(j, n)?
00:23:30.160 --> 00:23:33.470
So can you just tell me,
what do I put in there?
00:23:33.470 --> 00:23:36.750
So this will be that nice
way to look at our difference
00:23:36.750 --> 00:23:38.070
equation.
00:23:38.070 --> 00:23:43.510
Each new value is a combination
of two old values, r
00:23:43.510 --> 00:23:47.570
times the guy here.
00:23:47.570 --> 00:23:50.200
So in other words, here's
my little molecule.
00:23:52.720 --> 00:23:54.920
This is the new value.
00:23:54.920 --> 00:23:58.700
It comes from r
times this plus what,
00:23:58.700 --> 00:24:01.600
you have to tell
me what multiplies
00:24:01.600 --> 00:24:03.350
this u at this point.
00:24:03.350 --> 00:24:10.910
So here's u_(j, n+1), and here's
u_(j+1, n), and here is u_(j,
00:24:10.910 --> 00:24:11.410
n).
00:24:11.410 --> 00:24:14.340
And what goes in parentheses?
00:24:14.340 --> 00:24:16.660
1 minus r.
00:24:16.660 --> 00:24:23.020
Because I get the 1 when that
flips over to the other side.
00:24:23.020 --> 00:24:24.120
Good.
00:24:24.120 --> 00:24:26.560
So it's just a combination.
00:24:26.560 --> 00:24:29.030
The new value is a
combination of those two.
00:24:31.790 --> 00:24:41.230
And I guess what I want to show
is that it could not possibly
00:24:41.230 --> 00:24:48.360
be stable unless r is
less or equal to 1.
00:24:48.360 --> 00:24:51.250
So this will be the
Courant condition.
00:24:51.250 --> 00:24:54.310
The condition on
the Courant number.
00:24:54.310 --> 00:25:00.110
So the Courant
condition or the CFL --
00:25:00.110 --> 00:25:07.230
that's a really a better
condition -- will be --
00:25:07.230 --> 00:25:08.890
let me say what it is.
00:25:08.890 --> 00:25:14.980
The CFL condition is
r less or equal to 1.
00:25:14.980 --> 00:25:20.770
That's a condition for
stability or convergence
00:25:20.770 --> 00:25:27.490
that comes to us from comparing
the real characteristics
00:25:27.490 --> 00:25:31.461
with the finite
difference picture.
00:25:31.461 --> 00:25:31.960
OK.
00:25:31.960 --> 00:25:33.920
So what's CFL?
00:25:33.920 --> 00:25:35.260
C is Courant still.
00:25:35.260 --> 00:25:40.450
So this came from a
really early paper,
00:25:40.450 --> 00:25:43.850
and I think actually Lewy.
00:25:43.850 --> 00:25:46.170
That's Courant,
that's Friedrichs,
00:25:46.170 --> 00:25:47.930
they were close friends.
00:25:47.930 --> 00:25:51.330
That's Lewy, all three
were friends actually.
00:25:51.330 --> 00:25:58.400
And I think it was actually
Lewy who spotted what we're just
00:25:58.400 --> 00:26:02.450
going to do right now,
the requirement that r
00:26:02.450 --> 00:26:03.870
had to be less or equal 1.
00:26:06.700 --> 00:26:13.690
Now let me just make clear that
this Courant-Friedrichs-Lewy
00:26:13.690 --> 00:26:16.770
condition is going to be
a necessary condition.
00:26:16.770 --> 00:26:21.050
It has to hold, or
there is no hope.
00:26:21.050 --> 00:26:27.780
But it's not enough, it's
not a sufficient condition.
00:26:27.780 --> 00:26:33.830
We can't guarantee that a method
stable just because the Courant
00:26:33.830 --> 00:26:35.670
condition is satisfied.
00:26:35.670 --> 00:26:37.220
The Courant condition
will tell us
00:26:37.220 --> 00:26:39.830
something about the
position of characteristics,
00:26:39.830 --> 00:26:43.220
we'll see it in a second.
00:26:43.220 --> 00:26:50.130
For example, this centered
one is unstable, this guy,
00:26:50.130 --> 00:26:52.180
when the right-hand
side -- you might say,
00:26:52.180 --> 00:26:56.070
oh this is a better method;
always better to take
00:26:56.070 --> 00:26:59.680
a centered difference for
du/dx than a one-sided.
00:26:59.680 --> 00:27:02.680
But not now.
00:27:02.680 --> 00:27:06.790
The one-sided one is OK.
00:27:06.790 --> 00:27:14.690
The centered one is going
to be totally unstable,
00:27:14.690 --> 00:27:19.470
for all r, this centered one.
00:27:19.470 --> 00:27:25.600
And we'll identify that not
from Courant-Friedrichs-Lewy --
00:27:25.600 --> 00:27:28.540
their paper wouldn't have
spotted the difference between
00:27:28.540 --> 00:27:31.870
one and two, but
von Neumann did;
00:27:31.870 --> 00:27:38.130
von Neumann quickly noticed that
if you use an exponential --
00:27:38.130 --> 00:27:40.360
so we'll do one van
Neumann in a moment --
00:27:40.360 --> 00:27:44.280
if you plug in an
exponential to number 2,
00:27:44.280 --> 00:27:47.440
this centered
difference, it takes off.
00:27:47.440 --> 00:27:51.670
And it's unstable even
if delta t is small.
00:27:51.670 --> 00:27:52.400
OK.
00:27:52.400 --> 00:27:56.000
Now what is this CFL,
Courant-Friedrichs-Lewy
00:27:56.000 --> 00:27:56.500
condition?
00:27:56.500 --> 00:27:59.960
Where does that come from?
00:27:59.960 --> 00:28:04.790
It comes from just thinking
about the information.
00:28:08.850 --> 00:28:10.450
I have to write down
the thinking now
00:28:10.450 --> 00:28:13.260
that goes into the
Courant-Friedrichs-Lewy
00:28:13.260 --> 00:28:17.930
condition, the CFL condition.
00:28:24.920 --> 00:28:26.640
OK.
00:28:26.640 --> 00:28:29.710
It's straightforward.
00:28:29.710 --> 00:28:42.110
I have to think, at a time t,
let's say t equals n delta t.
00:28:42.110 --> 00:28:47.710
Suppose I've taken
n times steps.
00:28:47.710 --> 00:28:58.780
Then the true u at, let's
say, 0 and that time t is --
00:28:58.780 --> 00:29:02.720
or x and t, because we
know the true solution.
00:29:02.720 --> 00:29:08.020
The true u at x and
t is, as we know,
00:29:08.020 --> 00:29:17.080
the initial function at
the point x plus c*t.
00:29:17.080 --> 00:29:22.780
So that's the correct solution.
00:29:22.780 --> 00:29:25.920
And Courant-Friedrichs-Lewy
are just
00:29:25.920 --> 00:29:33.500
saying that you better use this
number in finite difference
00:29:33.500 --> 00:29:38.710
method or you don't
have a chance.
00:29:38.710 --> 00:29:39.210
Right.
00:29:39.210 --> 00:29:42.240
That makes sense.
00:29:42.240 --> 00:29:46.291
So what do I mean
by use this number?
00:29:46.291 --> 00:29:46.790
OK.
00:29:46.790 --> 00:29:48.450
So let me draw.
00:29:48.450 --> 00:29:52.110
So u at x and t is
some point here.
00:29:52.110 --> 00:29:54.540
This is at the point x and t.
00:29:54.540 --> 00:29:57.010
This used these two values.
00:29:57.010 --> 00:30:00.350
They use these three values.
00:30:00.350 --> 00:30:02.620
This one used that one,
that one, that one.
00:30:02.620 --> 00:30:04.800
This one used those two.
00:30:04.800 --> 00:30:08.750
Those four used
these five values.
00:30:08.750 --> 00:30:09.250
Right.
00:30:15.470 --> 00:30:20.180
See, the difference method is
not propagating the information
00:30:20.180 --> 00:30:26.370
entirely on that line,
it's really taking values
00:30:26.370 --> 00:30:30.020
over that whole interval
with some combinations of r
00:30:30.020 --> 00:30:31.520
and 1 minus r.
00:30:31.520 --> 00:30:33.840
And in the end, after
five times steps,
00:30:33.840 --> 00:30:37.950
it's giving us this
value up there.
00:30:37.950 --> 00:30:46.700
But the point is that if this
point x plus c*t were out here,
00:30:46.700 --> 00:30:50.890
then refining delta x
and refining delta t,
00:30:50.890 --> 00:30:54.440
and using more and more points,
and filling in and using more
00:30:54.440 --> 00:30:58.900
of these, but not getting out
here, would get you nowhere.
00:30:58.900 --> 00:31:00.410
You wouldn't have a chance.
00:31:00.410 --> 00:31:02.090
So that's the
Courant-Friedrichs-Lewy
00:31:02.090 --> 00:31:02.870
condition.
00:31:02.870 --> 00:31:05.010
How far out is this?
00:31:05.010 --> 00:31:09.240
This is n delta x inside this.
00:31:09.240 --> 00:31:14.870
And if this is x, this
is n delta x's away,
00:31:14.870 --> 00:31:18.520
and this is x plus c*t.
00:31:18.520 --> 00:31:20.470
And c is n delta t's.
00:31:24.890 --> 00:31:26.390
Right?
00:31:26.390 --> 00:31:33.150
t is n delta t.
00:31:33.150 --> 00:31:33.840
Are you with me?
00:31:38.690 --> 00:31:43.280
As I keep delta t over
delta x, the ratio r, fixed
00:31:43.280 --> 00:31:49.130
and use more and more points,
I'm filling up this interval
00:31:49.130 --> 00:31:53.100
with points that I've used.
00:31:53.100 --> 00:31:56.590
But I'm never going to
get to a point there.
00:31:56.590 --> 00:32:02.890
So the idea is then,
unstable, couldn't converge,
00:32:02.890 --> 00:32:16.120
couldn't work, if the distance
reached here, n delta x,
00:32:16.120 --> 00:32:24.410
is smaller than c*n delta
t, it couldn't work.
00:32:24.410 --> 00:32:26.910
OK.
00:32:26.910 --> 00:32:28.830
So I'm taking a negative
point of view here.
00:32:28.830 --> 00:32:32.860
It can't work in this case.
00:32:32.860 --> 00:32:35.510
The reason I take that
negative point of view is I'm
00:32:35.510 --> 00:32:41.630
not able to say it does
work in the case when
00:32:41.630 --> 00:32:44.770
delta x is big enough
compared to delta t,
00:32:44.770 --> 00:32:46.060
and I include that point.
00:32:46.060 --> 00:32:47.330
I can't be sure.
00:32:47.330 --> 00:32:50.390
But I can be sure that
if I don't include
00:32:50.390 --> 00:32:56.490
that neighborhood of where
the true u is produced,
00:32:56.490 --> 00:32:57.530
it can't have a chance.
00:32:57.530 --> 00:33:02.100
So let me just cancel
n, divide by delta x.
00:33:02.100 --> 00:33:09.470
And I say fail if 1 is
smaller then c delta t
00:33:09.470 --> 00:33:11.120
over delta x, which is r.
00:33:11.120 --> 00:33:20.210
It fails if r is bigger
than 1, by this reasoning
00:33:20.210 --> 00:33:21.290
of characteristics.
00:33:25.880 --> 00:33:29.090
There are two more cases that
are worth thinking about.
00:33:29.090 --> 00:33:37.100
Suppose the method was downwind.
00:33:37.100 --> 00:33:41.320
So this is upwind, because
I take a forward difference.
00:33:41.320 --> 00:33:44.580
The wind is blowing this way.
00:33:44.580 --> 00:33:52.200
Forgive me for incomplete
use of the word wind.
00:33:52.200 --> 00:33:53.640
I don't know what it means.
00:33:53.640 --> 00:33:56.330
But one way or another,
whatever, the wind
00:33:56.330 --> 00:33:57.980
is blowing this way.
00:33:57.980 --> 00:34:02.040
The values are coming
from the upwind direction.
00:34:02.040 --> 00:34:04.790
And that's good, because
the true value comes
00:34:04.790 --> 00:34:06.640
from the upwind direction.
00:34:06.640 --> 00:34:09.570
That's what we saw
in characteristics,
00:34:09.570 --> 00:34:12.160
the values are blowing downwind.
00:34:12.160 --> 00:34:17.410
So, what would happen if I use
a backward difference here?
00:34:17.410 --> 00:34:20.920
So I didn't write that
bad idea, but it's
00:34:20.920 --> 00:34:28.310
important to realizes that's
method 1a, a bad idea,
00:34:28.310 --> 00:34:31.060
is to use a backward
difference here.
00:34:31.060 --> 00:34:35.880
I should maybe call
it 1b, for backward.
00:34:35.880 --> 00:34:38.000
You see that it would fail?
00:34:38.000 --> 00:34:40.350
If I used a backward
difference, what will
00:34:40.350 --> 00:34:42.000
what happen to this picture?
00:34:42.000 --> 00:34:45.110
This value would come
from stuff on the left.
00:34:45.110 --> 00:34:47.350
It would totally
have no chance to use
00:34:47.350 --> 00:34:51.730
the correct initial value.
00:34:51.730 --> 00:34:55.330
So a backward difference
is an immediate failure.
00:34:55.330 --> 00:35:05.500
So r has to be -- It
will also fail if --
00:35:05.500 --> 00:35:09.360
well I was going to
say r less than 0.
00:35:09.360 --> 00:35:12.460
I don't know, can I say that?
00:35:12.460 --> 00:35:16.030
The way r could be less than
0 would be the delta x being
00:35:16.030 --> 00:35:21.360
negative, and that's what I
mean by the downwind method,
00:35:21.360 --> 00:35:25.960
where I'm looking for
looking for the value here,
00:35:25.960 --> 00:35:28.590
and of course I'm
not finding it.
00:35:28.590 --> 00:35:30.510
OK.
00:35:30.510 --> 00:35:35.850
So I guess I'm saying that
Courant-Friedrichs-Lewy tells
00:35:35.850 --> 00:35:42.700
us right away that this method
will only have a chance --
00:35:42.700 --> 00:35:48.700
it only has a chance if
r is -- so, possible,
00:35:48.700 --> 00:35:52.250
and in fact this is the
stability condition.
00:35:52.250 --> 00:35:56.290
So let me write that fact,
but we haven't proved it yet.
00:35:56.290 --> 00:36:00.970
It's stable for r
between 0 and 1.
00:36:00.970 --> 00:36:07.250
That's the stability condition,
which limits delta t.
00:36:07.250 --> 00:36:12.650
Because r is delta
t over delta x.
00:36:12.650 --> 00:36:16.710
And this says that
delta t can't be larger
00:36:16.710 --> 00:36:19.011
than the multiple of delta x.
00:36:19.011 --> 00:36:19.510
OK.
00:36:19.510 --> 00:36:25.910
You might say, that sounds
like delta t is too small.
00:36:25.910 --> 00:36:28.360
Is stability too restrictive?
00:36:28.360 --> 00:36:32.560
Well it's restrictive certainly,
because it limits delta t.
00:36:32.560 --> 00:36:40.980
But actually, for these methods,
accuracy also limits delta t.
00:36:40.980 --> 00:36:49.130
If I look for an implicit
method, that would allow me --
00:36:49.130 --> 00:36:54.450
if I looked for a method that
allowed a bigger delta t,
00:36:54.450 --> 00:36:59.780
then the error of
that, in that method,
00:36:59.780 --> 00:37:01.960
proportional to delta
t, would be too big.
00:37:01.960 --> 00:37:05.470
In other words,
accuracy as well as
00:37:05.470 --> 00:37:10.470
stability is keeping delta
t of the order of delta x.
00:37:10.470 --> 00:37:17.430
Accuracy as well as stability
is keeping r within a bound,
00:37:17.430 --> 00:37:21.230
and stability is keeping
it within those bounds.
00:37:21.230 --> 00:37:22.490
OK.
00:37:22.490 --> 00:37:26.700
So I still have to show
that the method is stable.
00:37:26.700 --> 00:37:28.840
The Courant-Friedrichs-Lewy
condition
00:37:28.840 --> 00:37:35.760
just helps to eliminate
impossible ratios.
00:37:35.760 --> 00:37:36.680
OK.
00:37:36.680 --> 00:37:42.490
One more point, which of course
everybody notices, in solving
00:37:42.490 --> 00:37:46.870
the difference equation.
00:37:46.870 --> 00:37:50.960
Suppose r is exactly 1.
00:37:50.960 --> 00:37:53.710
Think about the case
where r is exactly 1.
00:37:58.080 --> 00:38:00.550
Remember that's c
delta t over delta x.
00:38:06.650 --> 00:38:12.400
Suppose r is exactly 1, then
what does the method do?
00:38:12.400 --> 00:38:16.190
The method takes the
new value, r is 1.
00:38:16.190 --> 00:38:18.140
This is 0 now.
00:38:18.140 --> 00:38:22.840
So the new value is then, when
r is 1, is that old value.
00:38:22.840 --> 00:38:28.880
In this picture, when r is
1 this value is this one.
00:38:28.880 --> 00:38:34.300
The values are
traveling along a line.
00:38:34.300 --> 00:38:39.150
I'm not using these you see,
because if r is exactly 1,
00:38:39.150 --> 00:38:42.990
these are exactly 0.
00:38:42.990 --> 00:38:45.100
Now is that good?
00:38:45.100 --> 00:38:50.780
Actually it's terrific,
because that line, when r is 1,
00:38:50.780 --> 00:38:55.210
is the correct
characteristic line.
00:38:55.210 --> 00:39:00.020
If r is 1, if c delta
t equals delta x,
00:39:00.020 --> 00:39:06.040
I'm going up exactly with that
slope that the true line does.
00:39:06.040 --> 00:39:11.710
In other words, the
difference equation
00:39:11.710 --> 00:39:14.900
gives exactly the solution
to the differential equation.
00:39:14.900 --> 00:39:17.510
Because it's so
simple of course.
00:39:17.510 --> 00:39:19.970
Couldn't do it --
well, that's the point,
00:39:19.970 --> 00:39:27.230
we can't do it for big problems,
because in a big problem c is
00:39:27.230 --> 00:39:30.900
going to be variable.
00:39:30.900 --> 00:39:35.640
Maybe the problem, c may depend
on the position or the time,
00:39:35.640 --> 00:39:37.940
or it might depend
on the solution
00:39:37.940 --> 00:39:40.420
u in a non-linear problem.
00:39:40.420 --> 00:39:42.460
Those are ahead of us.
00:39:42.460 --> 00:39:47.100
But this possibility in
1D -- it's only, really,
00:39:47.100 --> 00:39:51.960
a one-dimensional possibility,
where the true information
00:39:51.960 --> 00:39:56.240
travels on a line, and we could
just hope to stay close to that
00:39:56.240 --> 00:39:57.491
characteristic line.
00:39:57.491 --> 00:39:57.990
OK.
00:40:01.340 --> 00:40:08.770
Now I'm ready to tackle,
for any method, the --
00:40:08.770 --> 00:40:10.750
let me get these guys up again.
00:40:13.980 --> 00:40:18.090
So first, I want to see,
why is upwind stable,
00:40:18.090 --> 00:40:22.070
and why is centered unstable.
00:40:22.070 --> 00:40:25.480
Should I start with the
stability question, rather than
00:40:25.480 --> 00:40:27.360
the accuracy question?
00:40:27.360 --> 00:40:30.230
The accuracy we could
guess was first order,
00:40:30.230 --> 00:40:33.440
until we get to Lax-Wendroff.
00:40:33.440 --> 00:40:36.900
So accuracy is going
to come next time.
00:40:40.410 --> 00:40:46.450
We've had Courant's take on
stability, the CFL condition,
00:40:46.450 --> 00:40:52.060
but now I'm ready for von
Neumann's deeper insight.
00:40:52.060 --> 00:40:52.560
OK.
00:40:52.560 --> 00:40:55.940
So how does von Neumann
study stability?
00:40:55.940 --> 00:40:58.580
He watches every e to the i*k*x.
00:41:01.400 --> 00:41:05.950
So von Neumann's test is going
to be each e to the i*k*x
00:41:05.950 --> 00:41:11.830
should have a growth factor,
in the difference equation,
00:41:11.830 --> 00:41:14.840
smaller then 1.
00:41:14.840 --> 00:41:18.350
The growth factor in the
differential equation,
00:41:18.350 --> 00:41:22.670
of course, was right on.
00:41:22.670 --> 00:41:27.960
This has magnitude exactly 1.
00:41:27.960 --> 00:41:34.130
So wave equations are not
giving us any space to work in.
00:41:34.130 --> 00:41:36.500
Because we want -- the growth
factor and the difference
00:41:36.500 --> 00:41:39.560
equation, we want it to
be close to the real one.
00:41:39.560 --> 00:41:45.930
And at the same time, it
better be not -- the real one,
00:41:45.930 --> 00:41:50.710
having absolute value
exactly 1 on the unit circle.
00:41:50.710 --> 00:41:53.680
But the difference
equation is allowed
00:41:53.680 --> 00:41:57.030
to go into the unit
circle, but not to go out.
00:41:57.030 --> 00:41:57.540
OK.
00:41:57.540 --> 00:42:01.790
That will separate the
good ones from the bad.
00:42:01.790 --> 00:42:02.440
OK.
00:42:02.440 --> 00:42:12.525
Let me work here on -- Can
I copy the equation u_(j,
00:42:12.525 --> 00:42:23.510
n+1) is equal to r*u_(j+1,
n), and 1 minus r u_(j, n).
00:42:23.510 --> 00:42:24.710
OK.
00:42:24.710 --> 00:42:29.030
Now I'm going to do
an exponential again.
00:42:29.030 --> 00:42:34.290
So I'm going to
have u, say, 0, n.
00:42:39.610 --> 00:42:43.590
I'm going to start
from e to the i*k*x.
00:42:48.470 --> 00:43:01.700
Sorry, let me say -- So, time
0 and position n will be e
00:43:01.700 --> 00:43:06.891
to the i*k*n delta x.
00:43:06.891 --> 00:43:07.390
Right.
00:43:07.390 --> 00:43:11.320
That's my initial,
e to the i*k*x,
00:43:11.320 --> 00:43:14.100
that's my pure frequency.
00:43:14.100 --> 00:43:20.100
I plug that in to the
-- oh, not n but j;
00:43:20.100 --> 00:43:25.270
j is measuring how many --
sorry, let's get it right --
00:43:25.270 --> 00:43:29.970
j is measuring how many
delta x's I'm going across;
00:43:29.970 --> 00:43:32.960
n is measuring how many
delta t's I'm going up.
00:43:32.960 --> 00:43:34.900
So this is the key,
here's von Neumann.
00:43:38.520 --> 00:43:43.000
Try a pure exponential,
plug it in.
00:43:43.000 --> 00:43:45.800
Again, it's going
to work, because we
00:43:45.800 --> 00:43:47.610
have constant coefficients.
00:43:47.610 --> 00:43:49.980
So what do I get on
the right-hand side?
00:43:49.980 --> 00:43:55.550
I get r times this
guy at level j plus 1,
00:43:55.550 --> 00:44:06.510
e to the i*k j plus 1 delta
x times the exponential.
00:44:06.510 --> 00:44:08.500
Can I save the
exponential, because it's
00:44:08.500 --> 00:44:11.970
going to factor out?
00:44:11.970 --> 00:44:16.760
Plus a 1 minus 4 times
the exponential itself,
00:44:16.760 --> 00:44:22.170
and here's the exponential:
e to the i*k*j delta x.
00:44:22.170 --> 00:44:24.840
This will be one step.
00:44:24.840 --> 00:44:37.900
I could say u_(j, 1) coming
from level 0 to level 1.
00:44:37.900 --> 00:44:45.290
Sorry, e to the i*k*j delta
x, so I don't need it here.
00:44:45.290 --> 00:44:46.780
Sorry, I did it wrong.
00:44:46.780 --> 00:44:54.100
That e to the i*k j plus 1 delta
x factors into e to the i*k
00:44:54.100 --> 00:44:58.810
delta x from the 1, and
e to the i*k*j delta x,
00:44:58.810 --> 00:44:59.720
which is over there.
00:44:59.720 --> 00:45:01.670
So I only wanted this much.
00:45:07.091 --> 00:45:07.590
OK.
00:45:12.530 --> 00:45:17.340
Sorry, that's on the permanent
tape but maybe it's OK.
00:45:17.340 --> 00:45:20.110
Because it makes
us think through,
00:45:20.110 --> 00:45:24.820
what's the result from
a pure exponential?
00:45:24.820 --> 00:45:27.780
And again, the result
is pure exponential
00:45:27.780 --> 00:45:31.810
in, pure exponential
out, but multiplied
00:45:31.810 --> 00:45:36.380
by some finite difference
growth factor G, that
00:45:36.380 --> 00:45:38.750
depends on the frequency.
00:45:38.750 --> 00:45:44.470
And it depends on delta
x and it depends on r.
00:45:50.400 --> 00:45:53.520
Well actually it depends
on k delta x together.
00:45:53.520 --> 00:45:54.880
So I could put that together.
00:46:01.530 --> 00:46:05.120
What's von Neumann's
question now?
00:46:05.120 --> 00:46:09.030
He wants to know is this number
-- it's a complex number,
00:46:09.030 --> 00:46:13.970
of course, because it's got this
cosine of k delta x plus i sine
00:46:13.970 --> 00:46:20.120
of k delta x -- he wants
to know is it -- magnitude,
00:46:20.120 --> 00:46:23.460
does the magnitude
get bigger than 1?
00:46:23.460 --> 00:46:28.890
If so, n steps will give
the n-th power of the thing,
00:46:28.890 --> 00:46:30.860
and it will blow up.
00:46:30.860 --> 00:46:33.410
Or does the
magnitude stay lesser
00:46:33.410 --> 00:46:39.790
equal to 1, in which case it
won't blow up, in which case
00:46:39.790 --> 00:46:42.770
we have stability.
00:46:42.770 --> 00:46:46.950
Of course, it would be great
if the magnitude was always
00:46:46.950 --> 00:46:49.100
exactly 1.
00:46:49.100 --> 00:46:53.520
Because that's what
the true solution has.
00:46:53.520 --> 00:46:59.170
But that's only going to happen
in this special, special case
00:46:59.170 --> 00:47:02.850
when r equals 1, and
I'm going just right
00:47:02.850 --> 00:47:04.510
on the characteristic.
00:47:04.510 --> 00:47:08.310
When r is exactly 1, that's
the case when that's gone,
00:47:08.310 --> 00:47:11.730
this is a 1, and that
has magnitude exactly 1.
00:47:11.730 --> 00:47:15.050
But normally, r is
going to be, I'm
00:47:15.050 --> 00:47:18.110
going to be on the safe
side, r will be less than 1.
00:47:18.110 --> 00:47:26.000
And I just want to draw this von
Neumann amplification factor.
00:47:26.000 --> 00:47:28.000
I'll often use the
word growth factor,
00:47:28.000 --> 00:47:30.140
just because it's
shorter, but another word
00:47:30.140 --> 00:47:32.360
is amplification factor.
00:47:32.360 --> 00:47:35.630
What does an exponential
get amplified by?
00:47:35.630 --> 00:47:41.300
Can you identify this
number in the complex plane?
00:47:41.300 --> 00:47:44.470
Of course, the big
question is, where is it
00:47:44.470 --> 00:47:47.300
with respect to the unit circle?
00:47:47.300 --> 00:47:48.240
OK.
00:47:48.240 --> 00:47:52.470
Take k equals 0 -- zero
frequency, the DC term,
00:47:52.470 --> 00:47:57.340
the constant start -- what is
that number equal when k is 0?
00:48:00.320 --> 00:48:01.570
1.
00:48:01.570 --> 00:48:04.350
So that's normal.
00:48:04.350 --> 00:48:10.050
At k equals 0, we're
right at the position 1.
00:48:10.050 --> 00:48:13.620
That's just telling us that
a constant initial value
00:48:13.620 --> 00:48:17.060
stays unchanged.
00:48:17.060 --> 00:48:20.420
The true growth factor and
the von Neumann amplification
00:48:20.420 --> 00:48:22.400
factor both 1.
00:48:22.400 --> 00:48:27.680
But now let k be non-zero.
00:48:27.680 --> 00:48:30.200
Where is this complex number?
00:48:30.200 --> 00:48:33.170
And now, I'm going to
impose the condition
00:48:33.170 --> 00:48:45.140
that r is between 0 and 1,
because I know from Courant
00:48:45.140 --> 00:48:47.920
that is going to be required.
00:48:47.920 --> 00:48:49.040
What's the point here?
00:48:49.040 --> 00:48:49.750
OK.
00:48:49.750 --> 00:48:53.050
Then, you see, here
is a 1 minus r.
00:48:56.050 --> 00:49:00.320
So there's 1, 1 minus r will
be a little bit in here,
00:49:00.320 --> 00:49:03.330
and then what happens
when I add on this number?
00:49:03.330 --> 00:49:05.750
So the 1 minus r I've done.
00:49:05.750 --> 00:49:07.080
It put me here.
00:49:07.080 --> 00:49:08.610
It was real.
00:49:08.610 --> 00:49:10.250
But this number is not real.
00:49:10.250 --> 00:49:16.259
This number is r times
some complex number,
00:49:16.259 --> 00:49:17.050
but what do I know?
00:49:17.050 --> 00:49:19.360
I do something critical here.
00:49:19.360 --> 00:49:22.930
What do I know
about this number?
00:49:22.930 --> 00:49:25.920
I know its absolute value is 1.
00:49:25.920 --> 00:49:28.600
So that it gets
multiplied by an r.
00:49:28.600 --> 00:49:31.860
Look, look, look, look.
00:49:31.860 --> 00:49:33.490
I start with a 1 minus r.
00:49:33.490 --> 00:49:36.210
So I go to 1, back
to r, and now I
00:49:36.210 --> 00:49:41.420
add in this part, which is
somewhere on a circle of radius
00:49:41.420 --> 00:49:46.360
r that's everything
in this problem.
00:49:46.360 --> 00:49:53.140
It's a circle of radius r
around the point 1 minus r.
00:49:58.170 --> 00:50:00.720
I'm inside the circle,
and you could say, well,
00:50:00.720 --> 00:50:04.410
you could have seen that clearly
by just using the triangle
00:50:04.410 --> 00:50:05.350
inequality.
00:50:05.350 --> 00:50:08.980
The magnitude of this can't
be bigger than the magnitude
00:50:08.980 --> 00:50:12.170
of that, which is what?
00:50:12.170 --> 00:50:13.210
r.
00:50:13.210 --> 00:50:17.920
Plus the magnitude of
that, which is what?
00:50:17.920 --> 00:50:19.530
1 minus r.
00:50:19.530 --> 00:50:21.840
So the magnitude, by
the triangle inequality,
00:50:21.840 --> 00:50:25.850
can't be more than r plus
1 minus r which is 1.
00:50:25.850 --> 00:50:34.740
But now wait a minute, where
did I use the Courant condition?
00:50:34.740 --> 00:50:36.790
The way I said
that there sounded
00:50:36.790 --> 00:50:38.710
like it would always work.
00:50:38.710 --> 00:50:40.360
This has magnitude r.
00:50:43.800 --> 00:50:45.580
What's going on here?
00:50:45.580 --> 00:50:49.320
Suppose r is bigger than
1, what's going wrong?
00:50:49.320 --> 00:50:53.220
In fact, what's the picture
if r is bigger than 1?
00:50:53.220 --> 00:50:59.600
If r is bigger than 1, then my
1 minus r is out here somewhere.
00:50:59.600 --> 00:51:02.980
So this is the unstable
case, 1 minus r,
00:51:02.980 --> 00:51:08.450
and then a circle of
radius r, bad news, right?
00:51:08.450 --> 00:51:11.670
Every frequency is
unstable in fact.
00:51:11.670 --> 00:51:15.640
When I'm reaching too far,
and that's just telling me
00:51:15.640 --> 00:51:18.810
I'm not using the
information I need.
00:51:18.810 --> 00:51:24.880
I don't have a chance
of keeping, controlling
00:51:24.880 --> 00:51:27.580
any frequency.
00:51:27.580 --> 00:51:28.330
OK.
00:51:28.330 --> 00:51:31.440
I've got just
enough time to show
00:51:31.440 --> 00:51:33.890
how bad this second method is.
00:51:33.890 --> 00:51:37.400
So nobody wanted
his name associated
00:51:37.400 --> 00:51:39.920
with that second method.
00:51:39.920 --> 00:51:41.070
Why is that?
00:51:41.070 --> 00:51:46.830
So what's the von Neumann
quantity for the second method?
00:51:46.830 --> 00:51:49.420
OK.
00:51:49.420 --> 00:51:53.490
Just space here to write
-- so this is now --
00:51:53.490 --> 00:51:56.330
I want to know the number
for that second method.
00:51:56.330 --> 00:52:04.970
So now the method is
u_(j, n+1) is u_(j, n),
00:52:04.970 --> 00:52:12.365
from the time difference,
plus r over 2, u_(j+1,
00:52:12.365 --> 00:52:22.070
n) minus u_(j-1, n).
00:52:25.780 --> 00:52:28.950
This is going to
be the bad method.
00:52:28.950 --> 00:52:33.010
It looks good because
the centered difference
00:52:33.010 --> 00:52:36.440
is more accurate than
a one-sided difference,
00:52:36.440 --> 00:52:38.400
but it's also unstable here.
00:52:38.400 --> 00:52:42.630
Can you look at that and see
what the von Neumann number
00:52:42.630 --> 00:52:45.430
G is going to be?
00:52:45.430 --> 00:52:48.390
Think of an
exponential going in.
00:52:48.390 --> 00:52:51.220
What exponential comes out?
00:52:51.220 --> 00:52:56.730
So G is a 1 from this.
00:52:56.730 --> 00:53:00.120
Now this is our guys
that's shifted over,
00:53:00.120 --> 00:53:04.940
so that would be in r over
2 e to the i*k delta x,
00:53:04.940 --> 00:53:07.410
just as it was before.
00:53:07.410 --> 00:53:16.880
And this one will be a minus
r over 2 times e to the --
00:53:16.880 --> 00:53:22.510
so it's back one step, so there
will be an e to the minus i*k
00:53:22.510 --> 00:53:26.310
delta x.
00:53:26.310 --> 00:53:27.480
So what's with this now?
00:53:30.380 --> 00:53:35.970
G is 1 plus this quantity, r
over 2 times e to the i*k*x
00:53:35.970 --> 00:53:38.980
minus e to the minus i*k*x.
00:53:38.980 --> 00:53:41.760
What am I seeing there?
00:53:41.760 --> 00:53:49.290
I'm seeing 1 plus r, and
everybody recognizes this minus
00:53:49.290 --> 00:54:03.950
this over 2 as i sine,
i*r sine k delta x.
00:54:03.950 --> 00:54:07.720
That's the amplification factor,
and is it smaller than 1?
00:54:10.300 --> 00:54:11.800
No way.
00:54:11.800 --> 00:54:12.300
No way.
00:54:12.300 --> 00:54:14.730
Let me raise it up here.
00:54:14.730 --> 00:54:19.400
So I don't care whether r is
less than 1 or not, I'm lost.
00:54:23.270 --> 00:54:25.670
This is a pure imaginary number.
00:54:25.670 --> 00:54:26.910
This is a real number.
00:54:26.910 --> 00:54:30.490
So I have the sum of squares
to get the magnitude,
00:54:30.490 --> 00:54:36.220
it will be the square root of 1
plus r sine k delta x squared.
00:54:36.220 --> 00:54:41.370
So if I draw the bad picture
then, what's the bad picture?
00:54:41.370 --> 00:54:48.180
Is now, it goes to 1 and then it
goes way up the imaginary axis.
00:54:48.180 --> 00:54:52.270
Well maybe not way up, but up.
00:54:52.270 --> 00:54:55.000
Sorry, I shouldn't have made
it quite as bad as it was.
00:54:55.000 --> 00:55:00.720
If I reduce r, I don't go
so far up, but no hope.
00:55:00.720 --> 00:55:02.620
So do you see why
that one is bad,
00:55:02.620 --> 00:55:06.000
because the
amplification factor --
00:55:06.000 --> 00:55:09.560
von Neumann tells us what
Courant did not tell us,
00:55:09.560 --> 00:55:13.300
that the amplification factor
here has magnitude bigger than
00:55:13.300 --> 00:55:13.800
1.
00:55:13.800 --> 00:55:20.150
It's outside the circle, and
every exponential is growing
00:55:20.150 --> 00:55:22.040
and there's no hope.
00:55:22.040 --> 00:55:22.540
OK.
00:55:22.540 --> 00:55:28.040
So the second last lecture on
this section 5-2 of the notes
00:55:28.040 --> 00:55:33.540
will be about Lax-Friedrichs
and Lax-Wendroff,
00:55:33.540 --> 00:55:39.750
order of accuracy, stability
and actual behavior in practice.
00:55:39.750 --> 00:55:40.250
OK.
00:55:40.250 --> 00:55:41.100
See you Wednesday.
00:55:41.100 --> 00:55:42.350
Thanks.