WEBVTT
00:00:04.180 --> 00:00:07.160
CLEVE MOLER: The Lorenz
strange attractor, perhaps
00:00:07.160 --> 00:00:10.450
the world's most
famous and extensively
00:00:10.450 --> 00:00:14.510
studied ordinary
differential equations.
00:00:14.510 --> 00:00:20.270
They were discovered in
1963 by an MIT mathematician
00:00:20.270 --> 00:00:23.820
and meteorologist,
Edward Lorenz.
00:00:23.820 --> 00:00:27.780
They started the field of chaos.
00:00:27.780 --> 00:00:31.400
They're famous because
they are sensitive
00:00:31.400 --> 00:00:34.380
to their initial conditions.
00:00:34.380 --> 00:00:36.790
Small changes in the
initial conditions
00:00:36.790 --> 00:00:41.070
have a big effect
on the solution.
00:00:41.070 --> 00:00:44.780
Lorenz is famous for talking
about the butterfly effect.
00:00:44.780 --> 00:00:51.820
How flapping of butterflies'
wings can affect the weather.
00:00:51.820 --> 00:00:58.000
A butterfly flying in
Brazil can cause a tornado
00:00:58.000 --> 00:01:05.440
and Texas is a flamboyant
version of a talk he gave.
00:01:08.410 --> 00:01:12.280
The equations are almost linear.
00:01:12.280 --> 00:01:16.320
There's two
quadratic terms here.
00:01:16.320 --> 00:01:23.450
The equations come out
of a model of fluid flow.
00:01:23.450 --> 00:01:26.710
The Earth's
atmosphere is a fluid.
00:01:26.710 --> 00:01:31.370
But this range of parameters,
the three parameters, sigma,
00:01:31.370 --> 00:01:35.420
rho, and beta, these
are outside the range
00:01:35.420 --> 00:01:41.830
that actually represents
the Earth's atmosphere.
00:01:41.830 --> 00:01:43.840
We're going to take a
look at these parameters.
00:01:43.840 --> 00:01:47.230
These are the most
commonly used parameters.
00:01:47.230 --> 00:01:54.775
But we're going to be interested
in other values of rho as well.
00:02:01.510 --> 00:02:04.110
But I'm a matrix guy,
so I like to write
00:02:04.110 --> 00:02:06.090
the equations in this form.
00:02:06.090 --> 00:02:08.400
Y dot equals Ay.
00:02:08.400 --> 00:02:12.716
It looks linear except
A depends upon y.
00:02:12.716 --> 00:02:16.900
And so there's y2, the
second component of y,
00:02:16.900 --> 00:02:20.500
appears in the matrix A.
00:02:20.500 --> 00:02:26.100
This helps me study the
differential equations
00:02:26.100 --> 00:02:29.210
in this form.
00:02:29.210 --> 00:02:33.110
This matrix form is
convenient for finding
00:02:33.110 --> 00:02:34.920
the critical points.
00:02:34.920 --> 00:02:38.760
Put a parameter
eta in place of y2.
00:02:38.760 --> 00:02:41.430
Try to make the matrix singular.
00:02:41.430 --> 00:02:44.780
That happens when eta is beta
times the square root of rho
00:02:44.780 --> 00:02:46.300
minus 1.
00:02:46.300 --> 00:02:53.020
And then the null vector
is the critical point.
00:02:53.020 --> 00:02:59.690
If we take this vector as the
starting value of the solution,
00:02:59.690 --> 00:03:02.430
then the solution stays there.
00:03:02.430 --> 00:03:06.250
Y prime is 0.
00:03:06.250 --> 00:03:11.090
This is an unstable
critical point.
00:03:11.090 --> 00:03:22.090
And values near this solution
deviate the solution.
00:03:22.090 --> 00:03:23.535
Won't stay near the solution.
00:03:27.210 --> 00:03:35.950
In May of 2014, I wrote a series
and blog post in Cleve's Corner
00:03:35.950 --> 00:03:41.240
about the MATLAB ordinary
differential equations suite.
00:03:41.240 --> 00:03:50.660
And I used the Lorenz
attractor as an example.
00:03:50.660 --> 00:03:55.080
And I included a program
called Lorenz plot
00:03:55.080 --> 00:03:56.525
that I'd like to use here.
00:04:02.940 --> 00:04:06.650
Here's Lorenz plot.
00:04:06.650 --> 00:04:09.150
Set the parameters.
00:04:09.150 --> 00:04:13.110
Set the initial value
of the matrix A.
00:04:13.110 --> 00:04:16.720
Here is the critical point.
00:04:16.720 --> 00:04:20.950
Here is an initial value
near the critical point.
00:04:20.950 --> 00:04:24.210
Integrate from 0 to 30.
00:04:24.210 --> 00:04:25.816
Use ODE 23.
00:04:28.860 --> 00:04:32.410
Give it a function called
the Lorenz equation.
00:04:32.410 --> 00:04:38.520
Capture the values t and y
and then plot the solution.
00:04:38.520 --> 00:04:44.440
I'm going to do a plot with
the three components offset
00:04:44.440 --> 00:04:46.100
from each other.
00:04:46.100 --> 00:04:50.960
And here's an internal
function Lorenz equation
00:04:50.960 --> 00:04:54.800
that is called by ODE 23.
00:04:54.800 --> 00:04:58.130
And it continuously,
every time it called,
00:04:58.130 --> 00:05:05.470
it modifies the matrix A updates
it with the new values of y2.
00:05:05.470 --> 00:05:09.525
So let's run that function.
00:05:16.800 --> 00:05:18.820
And here's the output.
00:05:18.820 --> 00:05:22.460
Here is the three components
of the Lorenz attractor.
00:05:22.460 --> 00:05:25.350
Time series is functions of t.
00:05:25.350 --> 00:05:27.500
It's pretty hard to see
what's going on here
00:05:27.500 --> 00:05:31.990
except to say they start out
with their initial values,
00:05:31.990 --> 00:05:34.680
oscillate around
them, close them
00:05:34.680 --> 00:05:38.920
through for a little while,
and then begin to deviate.
00:05:38.920 --> 00:05:42.000
And it's hard to see
what they're doing.
00:05:42.000 --> 00:05:48.330
They're just oscillating in
an unpredictable fashion.
00:05:48.330 --> 00:05:51.720
We need another graphic to see
what's really going on here.
00:05:55.970 --> 00:05:59.180
I want to write a program
called Lorenz GUI.
00:05:59.180 --> 00:06:02.340
Lorenz Graphic User Interface.
00:06:02.340 --> 00:06:08.190
That's out of my old book
calle this one is really
00:06:08.190 --> 00:06:11.750
out of Numerical Computing
with MATLAB, NCM.
00:06:15.190 --> 00:06:18.670
OK, I hit the Start button.
00:06:18.670 --> 00:06:21.440
Here are the two
critical points in green.
00:06:21.440 --> 00:06:24.680
We started near
the critical point.
00:06:24.680 --> 00:06:27.480
We oscillate around
the critical point.
00:06:27.480 --> 00:06:36.290
And here is the orbit.
00:06:36.290 --> 00:06:38.860
This is just going
back and forth.
00:06:38.860 --> 00:06:41.570
It oscillates around
one critical point then
00:06:41.570 --> 00:06:45.390
decides to go over and oscillate
around the other for a while.
00:06:45.390 --> 00:06:49.030
It continues around
like this forever.
00:06:49.030 --> 00:06:50.870
This is not periodic.
00:06:50.870 --> 00:06:53.620
It never repeats.
00:06:53.620 --> 00:06:58.620
Now, the butterfly is associated
with Lorenz in two ways.
00:06:58.620 --> 00:07:03.120
One is the butterfly
effect on the weather.
00:07:03.120 --> 00:07:07.190
Also, this plot looks
like a butterfly.
00:07:07.190 --> 00:07:11.700
I can grab this with
my mouse and rotate it
00:07:11.700 --> 00:07:13.560
in three dimensions.
00:07:13.560 --> 00:07:16.880
So I can get different
views of the orbit.
00:07:16.880 --> 00:07:19.180
It's still being computed.
00:07:19.180 --> 00:07:22.640
We're adding more
and more to the plot.
00:07:22.640 --> 00:07:27.270
And I can look at it from
different points of view
00:07:27.270 --> 00:07:32.900
to get some notion
of how this is
00:07:32.900 --> 00:07:35.590
proceeding in three dimensions.
00:07:35.590 --> 00:07:38.420
It almost lives in two
dimensions, but not quite.
00:07:45.010 --> 00:07:48.370
Earlier, we've seen solutions,
differential equations
00:07:48.370 --> 00:07:50.810
with periodic solutions.
00:07:50.810 --> 00:07:54.470
Here, this isn't periodic.
00:07:54.470 --> 00:07:59.360
Just going like this
[? forever. ?] Now,
00:07:59.360 --> 00:08:04.350
this is perfectly--
this isn't random.
00:08:04.350 --> 00:08:08.300
This is completely determined
by the initial conditions.
00:08:08.300 --> 00:08:12.580
If I were to start it over again
with those exact conditions,
00:08:12.580 --> 00:08:14.970
with those exact
initial conditions,
00:08:14.970 --> 00:08:18.610
I'd get exactly this behavior.
00:08:18.610 --> 00:08:20.820
But it's unpredictable.
00:08:20.820 --> 00:08:24.700
It's hard to say
where this is going.
00:08:24.700 --> 00:08:30.740
I can clear this out and see
the orbit continue to develop.
00:08:35.419 --> 00:08:36.272
Press Stop.
00:08:46.360 --> 00:08:47.750
Now I have a choice.
00:08:47.750 --> 00:08:52.860
This pull down
menu here allows me
00:08:52.860 --> 00:08:55.720
to choose other values of rho.
00:08:55.720 --> 00:09:01.710
28 is the value of rho that
is almost always studied,
00:09:01.710 --> 00:09:05.620
but there's a book
by a Colin Sparrow
00:09:05.620 --> 00:09:12.460
that I've referenced in my in
my blog about periodic solutions
00:09:12.460 --> 00:09:14.410
to Lorenz equations.
00:09:14.410 --> 00:09:15.880
And let's take another value.
00:09:15.880 --> 00:09:21.393
Let me choose rho equal to
160 and clear and restart.
00:09:24.890 --> 00:09:37.770
Now, after an initial
transient, this is now periodic.
00:09:37.770 --> 00:09:42.630
So this is not chaos.
00:09:42.630 --> 00:09:45.595
This is a periodic solution.
00:09:49.630 --> 00:09:53.370
And these other
values of rho, not rho
00:09:53.370 --> 00:09:58.030
equals 28, that's chaotic,
but these other values of rho
00:09:58.030 --> 00:10:01.660
give periodic solutions
with different character.
00:10:01.660 --> 00:10:05.000
That's a long,
interesting story that I
00:10:05.000 --> 00:10:10.030
talk about in my blog
following the work of Sparrow.