1
00:00:00,000 --> 00:00:01,458
INTRODUCTION: The
following content
2
00:00:01,458 --> 00:00:04,420
is provided by MIT
OpenCourseWare under a Creative
3
00:00:04,420 --> 00:00:06,090
Commons license.
4
00:00:06,090 --> 00:00:08,200
Additional information
about our license
5
00:00:08,200 --> 00:00:10,490
and MIT OpenCourseWare
in general
6
00:00:10,490 --> 00:00:11,930
is available at OCW.MIT.edu.
7
00:00:17,840 --> 00:00:18,880
PROFESSOR: OK.
8
00:00:18,880 --> 00:00:23,740
So I'll start now with
the third lecture.
9
00:00:23,740 --> 00:00:26,600
And we're into partial
differential equations.
10
00:00:26,600 --> 00:00:29,590
So we had two on ordinary
differential equations,
11
00:00:29,590 --> 00:00:33,560
and the idea of stability came
up, and the order of accuracy
12
00:00:33,560 --> 00:00:34,420
came up.
13
00:00:34,420 --> 00:00:39,160
And those will be the
key questions today --
14
00:00:39,160 --> 00:00:42,990
accuracy and stability.
15
00:00:42,990 --> 00:00:46,740
We do get beyond that, actually.
16
00:00:46,740 --> 00:00:54,030
I mean, to look at the contour,
at the output from a difference
17
00:00:54,030 --> 00:00:54,530
method.
18
00:00:54,530 --> 00:00:58,390
Once you've decided, yes, it's
stable, yes it's accurate,
19
00:00:58,390 --> 00:00:59,890
you still have to
look at the output
20
00:00:59,890 --> 00:01:02,930
and see, you know, how good
is it, where is it weak,
21
00:01:02,930 --> 00:01:06,440
where is it on target.
22
00:01:06,440 --> 00:01:11,830
But first come the accuracy
and stability questions.
23
00:01:11,830 --> 00:01:15,620
And beginning with
this equation.
24
00:01:15,620 --> 00:01:20,160
So this will be the
simplest initial value
25
00:01:20,160 --> 00:01:23,950
problem we can think of.
26
00:01:23,950 --> 00:01:26,230
I call it a one-way
wave equation.
27
00:01:26,230 --> 00:01:30,720
Notice the two-way wave
equation, which we'll get too,
28
00:01:30,720 --> 00:01:33,890
would have second
derivatives there.
29
00:01:33,890 --> 00:01:38,250
And that will send waves
in both directions.
30
00:01:38,250 --> 00:01:41,350
This, we'll see, sends a
wave only in one direction,
31
00:01:41,350 --> 00:01:43,530
so it's a nice scalar problem.
32
00:01:43,530 --> 00:01:46,100
First-order,
constant coefficient,
33
00:01:46,100 --> 00:01:47,610
that's the velocity.
34
00:01:47,610 --> 00:01:49,670
Perfect.
35
00:01:49,670 --> 00:01:55,840
The model problem
for wave equations.
36
00:01:59,440 --> 00:02:02,730
Because it's just
first order, I just
37
00:02:02,730 --> 00:02:10,270
begin it with the
function at time 0.
38
00:02:10,270 --> 00:02:16,050
So I'm looking for the solution
at time t to this equation.
39
00:02:16,050 --> 00:02:17,270
OK.
40
00:02:17,270 --> 00:02:19,770
So that will not
be hard to find.
41
00:02:19,770 --> 00:02:26,640
And I want to do it first
for pure exponentials.
42
00:02:26,640 --> 00:02:30,230
When u of x_0, the
initial function,
43
00:02:30,230 --> 00:02:32,650
is a pure exponential
e to the i*k*x.
44
00:02:32,650 --> 00:02:40,070
Because it really pays, to
-- Fourier is always around.
45
00:02:40,070 --> 00:02:46,380
And to see what happens, suppose
this is given, for example --
46
00:02:46,380 --> 00:02:51,390
so this will be my
example, e to the i*k*x.
47
00:02:51,390 --> 00:02:52,020
OK.
48
00:02:52,020 --> 00:02:53,760
Now what's special
about e to the i*k*x?
49
00:02:56,600 --> 00:02:59,830
The special thing is that with
constant coefficients and no
50
00:02:59,830 --> 00:03:05,710
boundaries, the solution will
be a multiple of e to the i*k*x.
51
00:03:05,710 --> 00:03:11,000
In other words, we can
separate variables.
52
00:03:11,000 --> 00:03:12,340
Maybe I'll put it here.
53
00:03:12,340 --> 00:03:22,880
I can then look for the solution
u to be a function times --
54
00:03:22,880 --> 00:03:26,990
a number really, but it
will depend on the time,
55
00:03:26,990 --> 00:03:34,430
on the frequency k, and the
time t -- times e to the i*k*x.
56
00:03:34,430 --> 00:03:36,580
You see how that
separated variables?
57
00:03:36,580 --> 00:03:44,960
x is separated from t, and
the frequency controls what
58
00:03:44,960 --> 00:03:48,970
this growth factor will be.
59
00:03:48,970 --> 00:03:53,410
So this growth factors is
a key quantity to compute.
60
00:03:53,410 --> 00:03:56,330
And we compute it
just by substituting
61
00:03:56,330 --> 00:04:00,130
that hope for a solution
into the equation.
62
00:04:00,130 --> 00:04:04,720
And getting an equation for
G, because e to the i*k*x will
63
00:04:04,720 --> 00:04:05,250
cancel.
64
00:04:05,250 --> 00:04:08,950
That's the key point,
that everything
65
00:04:08,950 --> 00:04:14,660
remains a pure harmonic with
that single frequency k.
66
00:04:14,660 --> 00:04:21,710
So if I plug it
in, I get dG/dt --
67
00:04:21,710 --> 00:04:26,270
I'm taking the time derivative
of u -- times e to the i*k*x,
68
00:04:26,270 --> 00:04:27,290
right?
69
00:04:27,290 --> 00:04:28,630
That's du/dt.
70
00:04:28,630 --> 00:04:33,100
Because t was separate
from x, that's what
71
00:04:33,100 --> 00:04:35,400
I get when I plug in this u.
72
00:04:35,400 --> 00:04:38,380
So I'm always
plugging in this u.
73
00:04:38,380 --> 00:04:42,810
What do I get on the right-hand
side? c, the x derivative.
74
00:04:42,810 --> 00:04:47,240
So that's just G. The x
derivative will bring down i*k,
75
00:04:47,240 --> 00:04:49,120
e to the i*k*x.
76
00:04:53,000 --> 00:04:58,010
No surprise that I can cancel e
to the i*k*x, which is never 0.
77
00:04:58,010 --> 00:05:03,010
And I have a simple
equation for G. Linear,
78
00:05:03,010 --> 00:05:05,650
constant coefficients,
but the coefficient
79
00:05:05,650 --> 00:05:07,700
depends on k, of course.
80
00:05:07,700 --> 00:05:14,300
The coefficient is i*c*k, and
of course the solution is G is
81
00:05:14,300 --> 00:05:19,860
equal to -- we're back to our
simplest model of an ordinary
82
00:05:19,860 --> 00:05:21,760
differential equation.
83
00:05:21,760 --> 00:05:25,590
Now the coefficient
a is now i*k*c,
84
00:05:25,590 --> 00:05:30,070
so it's e to the i*k*c*t, right?
85
00:05:32,910 --> 00:05:38,340
That shows us what happens
to the e to the i*k*x.
86
00:05:38,340 --> 00:05:42,020
So now I'll put that here,
because now we know it.
87
00:05:42,020 --> 00:05:47,790
So we have altogether e to
the i*k*c*t, and here's an x.
88
00:05:47,790 --> 00:05:51,340
So let's put those
together as x plus c*t,
89
00:05:51,340 --> 00:05:57,030
because that's a guide
to what's coming.
90
00:05:57,030 --> 00:06:01,360
So that's the solution:
separated variables, looked
91
00:06:01,360 --> 00:06:05,630
for the growth factor,
tried an exponential.
92
00:06:05,630 --> 00:06:08,770
And we'll do exactly the same
thing for difference method.
93
00:06:08,770 --> 00:06:11,870
So this was von
Neumann's brilliant idea,
94
00:06:11,870 --> 00:06:15,590
watch exponentials,
watch every frequency,
95
00:06:15,590 --> 00:06:20,850
and see what happens to the
multiple of e to the i*k*x.
96
00:06:20,850 --> 00:06:25,950
Now here is very special,
because all frequencies are
97
00:06:25,950 --> 00:06:31,600
producing this
combination x plus c*t.
98
00:06:31,600 --> 00:06:36,670
So when we combine frequencies
-- that's what Fourier said,
99
00:06:36,670 --> 00:06:40,920
take combinations
of these things --
100
00:06:40,920 --> 00:06:45,010
the solution will be a
combination of these things.
101
00:06:45,010 --> 00:06:48,350
And what do we get?
102
00:06:48,350 --> 00:06:51,910
If our original function
was u of x and 0,
103
00:06:51,910 --> 00:06:55,860
it's a combination of
these, e to the i*k*x's.
104
00:06:55,860 --> 00:07:01,740
And at later time, we
have the same combination,
105
00:07:01,740 --> 00:07:03,930
by linearity of these guys.
106
00:07:06,720 --> 00:07:12,560
All that's happening is x is
getting changed to x plus c*t.
107
00:07:15,320 --> 00:07:17,300
So, I'm getting the answer.
108
00:07:21,120 --> 00:07:26,440
Here was the answer
for one exponential.
109
00:07:26,440 --> 00:07:29,030
But now I'm going to do
the answer for a general u,
110
00:07:29,030 --> 00:07:31,810
and it's going to
be easy to pick off.
111
00:07:31,810 --> 00:07:36,080
It's just like picking
off this x plus c*t.
112
00:07:36,080 --> 00:07:41,710
It will be u at x
plus c*t at time 0.
113
00:07:41,710 --> 00:07:44,950
That's the solution.
114
00:07:44,950 --> 00:07:47,990
For every u, not just
for the exponentials,
115
00:07:47,990 --> 00:07:49,960
but for all
combinations of them,
116
00:07:49,960 --> 00:07:52,480
which give us any u of x and 0.
117
00:07:52,480 --> 00:07:56,535
So u of x and 0 was
a combination of e
118
00:07:56,535 --> 00:08:01,350
to the i*k*x's, and then
the solution is the same
119
00:08:01,350 --> 00:08:04,200
combination of these guys.
120
00:08:04,200 --> 00:08:10,420
Well, we can understand
what that solution is.
121
00:08:10,420 --> 00:08:13,920
It's what I call a one-way wave.
122
00:08:13,920 --> 00:08:17,520
Let me understand
what's happening here.
123
00:08:17,520 --> 00:08:19,480
So here's the key picture now.
124
00:08:25,370 --> 00:08:29,460
I want to a draw a
picture in the xt-plane.
125
00:08:29,460 --> 00:08:31,960
So I'm not graphing u here.
126
00:08:31,960 --> 00:08:39,710
This is a picture in the
xt-plane that will show us
127
00:08:39,710 --> 00:08:41,510
what this formula means.
128
00:08:41,510 --> 00:08:45,630
Because this is the
solution that we then
129
00:08:45,630 --> 00:08:48,561
want to approximate
by difference method.
130
00:08:48,561 --> 00:08:49,060
OK.
131
00:08:49,060 --> 00:08:51,490
So what does this mean?
132
00:08:51,490 --> 00:08:56,620
This means that the value,
for example, u of 0, 0 --
133
00:08:56,620 --> 00:08:57,990
so there's the point (0, 0).
134
00:09:05,830 --> 00:09:10,870
Here's what's happening, at
a later time, say up here,
135
00:09:10,870 --> 00:09:14,210
some later time,
the value of u --
136
00:09:14,210 --> 00:09:21,820
this is the line x
plus ct equals 0;
137
00:09:21,820 --> 00:09:25,480
x plus ct equals
0 along that line.
138
00:09:25,480 --> 00:09:27,510
And what's the point?
139
00:09:27,510 --> 00:09:32,300
On that line, the solution is
the same all the way along.
140
00:09:32,300 --> 00:09:35,120
So whatever the
initial value is here,
141
00:09:35,120 --> 00:09:42,150
it travels, so that u at this
point is u at this point.
142
00:09:42,150 --> 00:09:47,020
So let me to call that point
P, and say what I mean now.
143
00:09:47,020 --> 00:09:52,750
I mean that u of P is
the same as u at 0, 0.
144
00:09:52,750 --> 00:10:00,790
Because x plus c*t is
the same here and here.
145
00:10:00,790 --> 00:10:09,240
Let me take another point, let's
say x_0, another initial value.
146
00:10:09,240 --> 00:10:12,610
Then, again, along
the line like this --
147
00:10:12,610 --> 00:10:17,880
this will be the line x
plus c*t equals capital X,
148
00:10:17,880 --> 00:10:23,360
because it's the line where
x plus c*t is a constant,
149
00:10:23,360 --> 00:10:30,340
and the constant is chosen so
that it starts at this point,
150
00:10:30,340 --> 00:10:35,490
at t equals 0, X is big
X. So now -- let's see --
151
00:10:35,490 --> 00:10:42,570
I better make clear -- that
this line carries this initial
152
00:10:42,570 --> 00:10:43,370
value.
153
00:10:43,370 --> 00:10:47,500
This line carries
this initial value.
154
00:10:47,500 --> 00:10:48,810
You see it?
155
00:10:48,810 --> 00:10:51,730
The value of u all
along this line
156
00:10:51,730 --> 00:10:54,950
is the value it started
with right there.
157
00:10:54,950 --> 00:10:58,500
And you know the
name for those lines?
158
00:10:58,500 --> 00:11:03,100
So these are lines, they
happen to be straight here
159
00:11:03,100 --> 00:11:07,290
because we got constant
coefficients, straight
160
00:11:07,290 --> 00:11:09,840
and even parallel.
161
00:11:09,840 --> 00:11:13,090
And they're the lines on
which the information travels.
162
00:11:13,090 --> 00:11:17,640
Whatever the information
was at times 0.
163
00:11:17,640 --> 00:11:20,460
By information, I
mean the value of u
164
00:11:20,460 --> 00:11:25,120
at 0, 0, or the value
of u at this point.
165
00:11:25,120 --> 00:11:27,520
That information
travels along that line
166
00:11:27,520 --> 00:11:30,030
to give this solution
all along the line.
167
00:11:30,030 --> 00:11:33,180
And the name of the
line, anybody know it?
168
00:11:33,180 --> 00:11:34,820
Characteristic.
169
00:11:34,820 --> 00:11:45,005
So this is a characteristic
line, they all are.
170
00:11:45,005 --> 00:11:45,660
This too.
171
00:11:45,660 --> 00:11:49,370
All these line are
characteristic lines.
172
00:11:49,370 --> 00:11:50,655
Can you read characteristic?
173
00:11:50,655 --> 00:11:54,830
I should of have written
it a little better.
174
00:11:54,830 --> 00:12:02,580
So this is like a key
feature of wave equations.
175
00:12:02,580 --> 00:12:04,460
It's a key feature
of wave equations
176
00:12:04,460 --> 00:12:09,200
that we will not see
for heat equations.
177
00:12:09,200 --> 00:12:17,810
And so let me just say it
again, because it will bear also
178
00:12:17,810 --> 00:12:21,430
on the stability question
for difference equations.
179
00:12:21,430 --> 00:12:23,630
The information, the
true information,
180
00:12:23,630 --> 00:12:27,410
for the true solution, travels
along characteristic lines.
181
00:12:30,370 --> 00:12:33,480
We're in one
dimension here, which
182
00:12:33,480 --> 00:12:36,590
is a major simplification.
183
00:12:36,590 --> 00:12:42,970
In two dimensions we'll
have characteristic cones.
184
00:12:42,970 --> 00:12:46,450
In three dimension certainly
we'd call it a cone.
185
00:12:46,450 --> 00:12:48,170
And actually, I
guess what I'm saying
186
00:12:48,170 --> 00:12:54,540
is that if I speak
a word, you know,
187
00:12:54,540 --> 00:13:00,270
my voice or the sound waves
solve the 3D wave equation.
188
00:13:00,270 --> 00:13:04,710
So when I snap my
fingers, that sound
189
00:13:04,710 --> 00:13:14,450
travels from this point
out along characteristics.
190
00:13:17,670 --> 00:13:19,930
And of course it travels
in all directions,
191
00:13:19,930 --> 00:13:25,250
so we've got a more interesting,
more complicated picture
192
00:13:25,250 --> 00:13:28,220
in higher dimensions,
but we really
193
00:13:28,220 --> 00:13:30,370
see it here in one dimension.
194
00:13:30,370 --> 00:13:31,630
OK.
195
00:13:31,630 --> 00:13:39,120
Now, I should also include
a graph of the solution.
196
00:13:39,120 --> 00:13:41,000
What does the
solution look like?
197
00:13:41,000 --> 00:13:46,010
Maybe I'll find a spot
here for that graph.
198
00:13:49,210 --> 00:13:51,140
Now I'm going to graph u.
199
00:13:54,180 --> 00:13:56,270
This is still x.
200
00:13:56,270 --> 00:13:59,950
So I'll graph u at maybe
two different times.
201
00:13:59,950 --> 00:14:01,650
So the starting time.
202
00:14:01,650 --> 00:14:04,280
Suppose we have a wall of water.
203
00:14:07,270 --> 00:14:14,710
So this will be u of x and 0,
a step function, maybe at 0.
204
00:14:14,710 --> 00:14:20,970
So u of x and 0 is 1 and then 0.
205
00:14:20,970 --> 00:14:21,500
OK.
206
00:14:24,150 --> 00:14:29,060
So there's a typical
starting initial value.
207
00:14:32,260 --> 00:14:34,220
Well, I don't know
if it's typical.
208
00:14:34,220 --> 00:14:36,640
Pretty special to
have 1 and then 0,
209
00:14:36,640 --> 00:14:38,650
a perfect step function.
210
00:14:38,650 --> 00:14:40,530
But this will illustrate --
211
00:14:40,530 --> 00:14:43,660
Now I want to ask, what's
the solution to the equation?
212
00:14:43,660 --> 00:14:47,600
What is u of x and t?
213
00:14:47,600 --> 00:14:50,370
I want to graph u of x and t.
214
00:14:50,370 --> 00:14:52,580
What what happens?
215
00:14:52,580 --> 00:14:57,640
You have to assemble, sort
of, this picture, which
216
00:14:57,640 --> 00:15:03,910
is in the xt-plane, into a
graph here of u of x and t.
217
00:15:03,910 --> 00:15:05,390
What happens?
218
00:15:05,390 --> 00:15:10,980
Well all these zero
starting values travel along
219
00:15:10,980 --> 00:15:15,520
characteristics, and tell
us that u is 0 along all
220
00:15:15,520 --> 00:15:16,450
these characteristics.
221
00:15:16,450 --> 00:15:20,650
So along all these
characteristics, u is 0.
222
00:15:20,650 --> 00:15:23,740
This here, the
starting value is 1.
223
00:15:23,740 --> 00:15:31,180
So along these characteristics
we're starting with a 1,
224
00:15:31,180 --> 00:15:32,290
we end with a 1.
225
00:15:32,290 --> 00:15:33,780
Do you see what happens?
226
00:15:37,340 --> 00:15:38,580
How do I graph it?
227
00:15:38,580 --> 00:15:40,530
The wave is moving.
228
00:15:40,530 --> 00:15:44,930
The wall of water is moving
that way, moving to the left.
229
00:15:44,930 --> 00:15:48,080
Because I'm taking c to
be a positive number.
230
00:15:48,080 --> 00:15:54,690
So u of x and t is a wall,
or a wave you could say,
231
00:15:54,690 --> 00:16:04,270
moving left with speed c.
232
00:16:06,780 --> 00:16:10,960
Every solution to the
equation is doing this.
233
00:16:10,960 --> 00:16:16,050
And in this particular
case it's a wall of water
234
00:16:16,050 --> 00:16:18,290
and it stays a wall of water.
235
00:16:18,290 --> 00:16:19,350
That the point.
236
00:16:19,350 --> 00:16:22,370
Shapes are not changed as we go.
237
00:16:22,370 --> 00:16:29,370
There's no -- dispersion would
be the right word, I think.
238
00:16:29,370 --> 00:16:32,510
We would expect, in
a general equation,
239
00:16:32,510 --> 00:16:41,060
that the shape of the wave would
change a little as it travels.
240
00:16:41,060 --> 00:16:43,920
In this equation
it doesn't change.
241
00:16:43,920 --> 00:16:47,680
The shape stays the same.
242
00:16:47,680 --> 00:16:51,820
See, again I'm thinking of
this wave as a combination
243
00:16:51,820 --> 00:16:53,660
of pure exponentials.
244
00:16:53,660 --> 00:16:56,240
And they all travel
with the same speed c,
245
00:16:56,240 --> 00:16:58,520
so the whole wave
travels with speed c.
246
00:16:58,520 --> 00:17:05,980
And at a later time, that's
the graph of the solution.
247
00:17:05,980 --> 00:17:08,280
OK.
248
00:17:08,280 --> 00:17:15,900
So that much is all we have
to do, all we can do really,
249
00:17:15,900 --> 00:17:18,310
in solving the
differential equations.
250
00:17:21,140 --> 00:17:22,530
It's a simple model, certainly.
251
00:17:22,530 --> 00:17:25,680
But now I come to the
difference equation.
252
00:17:25,680 --> 00:17:27,710
Well, when I say the
difference equation,
253
00:17:27,710 --> 00:17:30,720
I should say equations plural.
254
00:17:30,720 --> 00:17:35,800
Because here I've written
four possibilities.
255
00:17:40,990 --> 00:17:45,870
Three of them are actually
used, and one is a disaster.
256
00:17:52,640 --> 00:17:56,860
But none of the four is perfect.
257
00:17:56,860 --> 00:17:59,460
Most people would
say Lax-Wendroff
258
00:17:59,460 --> 00:18:04,330
is the best of these
four, because it has
259
00:18:04,330 --> 00:18:06,250
one extra order of accuracy.
260
00:18:09,500 --> 00:18:11,100
Oh yeah, yeah.
261
00:18:11,100 --> 00:18:14,350
I guess these all have
only first-order accuracy.
262
00:18:17,160 --> 00:18:19,200
But Lax-Wendroff
moves up to second.
263
00:18:19,200 --> 00:18:23,930
So that's a method
that everybody knows,
264
00:18:23,930 --> 00:18:25,650
because it gets up to second.
265
00:18:25,650 --> 00:18:29,860
But actually upwind is the
first one to start with.
266
00:18:29,860 --> 00:18:32,120
Let me start with that one.
267
00:18:32,120 --> 00:18:33,060
OK.
268
00:18:33,060 --> 00:18:37,850
So I've multiplied up by
the delta t that should be
269
00:18:37,850 --> 00:18:42,410
in the denominator there,
especially so that you would
270
00:18:42,410 --> 00:18:48,620
see -- so upwind, or
forward difference --
271
00:18:48,620 --> 00:18:51,580
I'm taking the standard
forward difference in time --
272
00:18:51,580 --> 00:18:55,330
all these methods are
going to be explicit,
273
00:18:55,330 --> 00:19:01,370
so they're all going to be
solvable in a simple way for u
274
00:19:01,370 --> 00:19:03,400
at the new time.
275
00:19:03,400 --> 00:19:07,780
So a forward difference
in time for du/dt,
276
00:19:07,780 --> 00:19:12,450
and c times a forward
difference in space for du/dx.
277
00:19:12,450 --> 00:19:15,180
So that's the first idea
that would occur to you,
278
00:19:15,180 --> 00:19:19,980
and it's pretty reasonable.
279
00:19:19,980 --> 00:19:24,480
We can check its accuracy, but
you can guess what it would be.
280
00:19:24,480 --> 00:19:29,070
What's your guess on the
accuracy of this method?
281
00:19:29,070 --> 00:19:31,220
You're seeing a
forward difference
282
00:19:31,220 --> 00:19:34,360
in time, a forward
difference in space.
283
00:19:34,360 --> 00:19:37,680
The odds are those finite
differences give you
284
00:19:37,680 --> 00:19:43,400
an accuracy p -- if we use p
as the measure of accuracy --
285
00:19:43,400 --> 00:19:50,580
which would be probably
1, first-order accurate.
286
00:19:50,580 --> 00:19:55,500
So we'll see the accuracy
as only p equal to 1.
287
00:19:55,500 --> 00:19:57,680
OK.
288
00:19:57,680 --> 00:20:00,290
What about the stability?
289
00:20:00,290 --> 00:20:02,090
I'm looking at
this first method.
290
00:20:05,130 --> 00:20:07,800
So one comment
about the method is
291
00:20:07,800 --> 00:20:12,180
that this ratio c
delta t over delta x,
292
00:20:12,180 --> 00:20:20,830
let me call it r,
that's a key number.
293
00:20:20,830 --> 00:20:28,350
it's called the
Courant number by some.
294
00:20:32,010 --> 00:20:35,290
So in the literature you
might see the phrase Courant
295
00:20:35,290 --> 00:20:38,000
number for that ratio r.
296
00:20:38,000 --> 00:20:43,420
And maybe my first
point is, stability
297
00:20:43,420 --> 00:20:47,020
is going to put a bound on r.
298
00:20:47,020 --> 00:20:50,580
We can tell right away,
for this explicit method
299
00:20:50,580 --> 00:20:58,030
and for any explicit method,
that r can't be unlimited.
300
00:20:58,030 --> 00:21:02,230
There's going to be
a bound on r, which
301
00:21:02,230 --> 00:21:04,180
it means a bound on delta t.
302
00:21:04,180 --> 00:21:09,700
It's telling us that delta t has
to be less than some constant
303
00:21:09,700 --> 00:21:12,820
times delta x.
304
00:21:12,820 --> 00:21:17,240
And stability is the
job find that constant.
305
00:21:17,240 --> 00:21:20,060
How small does
delta t have to be?
306
00:21:20,060 --> 00:21:25,780
Now let me sort of understand
this forward difference method
307
00:21:25,780 --> 00:21:28,210
in this picture.
308
00:21:30,740 --> 00:21:37,180
So I'm going to do the forward
difference, delta t of u
309
00:21:37,180 --> 00:21:44,630
equals that ratio times the
forward difference of the space
310
00:21:44,630 --> 00:21:47,900
difference, so time differences
is that ratio times this space
311
00:21:47,900 --> 00:21:48,620
difference.
312
00:21:48,620 --> 00:21:49,440
OK.
313
00:21:49,440 --> 00:21:51,850
Method 1.
314
00:21:51,850 --> 00:21:53,520
OK.
315
00:21:53,520 --> 00:22:01,510
So I guess somehow, you
want to see that the --
316
00:22:01,510 --> 00:22:04,200
you want to see a picture
like this for the difference
317
00:22:04,200 --> 00:22:07,880
equation, So the
difference equation,
318
00:22:07,880 --> 00:22:16,965
we imagine we've got steps delta
x, all these steps are delta x.
319
00:22:16,965 --> 00:22:19,420
Let's suppose that's 0.
320
00:22:19,420 --> 00:22:20,710
OK.
321
00:22:20,710 --> 00:22:22,390
So what happening now?
322
00:22:22,390 --> 00:22:27,460
And time going this way and
I'm solving this equation.
323
00:22:27,460 --> 00:22:28,460
What's happening here?
324
00:22:36,390 --> 00:22:42,650
Let me copy this method,
u at a position j --
325
00:22:42,650 --> 00:22:47,950
so this might be the
point j delta x --
326
00:22:47,950 --> 00:22:54,590
at time n plus 1 is -- I want to
write this equation, as always,
327
00:22:54,590 --> 00:22:56,640
in the most convenient way.
328
00:22:56,640 --> 00:22:58,120
So what am I going to do?
329
00:22:58,120 --> 00:23:00,370
I'm going to take
this u of x and t
330
00:23:00,370 --> 00:23:03,450
and put it on the
right-hand side.
331
00:23:03,450 --> 00:23:09,650
So then my equation looks
like that ratio r times u
332
00:23:09,650 --> 00:23:13,790
at j plus 1 at time n.
333
00:23:13,790 --> 00:23:16,640
That's this.
334
00:23:16,640 --> 00:23:24,120
I'm one position over,
but I'm at the given time.
335
00:23:24,120 --> 00:23:30,160
And then what's the
coefficient of u_(j, n)?
336
00:23:30,160 --> 00:23:33,470
So can you just tell me,
what do I put in there?
337
00:23:33,470 --> 00:23:36,750
So this will be that nice
way to look at our difference
338
00:23:36,750 --> 00:23:38,070
equation.
339
00:23:38,070 --> 00:23:43,510
Each new value is a combination
of two old values, r
340
00:23:43,510 --> 00:23:47,570
times the guy here.
341
00:23:47,570 --> 00:23:50,200
So in other words, here's
my little molecule.
342
00:23:52,720 --> 00:23:54,920
This is the new value.
343
00:23:54,920 --> 00:23:58,700
It comes from r
times this plus what,
344
00:23:58,700 --> 00:24:01,600
you have to tell
me what multiplies
345
00:24:01,600 --> 00:24:03,350
this u at this point.
346
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,
347
00:24:10,910 --> 00:24:11,410
n).
348
00:24:11,410 --> 00:24:14,340
And what goes in parentheses?
349
00:24:14,340 --> 00:24:16,660
1 minus r.
350
00:24:16,660 --> 00:24:23,020
Because I get the 1 when that
flips over to the other side.
351
00:24:23,020 --> 00:24:24,120
Good.
352
00:24:24,120 --> 00:24:26,560
So it's just a combination.
353
00:24:26,560 --> 00:24:29,030
The new value is a
combination of those two.
354
00:24:31,790 --> 00:24:41,230
And I guess what I want to show
is that it could not possibly
355
00:24:41,230 --> 00:24:48,360
be stable unless r is
less or equal to 1.
356
00:24:48,360 --> 00:24:51,250
So this will be the
Courant condition.
357
00:24:51,250 --> 00:24:54,310
The condition on
the Courant number.
358
00:24:54,310 --> 00:25:00,110
So the Courant
condition or the CFL --
359
00:25:00,110 --> 00:25:07,230
that's a really a better
condition -- will be --
360
00:25:07,230 --> 00:25:08,890
let me say what it is.
361
00:25:08,890 --> 00:25:14,980
The CFL condition is
r less or equal to 1.
362
00:25:14,980 --> 00:25:20,770
That's a condition for
stability or convergence
363
00:25:20,770 --> 00:25:27,490
that comes to us from comparing
the real characteristics
364
00:25:27,490 --> 00:25:31,461
with the finite
difference picture.
365
00:25:31,461 --> 00:25:31,960
OK.
366
00:25:31,960 --> 00:25:33,920
So what's CFL?
367
00:25:33,920 --> 00:25:35,260
C is Courant still.
368
00:25:35,260 --> 00:25:40,450
So this came from a
really early paper,
369
00:25:40,450 --> 00:25:43,850
and I think actually Lewy.
370
00:25:43,850 --> 00:25:46,170
That's Courant,
that's Friedrichs,
371
00:25:46,170 --> 00:25:47,930
they were close friends.
372
00:25:47,930 --> 00:25:51,330
That's Lewy, all three
were friends actually.
373
00:25:51,330 --> 00:25:58,400
And I think it was actually
Lewy who spotted what we're just
374
00:25:58,400 --> 00:26:02,450
going to do right now,
the requirement that r
375
00:26:02,450 --> 00:26:03,870
had to be less or equal 1.
376
00:26:06,700 --> 00:26:13,690
Now let me just make clear that
this Courant-Friedrichs-Lewy
377
00:26:13,690 --> 00:26:16,770
condition is going to be
a necessary condition.
378
00:26:16,770 --> 00:26:21,050
It has to hold, or
there is no hope.
379
00:26:21,050 --> 00:26:27,780
But it's not enough, it's
not a sufficient condition.
380
00:26:27,780 --> 00:26:33,830
We can't guarantee that a method
stable just because the Courant
381
00:26:33,830 --> 00:26:35,670
condition is satisfied.
382
00:26:35,670 --> 00:26:37,220
The Courant condition
will tell us
383
00:26:37,220 --> 00:26:39,830
something about the
position of characteristics,
384
00:26:39,830 --> 00:26:43,220
we'll see it in a second.
385
00:26:43,220 --> 00:26:50,130
For example, this centered
one is unstable, this guy,
386
00:26:50,130 --> 00:26:52,180
when the right-hand
side -- you might say,
387
00:26:52,180 --> 00:26:56,070
oh this is a better method;
always better to take
388
00:26:56,070 --> 00:26:59,680
a centered difference for
du/dx than a one-sided.
389
00:26:59,680 --> 00:27:02,680
But not now.
390
00:27:02,680 --> 00:27:06,790
The one-sided one is OK.
391
00:27:06,790 --> 00:27:14,690
The centered one is going
to be totally unstable,
392
00:27:14,690 --> 00:27:19,470
for all r, this centered one.
393
00:27:19,470 --> 00:27:25,600
And we'll identify that not
from Courant-Friedrichs-Lewy --
394
00:27:25,600 --> 00:27:28,540
their paper wouldn't have
spotted the difference between
395
00:27:28,540 --> 00:27:31,870
one and two, but
von Neumann did;
396
00:27:31,870 --> 00:27:38,130
von Neumann quickly noticed that
if you use an exponential --
397
00:27:38,130 --> 00:27:40,360
so we'll do one van
Neumann in a moment --
398
00:27:40,360 --> 00:27:44,280
if you plug in an
exponential to number 2,
399
00:27:44,280 --> 00:27:47,440
this centered
difference, it takes off.
400
00:27:47,440 --> 00:27:51,670
And it's unstable even
if delta t is small.
401
00:27:51,670 --> 00:27:52,400
OK.
402
00:27:52,400 --> 00:27:56,000
Now what is this CFL,
Courant-Friedrichs-Lewy
403
00:27:56,000 --> 00:27:56,500
condition?
404
00:27:56,500 --> 00:27:59,960
Where does that come from?
405
00:27:59,960 --> 00:28:04,790
It comes from just thinking
about the information.
406
00:28:08,850 --> 00:28:10,450
I have to write down
the thinking now
407
00:28:10,450 --> 00:28:13,260
that goes into the
Courant-Friedrichs-Lewy
408
00:28:13,260 --> 00:28:17,930
condition, the CFL condition.
409
00:28:24,920 --> 00:28:26,640
OK.
410
00:28:26,640 --> 00:28:29,710
It's straightforward.
411
00:28:29,710 --> 00:28:42,110
I have to think, at a time t,
let's say t equals n delta t.
412
00:28:42,110 --> 00:28:47,710
Suppose I've taken
n times steps.
413
00:28:47,710 --> 00:28:58,780
Then the true u at, let's
say, 0 and that time t is --
414
00:28:58,780 --> 00:29:02,720
or x and t, because we
know the true solution.
415
00:29:02,720 --> 00:29:08,020
The true u at x and
t is, as we know,
416
00:29:08,020 --> 00:29:17,080
the initial function at
the point x plus c*t.
417
00:29:17,080 --> 00:29:22,780
So that's the correct solution.
418
00:29:22,780 --> 00:29:25,920
And Courant-Friedrichs-Lewy
are just
419
00:29:25,920 --> 00:29:33,500
saying that you better use this
number in finite difference
420
00:29:33,500 --> 00:29:38,710
method or you don't
have a chance.
421
00:29:38,710 --> 00:29:39,210
Right.
422
00:29:39,210 --> 00:29:42,240
That makes sense.
423
00:29:42,240 --> 00:29:46,291
So what do I mean
by use this number?
424
00:29:46,291 --> 00:29:46,790
OK.
425
00:29:46,790 --> 00:29:48,450
So let me draw.
426
00:29:48,450 --> 00:29:52,110
So u at x and t is
some point here.
427
00:29:52,110 --> 00:29:54,540
This is at the point x and t.
428
00:29:54,540 --> 00:29:57,010
This used these two values.
429
00:29:57,010 --> 00:30:00,350
They use these three values.
430
00:30:00,350 --> 00:30:02,620
This one used that one,
that one, that one.
431
00:30:02,620 --> 00:30:04,800
This one used those two.
432
00:30:04,800 --> 00:30:08,750
Those four used
these five values.
433
00:30:08,750 --> 00:30:09,250
Right.
434
00:30:15,470 --> 00:30:20,180
See, the difference method is
not propagating the information
435
00:30:20,180 --> 00:30:26,370
entirely on that line,
it's really taking values
436
00:30:26,370 --> 00:30:30,020
over that whole interval
with some combinations of r
437
00:30:30,020 --> 00:30:31,520
and 1 minus r.
438
00:30:31,520 --> 00:30:33,840
And in the end, after
five times steps,
439
00:30:33,840 --> 00:30:37,950
it's giving us this
value up there.
440
00:30:37,950 --> 00:30:46,700
But the point is that if this
point x plus c*t were out here,
441
00:30:46,700 --> 00:30:50,890
then refining delta x
and refining delta t,
442
00:30:50,890 --> 00:30:54,440
and using more and more points,
and filling in and using more
443
00:30:54,440 --> 00:30:58,900
of these, but not getting out
here, would get you nowhere.
444
00:30:58,900 --> 00:31:00,410
You wouldn't have a chance.
445
00:31:00,410 --> 00:31:02,090
So that's the
Courant-Friedrichs-Lewy
446
00:31:02,090 --> 00:31:02,870
condition.
447
00:31:02,870 --> 00:31:05,010
How far out is this?
448
00:31:05,010 --> 00:31:09,240
This is n delta x inside this.
449
00:31:09,240 --> 00:31:14,870
And if this is x, this
is n delta x's away,
450
00:31:14,870 --> 00:31:18,520
and this is x plus c*t.
451
00:31:18,520 --> 00:31:20,470
And c is n delta t's.
452
00:31:24,890 --> 00:31:26,390
Right?
453
00:31:26,390 --> 00:31:33,150
t is n delta t.
454
00:31:33,150 --> 00:31:33,840
Are you with me?
455
00:31:38,690 --> 00:31:43,280
As I keep delta t over
delta x, the ratio r, fixed
456
00:31:43,280 --> 00:31:49,130
and use more and more points,
I'm filling up this interval
457
00:31:49,130 --> 00:31:53,100
with points that I've used.
458
00:31:53,100 --> 00:31:56,590
But I'm never going to
get to a point there.
459
00:31:56,590 --> 00:32:02,890
So the idea is then,
unstable, couldn't converge,
460
00:32:02,890 --> 00:32:16,120
couldn't work, if the distance
reached here, n delta x,
461
00:32:16,120 --> 00:32:24,410
is smaller than c*n delta
t, it couldn't work.
462
00:32:24,410 --> 00:32:26,910
OK.
463
00:32:26,910 --> 00:32:28,830
So I'm taking a negative
point of view here.
464
00:32:28,830 --> 00:32:32,860
It can't work in this case.
465
00:32:32,860 --> 00:32:35,510
The reason I take that
negative point of view is I'm
466
00:32:35,510 --> 00:32:41,630
not able to say it does
work in the case when
467
00:32:41,630 --> 00:32:44,770
delta x is big enough
compared to delta t,
468
00:32:44,770 --> 00:32:46,060
and I include that point.
469
00:32:46,060 --> 00:32:47,330
I can't be sure.
470
00:32:47,330 --> 00:32:50,390
But I can be sure that
if I don't include
471
00:32:50,390 --> 00:32:56,490
that neighborhood of where
the true u is produced,
472
00:32:56,490 --> 00:32:57,530
it can't have a chance.
473
00:32:57,530 --> 00:33:02,100
So let me just cancel
n, divide by delta x.
474
00:33:02,100 --> 00:33:09,470
And I say fail if 1 is
smaller then c delta t
475
00:33:09,470 --> 00:33:11,120
over delta x, which is r.
476
00:33:11,120 --> 00:33:20,210
It fails if r is bigger
than 1, by this reasoning
477
00:33:20,210 --> 00:33:21,290
of characteristics.
478
00:33:25,880 --> 00:33:29,090
There are two more cases that
are worth thinking about.
479
00:33:29,090 --> 00:33:37,100
Suppose the method was downwind.
480
00:33:37,100 --> 00:33:41,320
So this is upwind, because
I take a forward difference.
481
00:33:41,320 --> 00:33:44,580
The wind is blowing this way.
482
00:33:44,580 --> 00:33:52,200
Forgive me for incomplete
use of the word wind.
483
00:33:52,200 --> 00:33:53,640
I don't know what it means.
484
00:33:53,640 --> 00:33:56,330
But one way or another,
whatever, the wind
485
00:33:56,330 --> 00:33:57,980
is blowing this way.
486
00:33:57,980 --> 00:34:02,040
The values are coming
from the upwind direction.
487
00:34:02,040 --> 00:34:04,790
And that's good, because
the true value comes
488
00:34:04,790 --> 00:34:06,640
from the upwind direction.
489
00:34:06,640 --> 00:34:09,570
That's what we saw
in characteristics,
490
00:34:09,570 --> 00:34:12,160
the values are blowing downwind.
491
00:34:12,160 --> 00:34:17,410
So, what would happen if I use
a backward difference here?
492
00:34:17,410 --> 00:34:20,920
So I didn't write that
bad idea, but it's
493
00:34:20,920 --> 00:34:28,310
important to realizes that's
method 1a, a bad idea,
494
00:34:28,310 --> 00:34:31,060
is to use a backward
difference here.
495
00:34:31,060 --> 00:34:35,880
I should maybe call
it 1b, for backward.
496
00:34:35,880 --> 00:34:38,000
You see that it would fail?
497
00:34:38,000 --> 00:34:40,350
If I used a backward
difference, what will
498
00:34:40,350 --> 00:34:42,000
what happen to this picture?
499
00:34:42,000 --> 00:34:45,110
This value would come
from stuff on the left.
500
00:34:45,110 --> 00:34:47,350
It would totally
have no chance to use
501
00:34:47,350 --> 00:34:51,730
the correct initial value.
502
00:34:51,730 --> 00:34:55,330
So a backward difference
is an immediate failure.
503
00:34:55,330 --> 00:35:05,500
So r has to be -- It
will also fail if --
504
00:35:05,500 --> 00:35:09,360
well I was going to
say r less than 0.
505
00:35:09,360 --> 00:35:12,460
I don't know, can I say that?
506
00:35:12,460 --> 00:35:16,030
The way r could be less than
0 would be the delta x being
507
00:35:16,030 --> 00:35:21,360
negative, and that's what I
mean by the downwind method,
508
00:35:21,360 --> 00:35:25,960
where I'm looking for
looking for the value here,
509
00:35:25,960 --> 00:35:28,590
and of course I'm
not finding it.
510
00:35:28,590 --> 00:35:30,510
OK.
511
00:35:30,510 --> 00:35:35,850
So I guess I'm saying that
Courant-Friedrichs-Lewy tells
512
00:35:35,850 --> 00:35:42,700
us right away that this method
will only have a chance --
513
00:35:42,700 --> 00:35:48,700
it only has a chance if
r is -- so, possible,
514
00:35:48,700 --> 00:35:52,250
and in fact this is the
stability condition.
515
00:35:52,250 --> 00:35:56,290
So let me write that fact,
but we haven't proved it yet.
516
00:35:56,290 --> 00:36:00,970
It's stable for r
between 0 and 1.
517
00:36:00,970 --> 00:36:07,250
That's the stability condition,
which limits delta t.
518
00:36:07,250 --> 00:36:12,650
Because r is delta
t over delta x.
519
00:36:12,650 --> 00:36:16,710
And this says that
delta t can't be larger
520
00:36:16,710 --> 00:36:19,011
than the multiple of delta x.
521
00:36:19,011 --> 00:36:19,510
OK.
522
00:36:19,510 --> 00:36:25,910
You might say, that sounds
like delta t is too small.
523
00:36:25,910 --> 00:36:28,360
Is stability too restrictive?
524
00:36:28,360 --> 00:36:32,560
Well it's restrictive certainly,
because it limits delta t.
525
00:36:32,560 --> 00:36:40,980
But actually, for these methods,
accuracy also limits delta t.
526
00:36:40,980 --> 00:36:49,130
If I look for an implicit
method, that would allow me --
527
00:36:49,130 --> 00:36:54,450
if I looked for a method that
allowed a bigger delta t,
528
00:36:54,450 --> 00:36:59,780
then the error of
that, in that method,
529
00:36:59,780 --> 00:37:01,960
proportional to delta
t, would be too big.
530
00:37:01,960 --> 00:37:05,470
In other words,
accuracy as well as
531
00:37:05,470 --> 00:37:10,470
stability is keeping delta
t of the order of delta x.
532
00:37:10,470 --> 00:37:17,430
Accuracy as well as stability
is keeping r within a bound,
533
00:37:17,430 --> 00:37:21,230
and stability is keeping
it within those bounds.
534
00:37:21,230 --> 00:37:22,490
OK.
535
00:37:22,490 --> 00:37:26,700
So I still have to show
that the method is stable.
536
00:37:26,700 --> 00:37:28,840
The Courant-Friedrichs-Lewy
condition
537
00:37:28,840 --> 00:37:35,760
just helps to eliminate
impossible ratios.
538
00:37:35,760 --> 00:37:36,680
OK.
539
00:37:36,680 --> 00:37:42,490
One more point, which of course
everybody notices, in solving
540
00:37:42,490 --> 00:37:46,870
the difference equation.
541
00:37:46,870 --> 00:37:50,960
Suppose r is exactly 1.
542
00:37:50,960 --> 00:37:53,710
Think about the case
where r is exactly 1.
543
00:37:58,080 --> 00:38:00,550
Remember that's c
delta t over delta x.
544
00:38:06,650 --> 00:38:12,400
Suppose r is exactly 1, then
what does the method do?
545
00:38:12,400 --> 00:38:16,190
The method takes the
new value, r is 1.
546
00:38:16,190 --> 00:38:18,140
This is 0 now.
547
00:38:18,140 --> 00:38:22,840
So the new value is then, when
r is 1, is that old value.
548
00:38:22,840 --> 00:38:28,880
In this picture, when r is
1 this value is this one.
549
00:38:28,880 --> 00:38:34,300
The values are
traveling along a line.
550
00:38:34,300 --> 00:38:39,150
I'm not using these you see,
because if r is exactly 1,
551
00:38:39,150 --> 00:38:42,990
these are exactly 0.
552
00:38:42,990 --> 00:38:45,100
Now is that good?
553
00:38:45,100 --> 00:38:50,780
Actually it's terrific,
because that line, when r is 1,
554
00:38:50,780 --> 00:38:55,210
is the correct
characteristic line.
555
00:38:55,210 --> 00:39:00,020
If r is 1, if c delta
t equals delta x,
556
00:39:00,020 --> 00:39:06,040
I'm going up exactly with that
slope that the true line does.
557
00:39:06,040 --> 00:39:11,710
In other words, the
difference equation
558
00:39:11,710 --> 00:39:14,900
gives exactly the solution
to the differential equation.
559
00:39:14,900 --> 00:39:17,510
Because it's so
simple of course.
560
00:39:17,510 --> 00:39:19,970
Couldn't do it --
well, that's the point,
561
00:39:19,970 --> 00:39:27,230
we can't do it for big problems,
because in a big problem c is
562
00:39:27,230 --> 00:39:30,900
going to be variable.
563
00:39:30,900 --> 00:39:35,640
Maybe the problem, c may depend
on the position or the time,
564
00:39:35,640 --> 00:39:37,940
or it might depend
on the solution
565
00:39:37,940 --> 00:39:40,420
u in a non-linear problem.
566
00:39:40,420 --> 00:39:42,460
Those are ahead of us.
567
00:39:42,460 --> 00:39:47,100
But this possibility in
1D -- it's only, really,
568
00:39:47,100 --> 00:39:51,960
a one-dimensional possibility,
where the true information
569
00:39:51,960 --> 00:39:56,240
travels on a line, and we could
just hope to stay close to that
570
00:39:56,240 --> 00:39:57,491
characteristic line.
571
00:39:57,491 --> 00:39:57,990
OK.
572
00:40:01,340 --> 00:40:08,770
Now I'm ready to tackle,
for any method, the --
573
00:40:08,770 --> 00:40:10,750
let me get these guys up again.
574
00:40:13,980 --> 00:40:18,090
So first, I want to see,
why is upwind stable,
575
00:40:18,090 --> 00:40:22,070
and why is centered unstable.
576
00:40:22,070 --> 00:40:25,480
Should I start with the
stability question, rather than
577
00:40:25,480 --> 00:40:27,360
the accuracy question?
578
00:40:27,360 --> 00:40:30,230
The accuracy we could
guess was first order,
579
00:40:30,230 --> 00:40:33,440
until we get to Lax-Wendroff.
580
00:40:33,440 --> 00:40:36,900
So accuracy is going
to come next time.
581
00:40:40,410 --> 00:40:46,450
We've had Courant's take on
stability, the CFL condition,
582
00:40:46,450 --> 00:40:52,060
but now I'm ready for von
Neumann's deeper insight.
583
00:40:52,060 --> 00:40:52,560
OK.
584
00:40:52,560 --> 00:40:55,940
So how does von Neumann
study stability?
585
00:40:55,940 --> 00:40:58,580
He watches every e to the i*k*x.
586
00:41:01,400 --> 00:41:05,950
So von Neumann's test is going
to be each e to the i*k*x
587
00:41:05,950 --> 00:41:11,830
should have a growth factor,
in the difference equation,
588
00:41:11,830 --> 00:41:14,840
smaller then 1.
589
00:41:14,840 --> 00:41:18,350
The growth factor in the
differential equation,
590
00:41:18,350 --> 00:41:22,670
of course, was right on.
591
00:41:22,670 --> 00:41:27,960
This has magnitude exactly 1.
592
00:41:27,960 --> 00:41:34,130
So wave equations are not
giving us any space to work in.
593
00:41:34,130 --> 00:41:36,500
Because we want -- the growth
factor and the difference
594
00:41:36,500 --> 00:41:39,560
equation, we want it to
be close to the real one.
595
00:41:39,560 --> 00:41:45,930
And at the same time, it
better be not -- the real one,
596
00:41:45,930 --> 00:41:50,710
having absolute value
exactly 1 on the unit circle.
597
00:41:50,710 --> 00:41:53,680
But the difference
equation is allowed
598
00:41:53,680 --> 00:41:57,030
to go into the unit
circle, but not to go out.
599
00:41:57,030 --> 00:41:57,540
OK.
600
00:41:57,540 --> 00:42:01,790
That will separate the
good ones from the bad.
601
00:42:01,790 --> 00:42:02,440
OK.
602
00:42:02,440 --> 00:42:12,525
Let me work here on -- Can
I copy the equation u_(j,
603
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).
604
00:42:23,510 --> 00:42:24,710
OK.
605
00:42:24,710 --> 00:42:29,030
Now I'm going to do
an exponential again.
606
00:42:29,030 --> 00:42:34,290
So I'm going to
have u, say, 0, n.
607
00:42:39,610 --> 00:42:43,590
I'm going to start
from e to the i*k*x.
608
00:42:48,470 --> 00:43:01,700
Sorry, let me say -- So, time
0 and position n will be e
609
00:43:01,700 --> 00:43:06,891
to the i*k*n delta x.
610
00:43:06,891 --> 00:43:07,390
Right.
611
00:43:07,390 --> 00:43:11,320
That's my initial,
e to the i*k*x,
612
00:43:11,320 --> 00:43:14,100
that's my pure frequency.
613
00:43:14,100 --> 00:43:20,100
I plug that in to the
-- oh, not n but j;
614
00:43:20,100 --> 00:43:25,270
j is measuring how many --
sorry, let's get it right --
615
00:43:25,270 --> 00:43:29,970
j is measuring how many
delta x's I'm going across;
616
00:43:29,970 --> 00:43:32,960
n is measuring how many
delta t's I'm going up.
617
00:43:32,960 --> 00:43:34,900
So this is the key,
here's von Neumann.
618
00:43:38,520 --> 00:43:43,000
Try a pure exponential,
plug it in.
619
00:43:43,000 --> 00:43:45,800
Again, it's going
to work, because we
620
00:43:45,800 --> 00:43:47,610
have constant coefficients.
621
00:43:47,610 --> 00:43:49,980
So what do I get on
the right-hand side?
622
00:43:49,980 --> 00:43:55,550
I get r times this
guy at level j plus 1,
623
00:43:55,550 --> 00:44:06,510
e to the i*k j plus 1 delta
x times the exponential.
624
00:44:06,510 --> 00:44:08,500
Can I save the
exponential, because it's
625
00:44:08,500 --> 00:44:11,970
going to factor out?
626
00:44:11,970 --> 00:44:16,760
Plus a 1 minus 4 times
the exponential itself,
627
00:44:16,760 --> 00:44:22,170
and here's the exponential:
e to the i*k*j delta x.
628
00:44:22,170 --> 00:44:24,840
This will be one step.
629
00:44:24,840 --> 00:44:37,900
I could say u_(j, 1) coming
from level 0 to level 1.
630
00:44:37,900 --> 00:44:45,290
Sorry, e to the i*k*j delta
x, so I don't need it here.
631
00:44:45,290 --> 00:44:46,780
Sorry, I did it wrong.
632
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
633
00:44:54,100 --> 00:44:58,810
delta x from the 1, and
e to the i*k*j delta x,
634
00:44:58,810 --> 00:44:59,720
which is over there.
635
00:44:59,720 --> 00:45:01,670
So I only wanted this much.
636
00:45:07,091 --> 00:45:07,590
OK.
637
00:45:12,530 --> 00:45:17,340
Sorry, that's on the permanent
tape but maybe it's OK.
638
00:45:17,340 --> 00:45:20,110
Because it makes
us think through,
639
00:45:20,110 --> 00:45:24,820
what's the result from
a pure exponential?
640
00:45:24,820 --> 00:45:27,780
And again, the result
is pure exponential
641
00:45:27,780 --> 00:45:31,810
in, pure exponential
out, but multiplied
642
00:45:31,810 --> 00:45:36,380
by some finite difference
growth factor G, that
643
00:45:36,380 --> 00:45:38,750
depends on the frequency.
644
00:45:38,750 --> 00:45:44,470
And it depends on delta
x and it depends on r.
645
00:45:50,400 --> 00:45:53,520
Well actually it depends
on k delta x together.
646
00:45:53,520 --> 00:45:54,880
So I could put that together.
647
00:46:01,530 --> 00:46:05,120
What's von Neumann's
question now?
648
00:46:05,120 --> 00:46:09,030
He wants to know is this number
-- it's a complex number,
649
00:46:09,030 --> 00:46:13,970
of course, because it's got this
cosine of k delta x plus i sine
650
00:46:13,970 --> 00:46:20,120
of k delta x -- he wants
to know is it -- magnitude,
651
00:46:20,120 --> 00:46:23,460
does the magnitude
get bigger than 1?
652
00:46:23,460 --> 00:46:28,890
If so, n steps will give
the n-th power of the thing,
653
00:46:28,890 --> 00:46:30,860
and it will blow up.
654
00:46:30,860 --> 00:46:33,410
Or does the
magnitude stay lesser
655
00:46:33,410 --> 00:46:39,790
equal to 1, in which case it
won't blow up, in which case
656
00:46:39,790 --> 00:46:42,770
we have stability.
657
00:46:42,770 --> 00:46:46,950
Of course, it would be great
if the magnitude was always
658
00:46:46,950 --> 00:46:49,100
exactly 1.
659
00:46:49,100 --> 00:46:53,520
Because that's what
the true solution has.
660
00:46:53,520 --> 00:46:59,170
But that's only going to happen
in this special, special case
661
00:46:59,170 --> 00:47:02,850
when r equals 1, and
I'm going just right
662
00:47:02,850 --> 00:47:04,510
on the characteristic.
663
00:47:04,510 --> 00:47:08,310
When r is exactly 1, that's
the case when that's gone,
664
00:47:08,310 --> 00:47:11,730
this is a 1, and that
has magnitude exactly 1.
665
00:47:11,730 --> 00:47:15,050
But normally, r is
going to be, I'm
666
00:47:15,050 --> 00:47:18,110
going to be on the safe
side, r will be less than 1.
667
00:47:18,110 --> 00:47:26,000
And I just want to draw this von
Neumann amplification factor.
668
00:47:26,000 --> 00:47:28,000
I'll often use the
word growth factor,
669
00:47:28,000 --> 00:47:30,140
just because it's
shorter, but another word
670
00:47:30,140 --> 00:47:32,360
is amplification factor.
671
00:47:32,360 --> 00:47:35,630
What does an exponential
get amplified by?
672
00:47:35,630 --> 00:47:41,300
Can you identify this
number in the complex plane?
673
00:47:41,300 --> 00:47:44,470
Of course, the big
question is, where is it
674
00:47:44,470 --> 00:47:47,300
with respect to the unit circle?
675
00:47:47,300 --> 00:47:48,240
OK.
676
00:47:48,240 --> 00:47:52,470
Take k equals 0 -- zero
frequency, the DC term,
677
00:47:52,470 --> 00:47:57,340
the constant start -- what is
that number equal when k is 0?
678
00:48:00,320 --> 00:48:01,570
1.
679
00:48:01,570 --> 00:48:04,350
So that's normal.
680
00:48:04,350 --> 00:48:10,050
At k equals 0, we're
right at the position 1.
681
00:48:10,050 --> 00:48:13,620
That's just telling us that
a constant initial value
682
00:48:13,620 --> 00:48:17,060
stays unchanged.
683
00:48:17,060 --> 00:48:20,420
The true growth factor and
the von Neumann amplification
684
00:48:20,420 --> 00:48:22,400
factor both 1.
685
00:48:22,400 --> 00:48:27,680
But now let k be non-zero.
686
00:48:27,680 --> 00:48:30,200
Where is this complex number?
687
00:48:30,200 --> 00:48:33,170
And now, I'm going to
impose the condition
688
00:48:33,170 --> 00:48:45,140
that r is between 0 and 1,
because I know from Courant
689
00:48:45,140 --> 00:48:47,920
that is going to be required.
690
00:48:47,920 --> 00:48:49,040
What's the point here?
691
00:48:49,040 --> 00:48:49,750
OK.
692
00:48:49,750 --> 00:48:53,050
Then, you see, here
is a 1 minus r.
693
00:48:56,050 --> 00:49:00,320
So there's 1, 1 minus r will
be a little bit in here,
694
00:49:00,320 --> 00:49:03,330
and then what happens
when I add on this number?
695
00:49:03,330 --> 00:49:05,750
So the 1 minus r I've done.
696
00:49:05,750 --> 00:49:07,080
It put me here.
697
00:49:07,080 --> 00:49:08,610
It was real.
698
00:49:08,610 --> 00:49:10,250
But this number is not real.
699
00:49:10,250 --> 00:49:16,259
This number is r times
some complex number,
700
00:49:16,259 --> 00:49:17,050
but what do I know?
701
00:49:17,050 --> 00:49:19,360
I do something critical here.
702
00:49:19,360 --> 00:49:22,930
What do I know
about this number?
703
00:49:22,930 --> 00:49:25,920
I know its absolute value is 1.
704
00:49:25,920 --> 00:49:28,600
So that it gets
multiplied by an r.
705
00:49:28,600 --> 00:49:31,860
Look, look, look, look.
706
00:49:31,860 --> 00:49:33,490
I start with a 1 minus r.
707
00:49:33,490 --> 00:49:36,210
So I go to 1, back
to r, and now I
708
00:49:36,210 --> 00:49:41,420
add in this part, which is
somewhere on a circle of radius
709
00:49:41,420 --> 00:49:46,360
r that's everything
in this problem.
710
00:49:46,360 --> 00:49:53,140
It's a circle of radius r
around the point 1 minus r.
711
00:49:58,170 --> 00:50:00,720
I'm inside the circle,
and you could say, well,
712
00:50:00,720 --> 00:50:04,410
you could have seen that clearly
by just using the triangle
713
00:50:04,410 --> 00:50:05,350
inequality.
714
00:50:05,350 --> 00:50:08,980
The magnitude of this can't
be bigger than the magnitude
715
00:50:08,980 --> 00:50:12,170
of that, which is what?
716
00:50:12,170 --> 00:50:13,210
r.
717
00:50:13,210 --> 00:50:17,920
Plus the magnitude of
that, which is what?
718
00:50:17,920 --> 00:50:19,530
1 minus r.
719
00:50:19,530 --> 00:50:21,840
So the magnitude, by
the triangle inequality,
720
00:50:21,840 --> 00:50:25,850
can't be more than r plus
1 minus r which is 1.
721
00:50:25,850 --> 00:50:34,740
But now wait a minute, where
did I use the Courant condition?
722
00:50:34,740 --> 00:50:36,790
The way I said
that there sounded
723
00:50:36,790 --> 00:50:38,710
like it would always work.
724
00:50:38,710 --> 00:50:40,360
This has magnitude r.
725
00:50:43,800 --> 00:50:45,580
What's going on here?
726
00:50:45,580 --> 00:50:49,320
Suppose r is bigger than
1, what's going wrong?
727
00:50:49,320 --> 00:50:53,220
In fact, what's the picture
if r is bigger than 1?
728
00:50:53,220 --> 00:50:59,600
If r is bigger than 1, then my
1 minus r is out here somewhere.
729
00:50:59,600 --> 00:51:02,980
So this is the unstable
case, 1 minus r,
730
00:51:02,980 --> 00:51:08,450
and then a circle of
radius r, bad news, right?
731
00:51:08,450 --> 00:51:11,670
Every frequency is
unstable in fact.
732
00:51:11,670 --> 00:51:15,640
When I'm reaching too far,
and that's just telling me
733
00:51:15,640 --> 00:51:18,810
I'm not using the
information I need.
734
00:51:18,810 --> 00:51:24,880
I don't have a chance
of keeping, controlling
735
00:51:24,880 --> 00:51:27,580
any frequency.
736
00:51:27,580 --> 00:51:28,330
OK.
737
00:51:28,330 --> 00:51:31,440
I've got just
enough time to show
738
00:51:31,440 --> 00:51:33,890
how bad this second method is.
739
00:51:33,890 --> 00:51:37,400
So nobody wanted
his name associated
740
00:51:37,400 --> 00:51:39,920
with that second method.
741
00:51:39,920 --> 00:51:41,070
Why is that?
742
00:51:41,070 --> 00:51:46,830
So what's the von Neumann
quantity for the second method?
743
00:51:46,830 --> 00:51:49,420
OK.
744
00:51:49,420 --> 00:51:53,490
Just space here to write
-- so this is now --
745
00:51:53,490 --> 00:51:56,330
I want to know the number
for that second method.
746
00:51:56,330 --> 00:52:04,970
So now the method is
u_(j, n+1) is u_(j, n),
747
00:52:04,970 --> 00:52:12,365
from the time difference,
plus r over 2, u_(j+1,
748
00:52:12,365 --> 00:52:22,070
n) minus u_(j-1, n).
749
00:52:25,780 --> 00:52:28,950
This is going to
be the bad method.
750
00:52:28,950 --> 00:52:33,010
It looks good because
the centered difference
751
00:52:33,010 --> 00:52:36,440
is more accurate than
a one-sided difference,
752
00:52:36,440 --> 00:52:38,400
but it's also unstable here.
753
00:52:38,400 --> 00:52:42,630
Can you look at that and see
what the von Neumann number
754
00:52:42,630 --> 00:52:45,430
G is going to be?
755
00:52:45,430 --> 00:52:48,390
Think of an
exponential going in.
756
00:52:48,390 --> 00:52:51,220
What exponential comes out?
757
00:52:51,220 --> 00:52:56,730
So G is a 1 from this.
758
00:52:56,730 --> 00:53:00,120
Now this is our guys
that's shifted over,
759
00:53:00,120 --> 00:53:04,940
so that would be in r over
2 e to the i*k delta x,
760
00:53:04,940 --> 00:53:07,410
just as it was before.
761
00:53:07,410 --> 00:53:16,880
And this one will be a minus
r over 2 times e to the --
762
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
763
00:53:22,510 --> 00:53:26,310
delta x.
764
00:53:26,310 --> 00:53:27,480
So what's with this now?
765
00:53:30,380 --> 00:53:35,970
G is 1 plus this quantity, r
over 2 times e to the i*k*x
766
00:53:35,970 --> 00:53:38,980
minus e to the minus i*k*x.
767
00:53:38,980 --> 00:53:41,760
What am I seeing there?
768
00:53:41,760 --> 00:53:49,290
I'm seeing 1 plus r, and
everybody recognizes this minus
769
00:53:49,290 --> 00:54:03,950
this over 2 as i sine,
i*r sine k delta x.
770
00:54:03,950 --> 00:54:07,720
That's the amplification factor,
and is it smaller than 1?
771
00:54:10,300 --> 00:54:11,800
No way.
772
00:54:11,800 --> 00:54:12,300
No way.
773
00:54:12,300 --> 00:54:14,730
Let me raise it up here.
774
00:54:14,730 --> 00:54:19,400
So I don't care whether r is
less than 1 or not, I'm lost.
775
00:54:23,270 --> 00:54:25,670
This is a pure imaginary number.
776
00:54:25,670 --> 00:54:26,910
This is a real number.
777
00:54:26,910 --> 00:54:30,490
So I have the sum of squares
to get the magnitude,
778
00:54:30,490 --> 00:54:36,220
it will be the square root of 1
plus r sine k delta x squared.
779
00:54:36,220 --> 00:54:41,370
So if I draw the bad picture
then, what's the bad picture?
780
00:54:41,370 --> 00:54:48,180
Is now, it goes to 1 and then it
goes way up the imaginary axis.
781
00:54:48,180 --> 00:54:52,270
Well maybe not way up, but up.
782
00:54:52,270 --> 00:54:55,000
Sorry, I shouldn't have made
it quite as bad as it was.
783
00:54:55,000 --> 00:55:00,720
If I reduce r, I don't go
so far up, but no hope.
784
00:55:00,720 --> 00:55:02,620
So do you see why
that one is bad,
785
00:55:02,620 --> 00:55:06,000
because the
amplification factor --
786
00:55:06,000 --> 00:55:09,560
von Neumann tells us what
Courant did not tell us,
787
00:55:09,560 --> 00:55:13,300
that the amplification factor
here has magnitude bigger than
788
00:55:13,300 --> 00:55:13,800
1.
789
00:55:13,800 --> 00:55:20,150
It's outside the circle, and
every exponential is growing
790
00:55:20,150 --> 00:55:22,040
and there's no hope.
791
00:55:22,040 --> 00:55:22,540
OK.
792
00:55:22,540 --> 00:55:28,040
So the second last lecture on
this section 5-2 of the notes
793
00:55:28,040 --> 00:55:33,540
will be about Lax-Friedrichs
and Lax-Wendroff,
794
00:55:33,540 --> 00:55:39,750
order of accuracy, stability
and actual behavior in practice.
795
00:55:39,750 --> 00:55:40,250
OK.
796
00:55:40,250 --> 00:55:41,100
See you Wednesday.
797
00:55:41,100 --> 00:55:42,350
Thanks.