Example 2. Solve
the Lorenz I. V. P.
and
and
and
Use Mathematica's NDSolve
procedure.
Solution 2.
Caution. The syntax must be
followed carefully. The symbol "
is the boolean equal, you can use two ordinary equal signs next to
each other if you prefer
".
Mathematica's numerical D.E. solver. It
is more robust than the Runge-Kutta method, we can solve the D.E.'s
over the larger interval
.
Caution. If you do not
use the option "
"
then Mathematica will give you the error message:
NDSolve::"mxst": "Maximum number of 1000
steps reached at the point t == 11.146875180780313`."
After you solve the problem successfully, you should make copies of
the commands and delete the MaxSteps option so you can see
"numerical analysis in action." (Or the lack of it,
because no one wants to report a bad answer.)
We need to get the interpolating functions in three coordinates. The statement ReplaceAll is uses replacement rules to obtain a new form which in this case is needed to draw a graph.
Now we can get a nice graph. Unfortunately,
ParametricPlot3D does not support colors.
Caution. If you do not
use the option "
"
then Mathematica not use enough points and you will not see
the "true curve."
After you solve the problem successfully, you should make copies of
the commands and delete the PlotPoints option so you can see
the "mess." It takes a lot of computation to make
complicated figures that are accurate.
![[Graphics:../Images/LorenzAttractorMod_gr_96.gif]](../Images/LorenzAttractorMod_gr_96.gif)
Caveat. If you want to take these nice pictures home on a disk then you can. However the numerical computations are tremendous and the size on the disk is about 180K. So you cannot draw very many 3D pictures and store them on a floppy disk. We usually suggest that you delete the output by going to the Kernel menu, and use the Delete All Output submenu. All the necessary Mathematica commands can then be saved and you can re-execute (every step) later. To re-execute everything in a Mathematica notebook use the Kernel menu, Evaluation submenu, Evaluate Notebook submenu.
Remark. If you want to use NDSolve and graph the projections. Then the following commands are needed.
![[Graphics:../Images/LorenzAttractorMod_gr_104.gif]](../Images/LorenzAttractorMod_gr_104.gif)
We can plot the projection on the xy-plane.
![[Graphics:../Images/LorenzAttractorMod_gr_107.gif]](../Images/LorenzAttractorMod_gr_107.gif)
We can plot the coordinate function x = x[t].
![[Graphics:../Images/LorenzAttractorMod_gr_110.gif]](../Images/LorenzAttractorMod_gr_110.gif)
(c) John H. Mathews 2004