Linearize

advertisement
DE.08.B1
y
2
Differential Equations&Mathematica
1
©1999 Bill Davis and Jerry Uhl
Produced by Bruce Carpenter
Published by Math Everywhere, Inc.
www.matheverywhere.com
DE.08 Linearizations
Basics
B.1) Approximating a nonlinear diffeq system by linearizing
at equilibrium points:
-2
2
4
x
-1
-2
You can see 8xeq, yeq< near 80.2, 1.3<.
To nail 8xeq, yeq< down, do this:
8xeq, yeq< =
8x, y< •. [email protected]@x, yD == 0, [email protected], yD == 0<, 8x, 0.2<, 8y, 1.3<D
80.364031, 1.14347<
How to do it and how to use it
See the equilibrium point with the flow:
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
áB.1.a.i)
Here's a nonlinear diffeq system:
[email protected], equilibriumplotD;
y
[email protected], n, x, y, tD
[email protected]_, y_D = 0.4 x - 0.9 y3 + 1.2;
[email protected]_, y_D = x - 0.4 [email protected];
diffeqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@diffeqsystemDD
2
1
-2
2
x¢ @tD == 1.2 + 0.4 [email protected] - 0.9 [email protected]
y¢ @tD == -0.4 [email protected]@tDD + [email protected]
4
x
-1
-2
And a flow plot:
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
8xlow, xhigh< = 8-2, 2<;
8ylow, yhigh< = 8-2, 2<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
12
flowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.25, HeadSize ® 0.2D,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
nonlinearflow = [email protected], Axes ® True, AxesLabel ® 8"x", "y"<D;
Grab both plots, align and animate.
áB.1.a.ii) Using the linearization matrix to linearize a nonlinear
diffeq system
Stay with the same nonlinear diffeq system as in part i);
[email protected], n, x, y, tD
[email protected]_, y_D = 0.4 x - 0.9 y3 + 1.2;
[email protected]_, y_D = x - 0.4 [email protected];
diffeqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@diffeqsystemDD
x¢ @tD == 1.2 + 0.4 [email protected] - 0.9 [email protected]
y¢ @tD == -0.4 [email protected]@tDD + [email protected]
The linearization matrix [email protected], yD at 8x, y< for this system is:
y
2
Some folks call this matrix by the name "Jacobian."
[email protected], gradm, gradnD
[email protected]_, y_D = [email protected]@x, yD, xD, [email protected]@x, yD, yD<;
[email protected]_, y_D = [email protected]@x, yD, xD, [email protected]@x, yD, yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
1
-2
2
4
x
-1
-2
You can spot an equilibrium point in this plot.
Plot it.
á Answer:
Saying that a point 8xeq, yeq< is an equilibrium point is the same as
saying that there is no flow out of 8xeq, yeq<, and this is the same as
saying:
[email protected], yeqD, [email protected], yeqD< = 80, 0<.
Some folks use the alternate term "fixed point"
to describe an equilibrium point.
0.4
-2.7 y2
y
i
z
j
z
j
-0.4 [email protected] {
k 1
[email protected], yD sits in the top horizontal row.
[email protected], yD sits in the bottom horizontal row.
How do you use the linearization matrix [email protected], yeqD to linearize this
system at 8xeq, yeq<?
The gradient of
The gradient of
á Answer:
Very easily.
You go with the linearization matrix [email protected], yeqD and use it for the
coefficient matrix of this system:
8x¢ @tD, y¢ @tD< = [email protected], yeqD . [email protected] - xeq, [email protected] - yeq<:
This tells you that 8xeq, yeq< lies at the intersection of the curve
linearized =
H8x'@tD, y'@tD< ==
[email protected]@[email protected], yeqD . [email protected] - xeq, [email protected] - yeq<DDL;
[email protected]@linearizedDD
defined by
[email protected], yD = 0
and the curve defined by
[email protected], yD = 0.
Here are these two curves shown with the flow plot:
mcontourplot = [email protected]@x, yD, 8x, xlow, xhigh<,
8y, ylow, yhigh<, Contours ® 80<, ContourStyle ® [email protected],
PlotPoints ® 50, ContourSmoothing ® Automatic,
ContourShading ® False, DisplayFunction ® IdentityD;
ncontourplot = [email protected]@x, yD, 8x, xlow, xhigh<,
8y, ylow, yhigh<, Contours ® 80<, ContourStyle ® [email protected],
PlotPoints ® 50, ContourSmoothing ® Automatic,
ContourShading ® False, DisplayFunction ® IdentityD;
[email protected], mcontourplot, ncontourplot,
DisplayFunction ® $DisplayFunctionD;
x¢ @tD == 3.89123 + 0.4 [email protected] - 3.53033 [email protected]
y¢ @tD == -0.174473 + 1. [email protected] - 0.165775 [email protected]
Done.
You can see [email protected], yeqD sitting in the system:
J
[email protected]@xeq, yeqDD
0.4 -3.53033
N
1
-0.165775
áB.1.b)
Here is the flow for the original system:
h = 1.0;
8xlow, xhigh< = 8xeq - h, xeq + h<;
8ylow, yhigh< = 8yeq - h, yeq + h<;
233
DE.08.B1
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
12
scalefactor = 0.2;
sizer = 0.1;
nonlinearflow = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
nonlinearflowplot = [email protected], equilibriumplot,
PlotRange ® 88xeq - 1.5 h, xeq + 1.5 h<, 8yeq - 1.5 h, yeq + 1.5 h<<,
Axes ® True, AxesLabel ® 8"x", "y"<, PlotLabel ® "Nonlinear"D;
y
Nonlinear
2.5
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
linearizedflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Red, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
[email protected], linearizedflowplot, equilibriumplot,
PlotRange ® 88xeq - 1.5 h, xeq + 1.5 h<, 8yeq - 1.5 h, yeq + 1.5 h<<,
Axes ® True, AxesLabel ® 8"x", "y"<, PlotLabel ® "Both"D;
y
1.2
1.15
2
1.1
1.5
1.05
1
0.25
0.5
0.350.40.450.5 x
Near the equilibrium point, you get a great approximation of the
-1 -0.5
0.5
1
1.5
x
Here is the corresponding flow of the linearized system:
[email protected]
[email protected]_, y_D = [email protected], yeqD . 8x - xeq, y - yeq<;
linearizedflow = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Red, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
linearizedflowplot = [email protected] , equilibriumplot, PlotRange ®
88xeq - 1.5 h, xeq + 1.5 h<, 8yeq - 1.5 h, yeq + 1.5 h<<, Axes ® True,
AxesLabel ® 8"x", "y"<, PlotLabel ® "Linearized at equilibrium"D;
Linearizedy at equilibrium
2.5
2
1.5
1
0.5
-1 -0.5
Both
1.25
0.5 1 1.5
x
nonlinear flow by the linearized flow.
See what happens when you go far away:
h = 5;
8xlow, xhigh< = 8xeq - h, xeq + h<;
8ylow, yhigh< = 8yeq - h, yeq + h<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
8
scalefactor = 0.1;
sizer = 0.5;
nonlinearflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
linearizedflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Red, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
[email protected], linearizedflowplot, equilibriumplot,
PlotRange ® 88xeq - 1.5 h, xeq + 1.5 h<, 8yeq - 1.5 h, yeq + 1.5 h<<,
Axes ® True, AxesLabel ® 8"x", "y"<, PlotLabel ® "Both"D;
Grab both plots, align and animate slowly.
Here are both flows together:
both =
[email protected], linearizedflowplot, PlotLabel ® "Both"D;
y Both
y
Both
8
2.5
6
2
4
1.5
2
1
-6 -4 -2
-2
0.5
-1 -0.5
0.5
1
1.5
4
6
x
-4
x
-6
What fundamental relation between the orginal nonlinear system and
its linearization at the equilibrium point is illustrated by these plots?
á Answer:
The further you go from the equilibrium point, the lower the quality of
the approximation of the original nonlinear system by the linearized
system.
Take another look:
áB.1.c) Using the linearization matrix to predict the behavior of a
[email protected];
y Both
nonlinear system
2.5
What advantage do you get by approximating this nonlinear system
with its linearized version?
2
1.5
á Answer:
1
You can look at the eigenvalues of the linearization matrix:
0.5
-1 -0.5
2
0.5
1
1.5
x
Near the equilibrium point, the flow of the linearization is a deadringer
for the original nonlinear flow. As you go further from the equilbrium
point, the quality of the approximation begins to deteriorate.
See what is happening in the immediate vicinty of the equilibrium
point:
h = 0.1;
8xlow, xhigh< = 8xeq - h, xeq + h<;
8ylow, yhigh< = 8yeq - h, yeq + h<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
8
scalefactor = 0.2;
sizer = 0.01;
nonlinearflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® scalefactor, HeadSize ® sizerD,
[email protected]@xeq, yeqDD
80.117113 + 1.8575 I, 0.117113 - 1.8575 I<
Propelling swirlers.
Because the linerized flow approximates the original nonlinear flow so
well, this information guarantees that trajectories in the original
nonlinear system that start near (but not on) the equilibrium point spiral
away from the equilibrium point never to return to the vicinity of
equilibrium point.
Watch it happen for some random starting points near the equilibrium
point:
h = 0.3;
8xstarter, ystarter< =
[email protected], 8xeq - h, xeq + h<D, [email protected], 8yeq - h, yeq + h<D<;
234
DE.08.B1®B2
endtime = 14;
starterpoint = 8xstarter, ystarter<;
[email protected], yD
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
[email protected], trajectoryplot,
equilibriumplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, PlotLabel ® "Nonlinear trajectory",
DisplayFunction ® $DisplayFunctionD;
á Repellor rules:
If the eigenvalues of the linearization matrix [email protected], yeqD are both
positive real numbers, then trajectories of the nonlinear system that
start near the equilibrium point are propelled more or less directly from
the equilibrium point.
If the eigenvalues of the linearization matrix [email protected], yeqD are
p + I q and p - I q with p > 0 and q ¹ 0,
then trajectories of the nonlinear system that start near the equilibrium
point spiral away from the equilibrium point.
If either of these happens, most folks say the equilbrium point is an
repellor.
y
Nonlinear
trajectory
á Saddle rule:
1.6
1.4
If the eigenvalues of the linearization matrix [email protected], yeqD consist of one
1.2
-0.5
0.5
1
x
0.8
positive real number and one negative real number, then trajectories of
the nonlinear system that start near the equilibrium are either propelled
0.6
0.4
directly away from the equilibrium point or move toward the
0.2
Rerun a couple of times.
equilibrium point and then move away.
Just as predicted by the eigenvalues of the linearization matrix
If either of these happens, most folks say the equilbrium point is an
(Jacobian matrix) at the equillibrium point:
saddle.
[email protected]@xeq, yeqDD
80.117113 + 1.8575 I, 0.117113 - 1.8575 I<
á No information rule:
B.2) Lyapunov's rules
áB.2.a) Lyapunov's
Given a nonlinear system, when can you trust the prediction you get
from the eigenvalues of the linearization matrix [email protected], yeqD at an
equilibrium point 8xeq, yeq<?
á Answer:
A juicy piece of advanced mathematics covers this. A brillant Russian
fellow named Lyapunov proved conclusively the following rules:
á Attractor rules:
If the eigenvalues of the linearization matrix [email protected], yeqD are both
negative real numbers, then trajectories of the nonlinear system that
start near the equilibrium point are sucked more or less directly to the
equilibrium point.
If the eigenvalues of the linearization matrix [email protected], yeqD are
p + I q and p - I q with p < 0 and q ¹ 0,
then trajectories of the nonlinear system that start near the equilibrium
point spiral in and stall at the equilibrium point.
If either of these happens, most folks say the equilbrium point is an
attractor.
Fancy folks say that an equilibrium point is asymptotically stable
if it is an attractor.
Some other folks call attractors by the name "sink."
If the equilibrium point is a neither a repellor nor an attractor nor a
saddle, then you are walking on thin ice if you trust the information
you get from the linearization at the equilibrium point.
For instance, if the the eigenvectors of the linearization are pure
swirlers, it is sometimes wrong to conclude that trajectories in the
original nonlinear system starting near the equilbrium point are closed
curves.
áB.2.b)
Give some illustrations of Lyapunov's rules.
á Answer:
Here's one:
[email protected], n, x, y, tD
[email protected]_, y_D = -1.3 x + 0.17 y - 0.2 x2 y;
[email protected]_, y_D = 0.50 x - 0.29 y + 0.7;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == -1.3 [email protected] + 0.17 [email protected] - 0.2 [email protected] [email protected]
y¢ @tD == 0.7 + 0.5 [email protected] - 0.29 [email protected]
The linearization matrix (Jacobian) at a point 8x, y< is:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
-1.3 - 0.4 x y 0.17 - 0.2 x2 y
i
z
j
z
j
0.5
-0.29
{
k
The equilibrium points are:
equisols = [email protected]@[email protected], yD == 0, [email protected], yD == 0<, 8x, y<DD
8y ® 0.914599 - 2.86101 I, x ® -0.869532 - 1.65939 I<
8y ® 0.914599 + 2.86101 I, x ® -0.869532 + 1.65939 I<
8y ® 2.99839, x ® 0.339065<
The only equilbrium point is:
8xeq, yeq< = 80.339065, 2.99839<
235
DE.08.B2®B3
80.339065, 2.99839<
The eigenvalues of the linearization matrix at 8xeq, yeq< are:
The linearization predicts trajectories that oscillate around 8xeq, yeq<.
But Lypunov's "No Information" rule says not to trust this.
[email protected]@xeq, yeqDD
8-1.75677, -0.239888<
Both negative. The equilibrium point is an attractor.
See a random trajectory that starts near the equilibrium point head right
for the equilibrium point:
h = 2;
8xstarter, ystarter< =
[email protected], 8xeq - h, xeq + h<D, [email protected], 8yeq - h, yeq + h<D<;
endtime = 15;
starterpoint = 8xstarter, ystarter<;
[email protected], yD
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
equiliblabel =
[email protected], [email protected]"equilib point", 8xeq, yeq<, 80, 1.5<D<D;
See a trajectory that starts near 8xeq, yeq<:
8xstarter, ystarter< = 8xeq, yeq< + 81, 1<;
endtime = 6.2;
starterpoint = 8xstarter, ystarter<;
[email protected], yD
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
equiliblabel =
[email protected], [email protected]"equilib point", 8xeq, yeq<, 80, 1.5<D<D;
[email protected], trajectoryplot,
equilibriumplot, equiliblabel, starterpointlabel,
PlotRange ® 88-1, 1<, 8-1, 1<<, Axes ® True, AxesLabel ® 8"x", "y"<,
AspectRatio ® 1, PlotLabel ® "Nonlinear trajectory",
DisplayFunction ® $DisplayFunctionD;
[email protected], trajectoryplot, equilibriumplot, equiliblabel,
starterpointlabel, PlotRange ® 88xeq - h, xeq + h<, 8yeq - h, yeq + h<<,
Axes ® True, AxesLabel ® 8"x", "y"<,
AspectRatio ® 1, PlotLabel ® "Nonlinear trajectory",
DisplayFunction ® $DisplayFunctionD;
y trajectory
Nonlinear
Nonlinear ytrajectory
1
sta
0.75
4.5
start4
3.5
0.5
0.25
3
equilib point
2.5
-1-0.75
-0.5
-0.25 0.25
0.50.75 1 x
equilib
point
-0.25
2
-0.5
1.5
-1.5-1-0.5
-0.75
0.5 1 1.5 2
x
-1
Rerun a couple of times.
Down the drain every time.
The linearization predicts trajectories that oscillate around 8xeq, yeq<.
Here's another:
This is in harmony with Lyapunov's rules.
[email protected], n, x, y, tD
[email protected]_, y_D = 1.3 y - 8.3 x2 ;
[email protected]_, y_D = -1.6 x ;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == -8.3 [email protected] + 1.3 [email protected]
y¢ @tD == -1.6 [email protected]
The linearization matrix at a point 8x, y< is:
But this time, the information from the linearization matrix was useless.
B.3) The pendulum oscillator: Damped and undamped
Put your eyes on this snapshot of a pendulum:
L = 10;
p
setup = ShowApendulumAL, €€€€€ E, DisplayFunction ® $DisplayFunctionE;
6
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
-16.6 x 1.3
J
N
-1.6
0
The equilibrium points are:
equisols = [email protected]@[email protected], yD == 0, [email protected], yD == 0<, 8x, y<DD
8y ® 0., x ® 0.<
The equilbrium point is 80, 0< :
8xeq, yeq< = 80, 0<
80, 0<
The eigenvalues of the linearization matrix at 8xeq, yeq< are:
[email protected]@xeq, yeqDD
80. + 1.44222 I, 0. - 1.44222 I<
All pendulum graphics are by Ben Halperin.
His code is in the initialization cells.
It's just like the pendulum that hangs out the bottom of a cuckoo
clock, or the bigger pendulum that hangs in that old clock in your
grandmother's hallway.
To come up with a tractable model for the motion of the pendulum,
you have to make a few assumptions that may be hard to swallow at
first.
They are these:
® The pendulum hangs from a frictionless pivot.
236
DE.08.B3
® The pendulum moves in a vacuum so that there is no air resistance.
® The arm of the pendulum which holds the bob at the end is both
massless and perfectly rigid.
With those assumptions under your belt, look at this:
[email protected], t, sD
L = 10;
p
[email protected] = €€€€€ ;
6
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
[email protected]@L, [email protected], angle, labels,
DisplayFunction ® $DisplayFunctionD;
[email protected], t, sD
p
[email protected] = - €€€€€ ;
3
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
[email protected]@L, [email protected], angle, labels,
DisplayFunction ® $DisplayFunctionD;
[email protected] =
Here's what happens when you go with
3p
:
[email protected] = €€€€€€€€
2
L
[email protected]
[email protected] =
p
€€€€€
6
L stands for the length of the pendulum rod
measured from the swivel to the center of the bob.
[email protected]
is the indicated angle measured counterclockwise
from the vertical support.
In the specific grahpics here, the sample value
L = 10
is used.
Here's what happens when you go with
[email protected] = €€€€p3€ :
[email protected], t, sD
p
[email protected] = €€€€€ ;
3
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
[email protected]@L, [email protected], angle, labels,
DisplayFunction ® $DisplayFunctionD;
L
[email protected]
[email protected] =
L
[email protected]
p
- €€€€€
3
p
€€€€€
3
Here's what happens when you go with
[email protected] = 0:
[email protected], t, sD
[email protected] = 0;
[email protected]
labels = [email protected]
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D<D;
[email protected]@L, [email protected], labels,
DisplayFunction ® $DisplayFunctionD;
[email protected], t, sD
3p
[email protected] = €€€€€€€€€ ;
2
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
[email protected]@L, [email protected], angle, labels,
DisplayFunction ® $DisplayFunctionD;
[email protected]
L
[email protected] =
3p
€€€€€€€€€€
2
Get it? Got it? Good!
To get ready to come up with the differential equation [email protected] solves,
look at this set up:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
[email protected], t, sD
L = 10;
[email protected] = 0.3 p;
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
setup = [email protected]@L, [email protected], bobpath, angle, labels,
DisplayFunction ® $DisplayFunctionD;
L
[email protected]
That circle is the path the center of bob moves on.
L
[email protected] =
0
Here's what happens when you go with
[email protected] = - €€€€p3€ :
áB.3.a.i) The pendulum oscillator diffeq
g [email protected]@tDD
y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€
€ = 0.
L
Use the picture and Newton's law
Force = Mass ‰ Acceleration
to come up with the differential equation that models the motion of
this pendulum.
á Answer:
Take another look at the set up together with the circular path on which
the center of the lump swings:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
237
DE.08.B3
[email protected], t, sD
L = 10;
[email protected] = 0.3 p;
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
setup = [email protected]@L, [email protected], bobpath, angle, labels,
DisplayFunction ® $DisplayFunctionD;
L
[email protected]
[email protected]
M g
In this snapshot, assume the bob is moving to from left to right so that
y¢ @tD > 0.
And look at:
[email protected], t, yD
position ¢ @tD
L
[email protected]
8L [email protected]@tDD y¢ @tD, L [email protected]@tDD y¢ @tD<
Because
Agree that the length of the rod is L.
y¢ @tD > 0,
You need a circular parameterization of the circle in terms of [email protected]
the unit tangent vector pointing in the direction of the path of the center
Here's one that works very well:
of the bob is:
[email protected], L, y, tD;
[email protected]_D = L [email protected]@tDD, [email protected]@tDD<
8L [email protected]@tDD, -L [email protected]@tDD<
[email protected];
[email protected]_D = [email protected]@tDD, [email protected]@tDD<
[email protected]@tDD, [email protected]@tDD<
This is the parametrization of the circle you want to make the
The unit tangent points opposite to the tangential acceleration.
pendulum hang down in the vertical position when the angle [email protected] = 0:
Consequently the tangential component of the force on the bob, [email protected], is
[email protected] •. [email protected] ® 0
80, -L<
Take a new look with all the goodies thrown in:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
[email protected], t, sD
L = 10;
[email protected] = 0.3 p;
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D,
[email protected]"M g", 8L [email protected]@tDD, -L [email protected]@tDD< + 80, -0.3 L< + 80.15 L, 0<D,
[email protected]"[email protected]", 0.85 8L [email protected]@tDD, -L [email protected]@tDD< +
0.5 80, -0.6 L< . [email protected]@tDD, [email protected]@tDD< [email protected]@tDD, [email protected]@tDD<D=E;
overallforce = [email protected], -0.6 L<, Tail ® 8L [email protected]@tDD, -L [email protected]@tDD<D;
tangentialforce =
[email protected], -0.6 L< . [email protected]@tDD, [email protected]@tDD< [email protected]@tDD, [email protected]@tDD<,
Tail ® 8L [email protected]@tDD, -L [email protected]@tDD<D;
"##########################################################################################################
factor = H0.6 LL2 - H80, -0.6 L< . [email protected]@tDD, [email protected]@tDD<L2 ;
tension = [email protected]
factor [email protected]@tDD, [email protected]@tDD<, Tail ® 8L [email protected]@tDD, -L [email protected]@tDD<D;
all = [email protected]@L, [email protected], angle, labels, bobpath, overallforce,
tangentialforce, tension, DisplayFunction ® $DisplayFunctionD;
given by:
[email protected], MD;
[email protected]_D = [email protected] position ² @tD . [email protected]
-L M y² @tD
Take one final peek at the picture:
[email protected];
L
[email protected]
[email protected]
M g
The picture tells you that [email protected] is also given by:
[email protected], gD
[email protected]_D = M g [email protected]@tDD
g M [email protected]@tDD
The result is:
pendulummodel = [email protected] == [email protected]
-L M y² @tD == g M [email protected]@tDD
Solve this for y''[t]:
L
[email protected]
[email protected]
M g
Agree that:
® The mass of the bob on the end is M.
® The vertical force on the bob is M(ass) g(ravity).
® The component of force pointing in the direction of the pendulum
rod can only try to stretch the unstretchable rod,
so the only part of the force that actually moves the pendulum is the
tangential component [email protected]
Take another look:
[email protected];
[email protected], y² @tDD
g [email protected]@tDD
99y² @tD ® - €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ==
L
This gives:
g [email protected]@tDD
i ²
pendulumoscillator = j
jy @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ==
L
k
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
The behavior of this pendulum does not depend
Galileo is redeemed.
y
0z
z
{
on the size of the mass.
There it is!
A very famous differential equation.
This differential equation
the asssumption that the pendulum is
If you want to be really anal-retentive
you get the same differential equation
pendulum is swinging from right to
came about under
swinging from left to right.
about this and want to see how
under the assumption that the
left, open the next cells.
Look again at:
position ¢ @tD
8L [email protected]@tDD y¢ @tD, L [email protected]@tDD y¢ @tD<
238
DE.08.B3®B4
When you assume the bob is moving from right to left, then you have
to say that y¢ @tD < 0.
[email protected];
[email protected]_D = [email protected]@tDD, [email protected]@tDD<
[email protected]@tDD, [email protected]@tDD<
In this case, the unit tangent vector pointing in the direction of the path
of the center of the bob is:
[email protected];
[email protected]_D = [email protected]@tDD, [email protected]@tDD<
[email protected]@tDD, [email protected]@tDD<
Take another look at the snapshot:
Without friction, you put:
[email protected], MD;
[email protected]_D = [email protected] position ² @tD . [email protected]
-L M y² @tD
With friction, you put:
[email protected], M, bD;
[email protected]_D = [email protected]_D = [email protected] position ² @tD . [email protected] - b y¢ @tD
-b y¢ @tD - L M y² @tD
[email protected];
H-b y¢ @tDL
term is that the retarding force due
to friction
¢
at the hub is proportional to the anglular velocity y @tD.
The reason for the extra
L
Now you go on as in part i):
[email protected]
[email protected]
M g
[email protected], gD
[email protected]_D = M g [email protected]@tDD
Because the bob is moving from right to left, the unit tangent above
points in the same direction as the tangential component of the
acceleration. This gives
g M [email protected]@tDD
The result is:
dampedpendulummodel = [email protected] == [email protected]
-b y¢ @tD - L M y² @tD == g M [email protected]@tDD
[email protected], MD;
[email protected]_D = [email protected] position''@tD . [email protected]
-L M y² @tD
On the otherhand, the picture still tells you that [email protected] is also given by:
[email protected], y''@tDD
g M [email protected]@tDD + b y¢ @tD
99y² @tD ® - €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ==
LM
A little rearranging and cancelling gives:
b y¢ @tD
g [email protected]@tDD
dampedpendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
LM
L
g [email protected]@tDD
b y¢ @tD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
LM
[email protected], gD
[email protected]_D = M g [email protected]@tDD
g M [email protected]@tDD
The result is:
There it is!
pendulummodel = [email protected] == [email protected]
-L M y² @tD == g M [email protected]@tDD
A very famous nonlinear differential equation.
²
[email protected], y @tDD
g [email protected]@tDD
99y² @tD ® - €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ==
L
As you might have expected, the damping term
This gives you:
g [email protected]@tDD
pendulumoscillator = y @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
b y¢ @tD
²
Just as you got in the case that the pendulum is moving from left to
is very small
€€€€€€€€€€€€€€
€
HL ML
when L and M
are large.
B.4) The ordinary linear oscillator
g [email protected]
y² @tD + €€€€€€€€€€€€€
€ =0
L
right.
Going either way, the pendulum oscillator is a winner.
is a linearization of the pendulum oscillator
g [email protected]@tDD
y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€
€ =0
L
áB.3.a.ii) The damped pendulum oscillator
b y¢ @tD
g [email protected]@tDD
y² @tD + €€€€€€€€€€€€€€€
€ + €€€€€€€€€€€€€€€€€€€€€€€€
€ = 0.
LM
L
What differential equation do you get when you include a friction
term?
á Answer:
You do exactly as you did above at the start.
[email protected];
áB.4.a)
The undamped pendulum oscillator diffeq is:
[email protected], g, L, tD
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
The ordinary undamped linear oscillator diffeq is:
[email protected], g, L, tD
g [email protected]
ordinaryoscillator = y² @tD + €€€€€€€€€€€€€€€€€€ == 0
L
g [email protected]
€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
L
Explain why the ordinary linear oscillator arrives as a linearization of
the pendulum oscillator.
[email protected]
[email protected]
M g
á Answer:
[email protected], L, x, tD;
[email protected]_D = L [email protected]@tDD, [email protected]@tDD<
8L [email protected]@tDD, -L [email protected]@tDD<
position ¢ @tD
¢
¢
8L [email protected]@tDD y @tD, L [email protected]@tDD y @tD<
Assume the bob is moving from left to right so that y¢ @tD > 0.
Accordingly the unit tangent vector pointing in the direction of the path
of the center of the bob is:
Look at:
pendulumoscillator
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
Make this second order differential equation into a system of two first
order differential equations, by putting
[email protected] = y¢ @tD
and then replacing y¢ @tDwith [email protected] and replacing y² @tDwith x¢ @tD:
239
DE.08.B4
[email protected]
[email protected]@8new = Hy'@tD == [email protected],
pendulumoscillator •. 8y'@tD -> [email protected], y''@tD -> x'@tD<<D D
y¢ @tD == [email protected]
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€
+ x¢ @tD == 0
L
[email protected]
10
8
6
4
2
Clean this up:
[email protected], n, x, y, tD
g [email protected]
[email protected]_, y_D = - €€€€€€€€€€€€€€€€€€€€€€€€ ;
L
[email protected]_, y_D = x;
pendulumsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@pendulumsystemDD
g [email protected]@tDD
x¢ @tD == - €€€€€€€€€€€€€€€€€€€€€€€€€
L
2
4
6
8
10
12
t
-2
One of these looks just like an ordinary oscillator.
Another looks something like an ordinary oscillator.
The third doesn't look like an ordinary oscillator at all.
Use linearizations to help explain why this happened.
á Answer:
y¢ @tD == [email protected]
The linearization matrix at 80, 0< is:
8xeq, yeq< = 80, 0<;
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@xeq, yeqDD
g
i 0 - €€€€
L y
j
z
j
z
k1 0 {
The flow field for the nonlinear pendulum oscillator is:
[email protected], n, x, y, t, FieldD
g [email protected]
[email protected]_, y_D = - €€€€€€€€€€€€€€€€€€€€€€€€ ;
L
[email protected]_, y_D = x;
[email protected]_, y_D = [email protected], yD, [email protected], yD<
8-1.96 [email protected], x<
The linearization matrix at 80, 0< is:
The linearization at 80, 0< is:
linearized =
H8x'@tD, y'@tD< == [email protected]@xeq, yeqD . [email protected] - xeq, [email protected] - yeq<DL;
[email protected]@linearizedDD
g [email protected]
x¢ @tD == - €€€€€€€€€€€€€€
L
y¢ @tD == [email protected]
Remembering that [email protected] = y¢ @tD, you see that this is the same as:
g [email protected]
y² @tD + €€€€€€€€€€€€€€€€€€ == 0
L
g [email protected]
€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
8xeq, yeq< = 80, 0<;
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@xeq, yeqDD
0 -1.96
J
N
1
0
The linearization at 80, 0< is:
linearized =
H8x'@tD, y'@tD< == [email protected]@xeq, yeqD . [email protected] - xeq, [email protected] - yeq<DL;
[email protected]@linearizedDD
x¢ @tD == -1.96 [email protected]
y¢ @tD == 1. [email protected]
The upshot:
The ordinary linear oscillator
The flow field for the linearization is:
g [email protected]
y² @tD + €€€€€€€€€€€€
€ =0
L
[email protected]
[email protected]_, y_D = [email protected], yeqD . 8x - xeq, y - yeq<
is a linearization of the pendulum oscillator
²
y @tD +
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€
€
L
= 0.
áB.4.b.i) Using the linearization to see why the pendulum oscillator
8-1.96 y, 1. x<
See the linearized flow and the nonlinear pendulum flow:
h = 3.5;
8xlow, xhigh< = 8xeq - h, xeq + h<;
8ylow, yhigh< = 8yeq - h, yeq + h<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
12
scalefactor = 0.35;
sizer = 0.3;
nonlinearflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
linearizedflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Red, ScaleFactor ® scalefactor, HeadSize ® sizerD,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
equilibriumplot =
[email protected], [email protected], [email protected], yeq<D<D;
both = [email protected], equilibriumplot, linearizedflowplot,
PlotRange ® 88xeq - 1.5 h, xeq + 1.5 h<, 8yeq - 1.5 h, yeq + 1.5 h<<,
Axes ® True, AxesLabel ® 8"y'", "y"<, PlotLabel ® "Both"D;
sometimes behaves
like an ordinary linear oscillator and sometimes it doesn't
Here are three solutions of the pendulum oscillator corresponding to
g = 9.8 and L = 5:
They all start with [email protected] = 0.8, but one starts with a reasonably small
y¢ @0D, the next one starts with a bigger y¢ @0D and the last starts with an
even bigger y¢ @0D:
[email protected], yslow, yfaster, yreallyfastD
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0;
L
g = 9.8;
L = 5;
endtime = 13;
slowstart = [email protected],
[email protected] == 0.8, y¢ @0D == 0.5<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. slowstartP1T;
fasterstart = [email protected],
[email protected] == 0.8, y¢ @0D == 2.57<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. fasterstartP1T;
reallyfaststart = [email protected],
[email protected] == 0.8, y¢ @0D == 2.9<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. fasterstartP1T;
[email protected]_D = [email protected] •. reallyfaststartP1T;
[email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® 88Red, [email protected]<,
8CadmiumOrange, [email protected]<, 8HotPink, [email protected]<<,
1
AxesLabel ® 8"t", "[email protected]"<, PlotRange ® 8-3, 10<, AspectRatio ® €€€€€ E;
2
y
Both
4
2
-4
-2
2
4
y’
-2
-4
The nonlinear pendulum flow is plotted in red.
The linearized flow is plotted in blue.
240
DE.08.B4®B5
[email protected]
Starter velocity not close to 0
Near 80, 0<, the two flows are similar - almost copies of each other.
8
6
4
2
The upshot:
When the starter data on [email protected] and y¢ @0Dare close to 80, 0<, the nonlinear
pendulum oscillator behaves very much like the ordinary linear
2
-2
pend
oscillator that comes from its linearization.
80.0138436, 0.152305<
[email protected] Starter data close to 80,0<
0.1
0.05
2
4
6
8
10
12
14
6
8
10
12
14
t
The point above the graph is the starter point.
Rerun many times.
Watch it happen for random starter data close to 80, 0<:
h = 0.5;
[email protected], ypend, yordinary, tD
8startery, starteryprime< =
[email protected], 8-h, h<D, [email protected], 8-h, h<D<
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0;
L
g [email protected]
linearizedoscillator = y² @tD + €€€€€€€€€€€€€€€€€€ == 0;
L
g = 9.8;
L = 5;
endtime = 15;
pendulum = [email protected],
[email protected] == startery, y¢ @0D == starteryprime<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. pendulumP1T;
ordinary = [email protected] ,
[email protected] == startery, y¢ @0D == starteryprime<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. ordinaryP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® 88Red, [email protected]<, 8Blue, [email protected]<<,
AxesLabel ® 8"t", "[email protected]"<,
1
PlotLabel ® "Starter data close to 80,0<", AspectRatio ® €€€€€ ,
3
PlotLegend ® 8"pend", "lin"<, LegendSize ® 0.4E;
4
lin
B.5) Linearizations and gradients:
Getting an idea about why linearizations give good
approximations
áB.5.a)
The linearization of a function [email protected] at a point x0 on the x - axis is:
[email protected], x, linearf, x0D
[email protected]_D = [email protected] + f¢ @x0D Hx - x0L
[email protected] + Hx - x0L f¢ @x0D
See the plot of a function [email protected] together with the plot of its linearization
at a random point x0 on the x - axis:
[email protected]_D = 0.2 x + [email protected] xD;
8xlow, xhigh< = 8-1, 4<;
x0 = [email protected], 8xlow, xhigh<D;
[email protected]@xD, [email protected]<, 8x, xlow, xhigh<,
PlotStyle ® 88Blue, [email protected]<, 8Red, [email protected]<<,
AxesLabel ® 8"x", ""<, PlotRange ® 8-2, 2.5<,
PlotLabel ® "Function and linearization \n at indicated point",
PlotLegend ® 8"[email protected]", "[email protected]"<, LegendSize ® 0.6,
Epilog ® 8Red, [email protected], [email protected], [email protected]<D<D;
t
-0.05
-0.1
pend
lin
The point above the graph is the starter point.
Rerun many times.
Take another look at both flows near 80, 0<:
Function and linearization
at indicated point
[email protected];
2
y
Both
1
4
-1
1
2
3
4 x
-1
2
[email protected] -2
-4
-2
2
4
y’
linf
-2
-4
The plot indicates that when you go with starter data on [email protected], y¢ @0D<not
so close to 80, 0<, the pendulum oscillator behaves much differently
from the ordinary oscillator coming from its linearization. See what
happens when you go with some random starter data not so close to
80, 0<:
[email protected], ypend, yordinary, tD
8startery, starteryprime< =
[email protected], 8-1.0, 1.0<D, [email protected], 81.5, 4.0<D<
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0;
L
g [email protected]
linearizedoscillator = y² @tD + €€€€€€€€€€€€€€€€€€ == 0;
L
g = 9.8;
L = 5;
endtime = 15;
pendulum = [email protected],
[email protected] == startery, y¢ @0D == starteryprime<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. pendulumP1T;
ordinary = [email protected] ,
[email protected] == startery, y¢ @0D == starteryprime<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. ordinaryP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® 88Red, [email protected]<, 8Blue, [email protected]<<,
AxesLabel ® 8"t", "[email protected]"<,
1
PlotLabel ® "Starter velocity not close to 0", AspectRatio ® €€€€€ ,
3
PlotLegend ® 8"pend", "lin"<, LegendSize ® 0.4E;
Rerun a couple of times.
That's right!
The linearization of [email protected] at x0 is nothing but the tangent
y = [email protected] D + f ¢ @x0 D Hx - x0 L
at x0 .
It gives a really good approximation of [email protected] near x0 , the point of
linearization.
How do you use gradients to carry this off for functions of two
variables?
á Answer:
One of the great drivers of mathematics is the power of analogy.
To linearize a function [email protected] of one variable at x0 , you go with the
derivative
f ¢ @xD
and write
[email protected] = [email protected] D + f ¢ @x0 D Hx - x0 L.
To linearize a function [email protected], yD of two variables at 8x0 , y0 <, you go with
the gradient
Ñ [email protected], yD = 8¶[email protected], yD • ¶x, ¶[email protected], yD • ¶y<
If you're running these lessons through Windows,
the funny looking characters above are supposed to be partial
derivative symbols.
8-0.308107, 3.25938<
241
DE.08.B5
which is the same as
Ñ [email protected], yD = 8¶x [email protected], yD, ¶y [email protected], yD<
and write
[email protected], yD = [email protected] , y0 D + Ñ[email protected] , y0 D . 8x - y0 , y - y0 <
which is the same as
[email protected], yD = [email protected] , y0 D + [email protected] , y0 D . 8x - y0 , y - y0 <
That's a dot product.
To help you stick your mental tongs into the idea behind using the
gradient for linearization, look at the following plot of a sample
function [email protected], yD:
[email protected], x, yD
[email protected]_, y_D = 3 - 0.4 x2 - 0.5 y2 ;
actualsurfaceplot =
[email protected], y, [email protected], yD<, 8x, -1, 1<, 8y, -1, 1<,
Axes ® Automatic, AxesLabel ® 8"x", "y", "[email protected],yD"<, PlotRange ® All,
ViewPoint ® CMView, DisplayFunction ® $DisplayFunctionD;
0.5
x
-1
-0.5
0
80., -1.66667<
80.85, 4.<
The linearized system at [email protected], [email protected]< is:
[email protected], gradm, gradnD
[email protected]_, y_D = [email protected]@x, yD, xD, [email protected]@x, yD, yD<;
[email protected]_, y_D = [email protected]@x, yD, xD, [email protected]@x, yD, yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
linearized2 =
H8x'@tD, y'@tD< ==
[email protected]@[email protected]@2D, [email protected] . [email protected] - [email protected], [email protected] - [email protected]<DDL;
[email protected]@linearized2DD
x¢ @tD == 0.34 - 0.085 [email protected]
y¢ @tD == -2.2 + 2. [email protected] + 0.125 [email protected]
How is this linearized system related to the linearizations of [email protected], yD
and [email protected], yD at [email protected], [email protected]<?
How does the answer explain why the linearized system approximates
the original system very well near [email protected], [email protected]<?
á Answer:
Very intimately.
1
3
2.8
[email protected],yD
2.6
2.4
2.2
2
-1
equisols = [email protected]@x, yD == 0, [email protected], yD == 0<, 8x, y<D;
[email protected], yeqD
[email protected], [email protected]< = 8x, y< •. equisolsP1T
[email protected], [email protected]< = 8x, y< •. equisolsP2T
To get the idea, linearize [email protected], yD and linearize [email protected], yD at
-0.5
[email protected], [email protected]<:
0
y
0.5
1
Now look at plots of linearizations at the indicated points:
[email protected], linearnD;
[email protected]_, y_D = [email protected]
[email protected]@2D, [email protected] + [email protected]@2D, [email protected] . 8x - [email protected], y - [email protected]<D
[email protected]_, y_D = [email protected]
[email protected]@2D, [email protected] + [email protected]@2D, [email protected] . 8x - [email protected], y - [email protected]<D
-0.085 H-4. + yL
2. H-0.85 + xL + 0.125 H-4. + yL
Use [email protected], yD and [email protected], yD to make a new diffeq system:
newDiffEqsystem =
H8x'@tD, y'@tD< ==
[email protected]@[email protected], [email protected], [email protected]@tD, [email protected]<DL;
[email protected]@newDiffEqsystemDD
8x0, y0< = [email protected], 80, 1<D, [email protected], 8-1, 1<D<;
[email protected], linearf, pointD;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], y0D + [email protected], y0D . 8x - x0, y - y0<;
h = 0.4;
linearizationplot =
[email protected], y, [email protected], yD<, 8x, x0 - h, x0 + h<,
8y, y0 - h, y0 + h<, PlotPoints ® 82, 2<, DisplayFunction ® IdentityD;
linpoint =
[email protected], [email protected], [email protected], y0, [email protected], y0D<D<D;
[email protected], linearizationplot, linpointD;
1
3
2.75
[email protected],yD
2.5
2.25
5
0.5
-1
x
-1
-0.5
0
x¢ @tD == 0.34 - 0.085 [email protected]
y¢ @tD == -2.2 + 2. [email protected] + 0.125 [email protected]
This is the same as the linearized system you got via the linearization
matrix:
[email protected]@linearized2DD
x¢ @tD == 0.34 - 0.085 [email protected]
y¢ @tD == -2.2 + 2. [email protected] + 0.125 [email protected]
It works this way everytime.
And that's why linearized systems approximate the original system
very, very well at the point of linearization.
-0.5
0
y
áB.5.c)
In what other mathematical issues is the idea of linearization
important?
0.5
1
Rerun several times.
á Answer:
That flat sheet hugging onto the actual surface plot is a plot of the
The idea of linearization sits at the heart of the chain rule for functions
linearization at the indicated point.
of more than one variable.
In fact, that sheet is tangent to the surface and approximates the actual
And the idea of linearization sits at the heart of the way you change
surface very well close to the indicated point.
variables in double and triple integrals.
It's around all over the place.
Some calculous courses call the flat sheet by the name "tangent plane."
áB.5.b)
Here's a nonlinear diffeq system:
[email protected], n, x, yD
[email protected]_, y_D = 0.4 x - 0.1 x y;
[email protected]_, y_D = -0.3 y + 0.5 y x - 0.5;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == 0.4 [email protected] - 0.1 [email protected] [email protected]
y¢ @tD == -0.5 - 0.3 [email protected] + 0.5 [email protected] [email protected]
The equilibrium points are:
242
DE.08.T1
DE.08 Linearizations
Tutorials
T.1) Using formulas resulting from the linearization of a
pendulum oscillator to estimate the amplitude and
frequency of a pendulum oscillator
Because linear {differential] equations are easy to solve and study,
the theory of linear oscillation is the most highly developed area of
mechanics.
In many non-linear problems, linearization produces a
satisfactory approximate solution. Even when this is not the case,
the study of the linear part of a problem is often a first step,
to be followed by the study of the relation between motions in a
nonlinear system and its linear model.
-------World DiffEq Master V. I. Arnold
writing in his advanced book Mathematical Methods of Classical Mechanics
(Springer-Verlag, New York, 1989)
Nailed it fairly well. You could probably use this formula for t between
0 and 12.
See more:
endtime = 50;
realthing = [email protected], [email protected] == starterangle,
y¢ @0D == startervelocity<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
2 GoldenRatio
0.4
0.2
10
20
30
40
50
t
-0.2
-0.4
Whether to use the formula for a long time interval is a question of
your own judgment.
T.1.a.i) Approximate formulas: The good news
The truth is that nothing, including Mathematica, has ever succeeded
in coming up with an exact formula for the actual pendulum oscillator.
Try it in the sample case L = 7.5 and g = 9.8 with starter data
[email protected] = 0.4 and y¢ @0D = -0.3:
L = 7.5;
g = 9.8;
starterangle = 0.4;
startervelocity = -0.3;
[email protected], yD
áT.1.a.ii)
Look at the approximate formula for the pendulum oscillator you got
in part i) above:
[email protected]
0.4 [email protected] tD - 0.262445 [email protected] tD
Use it to estimate the amplitude, period and frequency of this
pendulum oscillator.
á Answer:
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
²
1.30667 [email protected]@tDD + y @tD == 0
actual = [email protected]
8pendulumoscillator, [email protected] == starterangle, y¢ @0D == startervelocity<,
[email protected], tD
[email protected] [email protected]@tDD + y² @tD == 0, [email protected] == 0.4, y¢ @0D == -0.3<,
[email protected], tD
Out of luck. Formulas for the solution do not exist.
Lots of formula-hungry folks turn to the linearized version for a quick
formula:
g [email protected]
linpendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€ == 0
L
[email protected];
linearized = [email protected]@8linpendulumoscillator ,
[email protected] == starterangle, y¢ @0D == startervelocity<, [email protected], tDD;
[email protected]_D = [email protected]@[email protected] •. linearizedP1TD, 6D
1.30667 [email protected] + y² @tD == 0
Look at the approximate formula again:
[email protected]
0.4 [email protected] tD - 0.262445 [email protected] tD
Write down the amplitude:
approxamplitude =
0.478411
"#########################################
#
0.42 + H-0.262445L2
Confirm with a plot:
amplitudeplot = [email protected], approxamplitude, -approxamplitude<,
8t, 0, endtime<, PlotStyle ® [email protected], Red<,
[email protected], Blue<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
2 GoldenRatio
0.4
0.2
10
20
30
40
50
t
-0.2
0.4 [email protected] tD - 0.262445 [email protected] tD
How do you know whether or not to trust this approximate formula?
á Answer:
-0.4
Estimate the period of the pendulum oscillator:
[email protected]
Look at the starter data:
0.4 [email protected] tD - 0.262445 [email protected] tD
8starterangle, startervelocity<
80.4, -0.3<
The starter point is not far from the point of linearization at 80, 0<; so
you can expect this formula to give good results. Give it the acid test:
endtime = 12;
realthing = [email protected], [email protected] == starterangle,
y¢ @0D == startervelocity<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
approxperiod = [email protected] t == [email protected] pD, tD
88t ® 5.49662<<
This pendulum oscillator repeats itself approximately every 5.5 time
units.
approxperiod = 5.5;
periodlines = [email protected]@8UltramarineViolet, [email protected],
[email protected], -approxamplitude<, 8t, approxamplitude<<D<D,
8t, 0, 8 approxperiod, approxperiod<D;
[email protected], periodlinesD;
0.4
0.2
10
20
30
40
50
t
-0.2
0.4
-0.4
0.2
Lots of folks like to talk about frequency. The approximate frequency
2
-0.2
-0.4
4
6
8
10
12
t
of this pendulum oscillator is:
1
appoxfrequency = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
approxperiod
0.181818
This oscillator goes through about 0.18 complete oscillations per unit
of time.
243
DE.08.T1®T2
áT.1.a.iii) Approximate formulas: The bad news
Can you always use the approximate formula you get from the
linearization to estimate amplitude, period, and frequency of the
pendulum oscillator?
It doesn't give you useful information.
To see why, go with
x¢ @tD = [email protected]@tD, [email protected]
y¢ @tD = [email protected]@tD, [email protected]
á Answer:
For crying out loud, this sounds like a question that wuss Calculus Cal
If8xnoteq, ynoteq< is not an equilibrium point, then the flow at
would ask (if he had the brains to come up with it).
8xnoteq, ynoteq< is given by
[email protected], ynoteqD, [email protected], ynoteqD<,
The quality of estimates you get from the linearization depends on the
quality of the approximation resulting from the linearization. When
you blindly trust the stuff you get from linearizations, you are running
And because 8xnoteq, ynoteq< is not an equilibrium point, this flow is
not 80, 0<.
the risk of walking in deep do-do.
So:
Look at this one:
The flow at 8xnoteq, ynoteq< goes through 8xnoteq, ynoteq< in the
direction of the vector:
L = 7.5;
g = 9.8;
[email protected], yD
g [email protected]@tDD
pendulumoscillator = y @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
starterangle = 0.5;
startervelocity = -2.0;
g [email protected]
simplependulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€ == 0
L
[email protected];
linearized = [email protected]@8simplependulumoscillator ,
[email protected] == starterangle, y¢ @0D == startervelocity<, [email protected], tDD;
[email protected]_D = [email protected]@tD •. linearizedP1T, 7D
²
1.30667 [email protected]@tDD + y² @tD == 0
²
1.30667 [email protected] + y @tD == 0
0.5 [email protected] tD - 1.749636 [email protected] tD
endtime = 12;
realthing = [email protected], [email protected] == starterangle,
y¢ @0D == startervelocity<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
[email protected], y noteqD, [email protected], y noteqD<.
As a result,
®8xnoteq, ynoteq< cannot be an attractor.
®8xnoteq, ynoteq< cannot be a repellor.
Check it out in this example:
The system:
[email protected], n, x, y, tD
[email protected]_, y_D = 0.4 x2 - 0.6 y2 + 1.2;
[email protected]_, y_D = x - 0.4 y;
diffeqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@diffeqsystemDD
x¢ @tD == 1.2 + 0.4 [email protected] - 0.6 [email protected]
y¢ @tD == [email protected] - 0.4 [email protected]
The equilbrium points:
equisols = [email protected]@x, yD == 0, [email protected], yD == 0<, 8x, y<D;
[email protected], yeqD
[email protected], [email protected]< = 8x, y< •. equisolsP1T
[email protected], [email protected]< = 8x, y< •. equisolsP2T
2
1
2
4
6
8
10
12
t
-1
8-0.598506, -1.49626<
80.598506, 1.49626<
The flow with the equilibrium points:
-2
The "approximate formula" resulting from the linearization here is:
[email protected]
0.5 [email protected] tD - 1.749636 [email protected] tD
Any one who would try to use this approximate formula to estimate
anything about the actual pendulum oscillator should look for the clue
phone or run the risk of getting the reputation of a total dork.
In fact the only DiffEq&Mathematica student who might be tempted
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
8xlow, xhigh< = 8-3, 3<;
8ylow, yhigh< = 8-3, 3<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
12
flowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.3, HeadSize ® 0.3D,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
equilibriumplots = [email protected]@
8Red, [email protected], [email protected]@kD, [email protected]<D<D, 8k, 1, 2<D;
setup =
[email protected], equilibriumplots, Axes ® True, AxesLabel ® 8"x", "y"<D;
y
3
to use this formula to estimate anything is Calculus Cal himself.
2
1
Cal, get yourself and your brain-rot out of here right now.
-2
2
4
x
-1
-2
T.2) Why most folks don't care about linearizing at points
other than equilibrium points
áT.2.a)
Given a nonlinear system, folks calculate the equilibrium points and
then check out the eigenvalues of the linearization matrix to determine
the nature of the equilibrium points.
Why don't folks do this at points other than equilibrium points?
á Answer:
-3
Away from the equilibrium points, the flow is just like "Old Man
River." The flow just keeps on rolling along.
Throw in a random point that is not an equilibrium point:
8xnoteq, ynoteq< = [email protected], 8-2, 2<D, [email protected], 8-1, 1<D<
notequilibriumplot =
[email protected], [email protected], [email protected], ynoteq<D<D;
[email protected], notequilibriumplotD;
8-1.44827, -0.650604<
244
DE.08.T2®T3
y
predator equilibrium
3
8
2
6
1
-2
2
4
x
4
-1
2
-2
-3
-5
Rerun a couple of times.
The flow goes right through the new point.
-2.5
2.5
5
7.5
10
r
If you feed in prey at a rate of r prey units per time unit and you make r
more negative than:
[email protected]@rD == 0, rD
T.3) Using Lyapunov's rules to investigate the predatorprey model
áT.3.a.i)
The predator-prey model is
x¢ @tD = a [email protected] - b [email protected] [email protected],
y¢ @tD = -c [email protected] + d [email protected] [email protected]
with a, b, c and d all positive.
Here [email protected] is the prey population at time t.
And [email protected] is the predator population at time t.
When you feed extra prey in at a rate of r units per time unit the model
becomes
x¢ @tD = a [email protected] - b [email protected] [email protected] + r
y¢ @tD = -c [email protected] + d [email protected] [email protected]
Go with the sample case of
a = 0.7, b = 0.3, c = 0.44 and d = 0.08
and calculate the equilibrium points as functions of r.
Discuss the results.
á Answer:
Set it up with cleared a, b, c, d and r:
[email protected], n, x, y, a, b, c, d, r, tD
[email protected]_, y_D = a x - b x y + r;
[email protected]_, y_D = -c y + d y x;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == r + a [email protected] - b [email protected] [email protected]
y¢ @tD == -c [email protected] + d [email protected] [email protected]
The equilibrium points are:
equisols = [email protected]@[email protected], yD == 0, [email protected], yD == 0<, 8x, y<DD
r <
8y ® 0, x ® - €€€€
a
a c+d r , x ® €€€€
c <
8y ® €€€€€€€€€€€€€€€
bc
d
The only equilbrium point of any physical interest is:
[email protected], yeq, rD
c
ac+dr
[email protected]_D, [email protected]_D< = 9 €€€€€ , €€€€€€€€€€€€€€€€€€€€€€ =
d
bc
c
ac+dr
9 €€€€€ , €€€€€€€€€€€€€€€€€€€€€€ =
d
bc
88r ® -3.85<<
Then the equilibrium predator population becomes negative.
This is not good.
áT.3.a.ii)
Keep everything the same as in part i) and keep everything in part i)
live in your computer's memory.
The equilibrium points as functions of r are:
[email protected], [email protected]<
85.5, 7.57576 H0.308 + 0.08 rL<
Use Lyapunov's rules to determine the nature of the equilibrium points.
á Answer:
The linearization (Jacobian) matrix at a point 8x, y< is:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
0.7 - 0.3 y
-0.3 x
J
N
0.08 y
-0.44 + 0.08 x
Calulate the eigenvalues of the linearization matrix (Jacobian) at
[email protected], [email protected]<:
[email protected]_D, [email protected]_D< =
[email protected]@[email protected]@rD, [email protected]
1
•!!!!!!!!!!!!!!!!!!!!!!!!!!! •!!!!!!!!!!!!!!!!!!!!!!!!
9 €€€€€ I-0.181818 r - 0.181818 -12.6306 + r 2.95061 + r M,
2
1
•!!!!!!!!!!!!!!!!!!!!!!!!!!! •!!!!!!!!!!!!!!!!!!!!!!!!
€€€€€ I-0.181818 r + 0.181818 -12.6306 + r 2.95061 + r M=
2
Check a few out:
[email protected]@8r, [email protected], [email protected]<, 8r, -2, 16, 2<DD
8-2, 0.181818 - 0.339031 I, 0.181818 + 0.339031 I<
80, 0. - 0.554977 I, 0. + 0.554977 I<
82, -0.181818 - 0.659501 I, -0.181818 + 0.659501 I<
84, -0.363636 - 0.704108 I, -0.363636 + 0.704108 I<
86, -0.545455 - 0.700342 I, -0.545455 + 0.700342 I<
88, -0.727273 - 0.64736 I, -0.727273 + 0.64736 I<
810, -0.909091 - 0.530616 I, -0.909091 + 0.530616 I<
812, -1.09091 - 0.279137 I, -1.09091 + 0.279137 I<
814, -1.71072, -0.834738<
816, -2.18098, -0.728114<
Now incorporate the given values of a, b, c and d to get the equilibrium
All but the large r's.
points as functions of r:
Look at the oh-so important real number that determines whether
a = 0.7;
b = 0.3;
c = 0.44;
d = 0.08;
[email protected], [email protected]<
85.5, 7.57576 H0.308 + 0.08 rL<
This indicates that the equilibrim prey population is 5.5
REGARDLESS of what r is.
The equilibrium predator population varies with r this way:
[email protected]@rD, 8r, -5, 12<, PlotStyle ® 88Red, [email protected]<<,
AxesLabel ® 8"r", "predator equilibrium"<D;
[email protected], [email protected]<
is an attractor or a repellor:
[email protected]
[email protected]@8r, [email protected] + [email protected]@rDDL • 2,
[email protected] + [email protected]@rDDL • 2<,
8r, -2, 16, 2<DDD
8-2, 0.181818, 0.181818<
80, 0, 0<
82, -0.181818, -0.181818<
84, -0.363636, -0.363636<
86, -0.545455, -0.545455<
88, -0.727273, -0.727273<
810, -0.909091, -0.909091<
812, -1.09091, -1.09091<
814, -1.71072, -0.834738<
816, -2.18098, -0.728114<
Plot as a function of r:
245
DE.08.T3
[email protected], yD;
xdiffeq = Hx'@tD == [email protected]@tD, [email protected];
ydiffeq = Hy'@tD == [email protected]@tD, [email protected];
1
eigenvalplot = PlotA9 €€€€€ [email protected] + [email protected]@rDDL,
2
1
€€€€€ [email protected] + [email protected]@rDDL=, 8r, -2, 20<,
2
PlotStyle ® 88Red, [email protected]<, 8Blue, [email protected]<<,
1
AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ , AxesLabel ® 8"r", ""<E;
GoldenRatio
5
10
15
20
xstartereqn = [email protected] == xstarterL;
ystartereqn = [email protected] == ystarterL;
approxsolutions = [email protected], ydiffeq,
xstartereqn, ystartereqn<, [email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< = [email protected] •. [email protected]@1DD,
[email protected] •. [email protected]@1DD<;
r
-0.5
-1
-1.5
trajectoryplot = [email protected]@tD, [email protected]<, 8t, 0, endtime<,
PlotStyle -> 88CadmiumOrange, [email protected]<<,
DisplayFunction -> IdentityD;
-2
-2.5
-3
starterplot = [email protected], [email protected],
[email protected]<D;
equilibriumplot = [email protected], [email protected],
[email protected]@rD, [email protected]<D<D;
The plot siganals that:
-> The equillibrium points [email protected], [email protected]< are attractors for r > 0.
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
-> The equillibrium [email protected], [email protected]< are repellors for r < 0.
equiliblabel =
[email protected], [email protected]"equilib", [email protected], [email protected]<, 80, 1.5<D<D;
Here's a sample for positive r:
r = 2.5
h = 2;
8xstarter, ystarter< = [email protected], [email protected] - h, [email protected] + h<D,
[email protected], [email protected] - h, [email protected] + h<D<;
endtime = 15;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = Hx'@tD == [email protected]@tD, [email protected];
ydiffeq = Hy'@tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarterL;
ystartereqn = [email protected] == ystarterL;
[email protected], trajectoryplot,
equilibriumplot, starterpointlabel, equiliblabel ,
PlotRange -> All,
Axes -> True, AxesLabel -> 8"x", "y"<, AspectRatio -> 1,
PlotLabel -> "Attractor", DisplayFunction -> $DisplayFunctionD;
y
Attractor
4
3.5
3
2.5
2
equilib
1.5
approxsolutions = [email protected], ydiffeq,
xstartereqn, ystartereqn<, [email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< = [email protected] •. [email protected]@1DD,
[email protected] •. [email protected]@1DD<;
trajectoryplot = [email protected]@tD, [email protected]<, 8t, 0, endtime<,
PlotStyle -> 88CadmiumOrange, [email protected]<<,
DisplayFunction -> IdentityD;
starterplot = [email protected], [email protected],
[email protected]<D;
equilibriumplot = [email protected], [email protected],
[email protected]@rD, [email protected]<D<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
start
4
6
10
x
Rerun a couple of times.
Looks like a genuine repellor.
áT.3.a.iii)
Look at the plot of the real parts of the eigenvalues of the linearization
matrix:
[email protected];
5
10
15
20
r
-0.5
-1
equiliblabel =
[email protected], [email protected]"equilib", [email protected], [email protected]<, 80, 1.5<D<D;
-1.5
[email protected], trajectoryplot,
equilibriumplot, starterpointlabel, equiliblabel ,
PlotRange -> All,
Axes -> True, AxesLabel -> 8"x", "y"<, AspectRatio -> 1,
PlotLabel -> "Attractor", DisplayFunction -> $DisplayFunctionD;
-2.5
-2
-3
How do you interpret that fork?
á Answer:
Take another look:
2.5
y
8
[email protected];
Attractor
5
start
5
4.75
10
15
20
r
-0.5
4.5
-1
4.25
3.75
-1.5
4.5 5 5.5 6 6.5x
equilib
-2
3.5
-2.5
Rerun a couple of times.
-3
A genuine attractor.
This bifurcation happens for r somewhere between 12 and 13:
See what happens for a sample negative r:
to see what the fork means, look at:
r = -0.3;
h = 2;
8xstarter, ystarter< = [email protected], [email protected] - h, [email protected] + h<D,
[email protected], [email protected] - h, [email protected] + h<D<;
endtime = 15;
starterpoint = 8xstarter, ystarter<;
r = 12.62;
[email protected]@[email protected], [email protected]
8-1.14727 + 0.0369498 I, -1.14727 - 0.0369498 I<
r = 12.63;
[email protected]@[email protected], [email protected]
8-1.14818 + 0.00886072 I, -1.14818 - 0.00886072 I<
246
DE.08.T3®G1
r = 12.64;
[email protected]@[email protected], [email protected]
8-1.18387, -1.11431<
The bifurcation point r between swirl and no swirl is between 12.63
and 12.64.
Take another look at the fork:
[email protected];
5
10
15
20
r
-0.5
-1
[email protected], y, linm, linn, tD
[email protected]_, y_D, [email protected]_, y_D< = [email protected], yeqD . 8x - xeq, y - yeq<;
xlindiffeq = x¢ @tD == [email protected]@tD, [email protected];
ylindiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
linsolutions =
[email protected], ylindiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]_D, [email protected]_D< = [email protected] •. linsolutionsP1T, [email protected] •. linsolutionsP1T<;
lintrajectoryplot = [email protected]@tD, [email protected]<, 8t, 0, endtime<,
PlotStyle ® 88Red, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
equiliblabel = [email protected]@"8xeq,yeq<", 8xeq, yeq<, 80, 1.5<D<D;
-1.5
-2
-2.5
-3
The handle of the fork on the left corresponds to (theoretical) swirl.
The right hand tines of the fork correspond to no swirl at all.
DE.08 Linearizations
Give it a Try!
[email protected], lintrajectoryplot, nonlineartrajectoryplot ,
starterpointlabel, equilibriumplot, equiliblabel, PlotRange ® All,
Axes ® True, AxesLabel ® 8"x", "y"<, AspectRatio ® 1, PlotLabel ®
"repellor, nonlin trajectory \n and linearized trajectory"D;
epellor, nonlin trajectory
and linearizedy trajectory
0.4
0.2
-0.6
-0.4
-8xeq,yeq<
0.2
0.20.4 x
-0.2
start
-0.4
-0.6
G.1) Linearization plots
áG.1.a.i)
Here's a nonlinear system:
[email protected], n, x, y, a, b, c, d, r, tD
[email protected]_, y_D = -0.9 [email protected] xD + 1.5 y ;
[email protected]_, y_D = -2.4 x + 1.2 y;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == -0.9 [email protected]@tDD + 1.5 [email protected]
y¢ @tD == -2.4 [email protected] + 1.2 [email protected]
You can see that 80, 0< is an equilbrium point for this nonlinear
system:
8xeq, yeq< = 80, 0<;
[email protected], yeqD == 0
[email protected], yeqD == 0
True
True
The linearization (Jacobian) matrix at 8xeq, yeq< is:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@xeq, yeqDD
-0.9 1.5
J
N
-2.4 1.2
The eigenvalues of [email protected], yeqD are:
[email protected]@xeq, yeqDD
80.15 + 1.58035 I, 0.15 - 1.58035 I<
Say why this information signals that this equilibrium point is a
repellor.
áG.1.a.ii)
Keep everything in part i) live and look at this plot:
endtime = 8;
h = 0.2;
s = [email protected], 80, [email protected] pD<D;
8xstarter, ystarter< = 8xeq, yeq< + h [email protected], [email protected]<;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
nonlinsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
[email protected] •. nonlinsolutionsP1T, [email protected] •. nonlinsolutionsP1T<;
nonlineartrajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
Rerun a couple of times.
Each plot shows a trajectory of the non-linear system ( orange) along
with the linearized trajectory (red) starting at the same point.
Why is it guaranteed that the two trajectories share a lot of ink as they
begin their trip?
How are Lyapunov's rules related to what you see?
Why is it guaranteed that the two trajectories eventually had to break
apart?
áG.1.b.i)
Here's another nonlinear system:
[email protected], n, x, y, a, b, c, d, r, tD
[email protected]_, y_D = -1.3 x + 0.5 y ;
[email protected]_, y_D = 0.3 x - 0.8 [email protected] yD;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == -1.3 [email protected] + 0.5 [email protected]
y¢ @tD == -0.8 [email protected] [email protected] + 0.3 [email protected]
You can see that 80, 0< is an equilbrium point for this nonlinear
system:
8xeq, yeq< = 80, 0<;
[email protected], yeqD == 0
[email protected], yeqD == 0
True
True
The linearization matrix at 8xeq, yeq< is:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@xeq, yeqDD
-1.3 0.5
N
J
0.3 -1.2
The eigenvalues of [email protected], yeqD are:
[email protected]@xeq, yeqDD
8-1.64051, -0.859488<
Say why this information signals that this equilibrium point is an
attractor.
áG.1.b.ii)
Keep everything in part i) live and look at this flow plot of the
linearized system at 80, 0<:
h = 2;
8xlow, xhigh< = 8xeq - h, xeq + h<;
8ylow, yhigh< = 8yeq - h, yeq + h<;
xhigh - xlow
jump = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
16
247
DE.08.G1
[email protected]
[email protected]_, y_D = [email protected], yeqD . 8x - xeq, y - yeq<;
linearizedflowplot = [email protected]@[email protected], yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.25, HeadSize ® 0.12D,
8x, xlow, xhigh, jump<, 8y, ylow, yhigh, jump<D;
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
equiliblabel =
[email protected], [email protected]"8xeq,yeq<", 8xeq, yeq<, 80, 1.5<D<D;
linearizedflows = [email protected], equilibriumplot,
equiliblabel, PlotRange ® 88xeq - h, xeq + h<, 8yeq - h, yeq + h<<,
Axes ® True, AxesLabel ® 8"x", "y"<,
PlotLabel ® "Linearized flow at equilibrium"D;
nearized flowy at equilibri
2
1.5
1
0.5
-2-1.5-1-0.5
0.5 1 1.5 2 x
8xeq,yeq<
-0.5
s = 0.5;
[email protected],
PlotRange ® 88xstarter - s, xstarter + s<, 8ystarter - s, ystarter + s<<,
PlotLabel ® "At the start"D;
y
At the start
-1.4
-1.6
-1.8
start
-1.8-1.6-1.4-1.2 x
-2.2
At the beginning, the trajectory is running against the grain of the
linearized flow.
How do you account for this?
áG.1.b.iv)
Now look at this new trajectory shown with the flow of the
linearization:
-1
-1.5
-2
Now look at this:
endtime = 16;
8xstarter, ystarter< = 8-1.6, -1.9<;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot = [email protected]@tD, [email protected]<, 8t, 0, endtime<,
PlotStyle ® 88Red, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
scaler = 0.75 h;
[email protected], trajectoryplot, linearizedflows, starterpointlabel,
PlotRange ® All, Axes ® True, AxesLabel ® 8"x", "y"<,
endtime = 16;
8xstarter, ystarter< = 8-1.6, -1.8<;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
scaler = 0.75 h;
setup = [email protected], trajectoryplot,
linearizedflows, starterpointlabel, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, AspectRatio ® 1, PlotLabel ® "Attractor,
trajectory with flow \n of the linearization at 8xeq,yeq<",
DisplayFunction ® $DisplayFunctionD;
actor, trajectory with flo
y
the linearization
at 8xeq,
2
AspectRatio ® 1, PlotLabel ® "Attractor, trajectory
with flow \n of the linearization at 8xeq,yeq<",
DisplayFunction ® $DisplayFunctionD;
actor, trajectory with flo
y
the linearization
at 8xeq,
2
1
1
-2
-2
-18xeq,yeq<1
2 x
-1
start
-2
This plot shows the linearized flow together with a trajectory in the
nonlinear system.
Look at the final stages of the trajectory as closing in on the attractor
equilibrium point at 80, 0<:
s = 1.0;
[email protected], PlotRange ® 88xeq - s, xeq + s<, 8yeq - s, yeq + s<<,
PlotLabel ® "At the end"D;
y end
At the
1
0.75
0.5
0.25
-1-0.75
-0.5
-0.25
0.250.50.75 1 x
8xeq,yeq<
-0.25
-0.5
-0.75
-1
At the end, the trajectory is in good harmony with the linearized
flow.
How are Lyapunov's rules related to what you see?
How do you account for this?
áG.1.b.iii)
Stay with the same setup as in part ii).
Look at the linearized flow together with a trajectory in the nonlinear
system at the very beginning of the trip:
-18xeq,yeq<1
-1
start
2 x
-2
-3
-4
This trajectory doesn't give a damn about the linearized flow
. Give you opinion about why that's not too unsettling.
áG.1.c)
Here's another nonlinear system:
[email protected], n, x, y, a, b, c, d, r, tD
[email protected]_, y_D = 0.7 x - 2.8 x y + 10;
[email protected]_, y_D = -0.44 y + 0.8 y x - 0.9;
DiffEqsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DiffEqsystemDD
x¢ @tD == 10 + 0.7 [email protected] - 2.8 [email protected] [email protected]
y¢ @tD == -0.9 - 0.44 [email protected] + 0.8 [email protected] [email protected]
The equilibrium points are:
equisols = [email protected]@[email protected], yD == 0, [email protected], yD == 0<, 8x, y<DD
8x ® -10.0199, y ® -0.106435<
8x ® 0.784156, y ® 4.80449<
Concentrate on the second equilbrium point:
8xeq, yeq< = 80.784156, 4.80449<
80.784156, 4.80449<
Calculate the eigenvalues of the linearization matrix at 8xeq, yeq<:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@[email protected], yeqDDD
8-12.0637, -0.501525<
This equilibrium point is a very strong attractor.
Now look at this plot:
248
DE.08.G1®G2
s = [email protected], 80, [email protected] pD<D;
h = 4;
endtime = 16;
8xstarter, ystarter< = 8xeq, yeq< + h [email protected], [email protected]<;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
approxsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
equilibriumplot = [email protected], [email protected], [email protected], yeq<D<D;
equiliblabel = [email protected]@"8xeq,yeq<", 8xeq, yeq<, 80, 1.5<D<D;
starterpointlabel =
[email protected], [email protected]"start", starterpoint, 80, 1.5<D<D;
scaler = 0.75 h;
[email protected]
[email protected], [email protected]< = [email protected]@xeq, yeqDD;
eigenplot = [email protected]@1D, Tail ® 8xeq, yeq<,
VectorColor ® Blue, ScaleFactor ® 0.75 h, HeadSize ® 1D,
[email protected]@1D, Tail ® 8xeq, yeq<,
VectorColor ® Blue, ScaleFactor ® 0.75 h, HeadSize ® 1D,
[email protected]@2D, Tail ® 8xeq, yeq<,
VectorColor ® Magenta, ScaleFactor ® 0.75 h, HeadSize ® 1D,
[email protected]@2D, Tail ® 8xeq, yeq<,
VectorColor ® Magenta, ScaleFactor ® 0.75 h, HeadSize ® 1D<;
setup = [email protected], trajectoryplot,
equilibriumplot, equiliblabel, starterpointlabel,
eigenplot, PlotRange ® All, Axes ® True, AxesLabel ® 8"x", "y"<,
AspectRatio ® 1, PlotLabel ® "Attractor, trajectory
and eigenvectors \n
of the linearization matrix",
DisplayFunction ® $DisplayFunctionD;
G.2) Lyapunov's Rules
In this problem, you are going to have the experience of trying out
Lyapunov's rules for yourself.
áG.2.a.i)
Here's a nonlinear system:
[email protected], n, x, y, tD
[email protected], nD
[email protected]_, y_D = x2 - 4 x + 2 y + 2 x y - y2 ;
[email protected]_, y_D = -x2 - 4 y - 2 x + 2 x y + y2 ;
DEsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DEsystemDD
x¢ @tD == -4 [email protected] + [email protected] + 2 [email protected] + 2 [email protected] [email protected] - [email protected]
y¢ @tD == -2 [email protected] - [email protected] - 4 [email protected] + 2 [email protected] [email protected] + [email protected]
The linearization (Jacobian) matrix [email protected], yD at 8x, y< for this system is:
Some folks call this matrix by the name "Jacobian."
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
-4 + 2 x + 2 y 2 + 2 x - 2 y
J
N
-2 - 2 x + 2 y -4 + 2 x + 2 y
Here come the equilibrium points:
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yD == 80, 0<D
1
3I
3
I
1
3I
3
I
98x ® 0, y ® 0<, 9x ® €€€€€ - €€€€€€€€€ , y ® €€€€€ + €€€€€ =, 9x ® €€€€€ + €€€€€€€€€ , y ® €€€€€ - €€€€€ =,
2
2
2
2
2
2
2
2
8x ® 1, y ® 3<=
•!!!!!!
I = -1 don't count.
Throw away the imaginary stuff and go with these two equilibrium
points:
The equilibrium points involving
[email protected], yeqD
[email protected], [email protected]< = 80, 0<
[email protected], [email protected]< = 81, 3<
80, 0<
or, trajectory and eigenv
y
f the linearization
matri
81, 3<
The eigenvalues of the linearization matrix at [email protected], [email protected]< are:
7
6
[email protected]@[email protected], [email protected]
5
8xeq,yeq<
4
8-4 - 2 I, -4 + 2 I<
The eigenvalues of the linearization matrix at [email protected], [email protected]< are:
3
-2 -1
1
2
[email protected]@[email protected], [email protected]
start
3 4 x
Rerun several times.
Each plot depicts a trajectory in the orginal nonlinear system headed
toward the attractor at 8xeq, yeq< shown with scaled eigenvectors of
the linearization (Jacobian) matrix at 8xeq, yeq<.
Notice that the trjectories start out running nearly parallel to the blue
eigenvectors and then shift over to try to merge with the line through
the equilbrium point running in the direction of the magenta
eigenvectors.
How do you account for this?
áG.1.c.ii)
Look at the last plot:
[email protected];
or, trajectory and eigenv
y
f the linearization
matri
Use Lyapunov's rules to determine which equilibrium point is a
repeller and which is an attractor.
áG.2.a.ii)
Run some experiments in effort to come up with opinions on the
following question:
When you start a trajectory near the repeller, does it go to the attractor?
áG.2.b.i)
Here's a new system:
[email protected], n, x, y, tD
[email protected], nD
[email protected]_, y_D = -y + x2 + y2 ;
[email protected]_, y_D = x - x2 - y2 ;
DEsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DEsystemDD
7
x¢ @tD == [email protected] - [email protected] + [email protected]
6
y¢ @tD == [email protected] - [email protected] - [email protected]
5
8xeq,yeq<
4
Here come the equilibrium points:
3
-2 -1
84 - 2 I, 4 + 2 I<
1
2
3
start
4 x
Here is a calculation of the eigenvaluess of the linearization matrix at
8xeq, yeq<:
[email protected]@xeq, yeqDD
8-12.0637, -0.501525<
Look at the plot and then say which of the eigenvalues corresponds to
the magenta eigenvectors.
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@[email protected], yD == 80, 0<DD
88x ® 0, y ® 0<, 8x ® 0.5, y ® 0.5<<
This gives you two equilibrium points:
[email protected], yeqD
[email protected], [email protected]< = 80, 0<
[email protected], [email protected]< = 80.5, 0.5<
80, 0<
80.5, 0.5<
249
DE.08.G2®G3
The linearization matrix (Jacobian) is:
[email protected], gradm, gradnD
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
[email protected]@x, yDD
2x
-1 + 2 y
N
J
1-2x
-2 y
The eigenvalues of the linearization matrix at 80, 0< are:
[email protected]@0, 0DD
8-I, I<
The linearization predicts that trajectories starting near the equilibrium
point at 80, 0< cycle around and around and around the equilibrium
point on closed curves.
Now look at the actual flow near the equilibrium point at 80, 0<:
h = 1;
flowplot = [email protected]@x, yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.3, HeadSize ® 0.1D,
h
h
9x, [email protected] - h, [email protected] + h, €€€€€ =, 9y, [email protected] - h, [email protected] + h, €€€€€ =E;
8
8
equilibplot =
[email protected], [email protected], [email protected]@1D, [email protected]<D<D;
actualflow = [email protected], equilibplot, Axes ® True,
AxesOrigin ® [email protected], [email protected]<, AxesLabel ® 8"x", "y"<,
PlotRange ® [email protected] - h, [email protected] + h<, [email protected] - h, [email protected] + h<<,
PlotLabel ® "Actual flow"D;
áG.3.a.i)
Here's another look at everyone's favorite:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
[email protected], t, sD
L = 10;
[email protected] = 0.3 p;
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
all = [email protected]@L, [email protected], angle, labels, bobpath, Axes ® True,
AxesOrigin ® 80, 0<, DisplayFunction ® $DisplayFunctionD;
10
5
-10
-5
L5
10
15
-5 [email protected]
-10
Thanks to Ben Halperin for the pendulum graphics.
In the grapics for this part, the sample value L = 10 is used.
The position of the center of the bob at time t is given by:
y flow
Actual
1
[email protected], L, M, g, y, tD;
[email protected]_D = L [email protected]@tDD, [email protected]@tDD<
0.75
0.5
8L [email protected]@tDD, -L [email protected]@tDD<
0.25
-1-0.75
-0.5
-0.25 0.250.50.75 1 x
-0.25
-0.5
-0.75
-1
Take a look at a trajectory starting near the equilibrium point:
8a, b< = 80.25, -0.25<;
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 2.2;
approxsolutions = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
[email protected], equilibplot, trajectoryplot, PlotRange ® All,
Axes ® True, AxesLabel ® 8"x", "y"<, AspectRatio ® 1,
DisplayFunction ® $DisplayFunctionD;
y
0.5 1 1.5 2 2.5
x
-0.2
-0.4
-0.6
The linearization at the equilibrium point 80, 0< dropped the strong
hint that this trajectory would cycle around and around 80, 0<. Does it?
Why are you not surprised?
áG.2.b.ii)
Explain the wisdom behind:
When [email protected] = 0, the pendulum looks like this:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
[email protected], t, sD
L = 10;
[email protected] = 0;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
zeropotentialenergyline = [email protected]@88-L, -L<, 8L, -L<<DD;
all = [email protected]@L, [email protected], labels, bobpath,
zeropotentialenergyline , Axes ® True, AxesOrigin ® 80, 0<,
DisplayFunction ® $DisplayFunctionD;
10
5
-10
-5
5
10
15
L
-5
[email protected]
-10
This is the position of zero potential energy.
See the pendulum in a different position:
bobpath = [email protected]
10 [email protected], [email protected]<, 8s, -p, p<, DisplayFunction ® IdentityD;
[email protected], t, sD
L = 10;
[email protected] = 0.3 p;
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
zeropotentialenergyline = [email protected]@88-L, -L<, 8L, -L<<DD;
all = [email protected]@L, [email protected], angle, labels, bobpath,
zeropotentialenergyline , Axes ® True, AxesOrigin ® 80, 0<,
DisplayFunction ® $DisplayFunctionD;
10
áNo information rule:
If the equilibrium point is a neither a repeller nor an attractor nor a
saddle, then you are walking on thin ice if you trust the information
you get from the linearization at the equilibrium point.
5
-10
-5
L5
10
15
-5 [email protected]
-10
G.3) Energy and the undamped pendulum oscillator
Before you starton this one,
it would be a very good idea to become
familiar
with the Basic problem on the pendulum oscillator.
Look at:
[email protected], y, tD
[email protected]
8L [email protected]@tDD, -L [email protected]@tDD<
250
DE.08.G3
For a given [email protected], the center of the bob is
L - L [email protected]@tDD
units above the zeropotential energy line.
So, as the physics folks say:
[email protected]
[email protected]@8new = Hy'@tD == [email protected],
pendulumoscillator •. 8y'@tD -> [email protected], y''@tD -> x'@tD<<D D
y¢ @tD == [email protected]
1.96 [email protected]@tDD + x¢ @tD == 0
[email protected], n, x, y, tD
[email protected]_, y_D = -Hg • LL [email protected];
[email protected]_, y_D = x;
pendulumsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@pendulumsystemDD
[email protected], M, g, LD
[email protected]_D = M g HL - L [email protected]@tDDL
g M HL - L [email protected]@tDDL
2
mv
The kinetic energy €€€€€€€€€€€
€ at the center of the bob at time t is:
2
[email protected]
1
[email protected]_D = €€€€€ [email protected] position ¢ @tD . position ¢ @tDD
2
x¢ @tD == -1.96 [email protected]@tDD
y¢ @tD == [email protected]
endtime = 7;
8xstarter, ystarter< = 81.6, 1.6<;
starterpoint = 8xstarter, ystarter<;
1
€€€€€ L2 M y¢ @tD2
2
The total energy is:
[email protected]
[email protected]_D = [email protected] + [email protected]
1
g M HL - L [email protected]@tDDL + €€€€€ L2 M y¢ @tD2
2
[email protected], yD;
xdiffeq = Hx'@tD == [email protected]@tD, [email protected];
ydiffeq = Hy'@tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarterL;
ystartereqn = [email protected] == ystarterL;
One physical principle is that the the total energy of the undamped
pendulum remains constant as time varies.
This is the same as saying that
totalenergy¢ @tD = 0
for all times t.
Execute this:
nonlinsolutions = [email protected], ydiffeq,
xstartereqn, ystartereqn<, [email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< = [email protected] •. [email protected]@1DD,
[email protected] •. [email protected]@1DD<;
[email protected] ¢ @tD == 0, y² @tDD
g [email protected]@tDD
99y² @tD ® - €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ==
L
trajectoryplot = [email protected]@tD, [email protected]<, 8t, 0, endtime<,
PlotStyle ->
88CadmiumOrange, [email protected]<<, DisplayFunction -> IdentityD;
Compare your result with the undamped pendulum oscillator
differential equation as propounded in the Basics:
g [email protected]@tDD
pendulumoscillator = y @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
g [email protected]@tDD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
[email protected], trajectoryplot, DisplayFunction -> $DisplayFunctionD;
²
Write up your conclusion.
y
10
5
y’
0
áG.3.a.ii)
Look at this:
-5
-10
-6 -4 -2 0
[email protected], M, g, LD
[email protected]_D = M g HL - L [email protected]@tDDL
g M HL - L [email protected]@tDDL
[email protected]
1
[email protected]_D = €€€€€ [email protected] position ¢ @tD . position ¢ @tDD
2
1
€€€€€ L2 M y¢ @tD2
2
[email protected]
[email protected]_D = [email protected] + [email protected]
1
g M HL - L [email protected]@tDDL + €€€€€ L2 M y¢ @tD2
2
1
€€€€€ L2 M x2 + g M HL - L [email protected]
2
Now look at this contour plot of energy[x,y];
L = 5;
g = 9.8;
M = 1;
equilibriumplot = [email protected]@0.04D, Red, [email protected], 0<D<D;
levelcurves = [email protected]@[email protected], yDD, 8x, -2 p, 2 p<,
8y, -4 p, 4 p<, PlotPoints ® 50, ContourSmoothing ® Automatic,
AxesLabel ® 8"x", "y"<, DisplayFunction ® IdentityD;
setup = [email protected], equilibriumplot, Axes ® True,
AxesLabel ® 8"y'", "y"<, DisplayFunction ® $DisplayFunctionD;
y
10
5
y’
0
-5
-10
-6 -4 -2 0
2
4
6
On each plotted curve, energy[x,y] stays constant.
The lighter shading indicates larger values of energy[x,y].
Throw in a trajectory in the system by converting the undamped
pendulum oscillator to a nonlinear system:
[email protected], y, tD
pendulumoscillator = Hy''@tD + Hg • LL [email protected]@tDD == 0L;
4
6
On each plotted curve,
[email protected], yD
stays constant.
[email protected], yD.
Explain how you know that all the curves (not just the plotted
trajectory) shown in the plot above are all trajectories in this system.
The lighter shading indicates larger values of
áG.3.a.iii)
Take another look at the plot of some level curves of [email protected], yD as
above:
equilbriumplots = [email protected]@
[email protected], CadmiumOrange, [email protected], k 2 p<D<D, 8k, -2, 2<D;
newsetup = [email protected], equilbriumplots, Axes ® True,
AxesLabel ® 8"y'", "y"<, DisplayFunction ® $DisplayFunctionD;
The total energy at a time t at which y[t] = x and y' [t] = y is:
[email protected], x, yD
[email protected]_, y_D = [email protected] •. [email protected] ® y, y¢ @tD ® x<
2
y
10
5
0
y’
-5
-10
-6 -4 -2 0
2
4
6
Discuss what other information you get from this plot.
What makes the pendulum operate with high energy? Low energy?
There are some additional equilibrium points other than 80, 0<.
Where are they and what do they mean?
To get a handle on these questions, you might want to play with
trajectories such as:
endtime = 13;
8xstarter, ystarter< = 81.5, 2 p<;
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
nonlinsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
251
DE.08.G3®G4
[email protected] •. nonlinsolutionsP1T, [email protected] •. nonlinsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
[email protected], trajectoryplot, DisplayFunction ® $DisplayFunctionD;L
y
10
5
y’
0
-5
This is an ordinary damped oscillator.
Go ahead and assume that M, g, L and b are positive.
Use your knowledge of ordinary oscillators to predict how the actual
pendulum oscillator reacts when you:
® Make M (mass) bigger and bigger.
® Make L (length) bigger and bigger.
® Make g (gravity) bigger and bigger.
® Make b (friction) bigger and bigger.
áG.4.b.i) Flows and trajectories for the damped pendulum oscillator
-10
-6 -4 -2 0
2
4
The undamped pendulum oscillator is modeled by this second order
differential equation:
6
Or:
endtime = 8;
8xstarter, ystarter< = 81.98, -2.6<
starterpoint = 8xstarter, ystarter<;
[email protected], yD;
xdiffeq = x¢ @tD == [email protected]@tD, [email protected];
ydiffeq = y¢ @tD == [email protected]@tD, [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
nonlinsolutions =
[email protected], ydiffeq, xstartereqn, ystartereqn<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], y, tD;
[email protected]_D, [email protected]_D< =
[email protected] •. nonlinsolutionsP1T, [email protected] •. nonlinsolutionsP1T<;
trajectoryplot =
[email protected]@tD, [email protected]<, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
[email protected], trajectoryplot, DisplayFunction ® $DisplayFunctionD;
[email protected], L, g, b, M, yD
b y¢ @tD
g [email protected]@tDD
dampedpendosc = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
M
L
g [email protected]@tDD
b y¢ @tD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
M
You make this second order differential equation into a system of two
first order differential equations by putting
[email protected] = y¢ @tD
and then replacing y¢ @tD by [email protected] and replacing y² @tD by x¢ @tD:
[email protected]
[email protected]@8new = Hy'@tD == [email protected],
dampedpendosc •. 8y'@tD -> [email protected], y''@tD -> x'@tD<<D D
y¢ @tD == [email protected]
g [email protected]@tDD
b [email protected]
€€€€€€€€€€€€€€€€€€€€€€€€€
+ €€€€€€€€€€€€€€
+ x¢ @tD == 0
L
M
Clean this up:
[email protected], n, x, y, tD
g [email protected]
bx
[email protected]_, y_D = - €€€€€€€€€€€€€€€€€€€€€€€€ - €€€€€€€€€ ;
L
M
[email protected]_, y_D = x;
dampedpendulumsystem =
H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@dampedpendulumsystem DD
81.98, -2.6<
y
15
10
5
y’
0
g [email protected]@tDD
b [email protected]
x¢ @tD == - €€€€€€€€€€€€€€€€€€€€€€€€€
- €€€€€€€€€€€€€€
L
M
-5
y¢ @tD == [email protected]
-10
-6 -4 -2 0
2
4
Feast your eyes on the flow in the sample case
L = 5, g = 9.8, b = 0.2, and M = 1:
6
b = 0.2;
g = 9.8;
L = 5.0;
M = 1;
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
flowplot = [email protected]@[email protected], yD, Tail ® 8x, y<, VectorColor ® Blue,
ScaleFactor ® 0.3, HeadSize ® 0.3D, 8x, -4, 4, 0.5<, 8y, -4, 4, 0.5<D;
pendulumflow = [email protected], Axes ® True, AxesLabel ® 8"y'", "y"<D;
G.4) Playing with the damped pendulum oscillator and its
linearization
áG.4.a.i)
Advanced references give this as a model of the damped pendulum
oscillator:
y
[email protected], L, g, b, M, yD
b y¢ @tD
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
M
L
g [email protected]@tDD
b y¢ @tD
€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
M
Yet most elementary math and physics texts give this as a model of
the damped pendulum oscillator:
b y¢ @tD
g [email protected]
simplependulumoscillator = y @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€ == 0
M
L
g [email protected]
b y¢ @tD
€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
M
²
Adapt the linearization of the undamped pendulum oscillator from the
Basics in effort to linearize the damped pendulum oscillator at its
equilibrium point at 80, 0< in effort to explain where the simplified
version comes from.
áG.4.a.ii) Linear predictions
Because linear {differential] equations are easy to solve and study,
the theory of linear oscillation is the most highly developed area of
mechanics.
In many non-linear problems, linearization produces a
satisfactory approximate solution. Even when this is not the case,
the study of the linear part of a problem is often a first step,
to be followed by the study of the relation between motions in a
nonlinear system and its linear model.
-------World DiffEq Master V. I. Arnold
writing in his advanced book Mathematical Methods of Classical Mechanics
(Springer-Verlag, New York, 1989)
Look again at the simple damped pendulum oscillator:
b y¢ @tD
g [email protected]
simplependulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€ == 0
M
L
¢
g [email protected]
b y @tD
€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€ + y² @tD == 0
L
M
4
2
-4
-2
2
4 y’
-2
-4
Throw in a trajectory:
8startingvelocity, startingangle< = 81.2, 0.8<;
starterpoint = 8startingvelocity, startingangle<;
[email protected], y, tD
equationx = Hx'@tD == [email protected]@tD, [email protected];
equationy = Hy'@tD == [email protected]@tD, [email protected];
starterx = [email protected] == startingvelocityL;
startery = [email protected] == startingangleL;
endtime = 15;
approxsolutions = [email protected], equationy,
starterx, startery<, [email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D = [email protected] •. [email protected]@1DD,
[email protected] •. [email protected]@1DD<;
trajectoryplot = [email protected]@tD, 8t, 0, endtime<,
PlotStyle -> 88CadmiumOrange, [email protected]<<,
DisplayFunction -> IdentityD;
experiment1 = [email protected], trajectoryplot,
PlotRange -> All, Axes -> True, AxesLabel -> 8"x", "y"<,
DisplayFunction -> $DisplayFunction,
Epilog -> 8Red, [email protected],
[email protected]<D;
252
DE.08.G4
[email protected]
y
20
4
15
2
-4
-2
2
4 x
10
5
-2
-4
2
What does this plot signify?
Why do you think that happened?
áG.4.b.ii)
Throw in another trajectory corresponding to a bigger starting
velocity::
8startingvelocity, startingangle< = 83.2, 0.8<;
starterpoint = 8startingvelocity, startingangle<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == startingvelocity;
startery = [email protected] == startingangle;
endtime = 15;
approxsolutions = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
experiment1 =
[email protected], trajectoryplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, DisplayFunction ® $DisplayFunction,
Epilog ® 8Red, [email protected], [email protected]<D;
6
8
10
12
14
t
áG.4.c.i)
Go to the sample case of L = 5.0, g = 9.8, b = 0.2, and M = 1
studied above.
The corresponding nonlinear damped pendulum oscillator diffeq is:
8b, L, g, M< = 80.2, 5.0, 9.8, 1.0<;
[email protected], yD
b y¢ @tD
g [email protected]@tDD
dampedpendosc = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
M
L
¢
²
1.96 [email protected]@tDD + 0.2 y @tD + y @tD == 0
Its linearized version is:
b y¢ @tD
g [email protected]
linearversion = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€ == 0
M
L
1.96 [email protected] + 0.2 y¢ @tD + y² @tD == 0
Now look at these plots of the actual damped pendulum oscillator and
its linearized version:
The first plot goes with starter data
[email protected], y¢ @0D< = 80.3, 0.2<:
8starterangle, startervel< = 80.3, 0.2<;
endtime = 15;
[email protected], y, yreal, ylinearD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
simplething = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. simplethingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ,
GoldenRatio
PlotLegend ® 8"real", "linear"<, LegendSize ® 0.6E;
y
8
6
4
2
-4 -2
-2
4
Two of these looks something like ordinary damped linear oscillators,
and the other two don't look like ordinary damped linear oscillators at
all.
What do these plots mean?
2
4 x
0.3
0.2
-4
What does this plot signify?
Why do you think that happened?
áG.4.b.iii)
Stay with the same setup as in the part immediately above:
8b, L, g, M< = 80.2, 5.0, 9.8, 1.0<;
[email protected], yslow, yfaster, yevenfaster, yreallyfastD
b y¢ @tD
g [email protected]@tDD
dampedpendosc = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0;
M
L
endtime = 15;
slowstart = [email protected]
8dampedpendosc, [email protected] == 0.8, y¢ @0D == 1<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. slowstartP1T;
fasterstart = [email protected]
8dampedpendosc, [email protected] == 0.8, y¢ @0D == 2.55<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. fasterstartP1T;
evenfasterstart = [email protected]
8dampedpendosc, [email protected] == 0.8, y¢ @0D == 3.2<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. evenfasterstartP1T;
reallyfaststart = [email protected]
8dampedpendosc, [email protected] == 0.8, y¢ @0D == 6.0<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. reallyfaststartP1T;
[email protected], [email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® 88Red, [email protected]<<,
1
AxesLabel ® 8"t", "[email protected]"<, PlotRange ® All, AspectRatio ® €€€€€ ,
2
Epilog ® 88Blue, [email protected], 2 p<, 8endtime, 2 p<<D<,
8Blue, [email protected], 4 p<, 8endtime, 4 p<<D<,
8Blue, [email protected], 6 p<, 8endtime, 6 p<<D<<E;
0.1
2
4
6
8
10 12 14
t
-0.1
-0.2
real
linear
The formula for the solution of the linearized version of this damped
pendulum oscillator is:
This baroque code is needed to get around a major bug in Mathematica 3.0.
[email protected], MM, gg, LL, ss, vv, linearformulaD
bb y¢ @tD
gg [email protected]
clearlinversion = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€ == 0;
MM
LL
linearsol =
[email protected], [email protected] == ss, y¢ @0D == vv<, [email protected], tD •.
8ss ® starterangle, vv ® startervel, bb ® b, MM ® M, gg ® g, LL ® L<;
[email protected]_D = [email protected]@[email protected] •. linearsolP1TDD
0.3 E-0.1 t [email protected] tD + 0.164706 E-0.1 t [email protected] tD
Do you trust this formula to model the actual damped pendulum
oscillator?
Why or why not?
áG.4.c.ii)
The next plot raises the starter data from
[email protected], y¢ @0D< = 80.3, 0.2< to [email protected], y¢ @0D< = 80.6, 0.2<:
8starterangle, startervel< = 80.6, 0.2<;
endtime = 15;
[email protected], y, yreal, ylinearD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
simplething = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. simplethingP1T;
253
DE.08.G4
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ,
GoldenRatio
PlotLegend ® 8"real", "linear"<, LegendSize ® 0.6E;
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ,
GoldenRatio
PlotLegend ® 8"real", "linear"<, LegendSize ® 0.6E;
1.5
0.6
1
0.4
0.5
0.2
2
2
4
6
8
10 12 14
t
4
6
8
10 12 14
t
-0.5
-1
real
-0.2
-0.4
real
linear
linear
The formula for the solution of the linearized version of this damped
pendulum oscillator is:
[email protected], MM, gg, LL, ss, vv, linearformulaD
bb y¢ @tD
gg [email protected]
clearlinversion = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€ == 0;
MM
LL
linearsol =
[email protected], [email protected] == ss, y¢ @0D == vv<, [email protected], tD •.
8ss ® starterangle, vv ® startervel, bb ® b, MM ® M, gg ® g, LL ® L<;
[email protected]_D = [email protected]@[email protected] •. linearsolP1TDD
0.6 E-0.1 t [email protected] tD + 0.18619 E-0.1 t [email protected] tD
Do you trust this formula to model the actual damped pendulum
oscillator?
Why or why not?
áG.4.c.iii)
The next plot raises the starter data from
[email protected], y¢ @0D< = 80.6, 0.2< to [email protected], y¢ @0D< = 81.2, 0.2<:
8starterangle, startervel< = 81.2, 0.2<;
endtime = 15;
[email protected], y, yreal, ylinearD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
simplething = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. simplethingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ,
GoldenRatio
PlotLegend ® 8"real", "linear"<, LegendSize ® 0.6E;
The formula for the solution of the linearized version of this damped
pendulum oscillator is:
[email protected], MM, gg, LL, ss, vv, linearformulaD
bb y¢ @tD
gg [email protected]
clearlinversion = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€ == 0;
MM
LL
linearsol =
[email protected], [email protected] == ss, y¢ @0D == vv<, [email protected], tD •.
8ss ® starterangle, vv ® startervel, bb ® b, MM ® M, gg ® g, LL ® L<;
[email protected]_D = [email protected]@[email protected] •. linearsolP1TDD
1.5708 E-0.1 t [email protected] tD + 0.25571 E-0.1 t [email protected] tD
Do you trust this formula to model the actual damped pendulum
oscillator?
áG.4.c.v)
The next plot raises the starter data from
[email protected], y¢ @0D< = 8 €€€€p2€ , 0.2< to [email protected], y¢ @0D< = 8p, 0.2<:
8starterangle, startervel< = 8p, 0.2<;
endtime = 15;
[email protected], y, yreal, ylinearD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
simplething = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. simplethingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
PlotStyle ® [email protected], Red<, [email protected], Blue<<,
1
AxesLabel ® 8"t", ""<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ,
GoldenRatio
PlotLegend ® 8"real", "linear"<, LegendSize ® 0.6E;
8
1
6
0.5
4
2
4
6
8
10 12 14
t
2
-0.5
-1
real
linear
2
4
6
8
10 12 14
t
-2
real
linear
The formula for the solution of the linearized version of this damped
pendulum oscillator is:
The formula for the solution of the linearized version of this damped
pendulum oscillator is:
[email protected], MM, gg, LL, ss, vv, linearformulaD
bb y¢ @tD
gg [email protected]
clearlinversion = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€ == 0;
MM
LL
linearsol =
[email protected], [email protected] == ss, y¢ @0D == vv<, [email protected], tD •.
8ss ® starterangle, vv ® startervel, bb ® b, MM ® M, gg ® g, LL ® L<;
[email protected]_D = [email protected]@[email protected] •. linearsolP1TDD
[email protected], MM, gg, LL, ss, vv, linearformulaD
bb y¢ @tD
gg [email protected]
clearlinversion = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€ == 0;
MM
LL
linearsol =
[email protected], [email protected] == ss, y¢ @0D == vv<, [email protected], tD •.
8ss ® starterangle, vv ® startervel, bb ® b, MM ® M, gg ® g, LL ® L<;
[email protected]_D = [email protected]@[email protected] •. linearsolP1TDD
1.2 E-0.1 t [email protected] tD + 0.229157 E-0.1 t [email protected] tD
Do you trust this formula to model the actual damped pendulum
oscillator?
Why or why not?
áG.4.c.iv)
The next plot raises the starter data from
[email protected], y¢ @0D< = 81.2, 0.2< to [email protected], y¢ @0D< = 8 €€€€p2€ , 0.2<:
p
8starterangle, startervel< = 9 €€€€€ , 0.2=;
2
endtime = 15;
[email protected], y, yreal, ylinearD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
simplething = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. simplethingP1T;
[email protected], [email protected]<, 8t, 0, endtime<,
3.14159 E-0.1 t [email protected] tD + 0.368197 E-0.1 t [email protected] tD
Do you trust this formula to model the actual damped pendulum
oscillator?
áG.4.c.vi)
Even though in all the above plots the starter velocity was kept the
same, the quality of the formulas deteriorated as the starter angle was
raised. Why is this no surprise?
áG.4.c.vii)
Look again at part of that last plot of the nonlinear pendulum
oscillator:
last =
[email protected], 8t, 0, endtime<, PlotStyle ® [email protected], Red<<,
1
AxesLabel ® 8"t", "[email protected]"<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
254
DE.08.G4®G6
[email protected]
8
G.5) Frequency of the undamped pendulum
7
áG.5.a)
6
5
Here are two undamped pendulums.
4
2
4
6
8
10
12
14
t
Throw in the horizontal line [email protected] = 2 p:
[email protected], tD
p
[email protected] = - €€€€€ ;
6
[email protected]@[email protected], [email protected], [email protected], [email protected]<DD;
extraline = [email protected]
8DarkSlateGray, [email protected], [email protected], 2 p<, 8endtime, 2 p<<D<D;
[email protected], extralineD;
[email protected]
8
7
6
5
Given starter data on [email protected] and y¢ @0D, the motion of the shorter
pendulum is modeled by:
4
2
4
6
8
10
12
14
t
Explain what information is conveyed by the plot.
Did the pendulum go over the top? If so, then what happened after it
did? Does it just go around, around and around?
In your opinion, why is this damped pendulum oscillator so interested
in the line
[email protected] = 2 p ?
g = 9.8;
L = 5;
[email protected], tD
g [email protected]@tDD
shortpendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
1.96 [email protected]@tDD + y² @tD == 0
Given starter data on [email protected] and y¢ @0D, the motion of the longer
pendulum is modeled by:
L = 10;
áG.d.i)
Check out what happens when you start the pendulum above at
starting angle [email protected] = 0, but you give it a whack to the left by starting
with y¢ @0D = -2:
8starterangle, startervel< = 80, -2<;
8b, L, g, M< = 80.2, 5.0, 9.8, 1.0<;
[email protected], yD
g [email protected]@tDD
b y¢ @tD
dampedpendosc = y² @tD + €€€€€€€€€€€€€€€€€€€€ + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
M
L
[email protected], y, yreal, ysimpleD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
[email protected], 8t, 0, endtime<,
PlotStyle ® [email protected], Red<<, PlotRange ® All,
1
AxesLabel ® 8"t", "[email protected]"<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
1.96 [email protected]@tDD + 0.2 y¢ @tD + y² @tD == 0
[email protected]
1
0.5
2
4
6
8
10
12
14
t
g [email protected]@tDD
longpendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
0.98 [email protected]@tDD + y² @tD == 0
If you go with the same starting data on [email protected] and y¢ @0D, then which of
the two pendulums has the higher frequency (= shorter period)?
Show off your answer with convincing plots or movies.
áG.5.b)
Here's a single undamped pendulum:
[email protected], t, sD
L = 10;
p
[email protected] = €€€€€ ;
6
[email protected]
angle = [email protected]
0.5 L [email protected], [email protected]<, 8s, 0, [email protected]<, DisplayFunction ® IdentityD;
1
[email protected]
[email protected]
labels = GraphicsA9TextA"[email protected]", €€€€€€€€ 5.5 L 9SinA €€€€€€€€€€€€€€ E, -CosA €€€€€€€€€€€€€€ E=E,
10
2
2
[email protected]"L", 0.4 L [email protected]@tDD, [email protected]@tDD< + [email protected]@tDD, [email protected]@tDD<D=E;
[email protected]@L, [email protected], angle, labels,
DisplayFunction ® $DisplayFunctionD;
-0.5
-1
Check out what happens when you start the pendulum above at
starting angle [email protected] = 0, but you give it a heck of a whack to the left by
starting with y¢ @0D = -3:
8starterangle, startervel< = 80, -3.2<;
[email protected], y, yreal, ysimpleD;
realthing = [email protected],
[email protected] == starterangle, y¢ @0D == startervel<, [email protected], 8t, 0, endtime<D;
[email protected]_D = [email protected] •. realthingP1T;
[email protected], 8t, 0, endtime<,
PlotStyle ® [email protected], Red<<, PlotRange ® All,
1
AxesLabel ® 8"t", "[email protected]"<, AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
[email protected]
1
2
4
6
8
10
12
14
t
L
[email protected]
[email protected] =
p
€€€€€
6
Given starter data on [email protected] and y¢ @0D, the motion of this pendulum is
modeled by:
g = 9.8;
[email protected], tD
g [email protected]@tDD
pendulumoscillator = y² @tD + €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ == 0
L
0.98 [email protected]@tDD + y² @tD == 0
If you go with a small starting angle [email protected] and y¢ @0D = 0, then do you
expect the pendulum to wiggle back and forth faster or slower than if
you start the pendulum off with a larger [email protected] and y¢ @0D = 0?
Back up your answer with convincing plots or movies.
-1
-2
-3
Can you give this damped pendulum a starting whack so hard the
damped pendulum oscillators goes over the top?
If you can, then show off your ability with a decisive plot.
G.6) The Van der Pol oscillator
áG.6.a.i)
You can get an undamped ordinary oscillator this way:
[email protected], t, bD
y² @tD + b y¢ @tD + [email protected] == 0 •. b ® 0
[email protected] + y² @tD == 0
255
DE.08.G6®G7
You can get a damped oscillator by making b positive and small:
[email protected], t, bD
y² @tD + b y¢ @tD + [email protected] == 0 •. b ® 0.3
[email protected] + 0.3 y¢ @tD + y² @tD == 0
You can get a negatively damped (self-excited) oscillator by making b
negative and small:
[email protected], t, bD
y² @tD + b y¢ @tD + [email protected] == 0 •. b ® -0.23
[email protected] - 0.23 y¢ @tD + y² @tD == 0
Here's how you get a van der Pol oscillator:
[email protected], yD
vanderPoloscillator = y² @tD + [email protected] - 1L y¢ @tD + [email protected] == 0
[email protected] + H-1 + [email protected] L y¢ @tD + y² @tD == 0
To make the van der Pol oscillator into a system of two first order
differential equations, you put
[email protected] = y¢ @tD
and then replace y¢ @tD by [email protected] and replace y² @tD by x¢ @tD:
[email protected]
[email protected]@8new = Hy'@tD == [email protected],
vanderPoloscillator •. 8y'@tD -> [email protected], y''@tD -> x'@tD<<D D
y¢ @tD == [email protected]
[email protected] L
x¢ @tD
+
== 0
[email protected] + [email protected] H-1 +
[email protected], n, x, y, tD
[email protected]_, y_D = -Hy2 - 1L x - y;
[email protected]_, y_D = x;
vanderPolsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@vanderPolsystemDD
x¢ @tD == [email protected] + [email protected] H1 - [email protected] L
y¢ @tD == [email protected]
The equilibrium points come from:
[email protected]@x, yD == 0, [email protected], yD == 0<, 8x, y<D
88x ® 0, y ® 0<<
The friendly point 80, 0< is an equilibrium point for the van der Pol
oscillator. Here comes the a plot of the van der Pol flow near the
equilibrium point:
h = 0.3;
s = [email protected], 80, 2 p<D;
8a, b< = 8xequilib, yequilib< + h [email protected], [email protected]<
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 24.0;
ndssol = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D = [email protected] •. ndssolP1T, [email protected] •. ndssolP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
[email protected], trajectoryplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"y'", "y"<, DisplayFunction ® $DisplayFunction,
Epilog ® [email protected], Red, [email protected]<,
[email protected], CadmiumOrange, [email protected], yequilib<D<<D;
8-0.278058, 0.112621<
y flow
Actual
3
2
1
-3 -2 -1
1
2
3 y’
-1
-2
-3
Rerun a couple of times.
Initially, the trajectory is propelled away from the equilibrium point.
Run a few more if you like.
The overwhelming visual evidence is that the equilibriium point 80, 0<
is a repellor for the van der Pol oscillator system.
Confirm this visual evidence by calculating the eigenvalues of the
linearization matrix at 80, 0<.
8xequilib, yequilib< = 80, 0<;
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<;
h = 2.5;
flowplot = [email protected]@x, yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.2, HeadSize ® 0.15D,
h
9x, xequilib - h, xequilib + h, €€€€€€€€ =,
10
h
9y, yequilib - h, yequilib + h, €€€€€€€€ =E;
10
actualflow =
[email protected], Axes ® True, AxesOrigin ® 8xequilib, yequilib<,
AxesLabel ® 8"x", "y"<, PlotRange ®
88xequilib - h, xequilib + h<, 8yequilib - h, yequilib + h<<,
Epilog ® [email protected], Red, [email protected], yequilib<D<,
PlotLabel ® "Actual flow"D;
y flow
Actual
2
1
-2
-1
1
2
x
áG.6.a.ii)
Show a plot of the linearized field with the linearized field vectors
plotted with their tails at the same points the actual field vectors above
are plotted.
® Comment on the quality of the approximation of the actual flow by
the flow of the linearization near the equilibrium point.
® Why did the linearization have absolutely no chance of predicting
the limit cycle which is so vivid in trajectories in the van der Pol flow?
® Some of the formulas coming from the linearization of the
pendulum oscillator can be used to predict long term behavior of
trajectories for the pendulum oscillator.
In contrast, only clueless, inexperienced persons would ever use
formulas coming from the linearization of the van der Pol oscillator to
try to predict long-term behavior of the van der Pol oscillator. Why?
-1
G.7) Gradient systems and Hamiltonian systems: Max-Min
-2
Throw in a trajectory starting at a random point near the equilibrium
point:
and level curves
áG.7.a.i) Gradient systems
Given a function [email protected], yD, you get the gradient of [email protected], yD by going with
[email protected], yD = 8¶x [email protected], yD, ¶y [email protected], yD<.
This is the same as saying
Ñ[email protected], yD = 8¶[email protected], yD • ¶ x, ¶[email protected], yD • ¶y<.
If you're running this lesson from some versions of Windows, the funny
characters above are partial derivative symbols.
To get the gradient system coming from [email protected], yD, you put
8x¢ @tD, y¢ @tD< = [email protected]@tD, [email protected],
which is the same as putting
8x¢ @tD, y¢ @tD< = Ñ[email protected]@tD, [email protected]
Here's a the gradient system coming from
[email protected], yD = x [email protected] + y [email protected]:
[email protected], n, x, y, t, f, gradfD
[email protected]_, y_D = x [email protected] + y [email protected];
256
DE.08.G7
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D, [email protected]_, y_D< = [email protected], yD;
gradsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@gradsystemDD
ndssol = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D = [email protected] •. ndssolP1T, [email protected] •. ndssolP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
[email protected], trajectoryplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, DisplayFunction ® $DisplayFunctionD;
x¢ @tD == [email protected]@tDD + [email protected]@tDD [email protected]
y¢ @tD == [email protected]@tDD - [email protected]@tDD [email protected]
Here's a trajectory in this gradient field of [email protected], yD:
8a, b< = 80.5, 0.3<;
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 7;
approxsolutions = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D =
[email protected] •. approxsolutionsP1T, [email protected] •. approxsolutionsP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
ShowAstarterplot, trajectoryplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, DisplayFunction ® $DisplayFunction,
1
AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
y
4
2
-6
-4
-2
2
4
6
x
-2
-4
An elliptical closed curve.
How does the shape of this trajectory signal that the given system is
not a gradient system?
á Tip:
Remember from part i) above:
No matter what function [email protected], yD you go with, if
y
[email protected], [email protected]<
0.6
parameterizes a trajectory in the gradient field of [email protected], yD, then you are
0.4
guaranteed that
0.2
[email protected]@tD, [email protected]
2
3
4
5
6
x
goes up as t goes up.
-0.2
Agree that [email protected], [email protected]< specifies the point on this
trajectory at time t.
Here's what happens to [email protected]@tD, [email protected] as t advances
from 0:
[email protected], ytrajectoryD;
[email protected]_D, [email protected]_D< =
[email protected], [email protected]< •. approxsolutionsP1T;
[email protected]@[email protected], [email protected],
8t, 0, endtime<, PlotStyle ® 88Red, [email protected]<<,
AxesLabel ® 8"t", "[email protected]@tD,[email protected]"<D;
[email protected],[email protected]
6
5
4
3
2
1
1234567 t
áG.7.b.i)
Here's the gradient of
[email protected], yD = x3 + E3 y - 3 x Ey :
[email protected], gradf, x, yD
[email protected]_, y_D = x3 + E3 y - 3 x Ey ;
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<
8-3 Ey + 3 x2 , 3 E3 y - 3 Ey x<
Here's the corresponding gradient system:
[email protected], n, x, y, tD
[email protected]_, y_D, [email protected]_, y_D< = [email protected], yD;
Gradientsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@GradientsystemDD
x¢ @tD == -3 [email protected] + 3 [email protected]
y¢ @tD == 3 E3 [email protected] - 3 [email protected] [email protected]
The field for this system is:
[email protected]
[email protected]_, y_D = [email protected], yD, [email protected], yD<
Going up. Use your knowledge of the fact that when you plot
[email protected], yD with tail at 8x, y<, the direction of [email protected], yD is the
direction of greatest initial increase in [email protected], yD to explain why this
curve had no choice but to go up.
Explain this bold statement:
No matter what function [email protected], yD you go with, if
[email protected], [email protected]<
parameterizes a trajectory in the gradient field of [email protected], yD, then you are
guaranteed that [email protected]@tD, [email protected] goes up as t goes up.
áG.7.a.ii)
Here's a system:
[email protected], n, x, y, tD
[email protected]_, y_D = 0.2 x + 1.5 y;
[email protected]_, y_D = -0.5 x - 0.2 y;
DEsystem = H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@DEsystemDD
x¢ @tD
== 0.2 [email protected] + 1.5 [email protected]
y¢ @tD == -0.5 [email protected] - 0.2 [email protected]
And one of its trajectories:
8a, b< = 8-4, -3<;
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 8;
8-3 Ey + 3 x2 , 3 E3 y - 3 Ey x<
This is the same as [email protected], yD.
[email protected], yD
8-3 Ey + 3 x2 , 3 E3 y - 3 Ey x<
You go after the the equillibrium points by finding where
[email protected], yD = 80, 0<:
[email protected]@[email protected]@x, yD == 80, 0<DDD
1
1
1
99y ® -0.5 LogA €€€€€ E, LogA €€€€€€€
€ E ® 0.5 LogA €€€€€ E==
x
x2
x
Remembering that Log[1] = 0, you can see that the equilibrium point
is:
8xequilib, yequilib< = 81, 0<
81, 0<
Look at the level curves of [email protected], yD in the vicinity of the equilibrium
point:
h = 0.2;
levelcurves = [email protected]@[email protected], yDD,
8x, xequilib - h, xequilib + h<, 8y, yequilib - h, yequilib + h<,
ContourSmoothing ® Automatic, AxesLabel ® 8"x", "y"<D;
0.2
0.1
0
-0.1
-0.2
0.8
0.9
1
1.1
1.2
257
DE.08.G7
The lighter shading indicates larger values of
[email protected], yD.
Throw in the flow of this gradient field:
flowplot = [email protected]@x, yD, Tail ® 8x, y<,
VectorColor ® Blue, ScaleFactor ® 0.1, HeadSize ® 0.02D,
h
9x, xequilib - h, xequilib + h, €€€€€ =,
8
h
9y, yequilib - h, yequilib + h, €€€€€ =E;
8
equilibplot = [email protected]
[email protected], CadmiumOrange, Poi[email protected], yequilib<D<D;
[email protected], flowplot, equilibplot, Axes ® True,
AxesOrigin ® 8xequilib, yequilib<, AxesLabel ® 8"x", "y"<,
PlotRange ® 88xequilib - h, xequilib + h<, 8yequilib - h, yequilib + h<<,
PlotLabel ® "Actual flow with level curves"D;
y level curv
tual flow with
0.2
0.15
0.1
0.05
0
x
-0.05
-0.1
-0.15
0.85
0.9
0.95
1.05
1 1.1
1.15
As you can see, the equilibrium point is a repellor for this gradient
system.
And as you can see, the equilibrium point is probably a local
minimizer in the sense that
[email protected], yequilibD < [email protected], yD
for all other 8x, y< near the equilibrium point.
Go after candidates for maximizers and minimizers:
[email protected]@[email protected]@x, yD == 80, 0<DDD
88x ® -0.707107, y ® -0.707107<, 8x ® 0.707107, y ® 0.707107<<
This gives you two candidates. Calculate the linearization matrices for
these gradient systems at each of these two points and do an
eigenvalue analysis in effort to find whether any or all of these points
are in fact local maxmizers or minimizers. Report your results.
áG.7.c) Fishing for local maximizers
Just as you are working on gradients and max-min, an old retired prof
(sort of a geezer) sits down at a computer next to you and says, "I
don't use Solve commands or anything like that when I am looking for
local max's in a certain region. Instead I just go fishing in the gradient
flow. For instance if I am trying to find local max's near 80, 0< of
E-0.3 Hx-0.4L [email protected] y+0.4D
[email protected], yD = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
€,
1+y2
I throw four corks in like this:
2
[email protected], ystarter, kD
h = 2;
[email protected], [email protected]< = 8h, 0<;
[email protected], [email protected]< = 80, h<;
[email protected], [email protected]< = 8-h, 0<;
[email protected], [email protected]< = 80, -h<;
starterplots = [email protected]@8Red, [email protected],
[email protected]@kD, [email protected]<D<D, 8k, 1, 4<D;
starterlabels = [email protected]@8Red,
[email protected]"start", [email protected], [email protected]<, 80, 1<D<D, 8k, 1, 4<D;
[email protected], starterlabels, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<D;
y
2
start
Explain why you are certain that the equilibrium point is a local
minimizer of [email protected], yD.
1
-2
-1
start
1
2 x
start
-1
-2
start
"Then I enter the function and plot the trajectories in the gradient flow
that start at the plotted points and then I see where they go:"
áG.7.b.ii)
Given a function [email protected], yD, call a point 8xmin, ymin< a local minimizer
of [email protected], yD if
[email protected], yD > [email protected], yminD
for all other 8x, y< near 8xmin, ymin<.
And call a point 8xmax, ymax< a local maximizer of [email protected], yD if
[email protected], yD < [email protected], ymaxD.
Explain why you don't need to look at any linearizations to know that
local minimizers of [email protected], yD are repellers and the local maximizers are
attractors for the gradient system
8x¢ @tD, y¢ @tD< = [email protected]@tD, [email protected]
áG.7.b.iii)
On the other hand, if you go with a fixed function [email protected], yD, you look for
candidates for local maximizers and minimizers by setting
[email protected], yD = 80, 0<
and trying to solve for 8x, y<.
Once you have a candidate 8x0 , y0 <, how do you know that 8x0 , y0 < is
guaranteed to be an equilibrium point of the gradient system
8x¢ @tD, y¢ @tD< = [email protected]@tD, [email protected]?
If you linearize this gradient system at the same point 8x0 , y0 < and
your eigenvalue analysis reveals that 8x0 , y0 < is an attractor, then
what's your reaction? If your eigenvalue analysis reveals that 8x0 , y0 <
is an repellor, what's your reaction?
[email protected], gradf, m, n, x, y, tD
2
E-0.3 Hx-0.4L [email protected] y + 0.4D
[email protected]_, y_D = €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
1 + y2
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<;
[email protected]_, y_D, [email protected]_, y_D< = [email protected], yD;
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
endtime = 25;
ndssol1 = [email protected], equationy, [email protected] == h, [email protected] == 0<,
[email protected], [email protected]<, 8t, 0, endtime<D;
ndssol2 = [email protected], equationy, [email protected] == 0, [email protected] == h<,
[email protected], [email protected]<, 8t, 0, endtime<D;
ndssol3 = [email protected], equationy, [email protected] == -h, [email protected] == 0<,
[email protected], [email protected]<, 8t, 0, endtime<D;
ndssol4 = [email protected], equationy, [email protected] == 0, [email protected] == -h<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected], trajectory2, trajectory3, trajectory4D
[email protected]_D = [email protected], [email protected]< •. ndssol1P1T;
t[email protected]_D = [email protected], [email protected]< •. ndssol2P1T;
[email protected]_D = [email protected], [email protected]< •. ndssol3P1T; [email protected]_D =
[email protected], [email protected]< •. ndssol4P1T; trajectoryplots = [email protected]
[email protected], [email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® 88CadmiumOrange, [email protected]<<,
DisplayFunction ® IdentityD; endplots =
[email protected], [email protected], [email protected]@endtimeDD<D,
[email protected], [email protected], [email protected]@endtimeDD<D,
[email protected], [email protected], [email protected]@endtimeDD<D,
[email protected], [email protected], [email protected]@endtimeDD<D<;
[email protected], starterlabels, trajectoryplots,
endplots, PlotRange ® All, Axes ® True, AxesLabel ® 8"x", "y"<,
DisplayFunction ® $DisplayFunctionD;
y
2
start
áG.7.b.iv)
Now you have the opportunity to practice what you preach.
Go with this function:
[email protected], gradf, x, yD
x+y
[email protected]_, y_D = €€€€€€€€€€€€€€€€€€€€€€€€€€€ ;
1 + x2 + y2
[email protected]_, y_D = 8¶x [email protected], yD, ¶y [email protected], yD<
2 x Hx + yL
1
2 y Hx + yL
1
9- €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
+ €€€€€€€€€€€€€€€€€€€€€€€€€€€
, - €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
+ €€€€€€€€€€€€€€€€€€€€€€€€€€€
=
2
2
1 + x2 + y2
1 + x2 + y2
H1 + x2 + y2 L
H1 + x2 + y2 L
1
-2
-1
start
1
2 x
start
-1
-2
start
The old guy goes on to say,"Those blue dots at [email protected],
[email protected], [email protected] and [email protected]
are the points at which the trajectories stalled. So, goldurn it, I'm
pretty well convinced that that these are local maximizers.
258
DE.08.G7
Is this guy still with it?
Does his idea have any merit?.
If so, explain why.
áG.7.d.i) Hamiltonian systems
Given a function [email protected], yD, you get the gradient system coming from
[email protected], yD by going with
[email protected], yD = ¶x [email protected], yD (which is the same as ¶[email protected], yD • ¶ x)
[email protected], yD = ¶y [email protected], yD (which is the same as ¶[email protected], yD • ¶y)
If you're running this lesson from Windows, the funny characters above
are partial derivative symbols.
and putting
8x¢ @tD, y¢ @tD< = [email protected]@tD, [email protected], [email protected]@tD, [email protected]<.
[email protected]@tD,[email protected]
5.5
5
4.5
4
3.5
3
2.5
1
[email protected], yD = -¶y [email protected], yD (which is the same as -¶[email protected], yD • ¶y)
[email protected], yD = ¶x [email protected], yD (which is the same as ¶[email protected], yD • ¶x)
and putting
8a, b< = [email protected], 8-5, 5<D, [email protected], 8-3, 3<D<;
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 5;
ndssol = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D = [email protected] •. ndssolP1T, [email protected] •. ndssolP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
levelcurves = [email protected]@[email protected], yDD, 8x, -7, 7<, 8y, -4, 4<,
ContourSmoothing ® Automatic, DisplayFunction ® IdentityD;
[email protected], starterplot, trajectoryplot,
PlotRange ® All, Axes ® True, AxesLabel ® 8"x", "y"<,
DisplayFunction ® $DisplayFunctionD;
2
[email protected]
x¢ @tD == [email protected] €€€€€€€€€€
3 € D - 2 [email protected]
== -
[email protected]
8a, b< = [email protected], 8-2, 2<D, [email protected], 8-2, 2<D<;
starterpoint = 8a, b<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected];
starterx = [email protected] == a;
startery = [email protected] == b;
endtime = 7;
ndssol = [email protected], equationy, starterx, startery<,
[email protected], [email protected]<, 8t, 0, endtime<D;
[email protected]
[email protected]_D = [email protected] •. ndssolP1T, [email protected] •. ndssolP1T<;
trajectoryplot =
[email protected]@tD, 8t, 0, endtime<, PlotStyle ®
88CadmiumOrange, [email protected]<<, DisplayFunction ® IdentityD;
starterplot = [email protected], [email protected], [email protected]<D;
ShowAstarterplot, trajectoryplot, PlotRange ® All, Axes ® True,
AxesLabel ® 8"x", "y"<, DisplayFunction ® $DisplayFunction,
1
AspectRatio ® €€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€ E;
GoldenRatio
y
-1.5
-1.6
-1.7
5
10
15
20
25
x
Agree that [email protected], [email protected]< specifies the point on this
trajectory at time t.
Here's what happens to [email protected]@tD, [email protected]:
[email protected], ytrajectoryD;
[email protected]_D, [email protected]_D< = [email protected], [email protected]< •. ndssolP1T;
[email protected]@[email protected], [email protected],
8t, 0, endtime<, PlotStyle ® 88Red, [email protected]<<,
AxesLabel ® 8"t", "[email protected]@tD,[email protected]"<,
PlotRange ® [email protected], bD - 2, [email protected], bD + 2<D;
t
Here's a trajectory for this system shown with a contour plot of some
of the level curves of [email protected], yD:
[email protected]_, y_D, [email protected]_, y_D< = 8-¶yf @x, yD, ¶xf @x, yD<;
hamiltoniansystem =
H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@hamiltoniansystemDD
Here's a random trajectory in this Hamiltonian flow:
7
x¢ @tD == 5 [email protected]@tDD - 8 [email protected]
y¢ @tD == 2 [email protected] - 5 [email protected]@tDD [email protected]
[email protected], n, x, y, t, fD
x 2
[email protected]_, y_D = y2 - y SinA €€€€€ E ;
3
[email protected]
[email protected] €€€€€€€€€€€
3 D
6
[email protected], gradf, m, n, x, yD
[email protected]_, y_D = x2 - 5 [email protected] y + 4 y2 ;
[email protected]_, y_D, [email protected]_, y_D< = 8-¶yf @x, yD, ¶xf @x, yD<;
hamiltoniansystem =
H8x'@tD, y'@tD< == [email protected]@tD, [email protected], [email protected]@tD, [email protected]<L;
[email protected]@hamiltoniansystemDD
[email protected], yD = y2 - y [email protected] €€€€x3€ D2 :
[email protected]
[email protected] €€€€€€€€€€
3 €D
5
Here's the Hamiltonian system coming from
[email protected], yD = x2 - 5 [email protected] y + 4 y2 :
Here's the Hamiltonian system coming from
2
€€€€
3
4
áG.7.d.ii)
8x¢ @tD, y¢ @tD< = [email protected]@tD, [email protected], [email protected]@tD, [email protected]<.
y¢ @tD
3
Got any idea why that happened?
Given a function [email protected], yD, you get the Hamiltonian system coming from
[email protected], yD by going with
2
y
4
2
0
x
-2
-4
-6 -4 -2 0
2
4
6
Rerun several times
Give your opinion about why each plot turns out the way it does.
áG.7.d.iii)
Go with:
[email protected], x, yD
[email protected]_, y_D = -2.3 [email protected] + 0.9 [email protected] xD
0.9 [email protected] xD - 2.3 [email protected]
When you set
[email protected], yD = [email protected], 0D
and vary x, then y also has to vary to maintain the equality
[email protected], yD = [email protected], 0D.
So, when you set
[email protected], yD = [email protected], 0D,
you are implicitly defining y in terms of of x.
Mathematica can give you the formula for this function:
sols = [email protected]@x, yD == [email protected], 0D, yD;
[email protected]_D = [email protected] •. solsP1T, 6D
1. [email protected] H-9. + 9. [email protected] xDLD
And you can plot at least part of [email protected] as a function of x:
ParametricPlotA8x, [email protected]<, 8x, 0, 5<,
PlotStyle ® 88Magenta, [email protected]<<, AxesLabel ® 8"x", "[email protected]"<,
1
AspectRatio ® €€€€€ E;
2
259
DE.08.G7®G8
[email protected]
1
2
3
4
5
x
-0.2
x¢ @tD
== -10. [email protected] - [email protected]
y¢ @tD == 28. [email protected] - [email protected] - [email protected] [email protected]
¢
z @tD == [email protected] [email protected] - 2.6667 [email protected]
The equilibrium points are:
-0.4
equisols =
[email protected]@x, y, zD == 0, [email protected], y, zD == 0, [email protected], y, zD == 0<, 8x, y, z<D;
[email protected], yeq, zeqD
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP1T
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP2T
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP3T
-0.6
-0.8
At every point 8x, y< on this curve, you are guaranteed that
[email protected], yD = [email protected], 0D:
80., 0., 0.<
8-8.48533, -8.48533, 27.<
x = [email protected], 80, 5<D;
[email protected], [email protected] == [email protected], 0D
88.48533, 8.48533, 27.<
True
[email protected], [email protected], 8x, 0, 6<, PlotStyle ® 88Blue, [email protected]<<,
1
AxesLabel ® 8"x", "[email protected],[email protected]"<, AspectRatio ® €€€€€ ,
2
PlotRange ® [email protected], 0D - 1, [email protected], 0D + 1<E;
See a trajectory starting at 85, 5, 5< together with the three equilbrium
points:
8xstarter, ystarter, zstarter< = 85, 5, 5<;
endtime = 0.6;
[email protected], y, z, k, tD
equationx = Hx'@tD == [email protected]@tD, [email protected], [email protected];
equationy = Hy'@tD == [email protected]@tD, [email protected], [email protected];
equationz = Hz'@tD == [email protected]@tD, [email protected], [email protected];
xstartereqn = [email protected] == xstarterL;
ystartereqn = [email protected] == ystarterL;
zstartereqn = [email protected] == zstarterL;
[email protected],[email protected]
1.75
1.5
1.25
1
0.75
0.5
0.25
1
2
3
4
5
6
nonlinsols = [email protected], equationy, equationz,
xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<,
MaxSteps -> 2000D;
x
Now go with:
[email protected], x, yD
[email protected]_, y_D = -2.3 [email protected] + [email protected] [email protected] xD
trajectoryplot =
[email protected]@tD, [email protected], [email protected]< •. [email protected]@1DD,
8t, 0, endtime<,
PlotPoints -> 500, DisplayFunction -> IdentityD;
starterplot = [email protected]
8Red, [email protected], [email protected], ystarter, zstarter<D<D;
equilibplots =
[email protected]@8CadmiumOrange, [email protected],
[email protected]@kD, [email protected], [email protected]<D<D, 8k, 1, 3<D;
h = 4;
equilabels = [email protected]
8CadmiumOrange, [email protected]"1", [email protected], [email protected], [email protected] + h<D<D,
[email protected]
[email protected] [email protected] xD - 2.3 [email protected]
When you set
[email protected], yD = [email protected], 0D,
you are implicitly defining y in terms of x. But when you go to
Mathematica for a formula for [email protected], you get:
sols = [email protected]@x, yD == [email protected], 0D, yD
[email protected]@yD [email protected] xD - 2.3 [email protected] == E, yD
No dice. No formula is available.
In spite of this apparent setback, you can use a trajectory plot in an
8CadmiumOrange, [email protected]"2", [email protected], [email protected], [email protected] + h<D<D,
[email protected]
8CadmiumOrange, [email protected]"3", [email protected], [email protected], [email protected] + h<D<D<;
appropriate Hamiltonian system to come up with a nice plot of y in
terms of x through the implicit definition
[email protected], yD = [email protected], 0D.
Do it.
[email protected], starterplot, equilibplots,
equilabels, Axes -> True, AxesLabel -> 8"x", "y", "z"<,
PlotRange -> All, PlotLabel -> endtime "= endtime",
DisplayFunction -> $DisplayFunctionD;
G.8) Chaos: Lorenz's chaotic 3D oscillator
This problem is a memory hog.
If you want to work on this one, it might be a good idea
to copy and paste it into a new notebook.
In fact it might be a good idea to use a very fast computer with lots of
memory
From E. Atlee Jackson's book "Perspectives of Nonlinear Dynamics"
(Cambridge, 1991):
"In 1963, E. N. Lorenz published a study of a highly simplified model
of a particular hydrodynamic flow [involving long-range weather
forecasting] problem, which has become a classic in the area of
nonlinear dynamics. The importance of this model is . . . that it
illustrates how a simple model can produce very rich and varied forms
of dynamics."
Folks like to call this "rich and varied behavior" by the name "chaos."
DiffEq&Mathematica invites you to experience chaos first hand.
áG.8.a.i)
Lorenz's chaotic diffeq system is an innocent looking 3 D nonlinear
system.
Here it is:
[email protected], n, p, x, y, z, tD
s = 10.0;
b = 2.6667;
r = 28.0;
[email protected]_, y_, z_D = -s Hx - yL;
[email protected]_, y_, z_D = r x - y - x z;
[email protected]_, y_, z_D = - b z + x y;
Lorenzsystem =
H8x'@tD, y'@tD, z'@tD< ==
[email protected]@tD, [email protected], [email protected], [email protected]@tD, [email protected], [email protected], [email protected]@tD, [email protected], [email protected]<L;
[email protected]@LorenzsystemDD
x
0.6 = endtime
y 20 0
10
10
0
40
3
30 2
z
20
10
0
1
So far so good.
See more of the trajectory:
endtime = 2.1;
nonlinsols = [email protected], equationy, equationz,
xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<,
MaxSteps -> 2000D;
trajectoryplot =
[email protected]@tD, [email protected], [email protected]< •. [email protected]@1DD,
8t, 0, endtime<,
PlotPoints -> 500, DisplayFunction -> IdentityD;
[email protected], starterplot, equilibplots,
equilabels, Axes -> True, AxesLabel -> 8"x", "y", "z"<,
PlotRange -> All, PlotLabel -> endtime "= endtime",
DisplayFunction -> $DisplayFunctionD;
260
DE.08.G8
2.1 = endtime
y 20
10
0
-10
10
40
40
3
30 2
z
20
10
0
-10
10
1
Uh-oh.
See more:
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 2000D;
trajectoryplot = [email protected]@tD, [email protected], [email protected]< •. nonlinsolsP1T,
8t, 0, endtime<, PlotPoints ® 500, DisplayFunction ® IdentityD;
[email protected], starterplot, equilibplots, equilabels,
Axes ® True, AxesLabel ® 8"x", "y", "z"<, PlotRange ® All,
PlotLabel ® endtime "= endtime", DisplayFunction ® $DisplayFunctionD;
4.3 = endtime
y 20
10
0
-10
40
The linearization (Jacobian) matrix for the Lorenz system at a point
8x, y, z< is:
[email protected], gradm, gradn, gradp, x, y, zD
[email protected]_, y_, z_D = 8¶x [email protected], y, zD, ¶y [email protected], y, zD, ¶z [email protected], y, zD<;
[email protected]_, y_, z_D = 8¶x [email protected], y, zD, ¶y [email protected], y, zD, ¶z [email protected], y, zD<;
[email protected]_, y_, z_D = 8¶x [email protected], y, zD, ¶y [email protected], y, zD, ¶z [email protected], y, zD<;
[email protected]_, y_, z_D = [email protected], y, zD, [email protected], y, zD, [email protected], y, zD<;
[email protected]@x, y, zDD
0
i -10. 10.
y
j
z
j
z
j
z
-x
j
z
j 28. - z -1
z
j
z
y
x
-2.6667
k
{
[email protected]@[email protected], [email protected], [email protected]<, 8k, 1, 3<DD
0
x 10
6.3 = endtime
y 20
10
0
-10
-20
20
3
2
The corresponding eigenvalues of the linearization matrix at each of
the three equilibrium points are:
[email protected]@[email protected]@[email protected], [email protected], [email protected], 8k, 1, 3<DD
8-22.8277, 11.8277, -2.6667<
8-13.8546, 0.0939504 + 10.1946 I, 0.0939504 - 10.1946 I<
8-13.8546, 0.0939504 + 10.1946 I, 0.0939504 - 10.1946 I<
Does this information begin to give you even the slightest clue about
why the trajectory plots out they way it does?
If so, then what is the clue?
áG.8.a.iii)
To add to the investigation, look at this:
[email protected]@[email protected]@2D, [email protected], [email protected], 3D
[email protected]@[email protected]@[email protected], [email protected], [email protected], 3DD
8-13.9, 0.094 + 10.2 I, 0.094 - 10.2 I<
1
880.856, -0.33, 0.399<, 8-0.266 - 0.295 I, 0.0321 - 0.569 I, 0.719<,
8-0.266 + 0.295 I, 0.0321 + 0.569 I, 0.719<<
0
x 10
Whoops. Someting attracted its interest.
See more:
endtime = 7.3;
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 2000D;
trajectoryplot = [email protected]@tD, [email protected], [email protected]< •. nonlinsolsP1T,
8t, 0, endtime<, PlotPoints ® 500, DisplayFunction ® IdentityD;
[email protected], starterplot, equilibplots, equilabels,
Axes ® True, AxesLabel ® 8"x", "y", "z"<, PlotRange ® All,
PlotLabel ® endtime "= endtime", DisplayFunction ® $DisplayFunctionD;
7.3 = endtime
y 20
10
0
-10
-20
20
40
áG.8.a.ii)
80., 0., 0.<
8-8.48533, -8.48533, 27.<
88.48533, 8.48533, 27.<
1
endtime = 6.3;
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 2000D;
trajectoryplot = [email protected]@tD, [email protected], [email protected]< •. nonlinsolsP1T,
8t, 0, endtime<, PlotPoints ® 500, DisplayFunction ® IdentityD;
[email protected], starterplot, equilibplots, equilabels,
Axes ® True, AxesLabel ® 8"x", "y", "z"<, PlotRange ® All,
PlotLabel ® endtime "= endtime", DisplayFunction ® $DisplayFunctionD;
3
2
30
z
20
10
0
-10
0
x 10
The equilibrium points are:
3
2
Seems to be settling into a predictable pattern.
See more:
40
1
Describe what you see.
endtime = 4.3;
30
z
20
10
0
-10
3
2
30
z
20
10
0
-10
0
x 10
30
z
20
10
0
-10
13 = endtime
y 20
10
0
-10
-20
20
1
0
x 10
Maybe it's settling into another predictable pattern.
See a lot more:
endtime = 13;
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 2000D;
trajectoryplot = [email protected]@tD, [email protected], [email protected]< •. nonlinsolsP1T,
8t, 0, endtime<, PlotPoints ® 500, DisplayFunction ® IdentityD;
last = [email protected], starterplot, equilibplots,
equilabels, Axes ® True, AxesLabel ® 8"x", "y", "z"<,
PlotRange ® All, PlotLabel ® endtime "= endtime",
DisplayFunction ® $DisplayFunctionD;
At [email protected], [email protected], [email protected]<, you spot a big time sucking eigenvector:
sucker2 = 80.856, -0.33, 0.399<
80.856, -0.33, 0.399<
See the last trajectory and this sucking eigenvector from a viewpoint
perpendicular to this sucking eigenvector:
sucker2plot = [email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D,
[email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D<;
[email protected], sucker2plot, ViewPoint ® 30 81, 0, 0< ‰ sucker2D;
x
13 = endtime
-20-10
0 10
40
30
z20
2
10
3
0
-20
-10
1
y0
10
20
Now move to [email protected], [email protected], [email protected]<
[email protected]@[email protected]@3D, [email protected], [email protected], 3D
[email protected]@[email protected]@[email protected], [email protected], [email protected], 3DD
8-13.9, 0.094 + 10.2 I, 0.094 - 10.2 I<
880.856, -0.33, -0.399<, 80.266 + 0.295 I, -0.0321 + 0.569 I, 0.719<,
80.266 - 0.295 I, -0.0321 - 0.569 I, 0.719<<
At [email protected], [email protected], [email protected]<, you spot another big time sucking
eigenvector:
sucker3 = 80.856, -0.33, -0.399<
80.856, -0.33, -0.399<
261
DE.08.G8
See the last trajectory and this sucking eigenvector from a viewpoint
perpendicular to this sucking eigenvector:
sucker3plot = [email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D,
[email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D<;
[email protected], sucker3plot, ViewPoint ® 30 81, 0, 0< ‰ sucker3D;
x
13 10
= endtime
20
0 -10
2
1
2
3
1
y0
20
40
30
20z
3
x
18 = endtime
-20-10
0 10 20
40
30
z20
10
0
-20
x
18 10
= endtime
20
0 -10-20
40
30
20z
3
10
2
0
20
10
0
20
10
0 y
-10
-20
y0
What two planes try to grab the interest of the trajectory?
Got any idea why?
áG.8.a.iv)
1
-20
Rerun several times and report anything you observe.
áG.8.b.i)
It might be a good idea to quit
Mathematica here and get a refreshed copy before going on.
Stay with the same chaotic system:
s = 10.0;
b = 2.6667;
r = 28.0;
[email protected], n, x, y, tD
[email protected]_, y_, z_D = -s Hx - yL;
[email protected]_, y_, z_D = r x - y - x z;
[email protected]_, y_, z_D = - b z + x y;
Here's what happens when you start at a random starting point:
endtime = 18;
8xstarter, ystarter, zstarter< = [email protected], 8-10, 10<D,
[email protected], 8-10, 10<D, [email protected], 8-10, 10<D<;
[email protected], n, p, x, y, z, tD
s = 10.0;
b = 2.6667;
r = 28.0;
[email protected]_, y_, z_D = -s Hx - yL;
[email protected]_, y_, z_D = r x - y - x z;
[email protected]_, y_, z_D = -b z + x y;
[email protected], y, z, k, tD
equationx = x¢ @tD == [email protected]@tD, [email protected], [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected], [email protected];
equationz = z¢ @tD == [email protected]@tD, [email protected], [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
zstartereqn = [email protected] == zstarter;
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 2000D;
trajectoryplot = [email protected]@tD, [email protected], [email protected]< •. nonlinsolsP1T,
8t, 0, endtime<, PlotPoints ® 700, DisplayFunction ® IdentityD;
starterplot = [email protected]
8Blue, [email protected], [email protected], ystarter, zstarter<D<D;
equisols =
[email protected]@x, y, zD == 0, [email protected], y, zD == 0, [email protected], y, zD == 0<, 8x, y, z<D;
[email protected], yeq, zeqD
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP1T;
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP2T;
[email protected], [email protected], [email protected]< = 8x, y, z< •. equisolsP3T;
equilibplots = [email protected]@8CadmiumOrange,
[email protected], [email protected]@kD, [email protected], [email protected]<D<D, 8k, 1, 3<D;
h = 4;
equilabels = [email protected]
8CadmiumOrange, [email protected]"1", [email protected], [email protected], [email protected] + h<D<D,
[email protected],
[email protected]"2", [email protected], [email protected], [email protected] + h<D<D, [email protected]
8CadmiumOrange, [email protected]"3", [email protected], [email protected], [email protected] + h<D<D<;
sucker2 = 80.856, -0.33, 0.399<;
sucker3 = 80.856, -0.33, -0.399<;
suckerplots = [email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D,
[email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D,
[email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D,
[email protected], Tail ® [email protected], [email protected], [email protected]<,
VectorColor ® Red, ScaleFactor ® 15, HeadSize ® 5D<;
outcome = [email protected], starterplot, equilibplots, equilabels,
suckerplots, Axes ® True, AxesLabel ® 8"x", "y", "z"<,
PlotRange ® All, PlotLabel ® endtime "= endtime",
DisplayFunction ® $DisplayFunctionD;
[email protected], ViewPoint ® 30 81, 0, 0< ‰ sucker2D;
[email protected], ViewPoint ® 30 81, 0, 0< ‰ sucker3D;
18 =20endtime
y
0
Lorenzsystem =
H8x'@tD, y'@tD, z'@tD< ==
[email protected]@tD, [email protected], [email protected], [email protected]@tD, [email protected], [email protected], [email protected]@tD, [email protected], [email protected]<L;
[email protected]@LorenzsystemDD
x¢ @tD == -10. [email protected] - [email protected]
y¢ @tD == 28. [email protected] - [email protected] - [email protected] [email protected]
z¢ @tD == [email protected] [email protected] - 2.6667 [email protected]
Look at the individual solution plots for t running from 0 to 20 with
starter point 85, 5, 5<:
endtime = 20;
8xstarter, ystarter, zstarter< = 85, 5, 5<;
[email protected], y, tD
equationx = x¢ @tD == [email protected]@tD, [email protected], [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected], [email protected];
equationz = z¢ @tD == [email protected]@tD, [email protected], [email protected];
xstartereqn = [email protected] == xstarter;
ystartereqn = [email protected] == ystarter;
zstartereqn = [email protected] == zstarter;
nonlinsols = [email protected], equationy,
equationz, xstartereqn, ystartereqn, zstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 3000D;
xsolplot = [email protected]@tD •. nonlinsolsP1T, [email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® [email protected]<, 8CadmiumOrange<,
8CadmiumOrange<, 8CadmiumOrange<<, PlotPoints ® 500,
AspectRatio ® 1, PlotLabel ® "[email protected] solution plot"D;
ysolplot = [email protected]@tD •. nonlinsolsP1T, [email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® [email protected]<, 8CadmiumOrange<,
8CadmiumOrange<, 8CadmiumOrange<<, PlotPoints ® 500,
AspectRatio ® 1, PlotLabel ® "[email protected] solution plot"D;
zsolplot = [email protected]@tD •. nonlinsolsP1T, [email protected], [email protected], [email protected]<,
8t, 0, endtime<, PlotStyle ® [email protected]<, 8CadmiumOrange<,
8CadmiumOrange<, 8CadmiumOrange<<, PlotPoints ® 500,
AspectRatio ® 1, PlotLabel ® "[email protected] solution plot"D;
[email protected] solution plot
15
10
5
5
10
15
20
-5
-10
-15
[email protected] solution plot
20
10
-20
40
z30
20
10
0
-20
20
-10
3
2
5
10
15
20
-10
1
-20
0
x
10
20
262
DE.08.G8
Describe what you see - including a few words on the issue of extreme
sensitivity to errors in starter data.
[email protected] solution plot
40
30
20
10
5
10
15
20
The horizontal lines correspond to the equilibrium values.
Describe what you see.
The result will be your own description of chaos.
áG.8.b.ii)
Now build in small random errors in the starter data:
endtime = 20;
h = 0.2;
8newxstarter, newystarter, newzstarter< = 85, 5, 5< +
[email protected], 8-h, h<D, [email protected], 8-h, h<D, [email protected], 8-h, h<D<
84.80826, 5.18991, 5.06207<
Compare:
8xstarter, ystarter, zstarter<
85, 5, 5<
The two starter points are very close.
See the individual solution plots corresponding to the new starter
points shown with the individual solution plots corresponding to the
old starter points:
[email protected], y, z, tD
equationx = x¢ @tD == [email protected]@tD, [email protected], [email protected];
equationy = y¢ @tD == [email protected]@tD, [email protected], [email protected];
equationz = z¢ @tD == [email protected]@tD, [email protected], [email protected];
newxstartereqn = [email protected] == newxstarter;
newystartereqn = [email protected] == newystarter;
newzstartereqn = [email protected] == newzstarter;
nonlinsols = [email protected], equationy,
equationz, newxstartereqn, newystartereqn, newzstartereqn<,
[email protected], [email protected], [email protected]<, 8t, 0, endtime<, MaxSteps ® 3000D;
newxsolplot = [email protected]@tD •. nonlinsolsP1T,
8t, 0, endtime<, PlotStyle ® 88Banana, [email protected]<<,
PlotPoints ® 500, DisplayFunction ® IdentityD;
newysolplot = [email protected]@tD •. nonlinsolsP1T,
8t, 0, endtime<, PlotStyle ® 88Banana, [email protected]<<,
PlotPoints ® 500, DisplayFunction ® IdentityD;
newzsolplot = [email protected]@tD •. nonlinsolsP1T,
8t, 0, endtime<, PlotStyle ® 88Banana, [email protected]<<,
PlotPoints ® 500, DisplayFunction ® IdentityD;
[email protected], xsolplot,
AspectRatio ® 1, DisplayFunction ® $DisplayFunctionD;
[email protected], ysolplot,
AspectRatio ® 1, DisplayFunction ® $DisplayFunctionD;
[email protected], zsolplot, AspectRatio ® 1,
DisplayFunction ® $DisplayFunctionD;
15
10
5
5
10
15
20
5
10
15
20
10
15
20
-5
-10
-15
20
10
-10
-20
40
30
20
10
5
What you see are the individual solution plots corresponding to the
new starter points shown with the individual solution plots
corresponding to the old starter points.
263
Download