WEBVTT

00:00:00.000 --> 00:00:01.470
NARRATOR: The
following content is

00:00:01.470 --> 00:00:04.966
provided by MIT OpenCourseWare
under a Creative Commons

00:00:04.966 --> 00:00:06.060
license.

00:00:06.060 --> 00:00:08.230
Additional information
about our license

00:00:08.230 --> 00:00:10.490
and MIT OpenCourseWare
in general

00:00:10.490 --> 00:00:14.430
is available at ocw.mit.edu.

00:00:14.430 --> 00:00:19.220
PROFESSOR: Ready to go.

00:00:19.220 --> 00:00:23.290
So first of all, to say
thank you to several people

00:00:23.290 --> 00:00:31.820
in the class who sent codes
to find these wavefronts when

00:00:31.820 --> 00:00:39.230
a shock, a step function is
moving along with velocity c.

00:00:39.230 --> 00:00:45.410
I had roughly drawn what
these three methods produced,

00:00:45.410 --> 00:00:49.830
but it was much better to see
it in Mr. Sekora's movie that's

00:00:49.830 --> 00:00:53.150
on 18.086 site.

00:00:53.150 --> 00:01:02.340
And sure enough, behind the
moving front is an overshoot,

00:01:02.340 --> 00:01:06.860
that reminds us of the Gibbs
phenomenon, from Lax-Wendroff,

00:01:06.860 --> 00:01:11.220
and I think it's sort of
unavoidable if we have

00:01:11.220 --> 00:01:15.360
a negative -- because one
of the three coefficients

00:01:15.360 --> 00:01:18.290
at the previous time is
negative for Lax-Wendroff,

00:01:18.290 --> 00:01:21.170
that's how it gets its
second order accuracy,

00:01:21.170 --> 00:01:24.160
and we see that better
accuracy in a much steeper,

00:01:24.160 --> 00:01:26.580
much steeper profile.

00:01:26.580 --> 00:01:29.600
Then Lax-Friedrichs,
if you've noticed,

00:01:29.600 --> 00:01:35.830
has a sort of jagged profile.

00:01:35.830 --> 00:01:38.600
Maybe you've realized
why that would be.

00:01:38.600 --> 00:01:45.430
Somehow Lax-Friedrichs kind of
operates on a staggered grid.

00:01:45.430 --> 00:01:49.140
We'll see, actually with -- I've
drawn a staggered grid here,

00:01:49.140 --> 00:01:50.770
so I can say what I mean.

00:01:50.770 --> 00:01:54.350
Lax-Friedrichs
computes this value

00:01:54.350 --> 00:01:59.770
from the two earlier
values there and then

00:01:59.770 --> 00:02:01.900
at the next level
again and so forth,

00:02:01.900 --> 00:02:09.690
so that actually, Lax-Friedrichs
is using two staggered grids

00:02:09.690 --> 00:02:11.350
separately.

00:02:11.350 --> 00:02:16.460
I think -- normally,
with Lax-Friedrichs,

00:02:16.460 --> 00:02:19.440
we call that n plus 1 and
n plus 2 and n plus 3,

00:02:19.440 --> 00:02:23.350
but the picture is still right,
so I think that's probably

00:02:23.350 --> 00:02:30.440
responsible for what you
see, that there's two waves,

00:02:30.440 --> 00:02:36.360
two fronts, right, one delta
x away from each other.

00:02:36.360 --> 00:02:40.070
And finally, upwind
is also smeared out.

00:02:40.070 --> 00:02:46.680
I guess I was so pleased to
see these actually showing

00:02:46.680 --> 00:02:51.670
on the website and that makes
me think of more questions.

00:02:51.670 --> 00:02:54.670
Maybe you too.

00:02:54.670 --> 00:03:00.230
First of all, as
time goes forward,

00:03:00.230 --> 00:03:03.500
we see this bump
beginning to appear.

00:03:03.500 --> 00:03:06.970
So am I right in thinking that
it reaches a certain height

00:03:06.970 --> 00:03:08.790
and stays there?

00:03:08.790 --> 00:03:13.170
So I guess I'm thinking about
sort of further questions,

00:03:13.170 --> 00:03:15.820
because every time you do
a numerical experiment,

00:03:15.820 --> 00:03:19.150
good additional
question show up.

00:03:19.150 --> 00:03:23.990
So I'm wondering, as
this wavefront forms,

00:03:23.990 --> 00:03:28.750
this characteristic profile
for these three methods,

00:03:28.750 --> 00:03:31.900
first of all, does that
profile settle down

00:03:31.900 --> 00:03:34.610
to a steady profile?

00:03:34.610 --> 00:03:37.110
Ultimately it'd be great
to be able to predict

00:03:37.110 --> 00:03:40.330
what it would be.

00:03:40.330 --> 00:03:43.300
In particular, does that
bump reach a certain height?

00:03:43.300 --> 00:03:45.770
Because you can see it just
barely forming and then

00:03:45.770 --> 00:03:48.650
you see it growing
to a certain point.

00:03:48.650 --> 00:03:52.200
And then, when the movie
ends, fortunately it

00:03:52.200 --> 00:03:55.210
plots this picture and you
really see the profile,

00:03:55.210 --> 00:03:57.420
and you can actually
see, if you look closely,

00:03:57.420 --> 00:04:02.460
that it goes above 1
again and probably more.

00:04:05.630 --> 00:04:10.580
That would be, does it
approach a steady profile?

00:04:10.580 --> 00:04:14.530
Does that height settle down?

00:04:14.530 --> 00:04:18.170
It'd be fantastic to be
able to predict that height.

00:04:18.170 --> 00:04:20.540
For example, you always
want to know, how do things

00:04:20.540 --> 00:04:22.780
depend on the parameter?

00:04:22.780 --> 00:04:26.510
The one parameter we have
in this problem is r --

00:04:26.510 --> 00:04:28.240
c delta t over delta x.

00:04:28.240 --> 00:04:32.180
If I change r, I'm changing
all the coefficients.

00:04:32.180 --> 00:04:36.790
If I changed r to be
exactly 1, then the profile

00:04:36.790 --> 00:04:38.500
would be perfect, right?

00:04:38.500 --> 00:04:43.370
That's the golden
ratio, r equal 1.

00:04:43.370 --> 00:04:48.280
I would be computing that
value exactly from this value,

00:04:48.280 --> 00:04:51.400
at exactly the right slope,
on the characteristic,

00:04:51.400 --> 00:04:54.330
and perfection.

00:04:54.330 --> 00:04:57.600
Now as r goes away
from 1, I presume --

00:04:57.600 --> 00:04:58.980
it goes down below 1.

00:04:58.980 --> 00:05:02.620
Of course, if it goes
above 1, catastrophe.

00:05:02.620 --> 00:05:08.140
If it goes below 1, I presume
the bump begins to appear,

00:05:08.140 --> 00:05:09.890
goes higher.

00:05:09.890 --> 00:05:11.530
I don't know.

00:05:11.530 --> 00:05:16.130
Could you see how the
dependence on r appears?

