(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 28742, 838]*) (*NotebookOutlinePosition[ 29441, 862]*) (* CellTagsIndexPosition[ 29397, 858]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Almost Linear Systems", "Title", CellFrame->True, TextAlignment->Center, Background->RGBColor[0, 1, 0]], Cell["\<\ This notebook is by Steven Amgott. Please send any questions or \ comments to samgott1@swarthmore.edu. Feel free to use and distribute this \ notebook, but keep this author information in any copy you use or distribute.\ \ \>", "SmallText"], Cell[TextData[{ "This notebook used the add-on package ", StyleBox["VisualDSolve", FontColor->RGBColor[0, 0, 1]], " to create the plots. ", StyleBox["VisualDSolve", FontColor->RGBColor[0, 0, 1]], " is not part of the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " media set. It is a commercial third-party package available (together \ with an accompanying book) from Telos at" }], "Text"], Cell[TextData[{ " ", StyleBox["http://www.telospub.com/catalog/MATHEMATICA/VisualDSolve.html", FontColor->RGBColor[0, 0, 0.996109]], "." }], "Text", TextAlignment->Center, TextJustification->0], Cell["or by download from Wolfram Research at", "Text"], Cell[TextData[{ StyleBox[" ", TextAlignment->Center, TextJustification->0, FontFamily->"Times New Roman", FontVariations->{"CompatibilityType"->0}], StyleBox["http://store.wolfram.com/view/book/D0706.str.", TextAlignment->Center, TextJustification->0, FontFamily->"Times New Roman", FontColor->RGBColor[0, 0, 0.996109], FontVariations->{"CompatibilityType"->0}] }], "Text", TextAlignment->Center, TextJustification->0], Cell["\<\ Without this package you will not be able to create the plots in \ this notebook.\ \>", "Text"], Cell[TextData[{ "In any input cell containing ", StyleBox["xxx", FontColor->RGBColor[1, 0, 1]], " , you must replace it with your input before evaluating the cell. In \ general, anything in ", StyleBox["magenta", FontColor->RGBColor[1, 0, 1]], " is something you can, and possibly should, change." }], "Text"], Cell["\<\ The following cell is an initialization cell which will be \ automatically evaluated, provided you answer \"Yes\" to the initialization \ prompt. If you do not, you will need to evaluate it manually before \ evaluating any of the cells in this notebook which create the plots.\ \>", \ "Text"], Cell[BoxData[ \(Needs["\"]\)], "Input", InitializationCell->True], Cell[TextData[{ "You can check to see if the package loaded by evaluating the next cell. \ The output should include ", StyleBox["VisualDSolve`", FontColor->RGBColor[1, 0, 0]], ". If it does not, either the package is not on your computer or it did \ not load correctly, and you will be unable to produce the plots." }], "Text"], Cell[BoxData[ \($Packages\)], "Input"], Cell[CellGroupData[{ Cell["What this notebook does", "Section"], Cell["\<\ This notebook plots phase portraits of several almost linear \ systems, and allows us to compare them to the phase portraits of the \ linearized system (by \"zooming-in\").\ \>", "Text"], Cell["\<\ The names of the first 6 sections below refer to the linearized \ system. We will see if the almost linear system has the same type critical \ point at (0,0). You can change the values of the non-linear parts g[x_,y_] \ and h[x_,y_]. It may take a while for each cell to evaluate, especially on a \ slower computer.\ \>", "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Proper Node", "Section"], Cell[TextData[{ "This is the case where there are two distinct real eigenvalues, either \ both positive or both negative. The general solution of the linearized \ system is of the form ", Cell[BoxData[ \(TraditionalForm\`c\_1\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\(\(\[Lambda]\_1\) t\)\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_1\)]], "+ ", Cell[BoxData[ \(TraditionalForm\`c\_2\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\(\(\[Lambda]\_2\) t\)\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_2\)]], ". " }], "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == \(-2\)\ x[t] - y[t] + g[x[t], y[t]], \(y'\)[t] == \(-y[t]\) + h[x[t], y[t]]}, {x[ t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-2\)\ x[t] - y[t], \(y'\)[ t] == \(-y[t]\)}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-2\)\ x[t] - y[t] + g[x[t], y[t]], \(y'\)[ t] == \(-y[t]\) + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .05\ i, .05 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {\(-2\), \(-1\)}, {"0", \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Saddle", "Section"], Cell[TextData[{ "This is the case where there are two distinct real eigenvalues of opposite \ sign. The general solution of the linearized system is of the form ", Cell[BoxData[ \(TraditionalForm\`c\_1\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\(\(\[Lambda]\_1\) t\)\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_1\)]], "+ ", Cell[BoxData[ \(TraditionalForm\`c\_2\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\(\(\[Lambda]\_2\) t\)\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_2\)]], "." }], "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == x[t] + g[x[t], \ y[t]], \(y'\)[t] == x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \ \(-10\), 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t], \(y'\)[t] == x[t] - y[t]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \(-10\), 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + g[x[t], \ y[t]], \(y'\)[t] == x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \(-10\), 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .05\ i, .05 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"1", "0"}, {"1", \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Star (Proper) Node", "Section"], Cell[TextData[{ "This is the case where there is only one real eigenvalue, and the \ eigenspace is two-dimensional. The general solution of the linearized system \ is of the form ", Cell[BoxData[ \(TraditionalForm\`c\_1\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\[Lambda]t\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_1\)]], "+ ", Cell[BoxData[ \(TraditionalForm\`c\_2\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\[Lambda]t\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\_2\)]], "." }], "Text"], Cell["\<\ The almost linear phase portrait. We restrict t to be between -2 \ and 2 to speed the computations, and to avoid some warning messages.\ \>", \ "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == \ x[t] + g[x[t], y[t]], \(y'\)[t] == y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \ \(-2\), 2}, {x, \(-5\), 5}, {\ y, \(-5\), 5}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t], \(y'\)[t] == y[t]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \(-5\), 5}, {x, \(-5\), 5}, {\ y, \(-5\), 5}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \ x[t] + g[x[t], y[t]], \(y'\)[t] == y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, \(-5\), 5}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .05\ i, .05 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"1", "0"}, {"0", "1"} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Improper Node", "Section"], Cell[TextData[{ "This is the case where there are one real eigenvalue, and the eigenspace \ is one-dimensional. The general solution for the linearized system is of the \ form ", Cell[BoxData[ \(TraditionalForm\`c\_1\)]], Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\[Lambda]t\)]], Cell[BoxData[ \(TraditionalForm\`\[Xi]\)]], "+ ", Cell[BoxData[ \(TraditionalForm\`c\_2\)]], " ", Cell[BoxData[ \(TraditionalForm\`\[ExponentialE]\^\[Lambda]t\)]], "(", Cell[BoxData[ \(TraditionalForm\`\[Xi]\)]], " t + \[Eta])." }], "Text"], Cell["\<\ Without trajectories (phase plane). If the eigenvalue is positive, \ the arrows move us away from the origin, and the node is unstable. If \ negative, the arrows move us toward the origin and the node is stable.\ \>", "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == \(-\ x[t]\) + 2\ y[t] + g[x[t], \ y[t]], \(y'\)[t] == \(-y[t]\) + h[x[t], y[t]]}, {x[ t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-x[t]\) + 2 y[t], \(y'\)[ t] == \(-y[t]\)}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-\ x[t]\) + 2\ y[t] + g[x[t], \ y[t]], \(y'\)[t] == \(-y[t]\) + h[x[t], y[t]]}, {x[ t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .05\ i, .05 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {\(-1\), "2"}, {"0", \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Focus or Spiral Node", "Section"], Cell["\<\ Here we have complex eigenvalues whose real parts are not \ zero.\ \>", "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == \(-x[t]\) - 4\ y[t] + g[x[t], \ y[t]], \(y'\)[t] == x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, \ i, j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-x[t]\) - 4\ y[t], \(y'\)[t] == x[t] - y[t]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-3\), 3}, {\ y, \(-3\), 3}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{\ 0, i, j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == \(-x[t]\) - 4\ y[t] + g[x[t], \ y[t]], \(y'\)[ t] == x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .1\ i, .1 j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {\(-1\), \(-4\)}, {"1", \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Center", "Section"], Cell["\<\ This time we have complex eigenvalues whose real parts are \ zero.\ \>", "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(x\ y\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox["0", FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t] + g[x[t], \ y[t]], \(y'\)[t] == \(-5\)\ x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, i, j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t], \(y'\)[t] == \(-5\)\ x[t] - y[t]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-5\), 5}, {\ y, \(-5\), 5}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{\ 0, i, j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t] + g[x[t], \ y[t]], \(y'\)[t] == \(-5\)\ x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{ .1\ i, .1 j}, {i, \(-2\), 2}, {j, \(-2\), 2}], 1]];\)\ \)}], "Input"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"1", "2"}, {\(-5\), \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Same center (linearized), but different non-linear part.", "Section"], Cell["\<\ This time we have complex eigenvalues whose real parts are \ zero.\ \>", "Text"], Cell["The almost linear phase portrait.", "Text"], Cell[BoxData[{\(Clear[x, y, t, g, h]\), "\n", RowBox[{ RowBox[{\(g[x_, y_]\), "=", StyleBox[\(-\((x\^2 + y\^2)\)\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{ RowBox[{\(h[x_, y_]\), "=", StyleBox[\(-\((x\^2 + y\^2)\)\), FontColor->RGBColor[1, 0, 1]]}], ";"}], "\n", RowBox[{\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t] + g[x[t], y[t]], \(y'\)[t] == \(-5\)\ x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .5\ i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\), " "}]}], "Input"], Cell["The linearized phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t], \(y'\)[t] == \(-5\)\ x[t] - y[t]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(-2\), 2}, {\ y, \(-2\), 2}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField \ -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{\ 0, .5 i, .5 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\"Zooming in\" on the non-linear phase portrait.", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t] + g[x[t], y[t]], \(y'\)[t] == \(-5\)\ x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 10}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> Flatten[Table[{0, .05\ i, .05 j}, {i, \(-3\), 3}, {j, \(-3\), 3}], 1]];\)\ \)}], "Input"], Cell["\<\ This is rather messy. Let's see what happens with only one initial \ value.\ \>", "Text"], Cell[BoxData[{ \(Clear[x, y, t]\), "\n", \(\(PhasePlot[{\(x'\)[t] == x[t] + 2\ y[t] + g[x[t], y[t]], \(y'\)[t] == \(-5\)\ x[t] - y[t] + h[x[t], y[t]]}, {x[t], y[t]}, \n\t\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ {t, 0, 50}, {x, \(- .25\), .25}, {\ y, \(- .25\), .25}, \n\t\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ VectorField -> True, FieldLogScale \[Rule] 10, \n\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ InitialValues\ -> {{ .1, .1}}];\)\ \)}], "Input"], Cell["\<\ This is not a single ellipse. It looks like we are spiraling in \ somewhat. We could try increasing the t bound to see if we actually spiral \ in to {0,0}, but we would also need to increase MaxSteps.\ \>", "Text"], Cell[CellGroupData[{ Cell["Eigenvalues and eigenvectors for the linearized system", "Subsection"], Cell[BoxData[{\(Clear[a]\), RowBox[{ RowBox[{"a", "=", RowBox[{"(", GridBox[{ {"1", "2"}, {\(-5\), \(-1\)} }], ")"}]}], ";"}]}], "Input"], Cell[BoxData[{ \(Clear[\[Lambda], v]\), \(\[Lambda] = Eigenvalues[a]\), \(v = Eigenvectors[a]\)}], "Input"] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 722}}, AutoGeneratedPackage->None, WindowToolbars->"EditBar", WindowSize->{617, 647}, WindowMargins->{{10, Automatic}, {Automatic, 0}} ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 115, 3, 131, "Title"], Cell[1845, 57, 252, 5, 44, "SmallText"], Cell[2100, 64, 430, 12, 71, "Text"], Cell[2533, 78, 207, 7, 33, "Text"], Cell[2743, 87, 55, 0, 33, "Text"], Cell[2801, 89, 462, 14, 33, "Text"], Cell[3266, 105, 105, 3, 33, "Text"], Cell[3374, 110, 328, 9, 52, "Text"], Cell[3705, 121, 303, 6, 71, "Text"], Cell[4011, 129, 87, 2, 30, "Input", InitializationCell->True], Cell[4101, 133, 340, 7, 71, "Text"], Cell[4444, 142, 42, 1, 30, "Input"], Cell[CellGroupData[{ Cell[4511, 147, 42, 0, 59, "Section"], Cell[4556, 149, 196, 4, 52, "Text"], Cell[4755, 155, 342, 6, 71, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[5134, 166, 30, 0, 39, "Section"], Cell[5167, 168, 601, 18, 52, "Text"], Cell[5771, 188, 49, 0, 33, "Text"], Cell[5823, 190, 913, 19, 190, "Input"], Cell[6739, 211, 46, 0, 33, "Text"], Cell[6788, 213, 581, 11, 130, "Input"], Cell[7372, 226, 64, 0, 33, "Text"], Cell[7439, 228, 640, 12, 150, "Input"], Cell[CellGroupData[{ Cell[8104, 244, 76, 0, 47, "Subsection"], Cell[8183, 246, 202, 6, 62, "Input"], Cell[8388, 254, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[8558, 263, 25, 0, 39, "Section"], Cell[8586, 265, 576, 17, 52, "Text"], Cell[9165, 284, 49, 0, 33, "Text"], Cell[9217, 286, 893, 19, 190, "Input"], Cell[10113, 307, 46, 0, 33, "Text"], Cell[10162, 309, 559, 10, 130, "Input"], Cell[10724, 321, 64, 0, 33, "Text"], Cell[10791, 323, 633, 12, 150, "Input"], Cell[CellGroupData[{ Cell[11449, 339, 76, 0, 47, "Subsection"], Cell[11528, 341, 196, 6, 62, "Input"], Cell[11727, 349, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[11897, 358, 37, 0, 39, "Section"], Cell[11937, 360, 570, 18, 52, "Text"], Cell[12510, 380, 162, 4, 52, "Text"], Cell[12675, 386, 884, 19, 190, "Input"], Cell[13562, 407, 46, 0, 33, "Text"], Cell[13611, 409, 550, 10, 130, "Input"], Cell[14164, 421, 64, 0, 33, "Text"], Cell[14231, 423, 624, 12, 150, "Input"], Cell[CellGroupData[{ Cell[14880, 439, 76, 0, 47, "Subsection"], Cell[14959, 441, 193, 6, 62, "Input"], Cell[15155, 449, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[15325, 458, 32, 0, 39, "Section"], Cell[15360, 460, 587, 20, 52, "Text"], Cell[15950, 482, 240, 5, 52, "Text"], Cell[16193, 489, 49, 0, 33, "Text"], Cell[16245, 491, 917, 19, 190, "Input"], Cell[17165, 512, 46, 0, 33, "Text"], Cell[17214, 514, 581, 11, 130, "Input"], Cell[17798, 527, 64, 0, 33, "Text"], Cell[17865, 529, 646, 12, 150, "Input"], Cell[CellGroupData[{ Cell[18536, 545, 76, 0, 47, "Subsection"], Cell[18615, 547, 199, 6, 62, "Input"], Cell[18817, 555, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[18987, 564, 39, 0, 39, "Section"], Cell[19029, 566, 89, 3, 33, "Text"], Cell[19121, 571, 49, 0, 33, "Text"], Cell[19173, 573, 918, 20, 190, "Input"], Cell[20094, 595, 46, 0, 33, "Text"], Cell[20143, 597, 573, 11, 130, "Input"], Cell[20719, 610, 64, 0, 33, "Text"], Cell[20786, 612, 638, 12, 150, "Input"], Cell[CellGroupData[{ Cell[21449, 628, 76, 0, 47, "Subsection"], Cell[21528, 630, 202, 6, 62, "Input"], Cell[21733, 638, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[21903, 647, 25, 0, 39, "Section"], Cell[21931, 649, 90, 3, 33, "Text"], Cell[22024, 654, 49, 0, 33, "Text"], Cell[22076, 656, 911, 20, 190, "Input"], Cell[22990, 678, 46, 0, 33, "Text"], Cell[23039, 680, 576, 11, 130, "Input"], Cell[23618, 693, 64, 0, 33, "Text"], Cell[23685, 695, 651, 13, 150, "Input"], Cell[CellGroupData[{ Cell[24361, 712, 76, 0, 47, "Subsection"], Cell[24440, 714, 199, 6, 62, "Input"], Cell[24642, 722, 121, 3, 70, "Input"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[24812, 731, 75, 0, 39, "Section"], Cell[24890, 733, 90, 3, 33, "Text"], Cell[24983, 738, 49, 0, 33, "Text"], Cell[25035, 740, 964, 20, 192, "Input"], Cell[26002, 762, 46, 0, 33, "Text"], Cell[26051, 764, 590, 11, 130, "Input"], Cell[26644, 777, 64, 0, 33, "Text"], Cell[26711, 779, 658, 13, 150, "Input"], Cell[27372, 794, 100, 3, 33, "Text"], Cell[27475, 799, 570, 11, 130, "Input"], Cell[28048, 812, 227, 4, 52, "Text"], Cell[CellGroupData[{ Cell[28300, 820, 76, 0, 47, "Subsection"], Cell[28379, 822, 199, 6, 62, "Input"], Cell[28581, 830, 121, 3, 70, "Input"] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)