00:05:16.130 --> 00:05:23.030
And then I can even suggest
one more thing, which is --

00:05:23.030 --> 00:05:31.910
let's put a fourth
guy onto this picture,

00:05:31.910 --> 00:05:33.850
which would be leapfrog.

00:05:33.850 --> 00:05:36.350
Leapfrog for
first-order equations,

00:05:36.350 --> 00:05:40.210
so let me just put down
below what that would be.

00:05:40.210 --> 00:05:44.110
So it would be on that
kind of a staggered grid.

00:05:44.110 --> 00:05:46.800
A new value at
time n plus 1 would

00:05:46.800 --> 00:05:51.650
come from these at time n,
really, and this one, at time n

00:05:51.650 --> 00:05:52.370
minus 1.

00:05:52.370 --> 00:05:55.900
So leapfrog -- you'd
think of it right away.

00:05:55.900 --> 00:06:04.070
I use a centered difference in
time, U_(j, n+1) minus U_(j,

00:06:04.070 --> 00:06:09.850
n-1) over 2 delta t equals c
times a centered difference

00:06:09.850 --> 00:06:20.510
in space, U_(j+1, n) minus
U_(j-1, n) over 2 delta x.

00:06:20.510 --> 00:06:24.680
So you see right
away, the 2's cancel.

00:06:24.680 --> 00:06:29.325
The delta x times c -- the
delta t times c over delta x is

00:06:29.325 --> 00:06:36.110
our old ratio r, so this is
easily written in terms of r

00:06:36.110 --> 00:06:37.300
again.

00:06:37.300 --> 00:06:44.140
It does have this
two time step issue

00:06:44.140 --> 00:06:47.030
and of course, we have
to think about stability.

00:06:47.030 --> 00:06:53.960
I'm writing down a fourth
candidate for the equation u_t

00:06:53.960 --> 00:06:59.990
equals c*u_x, of course, before
I come back to the second-order

00:06:59.990 --> 00:07:03.020
equations, or systems.

00:07:03.020 --> 00:07:05.220
I just wanted to put
in these comments,

00:07:05.220 --> 00:07:11.500
partly because I'm thinking
about projects that are --

00:07:11.500 --> 00:07:20.120
and I hope you are -- so
some people will have theses

00:07:20.120 --> 00:07:28.030
or problems from other courses
which involve solving PDEs

00:07:28.030 --> 00:07:36.050
and that'd be perfectly
natural to base some project

00:07:36.050 --> 00:07:42.720
on, but if you don't have
some specific application,

00:07:42.720 --> 00:07:47.660
then here are a whole lot
of interesting questions,

00:07:47.660 --> 00:07:49.790
to just go further with that.

00:07:49.790 --> 00:07:59.150
So the dependence
on r would be a --

00:07:59.150 --> 00:08:08.700
the profile dependence on
r, c delta t over delta x,

00:08:08.700 --> 00:08:09.650
would be a question.

00:08:14.710 --> 00:08:18.240
Let me just emphasize,
what's the goal?

00:08:18.240 --> 00:08:21.330
When I say that this
upwind one is smeared out,

00:08:21.330 --> 00:08:26.190
I mean that it doesn't satisfy
what you really hope for.

00:08:26.190 --> 00:08:31.860
You want to capture that
shock, that discontinuity --

00:08:31.860 --> 00:08:34.710
not perfectly, you
can't expect that --

00:08:34.710 --> 00:08:39.980
but you want to capture it,
maybe in, let's say, 2 delta x.

00:08:39.980 --> 00:08:43.510
A good method captures
the shock within 2 delta x

00:08:43.510 --> 00:08:50.960
and does it without much
undesirable oscillation,

00:08:50.960 --> 00:08:54.250
physical oscillation like that.

00:08:54.250 --> 00:08:58.870
So these are methods where
we're trading off a good shock

00:08:58.870 --> 00:09:03.400
capture versus a smeared one,
which is not satisfactory,

00:09:03.400 --> 00:09:07.650
really, in a lot
of applications.

00:09:07.650 --> 00:09:12.060
So capturing the
shock within 2 delta

00:09:12.060 --> 00:09:19.200
x, roughly, is highly
desirable, and you

00:09:19.200 --> 00:09:24.290
might have to go add a
artificial viscosity that we'll

00:09:24.290 --> 00:09:28.300
discuss to get there.

00:09:28.300 --> 00:09:33.120
So that's past things, but
still very much present,

00:09:33.120 --> 00:09:34.340
if I can say.

00:09:34.340 --> 00:09:38.720
Here I've introduced
a new leapfrog,

00:09:38.720 --> 00:09:42.450
a one-way equation
leapfrog, I'll

00:09:42.450 --> 00:09:50.230
call this, where
the last lecture was

00:09:50.230 --> 00:09:52.520
about two-way leapfrog.

00:09:52.520 --> 00:09:56.040
Leapfrog for u_tt
equals c squared

00:09:56.040 --> 00:09:58.510
u_xx, a two-way wave equation.

00:09:58.510 --> 00:10:04.480
I might just mention about
this one-way leapfrog,

00:10:04.480 --> 00:10:10.170
once you put in e to the
i*k*x as we always do,

00:10:10.170 --> 00:10:17.240
or e to the i*k*j delta
x in the discrete case --

00:10:17.240 --> 00:10:27.100
so you would put in an e
to the i*j delta x times k,

00:10:27.100 --> 00:10:33.560
and then find the G,
the growth factor in --

00:10:33.560 --> 00:10:39.040
that'll depend on k and will
tell us the time dependence.

00:10:39.040 --> 00:10:40.550
It'll be a G to the n-th.

00:10:43.330 --> 00:10:48.790
I think you'll find
that for this guy,

00:10:48.790 --> 00:10:53.440
the absolute value of G is
exactly 1 while it's stable.

00:10:53.440 --> 00:10:57.130
Of course, if the Courant
condition is violated,

00:10:57.130 --> 00:10:59.670
then there's no way
it could be stable

00:10:59.670 --> 00:11:04.010
and G's will grow,
be bigger than 1.

00:11:04.010 --> 00:11:10.040
But, I think in the stable
range, you will have --

00:11:10.040 --> 00:11:13.290
this G will have
absolute value exactly 1.

00:11:16.960 --> 00:11:18.620
So it'll be on the unit circle.

00:11:18.620 --> 00:11:23.390
You don't have
much leeway, right?

00:11:23.390 --> 00:11:28.920
We found upwind was,
like, well inside;

00:11:28.920 --> 00:11:32.840
Lax-Friedrichs was well
inside; Lax-Wendroff,

00:11:32.840 --> 00:11:38.240
because it had higher
accuracy for low frequencies,

00:11:38.240 --> 00:11:44.210
was closer; and I think
this guy is right on.

00:11:44.210 --> 00:11:48.170
So this is the
first-order methods.

00:11:48.170 --> 00:11:50.220
This would be Lax-Wendroff
and this would

00:11:50.220 --> 00:11:53.150
be this second-order method.

00:11:53.150 --> 00:11:56.710
So you're really
playing with fire there

00:11:56.710 --> 00:12:00.630
and maybe this is
not a favorite, just

00:12:00.630 --> 00:12:04.920
because it's too close to
the edge, in fact, right

00:12:04.920 --> 00:12:06.530
on the edge.

00:12:06.530 --> 00:12:10.960
So those are some
comments really generated

00:12:10.960 --> 00:12:17.890
by your numerical experiments
and I think that's the way this

00:12:17.890 --> 00:12:23.490
course should -- homeworks and
projects should develop out

00:12:23.490 --> 00:12:26.740
of numerical experiment.

00:12:26.740 --> 00:12:31.730
Now I'll come back to
complete my lecture

00:12:31.730 --> 00:12:34.110
on the second-order
wave equation.

00:12:37.260 --> 00:12:43.110
So we studied leapfrog for that.

00:12:43.110 --> 00:12:47.000
I won't repeat that, but
then with second-order wave

00:12:47.000 --> 00:12:49.730
equation, we have
another option,

00:12:49.730 --> 00:12:56.080
which is to reduce a
second-order equation with two

00:12:56.080 --> 00:13:01.260
time derivatives to a system
of two equations that are

00:13:01.260 --> 00:13:05.570
first order in time and space.

00:13:05.570 --> 00:13:12.310
I've chosen to use the letters
H and E as a kind of hint

00:13:12.310 --> 00:13:17.350
that we're touching a really
big application, which

00:13:17.350 --> 00:13:20.430
is electromagnetism.

00:13:20.430 --> 00:13:26.370
So E for the electric field, H
for the magnetic field but here

00:13:26.370 --> 00:13:35.400
in 1-D -- so it allows me
just to mention that in 3-D,

00:13:35.400 --> 00:13:39.160
when E has three components,
H has three components,

00:13:39.160 --> 00:13:45.310
this is really the curl and
this is really minus the curl.

00:13:45.310 --> 00:13:56.920
And the notes will show
the beautiful Yee mesh,

00:13:56.920 --> 00:14:05.790
staggered mesh that copies
for finite difference methods,

00:14:05.790 --> 00:14:11.700
the properties of the
curl, our interpretation

00:14:11.700 --> 00:14:16.210
of and the properties of -- that
Maxwell discovered the physics

00:14:16.210 --> 00:14:23.099
of, you know, current, magnetic
fields going around a wire that

00:14:23.099 --> 00:14:24.890
along which one an
electric field is going.

00:14:28.200 --> 00:14:31.670
But let me stay here
with one dimension.

00:14:31.670 --> 00:14:37.180
So first of all, can we recover
the wave equation from that?

00:14:37.180 --> 00:14:41.070
Let's just see that we haven't
left behind the wave equation.

00:14:45.190 --> 00:14:48.810
So I just take the
second derivative --

00:14:48.810 --> 00:14:51.820
so the second derivative -- I
just want to recover the wave

00:14:51.820 --> 00:14:56.360
equation so that I haven't lost
it here -- so this will be,

00:14:56.360 --> 00:14:58.810
if I -- I'm taking the time
derivative of the first

00:14:58.810 --> 00:15:07.220
equation, so I get d
second h dt dx, right?

00:15:07.220 --> 00:15:13.730
But by the useful, extremely
useful fact that this is

00:15:13.730 --> 00:15:20.060
the same as taking the t
derivative first and the x

00:15:20.060 --> 00:15:24.860
derivative second, now I
have the x derivative of this

00:15:24.860 --> 00:15:32.240
equation, so this is c --
now I have the x derivative,

00:15:32.240 --> 00:15:35.310
or c times it, so now
I'm up to c squared,

00:15:35.310 --> 00:15:39.920
the x derivative of the
x derivative, right?

00:15:43.310 --> 00:15:49.246
So we eliminated H, got back
to one equation, second order,

00:15:49.246 --> 00:15:50.370
and it's the wave equation.

00:15:53.660 --> 00:15:58.560
I want to show the same thing
now for finite differences.

00:15:58.560 --> 00:16:05.060
It's just -- it's such a simple
and useful device and our point

00:16:05.060 --> 00:16:09.610
will be that it works for --
just as well for differences.

00:16:09.610 --> 00:16:14.980
That allows us to do
this staggered grid idea.

00:16:14.980 --> 00:16:21.480
So the staggered grid idea
is, I'll do E on this grid,

00:16:21.480 --> 00:16:26.170
at these grid points,
H at the half points,

00:16:26.170 --> 00:16:32.750
E again at the integer points,
H again at the half points.

00:16:32.750 --> 00:16:41.790
Now, so my difference
method, leapfrog,

00:16:41.790 --> 00:16:46.390
on this staggered
mesh, will copy --

00:16:46.390 --> 00:16:54.900
so the first equation will
give E at the new time from

00:16:54.900 --> 00:16:59.770
the difference in
H at this time.

00:16:59.770 --> 00:17:02.250
So, you see it.

00:17:02.250 --> 00:17:08.810
dE/dt is going to be replaced
by that time difference.

00:17:08.810 --> 00:17:14.180
dH/dx is going to be replaced
by this space difference,

00:17:14.180 --> 00:17:16.420
and that will determine
E at the new time.

00:17:16.420 --> 00:17:21.280
So I need time 0 and
time 1/2 to get started.

00:17:21.280 --> 00:17:23.610
Maybe I put those
down here, somewhere.

00:17:23.610 --> 00:17:26.330
I have to use the
initial condition,

00:17:26.330 --> 00:17:33.710
the initial velocity to
get started on E and H

00:17:33.710 --> 00:17:35.990
and then I go onwards.

00:17:35.990 --> 00:17:38.470
I've got to this
point and this point.

00:17:38.470 --> 00:17:43.230
Then this guy comes from this
one, this one and this one.

00:17:46.520 --> 00:17:52.410
Of course, that similarly
comes from the same equation

00:17:52.410 --> 00:17:55.810
shifted over.

00:17:55.810 --> 00:17:56.980
Now I know these.

00:17:56.980 --> 00:17:59.540
Now I'm ready for this one.

00:17:59.540 --> 00:18:03.150
Coming from -- what am
I approximating now?

00:18:03.150 --> 00:18:09.270
I'm on the staggered part
of the grid, the half steps.

00:18:09.270 --> 00:18:14.220
I'm approximating this on the
half steps, where H is defined.

00:18:14.220 --> 00:18:18.990
So that minus that is
the time difference.

00:18:18.990 --> 00:18:23.380
This minus this -- which,
I know these now --

00:18:23.380 --> 00:18:26.190
is the space difference
in this equation,

00:18:26.190 --> 00:18:30.060
and that's what allows me
to compute the new one.

00:18:30.060 --> 00:18:33.940
You see, it's a simple idea.

00:18:33.940 --> 00:18:41.710
It's close but
different from my scalar

00:18:41.710 --> 00:18:44.580
leapfrog, one-way leapfrog here.

00:18:44.580 --> 00:18:49.140
Here it was the same
U at all the points.

00:18:49.140 --> 00:18:56.400
Here it is E at the integer
time levels and H at the half

00:18:56.400 --> 00:18:59.700
integer time levels.

00:18:59.700 --> 00:19:03.630
It's natural to say --
I'm calling this leapfrog.

00:19:06.990 --> 00:19:12.180
Could I do this for the
difference equation?

00:19:12.180 --> 00:19:17.760
I just want to see that
if I eliminate H --

00:19:17.760 --> 00:19:19.750
you saw what happened there.

00:19:19.750 --> 00:19:24.640
By using the identity that the
second derivative in t and x

00:19:24.640 --> 00:19:28.640
is always the same as the
second derivative in x and t,

00:19:28.640 --> 00:19:32.730
I eliminated H and got an
equation that involved E only.

00:19:36.550 --> 00:19:44.030
What's going to be the
corresponding identity?

00:19:44.030 --> 00:19:47.630
Trivial, but just -- trivial
things are not bad things

00:19:47.630 --> 00:19:51.820
to notice -- for the
different method.

00:19:54.760 --> 00:19:58.570
This is what I wanted to
be sure of, for the H part.

00:19:58.570 --> 00:20:05.460
This H -- so the H were -- do
you mind if I draw yet another

00:20:05.460 --> 00:20:06.650
symbol?

00:20:06.650 --> 00:20:11.840
I want to use this
idea to eliminate H. So

00:20:11.840 --> 00:20:15.270
let me put two H's there.

00:20:15.270 --> 00:20:16.700
Is that right?

00:20:16.700 --> 00:20:18.020
Yeah.

00:20:18.020 --> 00:20:25.000
I think what I'd like to know --
let me just say what I believe.

00:20:25.000 --> 00:20:31.090
I believe that the time
difference of the space

00:20:31.090 --> 00:20:35.990
difference of H
at mesh points is

00:20:35.990 --> 00:20:44.490
equal to the space difference
of the time difference of H

00:20:44.490 --> 00:20:45.560
at the same mesh points.

00:20:45.560 --> 00:20:47.370
I meant to put
these as subscripts.

00:20:51.290 --> 00:20:52.670
It's not delta x.

00:20:52.670 --> 00:20:57.180
It's delta sub x.

00:20:57.180 --> 00:21:01.130
Difference in the time
direction, difference

00:21:01.130 --> 00:21:02.950
in the space direction.

00:21:02.950 --> 00:21:05.520
Let's just see what this means.

00:21:05.520 --> 00:21:08.870
Let me redraw these four points.

00:21:08.870 --> 00:21:13.140
These are H. H at
all those points.

00:21:13.140 --> 00:21:19.480
So this says, figure out the
space differences -- so this,

00:21:19.480 --> 00:21:22.920
this minus this and
this minus this --

00:21:22.920 --> 00:21:27.790
and then take the time
difference of those.

00:21:27.790 --> 00:21:30.470
Can I see what I'll
get if I do that?

00:21:30.470 --> 00:21:33.890
So this means I take
the space differences,

00:21:33.890 --> 00:21:39.190
so I have 1 minus 1 and
that would be 1 minus 1,

00:21:39.190 --> 00:21:42.870
but now I'm going to take
the time difference of those.

00:21:42.870 --> 00:21:45.340
So that'll be this
one minus this one

00:21:45.340 --> 00:21:48.610
and this one plus this one.

00:21:48.610 --> 00:21:51.630
Do you see that?

00:21:51.630 --> 00:21:58.490
What we have here is H
at this point minus H

00:21:58.490 --> 00:22:00.740
at this point minus
H at this point

00:22:00.740 --> 00:22:05.740
plus H at this point plus 1.

00:22:05.740 --> 00:22:09.170
I claim that we have
the same thing here,

00:22:09.170 --> 00:22:12.640
that if I take the time
differences first --

00:22:12.640 --> 00:22:14.020
can I do that?

00:22:14.020 --> 00:22:16.340
Instead of taking the
space differences first,

00:22:16.340 --> 00:22:19.740
I'll take this one,
this time difference,

00:22:19.740 --> 00:22:23.780
this minus this and
I'll subtract --

00:22:23.780 --> 00:22:27.510
I'm taking now the space
difference -- I'll subtract --

00:22:27.510 --> 00:22:32.160
are you with me?

00:22:32.160 --> 00:22:35.960
You see, it's just the
same four values --

00:22:35.960 --> 00:22:42.840
two 1's and two minus 1's,
whether we go first -- in fact,

00:22:42.840 --> 00:22:46.640
this actually is a -- I think
maybe throws a little light

00:22:46.640 --> 00:22:56.740
on the calculus identity,
that we can exchange the order

00:22:56.740 --> 00:23:00.820
of the derivatives, because we
know we can exchange the order

00:23:00.820 --> 00:23:04.120
of the differences, because
we just got numbers like 1,

00:23:04.120 --> 00:23:09.190
minus 1, minus 1, and plus 1.

00:23:12.940 --> 00:23:19.180
If we let the spacing,
the mesh, go to 0, this --

00:23:19.180 --> 00:23:24.960
and divided by the
delta x and the delta t,

00:23:24.960 --> 00:23:31.840
I suppose we would prove
the continuous case.

00:23:31.840 --> 00:23:36.030
So in a way, this throws light
on something that's probably

00:23:36.030 --> 00:23:38.110
something that we
take for granted,

00:23:38.110 --> 00:23:43.010
but we wouldn't want to
be pressed on too closely.

00:23:46.360 --> 00:23:51.880
So having that
identity allows me

00:23:51.880 --> 00:23:57.000
to do exactly what I did with
the continuous case there

00:23:57.000 --> 00:24:03.270
and show that this, when I
eliminate the half levels,

00:24:03.270 --> 00:24:08.030
I've got ordinary leapfrog.

00:24:08.030 --> 00:24:11.670
So when I eliminate half
levels, I will be --

00:24:11.670 --> 00:24:15.310
when I eliminate this
half level, let's say,

00:24:15.310 --> 00:24:20.320
then I'll be connecting --
when I eliminate half levels,

00:24:20.320 --> 00:24:25.020
I'm going to be connecting these
at three levels -- one, two,

00:24:25.020 --> 00:24:28.310
three.

00:24:28.310 --> 00:24:30.790
It'll be leapfrog.

00:24:30.790 --> 00:24:37.890
So since it's been a few
days since we wrote down

00:24:37.890 --> 00:24:44.220
two-way leapfrog or second-order
equation leapfrog, let me just

00:24:44.220 --> 00:24:47.410
write it again, and
that's what we would get.

00:24:47.410 --> 00:24:55.100
The time difference
squared of E will

00:24:55.100 --> 00:25:01.250
be equal to c squared times the
space difference squared of E.

00:25:01.250 --> 00:25:05.070
And of course, here we
have a delta x squared

00:25:05.070 --> 00:25:08.760
and here a delta t squared.

00:25:08.760 --> 00:25:11.120
So altogether, an r squared.

00:25:11.120 --> 00:25:13.540
That's the formula we know.

00:25:13.540 --> 00:25:14.740
That's the formula we know.

00:25:19.320 --> 00:25:25.480
So if I simplify this
to make it look good

00:25:25.480 --> 00:25:27.910
and put the delta
t squared up there,

00:25:27.910 --> 00:25:29.870
you see that it's
just r squared.

00:25:37.720 --> 00:25:47.040
Maybe it's worth realizing that,
again, the magic r equal 1 --

00:25:47.040 --> 00:25:58.950
The magic ratio r equal
1 gives the exact U,

00:25:58.950 --> 00:26:02.900
agreeing exactly with u.

00:26:02.900 --> 00:26:08.030
This equation, if r is 1,
would be satisfied exactly

00:26:08.030 --> 00:26:14.920
by the continuous solution and
so it's the same as this one.

00:26:18.520 --> 00:26:22.040
So that's leapfrog.

00:26:22.040 --> 00:26:24.650
So can I summarize leapfrog?

00:26:24.650 --> 00:26:29.090
Leapfrog was, first of all,
that led us to these --

00:26:29.090 --> 00:26:32.270
it worked for
second-order equations.

00:26:32.270 --> 00:26:38.200
It led us to the same
stability condition

00:26:38.200 --> 00:26:42.130
that r had to be
less or equal to 1,

00:26:42.130 --> 00:26:54.730
but it took a quadratic
equation for G. Remember,

00:26:54.730 --> 00:27:01.070
we had G squared minus
2G times some quantity

00:27:01.070 --> 00:27:07.830
a that involved r's and
cosines plus 1 equals 0.

00:27:07.830 --> 00:27:09.782
The reason it was a
quadratic was there

00:27:09.782 --> 00:27:10.990
were two time steps involved.

00:27:14.810 --> 00:27:17.100
We handled that.

00:27:17.100 --> 00:27:21.070
We got stability, if r was
less than or equal to 1.

00:27:21.070 --> 00:27:25.330
That led us to a, in
magnitude, less or equal 1.

00:27:25.330 --> 00:27:30.100
And that led us to G -- I'll
just remember those steps --

00:27:30.100 --> 00:27:34.955
a less or equal 1, and that
let us to G less than or equal

00:27:34.955 --> 00:27:38.230
to 1.

00:27:38.230 --> 00:27:47.480
Yes, the notes, including
more about Maxwell's equation

00:27:47.480 --> 00:27:54.290
and Yee's beautiful method, with
a figure that shows his mesh,

00:27:54.290 --> 00:28:01.130
will go up -- I mean, every
section is getting upgraded

00:28:01.130 --> 00:28:05.040
and this one is the
next one to be upgraded.

00:28:05.040 --> 00:28:10.650
Probably by tomorrow,
you'll have a good section

00:28:10.650 --> 00:28:14.050
on second-order equations.

00:28:17.070 --> 00:28:24.220
For me, that's what I
wanted to say about the wave

00:28:24.220 --> 00:28:31.510
equation alone,
with no diffusion

00:28:31.510 --> 00:28:36.810
and now I'm ready to move
to the heat equation.

00:28:36.810 --> 00:28:40.400
So what do we have coming up?

00:28:40.400 --> 00:28:42.160
Maybe important to
say what's coming up.

00:28:47.120 --> 00:28:50.010
So we've done one-way wave.

00:28:54.240 --> 00:28:56.280
Now we've done two-way waves.

00:29:00.740 --> 00:29:10.820
Next comes the heat
equation, heat/diffusion,

00:29:10.820 --> 00:29:14.080
and then will come a
mixture of the two,

00:29:14.080 --> 00:29:26.810
convection-diffusion
-- and by the way,

00:29:26.810 --> 00:29:34.560
so I'll go straight to these
-- in a couple of weeks,

00:29:34.560 --> 00:29:38.810
we'll have a guest lecturer
who will do the applications

00:29:38.810 --> 00:29:44.980
to financial mathematics,
mathematical finance.

00:29:44.980 --> 00:29:49.280
Specifically, the
Black-Scholes equation.

00:29:53.920 --> 00:30:00.040
So you probably know that a lot
of effort and a lot of money

00:30:00.040 --> 00:30:04.730
are going into the
valuation of options

00:30:04.730 --> 00:30:13.330
and other financial derivatives
and that this Black-Scholes

00:30:13.330 --> 00:30:18.590
equation beautifully
produced the heat equation,

00:30:18.590 --> 00:30:23.330
and additional
correction terms will

00:30:23.330 --> 00:30:26.220
produce a
convection-diffusion equation.

00:30:26.220 --> 00:30:29.200
So this is an
application that we

00:30:29.200 --> 00:30:34.060
wouldn't have made
some years ago,

00:30:34.060 --> 00:30:37.970
but now it's worth
focusing on that.

00:30:37.970 --> 00:30:41.300
I think it's
interesting in itself.

00:30:41.300 --> 00:30:45.500
So this is what's
coming and then

00:30:45.500 --> 00:30:48.780
you could say one-way wave
equations, but nonlinear.

00:30:48.780 --> 00:30:53.870
So nonlinear wave
equations and those

00:30:53.870 --> 00:30:56.040
are called conservation laws.

00:31:05.740 --> 00:31:09.500
That's after these linear cases.

00:31:09.500 --> 00:31:10.840
All right.

00:31:10.840 --> 00:31:17.170
So I'm ready to tackle the
heat equation, starting

00:31:17.170 --> 00:31:22.100
then on to the next
section of the notes.

00:31:22.100 --> 00:31:25.510
So let me tackle it here.

00:31:25.510 --> 00:31:33.010
So the heat equation.

00:31:33.010 --> 00:31:38.010
Let me take the constant
to be 1; u_t equals u_xx.

00:31:41.310 --> 00:31:43.060
Because we already see
the big difference.

00:31:43.060 --> 00:31:45.970
Now, there's a second
x derivative, but only

00:31:45.970 --> 00:31:49.840
a first derivative in time.

00:31:49.840 --> 00:31:53.510
The dimensions of t and
x are no longer the same.

00:31:53.510 --> 00:31:58.810
We won't have delta t
and delta x comparable.

00:31:58.810 --> 00:32:03.515
Now it will be delta t
comparable with delta x

00:32:03.515 --> 00:32:06.930
squared, and that's a very
significant difference,

00:32:06.930 --> 00:32:09.680
because that's --
if delta x is small,

00:32:09.680 --> 00:32:12.110
delta x squared is
extremely small.

00:32:12.110 --> 00:32:19.060
So when delta t is constrained
by delta x squared,

00:32:19.060 --> 00:32:22.650
we're looking at
small time steps.

00:32:22.650 --> 00:32:27.610
We're looking at stiff
systems, absolutely.

00:32:27.610 --> 00:32:29.370
This is going to
be a stiff problem,

00:32:29.370 --> 00:32:36.220
because the low frequencies
and the high frequencies

00:32:36.220 --> 00:32:39.100
differ enormously
in the decay rate.

00:32:39.100 --> 00:32:41.550
In fact, why don't
we see it right away,

00:32:41.550 --> 00:32:44.530
starting as always
with exponentials.

00:32:44.530 --> 00:32:55.870
So if I plug in u of x and t
is some G of t e to the i*k*x,

00:32:55.870 --> 00:32:57.860
separating variables as always.

00:33:01.100 --> 00:33:03.860
Look for a pure
exponential solution,

00:33:03.860 --> 00:33:12.870
plug that in and we get
dG/dt times e to the i*k*x

00:33:12.870 --> 00:33:16.970
on the left, and now I have
to take two x derivatives,

00:33:16.970 --> 00:33:23.750
so that brings i*k down twice,
so that's minus k squared --

00:33:23.750 --> 00:33:29.610
i squared giving the minus 1 --
times G, times e to the i*k*x.

00:33:29.610 --> 00:33:40.870
And now, of course, I can
cancel that, which is never 0,

00:33:40.870 --> 00:33:45.010
and I've separated
out the time part,

00:33:45.010 --> 00:33:51.050
the G part, dG/dt is
minus k squared G. So G

00:33:51.050 --> 00:33:55.880
is e to the minus k squared t.

00:33:55.880 --> 00:33:59.580
Notice that it's k
squared, and notice

00:33:59.580 --> 00:34:02.750
that it's real and negative.

00:34:02.750 --> 00:34:06.320
See, that's a very
big difference.

00:34:06.320 --> 00:34:16.010
Compare e to the i*k*c*t, which
it was for the one-way wave

00:34:16.010 --> 00:34:17.490
equation.

00:34:17.490 --> 00:34:21.450
The difference is enormous here.

00:34:21.450 --> 00:34:26.920
That's magnitude 1,
energy conserved.

00:34:26.920 --> 00:34:30.180
This is magnitude smaller
than 1, energy dissipated.

00:34:36.080 --> 00:34:40.810
We had a ratio delta
t over delta x.

00:34:40.810 --> 00:34:43.390
Now we're going to see
delta t over delta x squared

00:34:43.390 --> 00:34:52.010
because somehow x and
t are -- now have --

00:34:52.010 --> 00:34:56.950
it's x squared
that matches t now.

00:34:56.950 --> 00:35:00.890
So now, when I put that into
here -- let me just do it --

00:35:00.890 --> 00:35:06.270
G of t is e to the
minus k squared t.

00:35:06.270 --> 00:35:10.100
So there is the
pure exponential.

00:35:10.100 --> 00:35:13.120
Simple as always, because we
have constant coefficients,

00:35:13.120 --> 00:35:16.770
but highly informative.

00:35:16.770 --> 00:35:20.750
I guess another thing that
I read off of that is,

00:35:20.750 --> 00:35:24.620
what frequencies
are decaying fast?

00:35:24.620 --> 00:35:26.220
High frequencies?

00:35:26.220 --> 00:35:30.750
If k is large, k
squared is very large

00:35:30.750 --> 00:35:34.690
and e to the minus k squared
t is decaying very quickly.

00:35:34.690 --> 00:35:39.840
So high-frequency
noise in this system,

00:35:39.840 --> 00:35:46.970
roughness, discontinuities
are going to get smoothed out,

00:35:46.970 --> 00:35:51.070
strongly, by moving
forward in time.

00:35:51.070 --> 00:35:52.750
Physically, what's
happening is, we

00:35:52.750 --> 00:36:00.020
have our wavefront, which
stayed a perfect step

00:36:00.020 --> 00:36:07.680
function in the wave equation,
will instantly smear.

00:36:07.680 --> 00:36:10.990
So diffusion smears
discontinuity.

00:36:14.420 --> 00:36:15.550
Heat travels.

00:36:15.550 --> 00:36:22.940
If we were back over here, if
the temperature starts out as 1

00:36:22.940 --> 00:36:28.540
on this side and 0 on this
side, then in an instant,

00:36:28.540 --> 00:36:33.870
some heat flows
from right to left.

00:36:33.870 --> 00:36:39.790
In fact, it flows
with infinite speed.

00:36:39.790 --> 00:36:44.220
In a short delta t, there's
a little heat all the way out

00:36:44.220 --> 00:36:48.930
there -- very little, of
course, because it's --

00:36:48.930 --> 00:36:54.690
I guess we want to see
what that behavior is.

00:36:54.690 --> 00:36:59.160
So I now want to write down --
staying with the differential

00:36:59.160 --> 00:37:03.380
equation, what do we want to do?

00:37:03.380 --> 00:37:08.590
We did the exponential
case and learned a good bit

00:37:08.590 --> 00:37:12.110
from that, the fast decay
of high frequencies.

00:37:16.640 --> 00:37:20.680
The next step would be to
put different frequencies,

00:37:20.680 --> 00:37:22.550
different k's together.

00:37:25.080 --> 00:37:33.120
By linearity, we can
add these solutions,

00:37:33.120 --> 00:37:36.830
we can multiply that
by any numbers we want,

00:37:36.830 --> 00:37:40.400
depending on k; we
still have solutions.

00:37:40.400 --> 00:37:43.980
And we can integrate over
k, so we will, actually.

00:37:43.980 --> 00:37:47.160
That that will be the next step.

00:37:47.160 --> 00:37:50.710
Let me write down
what that does.

00:37:50.710 --> 00:37:55.780
I'm going to jump,
take a little jump here

00:37:55.780 --> 00:37:58.630
to put on the board what
I just said in words.

00:37:58.630 --> 00:38:03.806
I can multiply this, e to
the minus k squared t e

00:38:03.806 --> 00:38:09.930
to the i*k*x -- that's what's
happening to the pure frequency

00:38:09.930 --> 00:38:11.350
k.

00:38:11.350 --> 00:38:23.610
If I multiply that by the amount
of that frequency which is

00:38:23.610 --> 00:38:26.220
in the initial condition -- so
here is the initial condition,

00:38:26.220 --> 00:38:30.730
u_0, and I've taken
its Fourier transform.

00:38:30.730 --> 00:38:36.020
This tells me how much of
frequency k is in the problem,

00:38:36.020 --> 00:38:38.930
is in the initial problem.

00:38:38.930 --> 00:38:41.140
This tells me how
much of frequency k

00:38:41.140 --> 00:38:43.430
is in the initial problem.

00:38:43.430 --> 00:38:48.220
That amount multiplies this,
with this rapid decay as time

00:38:48.220 --> 00:38:53.020
goes forward, but at any later
time, I'm just adding up --

00:38:53.020 --> 00:38:55.930
and since k -- we're
on the whole line --

00:38:55.930 --> 00:39:03.380
k is a continuous -- so we add
up from k equal minus infinity

00:39:03.380 --> 00:39:09.530
to infinity and I think we
have to remember the 2*pi that

00:39:09.530 --> 00:39:14.100
depends on our particular
definition of that transform,

00:39:14.100 --> 00:39:17.020
but I'm going to
stay with this one.

00:39:17.020 --> 00:39:18.470
That's the answer.

00:39:18.470 --> 00:39:19.760
That's u of x and t.

00:39:29.400 --> 00:39:32.910
So I've said that in
words, but actually, we

00:39:32.910 --> 00:39:36.170
could just check it.

00:39:36.170 --> 00:39:41.350
We would like to know that this
left-hand side solves the heat

00:39:41.350 --> 00:39:43.990
equation, and we
would like to know

00:39:43.990 --> 00:39:49.970
that it has the correct start,
the correct u of x and 0.

00:39:49.970 --> 00:39:50.960
Let's check that.

00:39:50.960 --> 00:39:56.060
At t equals 0, at
the start, this is 1.

00:39:56.060 --> 00:40:00.460
So at the start, this
formula, without that thing

00:40:00.460 --> 00:40:04.910
there, is just the
inverse Fourier transform

00:40:04.910 --> 00:40:07.780
that takes the Fourier
transform, multiplies by this,

00:40:07.780 --> 00:40:12.380
integrates to recover u_0.

00:40:12.380 --> 00:40:14.010
So it does start out correctly.

00:40:17.300 --> 00:40:19.240
Should I say that again?

00:40:19.240 --> 00:40:22.520
It starts correctly
because at t equal 0,

00:40:22.520 --> 00:40:25.415
this is just the inverse
Fourier transform of u_0,

00:40:25.415 --> 00:40:29.830
so it produces u_0.

00:40:29.830 --> 00:40:34.040
It inverts this
transform that we took.

00:40:34.040 --> 00:40:37.110
Secondly, does it solve
the heat equation?

00:40:37.110 --> 00:40:41.770
Sure, because for
each k, we've just

00:40:41.770 --> 00:40:43.720
found that that solves
the heat equation

00:40:43.720 --> 00:40:47.520
and now we're just putting
different k's together.

00:40:47.520 --> 00:40:50.740
So that's the answer.

00:40:50.740 --> 00:40:52.740
So you might say,
OK, perfection.

00:40:59.360 --> 00:41:02.000
Do we need finite differences?

00:41:04.670 --> 00:41:05.770
I guess we do.

00:41:05.770 --> 00:41:13.700
This is typical of formulas
that give the answer exactly,

00:41:13.700 --> 00:41:17.630
but in terms that are not
numerically convenient.

00:41:17.630 --> 00:41:21.660
Because, to use his
formula, first of all,

00:41:21.660 --> 00:41:29.400
this this requires an integral,
an infinite integral to find --

00:41:29.400 --> 00:41:37.130
integral to find
-- for u_0, u hat.

00:41:37.130 --> 00:41:42.240
To use this formula, we'd
have to find this transform,

00:41:42.240 --> 00:41:45.340
and then we have
to do this integral

00:41:45.340 --> 00:41:57.730
for the inverse transform, this
integral, for the answer, u.

00:41:57.730 --> 00:41:58.880
Two infinite integrals.

00:42:03.710 --> 00:42:09.580
And, not to mention the fact
that on a finite interval,

00:42:09.580 --> 00:42:12.160
when x doesn't go all the
way from minus infinity

00:42:12.160 --> 00:42:19.180
to infinity, we have to
think all over again.

00:42:19.180 --> 00:42:24.440
So we have a nice formula
for the answer, but --

00:42:24.440 --> 00:42:28.240
it looks nice, but it's
not numerically terrific.

00:42:31.390 --> 00:42:34.330
We can get a lot of
information out of this

00:42:34.330 --> 00:42:39.660
and there's one other
special solution that's

00:42:39.660 --> 00:42:42.220
also extremely informative.

00:42:42.220 --> 00:42:47.320
What if -- so I'm going
to do a special case,

00:42:47.320 --> 00:42:49.350
but it's the big case.

00:42:49.350 --> 00:42:57.240
What if the initial conditions
is a delta function?

00:42:57.240 --> 00:43:02.870
What if the initial condition
is a delta function?

00:43:02.870 --> 00:43:14.430
An impulse at time 0, x equal
0, an instant source of heat

00:43:14.430 --> 00:43:18.372
at a point -- a point
source with finite strength,

00:43:18.372 --> 00:43:19.280
you could say.

00:43:19.280 --> 00:43:22.580
An impulse at times 0.

00:43:27.450 --> 00:43:29.980
For the wave equation,
what happened?

00:43:29.980 --> 00:43:32.150
That was like turning
on a flash of light

00:43:32.150 --> 00:43:35.920
and it went along
the characteristics.

00:43:35.920 --> 00:43:42.600
For the heat equation,
it'll be quite different.

00:43:42.600 --> 00:43:47.000
There aren't
characteristics here,

00:43:47.000 --> 00:43:49.530
but this is an extremely
important solution,

00:43:49.530 --> 00:43:54.255
and I think you could call
it the fundamental solution

00:43:54.255 --> 00:43:55.130
to the heat equation.

00:44:01.390 --> 00:44:02.570
You may know what it is.

00:44:02.570 --> 00:44:05.230
You may have seen this formula.

00:44:05.230 --> 00:44:11.720
It's fantastic that we get
a formula for this one.

00:44:11.720 --> 00:44:14.930
You could say,
we've got a formula.

00:44:14.930 --> 00:44:18.170
What's the Fourier transform,
what's u_0 hat of k

00:44:18.170 --> 00:44:19.510
for the delta function?

00:44:22.280 --> 00:44:24.120
1, right?

00:44:24.120 --> 00:44:30.010
The Fourier transform of the
delta function is a constant 1.

00:44:30.010 --> 00:44:34.280
All frequencies are
there in equal amounts.

00:44:34.280 --> 00:44:38.310
This is a constant,
so I can remove it.

00:44:38.310 --> 00:44:39.710
It's 1.

00:44:39.710 --> 00:44:43.320
I'm left with a
specific integral to do.

00:44:43.320 --> 00:44:46.500
And the question
is, can I do it?

00:44:46.500 --> 00:44:49.410
And the answer
turns out to be yes.

00:44:49.410 --> 00:44:53.100
You can do that integral
when this is a constant

00:44:53.100 --> 00:44:55.030
and that will give
you the answer

00:44:55.030 --> 00:44:58.130
with that starting value.

00:44:58.130 --> 00:45:00.920
Let me just say
what that answer is.

00:45:00.920 --> 00:45:04.970
u of x and t -- this is
the fundamental solution,

00:45:04.970 --> 00:45:09.800
u fundamental,
maybe I should say,

00:45:09.800 --> 00:45:14.940
because it's such an important
case -- is, turns out to be --

00:45:14.940 --> 00:45:19.960
it's not obvious what
that integral is.

00:45:19.960 --> 00:45:37.030
By the way, normally --
let's see -- normally it's --

00:45:37.030 --> 00:45:39.050
to get the answer that
I'm going to write down,

00:45:39.050 --> 00:45:43.510
we take a kind of end
run on the integral,

00:45:43.510 --> 00:45:48.450
and I'm going to take a
serious end run and write down

00:45:48.450 --> 00:45:49.580
the answer exactly.

00:45:54.340 --> 00:45:55.940
Here's the key
part of the answer.

00:46:00.270 --> 00:46:03.880
It's a solution which starts
from a delta function, spreads

00:46:03.880 --> 00:46:10.620
of course, and the shape
as it spreads is a bell.

00:46:10.620 --> 00:46:15.665
It's the famous bell-shaped
Gaussian distribution of e

00:46:15.665 --> 00:46:23.230
to the minus -- so is it e to
the minus x squared, I guess?

00:46:23.230 --> 00:46:29.880
And then, always here comes --
that scalar tells us the width

00:46:29.880 --> 00:46:32.020
of the bell.

00:46:32.020 --> 00:46:34.900
How far has it spread at time t?

00:46:34.900 --> 00:46:37.210
And what goes there is 4t.

00:46:40.230 --> 00:46:42.250
That's the key observation.

00:46:42.250 --> 00:46:45.960
And notice how x squared
and t are coming in.

00:46:45.960 --> 00:46:50.380
It's that ratio, x squared
to t, that's crucial.

00:46:50.380 --> 00:46:52.480
That's the parameter again.

00:46:56.250 --> 00:46:59.550
Of course, we need to
multiply by a constant.

00:47:03.630 --> 00:47:06.790
How do I know I need a constant?

00:47:06.790 --> 00:47:12.450
Because the total
heat is conserved.

00:47:16.140 --> 00:47:19.210
In other words, the integral
of the delta function,

00:47:19.210 --> 00:47:24.010
the original source
of heat, was 1.

00:47:24.010 --> 00:47:26.280
The integral from minus
infinity to infinity

00:47:26.280 --> 00:47:31.150
of the delta function, which
is all totally concentrated

00:47:31.150 --> 00:47:33.290
at one point, is 1.

00:47:33.290 --> 00:47:35.480
So I need to put on
whatever constant

00:47:35.480 --> 00:47:37.360
it takes so that the
integral of this thing

00:47:37.360 --> 00:47:44.590
shall stay 1 for later times.

00:47:44.590 --> 00:47:47.940
This is one integral from minus
infinity to infinity that we

00:47:47.940 --> 00:47:51.740
can do and it turns out to
need 1 over the square root

00:47:51.740 --> 00:47:53.220
of 4*pi*t.

00:47:59.520 --> 00:48:01.180
That solves the heat equation.

00:48:05.610 --> 00:48:11.770
It's not a lot of fun to plug
that into the heat equation,

00:48:11.770 --> 00:48:13.910
but it's possible, right?

00:48:13.910 --> 00:48:17.380
The x derivative,
the time derivative

00:48:17.380 --> 00:48:19.010
is going to be messy.

00:48:19.010 --> 00:48:20.260
It'll have two terms.

00:48:20.260 --> 00:48:23.400
The x derivative will have
two terms and they'll agree.

00:48:27.550 --> 00:48:31.150
The notes will give one
way to do the integral

00:48:31.150 --> 00:48:31.990
and get that answer.

00:48:37.370 --> 00:48:40.390
You see that that
integral, it's --

00:48:40.390 --> 00:48:52.510
integrals with e to the minus k
squared in them are impossible

00:48:52.510 --> 00:48:57.360
on a finite interval, but here
we're going all the way from

00:48:57.360 --> 00:49:00.050
minus infinity to infinity,
which you might think makes

00:49:00.050 --> 00:49:04.640
the problem harder, but actually
it makes it a great deal easier

00:49:04.640 --> 00:49:09.810
and we can get an explicit
answer, a beautiful answer.

00:49:09.810 --> 00:49:15.340
So we learn that the solution
to the heat equation,

00:49:15.340 --> 00:49:22.180
coming from a point source, is a
bell-shaped Gaussian curve that

00:49:22.180 --> 00:49:26.570
gets wider and wider
as t increases,

00:49:26.570 --> 00:49:29.010
but I guess you would
want to look to see,

00:49:29.010 --> 00:49:32.890
what happens if t
comes down to 0?

00:49:32.890 --> 00:49:38.220
Does that really approximate
-- I meant to say,

00:49:38.220 --> 00:49:44.130
does it really converge to --
this should, as t goes to 0,

00:49:44.130 --> 00:49:52.030
this should go to the delta
function, and in some way,

00:49:52.030 --> 00:49:52.960
it does.

00:49:52.960 --> 00:49:54.600
In some way, it does.

00:49:54.600 --> 00:49:57.810
It's wonderful.

00:49:57.810 --> 00:50:05.520
The delta function, of course,
is 0 away from the origin.

00:50:05.520 --> 00:50:08.840
So why does this approach
0 away from the origin?

00:50:08.840 --> 00:50:11.070
Suppose x is 1.

00:50:11.070 --> 00:50:12.310
Suppose x is 1.

00:50:12.310 --> 00:50:19.890
Then do you see this thing
going to 0 as t goes to 0?

00:50:19.890 --> 00:50:20.910
Look what's happening.

00:50:20.910 --> 00:50:26.600
As t goes to 0, this part is
blowing up, but kind of weakly.

00:50:26.600 --> 00:50:29.630
That's not a disastrous blowup.

00:50:29.630 --> 00:50:34.290
Compared to this e to the
minus -- let's say 1 over 4t.

00:50:34.290 --> 00:50:40.450
As t goes to 0, that's e to
a very negative exponent.

00:50:40.450 --> 00:50:42.630
That's going to
0 very fast, much

00:50:42.630 --> 00:50:45.200
faster than this is going to 0.

00:50:45.200 --> 00:50:48.640
If you like to think of
l'Hopital's rule or ratio

00:50:48.640 --> 00:50:53.180
or something, this
quantity is going to 0 way

00:50:53.180 --> 00:50:56.500
faster than this one
is, and the result

00:50:56.500 --> 00:51:03.100
is 0, except at the one point
x equals 0, where this is 1.

00:51:08.140 --> 00:51:12.040
The fact that the total
amount of heat stays at 1

00:51:12.040 --> 00:51:17.590
tells us that the delta
function is the limit there.

00:51:20.350 --> 00:51:27.180
Today was the heat
equation, continuous case,

00:51:27.180 --> 00:51:30.950
with these explicit answers.

00:51:30.950 --> 00:51:36.570
Then next time is -- tomorrow,
I guess -- is the heat equation,

00:51:36.570 --> 00:51:39.400
finite differences.

00:51:39.400 --> 00:51:43.050
Again, we'll have several
difference methods

00:51:43.050 --> 00:51:46.330
and to compare them
would be terrific.

00:51:49.080 --> 00:51:53.200
Please think about that,
comparison with the heat

00:51:53.200 --> 00:51:57.290
equation and/or
what I was saying

00:51:57.290 --> 00:52:00.960
at the beginning of
class, a deeper look

00:52:00.960 --> 00:52:04.970
at the comparison for
the wave equation.

00:52:04.970 --> 00:52:11.150
See you tomorrow for difference
equations for this problem.

00:52:11.150 --> 00:52:12.400
Thanks.