(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 74562, 2150] NotebookOptionsPosition[ 71288, 2038] NotebookOutlinePosition[ 71695, 2056] CellTagsIndexPosition[ 71652, 2053] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Phase Portraits of Nonlinear Differential Equations", "Title", CellChangeTimes->{{3.6551777980357103`*^9, 3.655177842535219*^9}}], Cell[CellGroupData[{ Cell[TextData[StyleBox["Nonlinear Differential Equations:", FontColor->GrayLevel[0]]], "Section", CellChangeTimes->{{3.622973133683782*^9, 3.622973152291214*^9}, { 3.6550907148775053`*^9, 3.6550907364464083`*^9}}], Cell[TextData[{ "Consider the system ", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"x", "'"}], "=", " ", RowBox[{"f", "(", RowBox[{"x", ",", "y"}], ")"}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"y", "'"}], "=", " ", RowBox[{"g", "(", RowBox[{"x", ",", "y"}], ")"}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]]], " where f and g are functions of two variables x and y. " }], "Subsection", CellChangeTimes->{{3.6227922426259937`*^9, 3.62279231309624*^9}, { 3.6227927369105253`*^9, 3.622792744486435*^9}, {3.622805954711268*^9, 3.6228060525702353`*^9}, {3.622815694267383*^9, 3.6228156945063753`*^9}, { 3.622973160147009*^9, 3.622973167010988*^9}, {3.622973244164934*^9, 3.6229732511893044`*^9}, {3.6550907440986423`*^9, 3.655090840713463*^9}, { 3.655090876806201*^9, 3.655090892386242*^9}, {3.655090928173422*^9, 3.6550909555006523`*^9}, {3.655091007363132*^9, 3.655091054753298*^9}, 3.655541295913926*^9}], Cell[TextData[StyleBox["The critical points (equlibrium points, steady state \ solutions) are found by setting x' = y' = 0, \nand solving the resulting \ system f(x, y) = 0 and g(x, y) = 0. ", FontColor->GrayLevel[0]]], "Subsection", CellChangeTimes->{{3.655525453026067*^9, 3.655525536688652*^9}, 3.6555256703051*^9, 3.6555413017870197`*^9}], Cell["\<\ We approximate the nonlinear system by a linear system near the equilibirum \ points. Suppose that (a, b) is an equilibrium point, that is f(a, b) = g(a, b) = 0. \ The linearized system is:\ \>", "Subsection", CellChangeTimes->{{3.655098916287817*^9, 3.655098954285157*^9}, { 3.6550992601285563`*^9, 3.655099270260988*^9}, {3.655099309498228*^9, 3.655099317123205*^9}, {3.655525616464118*^9, 3.655525630077154*^9}, 3.655541332230514*^9}], Cell[TextData[{ Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"x", "'"}], "=", " ", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"f", "(", RowBox[{"a", ",", "b"}], ")"}]}], "x"}], " ", "+", " ", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"f", "(", RowBox[{"a", ",", "b"}], ")"}]}], "y"}]}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"y", "'"}], "=", RowBox[{ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"g", "(", RowBox[{"a", ",", "b"}], ")"}]}], "x"}], " ", "+", " ", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"g", "(", RowBox[{"a", ",", "b"}], ")"}]}], "y", " "}]}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]], FontColor->GrayLevel[0]], " whose coefficient matrix is the Jacobian matrix", Cell[BoxData[ RowBox[{" ", StyleBox[ RowBox[{ SubscriptBox["J", RowBox[{"(", RowBox[{"a", ",", "b"}], ")"}]], "=", RowBox[{"(", "\[NoBreak]", GridBox[{ { FormBox[ FormBox[ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"f", "(", RowBox[{"a", ",", "b"}], ")"}]}], TraditionalForm], TraditionalForm], FormBox[ RowBox[{" ", RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"f", "(", RowBox[{"a", ",", "b"}], ")"}]}]}], TraditionalForm]}, { FormBox[ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"g", "(", RowBox[{"a", ",", "b"}], ")"}]}], TraditionalForm], FormBox[ RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"g", "(", RowBox[{"a", ",", "b"}], ")"}]}], TraditionalForm]} }, GridBoxDividers->{ "Columns" -> {False, {True}, False}, "ColumnsIndexed" -> {}, "Rows" -> {{False}}, "RowsIndexed" -> {}}], ")"}]}], FontColor->GrayLevel[0]]}]], FontWeight->"Bold"], StyleBox[" .", FontWeight->"Bold"] }], "Subsection", CellChangeTimes->{{3.655099367558625*^9, 3.655099723802659*^9}, 3.655099761582212*^9, 3.655099939536467*^9, {3.655525606845304*^9, 3.655525611724815*^9}, {3.655525648231148*^9, 3.655525661820908*^9}, 3.655541340836543*^9}], Cell[TextData[StyleBox["We can use the eigenvalues of the matrix Jacobian \ matrix to decide the type and stability of the critical point (a,b) (sink, \ source, saddle, etc.). ", FontColor->GrayLevel[0]]], "Subsection", CellChangeTimes->{{3.655098916287817*^9, 3.655098954285157*^9}, { 3.6550992601285563`*^9, 3.655099270260988*^9}, {3.655099309498228*^9, 3.655099317123205*^9}, {3.655100038954228*^9, 3.655100146004983*^9}, { 3.655106518651154*^9, 3.655106549697339*^9}, {3.655541362721982*^9, 3.655541393099642*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Jacobian Matrix", "Section", CellChangeTimes->{{3.655525783884139*^9, 3.655525801549348*^9}}], Cell[CellGroupData[{ Cell["\<\ The following code from last class helps compute the Jacobian matrix of a \ function f of two variables x and y:\ \>", "Subsection", CellChangeTimes->{{3.655087818690167*^9, 3.6550878857838182`*^9}, { 3.655105454899314*^9, 3.655105475052891*^9}, {3.6555414341130257`*^9, 3.655541443070779*^9}, {3.656156475992754*^9, 3.656156479068927*^9}, { 3.6561566250797997`*^9, 3.65615666412746*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"f", ",", "J", ",", "x", ",", "y"}], "]"}], "\[IndentingNewLine]", RowBox[{"(*", " ", "Jacobian", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"J", "[", "f_", "]"}], ":=", "\[IndentingNewLine]", RowBox[{"Module", "[", RowBox[{ RowBox[{"{", RowBox[{"A", "=", RowBox[{"Table", "[", RowBox[{"0", ",", "2", ",", "2"}], "]"}]}], "}"}], ",", "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"1", ",", "1"}], "]"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", "x", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"1", ",", "2"}], "]"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", "y", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"2", ",", "1"}], "]"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"{", "x", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{ RowBox[{"A", "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}], "=", RowBox[{"D", "[", RowBox[{ RowBox[{ RowBox[{"f", "[", RowBox[{"x", ",", "y"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}], ",", RowBox[{"{", "y", "}"}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", "A", "]"}]}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"(*", " ", "Example", " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", " ", RowBox[{"{", RowBox[{ RowBox[{"x", RowBox[{"(", RowBox[{"1", "-", "y"}], ")"}]}], ",", " ", RowBox[{"y", RowBox[{"(", RowBox[{"x", "-", "1"}], ")"}]}]}], "}"}]}], "\[IndentingNewLine]", RowBox[{"J", "[", "f", "]"}]}], "Input", CellChangeTimes->{{3.655087912388377*^9, 3.6550880280346317`*^9}, { 3.65508807522073*^9, 3.6550880948034363`*^9}, {3.655088143861784*^9, 3.655088316593759*^9}, {3.655088352278129*^9, 3.655088500144615*^9}, { 3.655088799529388*^9, 3.655088810349916*^9}, {3.655088971895095*^9, 3.6550889970348454`*^9}, {3.655089052477755*^9, 3.655089080034995*^9}, { 3.65509029294143*^9, 3.655090296204915*^9}, {3.655090368388937*^9, 3.655090376711759*^9}, {3.6555258416141043`*^9, 3.655525860342813*^9}, { 3.6555357477558327`*^9, 3.655535757320565*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Example 2: ", "Section", CellChangeTimes->{{3.655107591410782*^9, 3.6551076186894207`*^9}, { 3.655116975122902*^9, 3.6551169796080027`*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Consider the system ", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"x", "'"}], "=", " ", RowBox[{"y", "-", RowBox[{"x", "(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"y", "'"}], "=", " ", RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", "(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]]], ". Study the nature of the critical point (x,y)=(0,0)." }], "Subsection", CellChangeTimes->{{3.6227922426259937`*^9, 3.62279231309624*^9}, { 3.6227927369105253`*^9, 3.622792744486435*^9}, {3.622805954711268*^9, 3.6228060525702353`*^9}, {3.622815694267383*^9, 3.6228156945063753`*^9}, { 3.622973160147009*^9, 3.622973167010988*^9}, {3.622973244164934*^9, 3.6229732511893044`*^9}, {3.655087026014307*^9, 3.655087111864697*^9}, { 3.655107659238628*^9, 3.655107723111965*^9}, {3.655108195181444*^9, 3.655108202311469*^9}, {3.6551099311108027`*^9, 3.655109946814225*^9}, { 3.655111095221326*^9, 3.655111096071643*^9}, {3.6555269149360533`*^9, 3.6555269158080187`*^9}, {3.655535963588684*^9, 3.6555359642932158`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", "h", "]"}], "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Define", " ", "the", " ", "function", " ", "h"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}]}], "}"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Find", " ", "the", " ", "critical", " ", "points", " ", "of", " ", "the", " ", "system"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol", " ", "=", " ", RowBox[{"Solve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", "sol"}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", RowBox[{"Find", " ", "the", " ", "Jacobian", " ", "matrix"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"MatrixForm", "[", RowBox[{"J", "[", "h", "]"}], "]"}]}], "]"}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{ "Evaluate", " ", "the", " ", "Jacobian", " ", "matrix", " ", "at", " ", "the", " ", "only", " ", "critical", " ", "point", " ", RowBox[{"(", RowBox[{"0", ",", "0"}], ")"}]}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"A", " ", "=", " ", RowBox[{ RowBox[{"J", "[", "h", "]"}], " ", "/.", " ", RowBox[{"Flatten", "[", "sol", "]"}]}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"MatrixForm", "[", "A", "]"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{"\"\\"", ",", " ", RowBox[{"Eigenvalues", "[", "A", "]"}]}], "]"}]}], "Input", CellChangeTimes->{{3.655106880628469*^9, 3.655106908952333*^9}, { 3.655106942805922*^9, 3.655107049862499*^9}, {3.6551071063308887`*^9, 3.65510715103959*^9}, {3.6551071823390007`*^9, 3.655107186941004*^9}, { 3.655107277207344*^9, 3.6551073497031307`*^9}, {3.655107751296221*^9, 3.65510775866566*^9}, {3.6551082062096033`*^9, 3.655108206655945*^9}, { 3.65510835850875*^9, 3.655108360435388*^9}, {3.655108757553741*^9, 3.655108790755447*^9}, {3.655109008732006*^9, 3.655109027087511*^9}, 3.6551091925534983`*^9, {3.655109958491024*^9, 3.655110012793545*^9}, { 3.65511017604873*^9, 3.655110201763318*^9}, {3.655111116679769*^9, 3.655111146605199*^9}, {3.655525999829084*^9, 3.6555261280695553`*^9}, { 3.6555263532706013`*^9, 3.655526576921339*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[CellGroupData[{ Cell["\<\ The only critical point for the nonlinear system is (0, 0). The eigenvalues \ of the Jacobian matrix at (0, 0) are i and - i (complex conjugate with Real \ part equal to 0), so the origin is a center for the linearized system. Let\ \[CloseCurlyQuote]s see if (0,0) is a center for the nonlinear system as well.\ \>", "Subsubsection", CellChangeTimes->{{3.655526156405455*^9, 3.6555263109319267`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Phase", " ", "Portrait", " ", "for", " ", "the", " ", "linear", " ", "system"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"StreamPlot", "[", RowBox[{ RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "x"}]}], " ", "}"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", " ", "2"}], "}"}], ",", " ", RowBox[{"StreamPoints", "\[Rule]", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", "Red"}], "}"}], ",", "Automatic"}], "}"}], "}"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.655107368626154*^9, 3.6551073732598143`*^9}, { 3.655107414106275*^9, 3.655107495549172*^9}, {3.655108219431294*^9, 3.65510823893052*^9}, {3.6551083421480494`*^9, 3.655108348909876*^9}, 3.655108805174324*^9, {3.655108910050715*^9, 3.655108960786852*^9}, { 3.65510912225454*^9, 3.655109173126273*^9}, {3.655109382611846*^9, 3.65510944317642*^9}, {3.6551095135019293`*^9, 3.6551095611989*^9}, { 3.655109600828974*^9, 3.655109625889028*^9}, {3.655110215848407*^9, 3.6551102464794197`*^9}, {3.6551102866003637`*^9, 3.655110288977004*^9}, { 3.6551110461224947`*^9, 3.655111048811097*^9}, {3.6555265991468487`*^9, 3.6555266128747683`*^9}, {3.655535891201149*^9, 3.6555359266188517`*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Phase", " ", "Portrait", " ", "for", " ", "the", " ", "nonlinear", " ", "system"}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{"StreamPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}]}], " ", "}"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", " ", "2"}], "}"}], ",", " ", RowBox[{"StreamPoints", "\[Rule]", RowBox[{"{", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "0"}], "}"}], ",", "Red"}], "}"}], ",", "Automatic"}], "}"}], "}"}]}]}], "]"}]}]], "Input", CellChangeTimes->{{3.655107368626154*^9, 3.6551073732598143`*^9}, { 3.655107414106275*^9, 3.655107495549172*^9}, {3.655108219431294*^9, 3.65510823893052*^9}, {3.6551083421480494`*^9, 3.655108348909876*^9}, 3.655108805174324*^9, {3.655108910050715*^9, 3.655108960786852*^9}, { 3.65510912225454*^9, 3.655109173126273*^9}, {3.655109382611846*^9, 3.65510944317642*^9}, {3.6551095135019293`*^9, 3.6551095611989*^9}, { 3.655109600828974*^9, 3.655109625889028*^9}, {3.655110215848407*^9, 3.6551102464794197`*^9}, {3.6551102866003637`*^9, 3.655110288977004*^9}, { 3.6551110461224947`*^9, 3.655111048811097*^9}, {3.6555265991468487`*^9, 3.6555266128747683`*^9}, {3.655535891201149*^9, 3.655535897011866*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ "Find", " ", "the", " ", "trajectory", " ", "that", " ", "passes", " ", "through", " ", "the", " ", "point", " ", RowBox[{"(", RowBox[{"1", ",", "0"}], ")"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol", "=", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "==", RowBox[{ RowBox[{"y", "[", "t", "]"}], "-", RowBox[{ RowBox[{"x", "[", "t", "]"}], RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], "^", "2"}], "+", RowBox[{ RowBox[{"y", "[", "t", "]"}], "^", "2"}]}], ")"}]}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "==", RowBox[{ RowBox[{"-", RowBox[{"x", "[", "t", "]"}]}], "-", RowBox[{ RowBox[{"y", "[", "t", "]"}], RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], "^", "2"}], "+", RowBox[{ RowBox[{"y", "[", "t", "]"}], "^", "2"}]}], ")"}]}]}]}], ",", " ", RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "1000"}], "}"}]}], "]"}]}], "\[IndentingNewLine]", RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}]}], "}"}], " ", "/.", " ", RowBox[{"Flatten", "[", "sol", "]"}]}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "100"}], "}"}], ",", " ", RowBox[{"PlotPoints", "\[Rule]", "100"}]}], "]"}]}]}]], "Input", CellChangeTimes->{{3.65511046372143*^9, 3.655110715886113*^9}, { 3.6551108599777822`*^9, 3.655110985923932*^9}, {3.655526658130445*^9, 3.655526702798514*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{"Poincare", "-", RowBox[{"Bendixon", " ", "criterion"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x"], RowBox[{"(", RowBox[{"y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], ")"}]}], "+", RowBox[{ SubscriptBox["\[PartialD]", "y"], RowBox[{"(", RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], ")"}]}]}]}]], "Input", CellChangeTimes->{{3.65511981039112*^9, 3.655119860675623*^9}, { 3.655526757467052*^9, 3.655526769726932*^9}, {3.655526813529108*^9, 3.655526822407707*^9}, {3.656156500324524*^9, 3.656156501403256*^9}}, FontSize->16, Background->RGBColor[1, 1, 0.85]] }, Open ]], Cell[TextData[{ StyleBox["Conclusions :", FontColor->GrayLevel[0]], " The linearized system has a center at the origin. The nonlinear system \ does not have a center! The origin is a spiral sink. " }], "Subsubsection", CellChangeTimes->{{3.6555358449466057`*^9, 3.6555358522065372`*^9}, { 3.655535997301132*^9, 3.655536003167778*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Example 3", "Section", CellChangeTimes->{{3.655116988852996*^9, 3.655116998228951*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Consider the system ", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"x", "'"}], "=", " ", RowBox[{"x", "+", "y", "-", RowBox[{"x", "(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"y", "'"}], "=", " ", RowBox[{ RowBox[{"-", "x"}], "+", "y", "-", RowBox[{"y", "(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]]], ". Find all critical points and study their nature." }], "Subsection", CellChangeTimes->{{3.6227922426259937`*^9, 3.62279231309624*^9}, { 3.6227927369105253`*^9, 3.622792744486435*^9}, {3.622805954711268*^9, 3.6228060525702353`*^9}, {3.622815694267383*^9, 3.6228156945063753`*^9}, { 3.622973160147009*^9, 3.622973167010988*^9}, {3.622973244164934*^9, 3.6229732511893044`*^9}, {3.655087026014307*^9, 3.655087111864697*^9}, { 3.655107659238628*^9, 3.655107723111965*^9}, {3.655108195181444*^9, 3.655108202311469*^9}, {3.6551099311108027`*^9, 3.655109946814225*^9}, { 3.655111095221326*^9, 3.655111096071643*^9}, {3.655117048993289*^9, 3.655117094127315*^9}}], Cell[BoxData[{ RowBox[{"Clear", "[", "h", "]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"h", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{"{", RowBox[{ RowBox[{"x", "+", "y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{"-", "x"}], "+", "y", "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}]}], "}"}]}], "\[IndentingNewLine]", "\[IndentingNewLine]", RowBox[{"(*", " ", RowBox[{"Find", " ", "the", " ", "critical", " ", "points"}], " ", "*)"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"NSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"y", "-", RowBox[{"x", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"-", "x"}], "-", RowBox[{"y", RowBox[{"(", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}], ")"}]}]}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}], "\[IndentingNewLine]"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"MatrixForm", "[", RowBox[{"J", "[", "h", "]"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"Eigenvalues", "[", RowBox[{ RowBox[{"J", "[", "h", "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "0"}], ",", " ", RowBox[{"y", "\[Rule]", "0"}]}], "}"}]}], "]"}], "\[IndentingNewLine]", RowBox[{"StreamPlot", "[", RowBox[{ RowBox[{"h", "[", RowBox[{"x", ",", "y"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "2"}], ",", " ", "2"}], "}"}]}], "]"}]}], "Input", CellChangeTimes->{{3.655106880628469*^9, 3.655106908952333*^9}, { 3.655106942805922*^9, 3.655107049862499*^9}, {3.6551071063308887`*^9, 3.65510715103959*^9}, {3.6551071823390007`*^9, 3.655107186941004*^9}, { 3.655107277207344*^9, 3.6551073497031307`*^9}, {3.655107751296221*^9, 3.65510775866566*^9}, {3.6551082062096033`*^9, 3.655108206655945*^9}, { 3.65510835850875*^9, 3.655108360435388*^9}, {3.655108757553741*^9, 3.655108790755447*^9}, {3.655109008732006*^9, 3.655109027087511*^9}, 3.6551091925534983`*^9, {3.655109958491024*^9, 3.655110012793545*^9}, { 3.65511017604873*^9, 3.655110201763318*^9}, {3.655111116679769*^9, 3.655111146605199*^9}, {3.65511712422307*^9, 3.6551171354778976`*^9}, { 3.655117191889144*^9, 3.655117215442329*^9}, {3.65554147743976*^9, 3.6555415336357737`*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[TextData[{ StyleBox["Conclusions :", FontColor->GrayLevel[0]], " The origin is an spiral source (unstable spiral point) for both the linear \ system and the nonlinear system. One may therefore think that all \ trajectories different from 0 should spiral out to infinity. This is clearly \ not the case, as far away from the origin, the arrows are pointing inward. \ Moreover, there is a closed trajectory (a circle) and all trajectories \ different from (0,0) spiral towards this circle (limit cycle). You can find \ the equation of this limit cycle by switching to polar coordinates x=rcos\ \[Theta], y=rsin\[Theta].\n" }], "Subsubsection", CellChangeTimes->{{3.6551173541040583`*^9, 3.6551175009672194`*^9}, { 3.6551176418796*^9, 3.65511764716705*^9}, {3.655117687877677*^9, 3.655117750802536*^9}, {3.655118373170957*^9, 3.655118374009554*^9}, { 3.655118406807019*^9, 3.65511841080414*^9}, {3.6551193180125227`*^9, 3.655119409018342*^9}, {3.655527038835891*^9, 3.655527040155295*^9}}, TextJustification->1.] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Polar Coordinates", "Section", CellChangeTimes->{{3.655533240381318*^9, 3.6555332534619503`*^9}}], Cell[CellGroupData[{ Cell["i. We do the coordinate change:", "Subsubsection", CellChangeTimes->{{3.6555349278609753`*^9, 3.65553494563328*^9}, { 3.655535559010468*^9, 3.655535560466721*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"x", " ", "=", " ", RowBox[{"r", " ", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], " ", ",", " ", RowBox[{"y", " ", "=", " ", RowBox[{"r", " ", RowBox[{"Sin", " ", "[", "\[Theta]", "]"}]}]}], " ", ",", " ", RowBox[{"0", "\[LessEqual]", " ", "r", " ", "<", " ", "\[Infinity]"}], ",", " ", RowBox[{"0", "\[LessEqual]", " ", "\[Theta]", " ", "<", " ", RowBox[{"2", "\[Pi]"}]}]}]], "Input", CellChangeTimes->{{3.655533258228694*^9, 3.65553336202842*^9}}], Cell["where r and \[Theta] are functions of time t.", "Text", CellChangeTimes->{{3.655534950534655*^9, 3.655535047160955*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["\<\ ii. We need to compute x' and y' as functions of r, \[Theta], r\ \[CloseCurlyQuote], \[Theta]\[CloseCurlyQuote]\ \>", "Subsubsection", CellChangeTimes->{{3.655533385440288*^9, 3.65553340213967*^9}, { 3.6555346614644003`*^9, 3.6555346981321573`*^9}, {3.655535563275959*^9, 3.655535564636519*^9}}], Cell[TextData[{ "a) We can do it by hand, using the Chain Rule. We get ", StyleBox["x\[CloseCurlyQuote] = r\[CloseCurlyQuote]Cos[\[Theta]] - r Sin[\ \[Theta]]\[Theta]\[CloseCurlyQuote] ", FontWeight->"Bold"], " and ", StyleBox["y\[CloseCurlyQuote] = r\[CloseCurlyQuote]Sin[\[Theta]] + r Cos[\ \[Theta]]\[Theta]\[CloseCurlyQuote]\n", FontWeight->"Bold"], "b) We use transformations rules in ", StyleBox["Mathematica", FontSlant->"Italic"], " to do the change of variables:" }], "Text", CellChangeTimes->{{3.65553476060994*^9, 3.655534912753528*^9}, { 3.6555350590283527`*^9, 3.6555351860355253`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], " ", "/.", " ", RowBox[{"x", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"r", "[", "#", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Theta]", "[", "#", "]"}], "]"}]}], "&"}], ")"}]}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], " ", "/.", " ", RowBox[{"y", " ", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"r", "[", "#", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Theta]", "[", "#", "]"}], "]"}]}], "&"}], ")"}]}]}]}], "Input", CellChangeTimes->{{3.65553523355733*^9, 3.655535248277375*^9}, { 3.655535307654399*^9, 3.65553531400168*^9}}, FontSize->16, Background->RGBColor[1, 1, 0.85]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Cos", "[", RowBox[{"\[Theta]", "[", "t", "]"}], "]"}], " ", RowBox[{ SuperscriptBox["r", "\[Prime]", MultilineFunction->None], "[", "t", "]"}]}], "-", RowBox[{ RowBox[{"r", "[", "t", "]"}], " ", RowBox[{"Sin", "[", RowBox[{"\[Theta]", "[", "t", "]"}], "]"}], " ", RowBox[{ SuperscriptBox["\[Theta]", "\[Prime]", MultilineFunction->None], "[", "t", "]"}]}]}]], "Output", CellChangeTimes->{3.655535251756874*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Sin", "[", RowBox[{"\[Theta]", "[", "t", "]"}], "]"}], " ", RowBox[{ SuperscriptBox["r", "\[Prime]", MultilineFunction->None], "[", "t", "]"}]}], "+", RowBox[{ RowBox[{"Cos", "[", RowBox[{"\[Theta]", "[", "t", "]"}], "]"}], " ", RowBox[{"r", "[", "t", "]"}], " ", RowBox[{ SuperscriptBox["\[Theta]", "\[Prime]", MultilineFunction->None], "[", "t", "]"}]}]}]], "Output", CellChangeTimes->{3.6555352517594347`*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Changing the system from Example 3 to polar coordinates", "Section", CellChangeTimes->{{3.655535487747897*^9, 3.6555355071537447`*^9}, { 3.655535567230349*^9, 3.655535568710731*^9}, {3.655542638829811*^9, 3.655542672747182*^9}}], Cell[TextData[{ "We know that ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], "=", SuperscriptBox["r", "2"]}], TraditionalForm]], FormatType->"TraditionalForm"], " , so can use the symmetries of the system ", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"x", "'"}], "=", " ", RowBox[{"x", "+", "y", "-", RowBox[{"x", " ", RowBox[{"(", FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm]}]}]}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"y", "'"}], "=", " ", RowBox[{ RowBox[{"-", "x"}], "+", "y", "-", RowBox[{"y", " ", RowBox[{"(", FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm]}]}]}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]], FontSize->16], " to create more terms of the form ", Cell[BoxData[ FormBox[ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], TraditionalForm]]], " that can be easily \[OpenCurlyDoubleQuote]translated\ \[CloseCurlyDoubleQuote] into ", Cell[BoxData[ FormBox[ SuperscriptBox["r", "2"], TraditionalForm]]], ". Therefore, we can look at the following system:\n", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{ RowBox[{"xx", "'"}], "+", RowBox[{"yy", "'"}]}], " ", "=", " ", RowBox[{"x", "(", RowBox[{"x", "+", "y", "-", RowBox[{"x", "(", FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm], ")"}], "+", RowBox[{"y", "(", RowBox[{ RowBox[{ RowBox[{"-", "x"}], "+", "y", "-", RowBox[{"y", "(", FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm], ")"}]}], "=", RowBox[{ FormBox[ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], TraditionalForm], "-", RowBox[{"(", RowBox[{ RowBox[{ FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm], FormBox[ RowBox[{"(", FormBox[ RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm]}], TraditionalForm]}], "=", RowBox[{ FormBox[ SuperscriptBox["r", "2"], TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}]}]}]}]}]}]}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{ RowBox[{"yx", "'"}], "-", RowBox[{"xy", "'"}]}], "=", " ", RowBox[{ RowBox[{ RowBox[{"y", "(", RowBox[{"x", "+", "y", "-", RowBox[{"x", "(", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}]}], ")"}], "-", RowBox[{"x", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "x"}], "+", "y", "-", RowBox[{"y", FormBox[ RowBox[{"(", RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], ")"}], TraditionalForm]}]}], ")"}]}]}], "=", RowBox[{ FormBox[ RowBox[{ SuperscriptBox["x", "2"], "+", SuperscriptBox["y", "2"]}], TraditionalForm], " ", "=", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}]}]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]], FontSize->16] }], "Text", CellChangeTimes->{{3.6555353717445793`*^9, 3.655535476425376*^9}, { 3.655535581029578*^9, 3.655535647883546*^9}, {3.655535689986052*^9, 3.655535700406891*^9}, {3.6555360778675737`*^9, 3.655536424839089*^9}, { 3.65553650211441*^9, 3.655536614386402*^9}, {3.655536989348228*^9, 3.655537013755888*^9}, {3.6555370439916143`*^9, 3.655537094909477*^9}, { 3.655537144435792*^9, 3.655537306356873*^9}}], Cell["\<\ Let' s see how the left hand sides xx\[CloseCurlyQuote] + \ yy\[CloseCurlyQuote] and yx\[CloseCurlyQuote] - xy\[CloseCurlyQuote] look \ like in polar coordinates:\ \>", "Text", CellChangeTimes->{{3.6555366842531853`*^9, 3.6555367464990683`*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"rule", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"r", "[", "#", "]"}], RowBox[{"Cos", "[", RowBox[{"\[Theta]", "[", "#", "]"}], "]"}]}], "&"}], ")"}]}], ",", " ", RowBox[{"y", "->", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"r", "[", "#", "]"}], RowBox[{"Sin", "[", RowBox[{"\[Theta]", "[", "#", "]"}], "]"}]}], "&"}], ")"}]}]}], " ", "}"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], " ", RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}]}], "+", " ", RowBox[{ RowBox[{"y", "[", "t", "]"}], " ", RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}]}]}], " ", "/.", " ", "rule"}], "]"}], "\[IndentingNewLine]", RowBox[{"Simplify", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"y", "[", "t", "]"}], " ", RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}]}], " ", "-", " ", RowBox[{ RowBox[{"x", "[", "t", "]"}], " ", RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}]}]}], " ", "/.", " ", "rule"}], "]"}]}], "Input", CellChangeTimes->{{3.655536840473791*^9, 3.655536916069742*^9}, { 3.655537563546381*^9, 3.6555376928130302`*^9}, {3.655537724028863*^9, 3.655537724562592*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[TextData[{ "In polar coordinates, the system becomes:\n\n", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"r", " ", RowBox[{"r", "'"}]}], "=", RowBox[{ FormBox[ SuperscriptBox["r", "2"], TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{ RowBox[{"-", SuperscriptBox["r", "2"]}], RowBox[{"\[Theta]", "'"}]}], "=", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]], FontSize->16], " which can be simplified to ", Cell[BoxData[ FormBox[ TagBox[GridBox[{ {"\[Piecewise]", GridBox[{ { RowBox[{ RowBox[{"r", "'"}], "=", RowBox[{ FormBox["r", TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}], RowBox[{"(", "1", ")"}]}, { RowBox[{ RowBox[{"\[Theta]", "'"}], "=", FormBox[ RowBox[{"-", "1"}], TraditionalForm]}], RowBox[{"(", "2", ")"}]} }, AllowedDimensions->{2, Automatic}, Editable->True, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.84]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}, Selectable->True]} }, GridBoxAlignment->{ "Columns" -> {{Left}}, "ColumnsIndexed" -> {}, "Rows" -> {{Baseline}}, "RowsIndexed" -> {}}, GridBoxItemSize->{ "Columns" -> {{Automatic}}, "ColumnsIndexed" -> {}, "Rows" -> {{1.}}, "RowsIndexed" -> {}}, GridBoxSpacings->{"Columns" -> { Offset[0.27999999999999997`], { Offset[0.35]}, Offset[0.27999999999999997`]}, "ColumnsIndexed" -> {}, "Rows" -> { Offset[0.2], { Offset[0.4]}, Offset[0.2]}, "RowsIndexed" -> {}}], "Piecewise", DeleteWithContents->True, Editable->False, SelectWithContents->True, Selectable->False], TraditionalForm]], FontSize->16], " " }], "Text", CellChangeTimes->{{3.6555353717445793`*^9, 3.655535476425376*^9}, { 3.655535581029578*^9, 3.655535647883546*^9}, {3.655535689986052*^9, 3.655535700406891*^9}, {3.6555360778675737`*^9, 3.655536424839089*^9}, { 3.65553650211441*^9, 3.655536614386402*^9}, {3.655536989348228*^9, 3.655537013755888*^9}, {3.6555370439916143`*^9, 3.655537094909477*^9}, { 3.655537144435792*^9, 3.655537418063877*^9}, {3.655537463414032*^9, 3.6555374731375227`*^9}, {3.655537769706683*^9, 3.655537817120719*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Analyze the system written in polar coordinates :", "Section", CellChangeTimes->{{3.655538336095399*^9, 3.655538347019176*^9}, 3.655541603110828*^9}], Cell[CellGroupData[{ Cell[TextData[{ "The equation ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[Theta]", "'"}], "=", FormBox[ RowBox[{"-", "1"}], TraditionalForm]}], TraditionalForm]], FontSize->16, FontWeight->"Bold"], " , solves to \n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[Theta]", "(", "t", ")"}], "=", FormBox[ RowBox[{ RowBox[{"-", "t"}], " ", "+", " ", "c"}], TraditionalForm]}], TraditionalForm]], FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[", where c is any real constant.", FontColor->GrayLevel[0]], "\n\nThe critical points of ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"r", "'"}], "=", RowBox[{ FormBox["r", TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}], TraditionalForm]], FontSize->16, FontWeight->"Bold"], " are: \n", StyleBox["r=0 (the origin of the old phase portrait) and \nr=1 (the unit \ circle in the old phase portrait). ", FontColor->GrayLevel[0]], "\n\nTherefore, a periodic solution of the system is \n", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"r", "(", "t", ")"}], "=", FormBox["1", TraditionalForm]}], TraditionalForm]], FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[", ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"\[Theta]", "(", "t", ")"}], "=", FormBox[ RowBox[{ RowBox[{"-", "t"}], " ", "+", " ", "c"}], TraditionalForm]}], TraditionalForm]], FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[". \n", FontColor->GrayLevel[0]], "(As time t increases, a point moves clockwise on the unit circle)\n\nFrom \ the equation ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"r", "'"}], "=", RowBox[{ FormBox["r", TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}], TraditionalForm]], FontSize->16, FontWeight->"Bold"], ", we also see that:\n", StyleBox["r\[CloseCurlyQuote] > 0 when r<1 (thus inside the unit circle the \ trajectories go outwards) \nr\[CloseCurlyQuote] < 0 when r>1 (thus outside \ the unit circle the trajectories are directed inwards) ", FontColor->GrayLevel[0]], "\n\nWhat about the other trajectories? \n", StyleBox["When r \[NotEqual] 1 and r \[NotEqual] 0, we can use separation of \ variables to solve the equation: ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ RowBox[{ StyleBox[ FractionBox["dr", "dt"], FontSize->24], "=", RowBox[{ FormBox["r", TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]}], TraditionalForm]], FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[". \nWe write ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ RowBox[{ StyleBox[ FractionBox["dr", RowBox[{ FormBox["r", TraditionalForm], "(", RowBox[{"1", "-", FormBox[ SuperscriptBox["r", "2"], TraditionalForm]}], ")"}]], FontSize->24], "=", "dt"}], TraditionalForm]], FontSize->16, FontWeight->"Bold", FontColor->GrayLevel[0]], StyleBox[" and we can integrate each term separately.", FontColor->GrayLevel[0]] }], "Subsubsection", CellChangeTimes->{{3.6555377372498417`*^9, 3.655537764845394*^9}, { 3.655537867489703*^9, 3.655537881081212*^9}, {3.6555380196864357`*^9, 3.655538077241571*^9}, {3.6555381199618397`*^9, 3.6555382533731327`*^9}, { 3.65553831751128*^9, 3.655538373608121*^9}, {3.655538420071821*^9, 3.655538718833457*^9}, {3.655538765168469*^9, 3.655538800385826*^9}, { 3.655538922547468*^9, 3.655538952464447*^9}, {3.6555390524771137`*^9, 3.655539288264491*^9}, {3.655539437074445*^9, 3.655539479380467*^9}, { 3.655540861408245*^9, 3.655540865896545*^9}, {3.655542733270897*^9, 3.655542771326734*^9}}], Cell[BoxData[ RowBox[{"Integrate", "[", RowBox[{ RowBox[{"1", "/", RowBox[{"(", RowBox[{"r", RowBox[{"(", RowBox[{"1", "-", RowBox[{"r", "^", "2"}]}], ")"}]}], ")"}]}], ",", "r"}], "]"}]], "Input", CellChangeTimes->{{3.65553948560599*^9, 3.655539506833646*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "The equation becomes ", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{"log", "(", "r", ")"}], "-", RowBox[{ FractionBox["1", "2"], RowBox[{"log", "(", RowBox[{"1", "-", SuperscriptBox["r", "2"]}], ")"}]}]}], TraditionalForm]], FormatType->"TraditionalForm"], " = t + k, where k is any real constant, with solution given by r(t)=", Cell[BoxData[ FractionBox[ SuperscriptBox["\[ExponentialE]", RowBox[{"k", "+", "t"}]], SqrtBox[ RowBox[{"1", "+", SuperscriptBox["\[ExponentialE]", RowBox[{"2", " ", RowBox[{"(", RowBox[{"k", "+", "t"}], ")"}]}]]}]]]], CellChangeTimes->{3.6555409038769693`*^9}, FontWeight->"Bold"] }], "Subsubsection", CellChangeTimes->{{3.65553956891956*^9, 3.655539573209445*^9}, 3.6555396063933268`*^9, {3.655539666084365*^9, 3.6555397602577267`*^9}, { 3.655540893281918*^9, 3.6555409144173307`*^9}}], Cell[BoxData[{ RowBox[{"solr", "=", " ", RowBox[{"Simplify", "[", RowBox[{"Solve", " ", "[", RowBox[{ FormBox[ RowBox[{ RowBox[{ RowBox[{"Log", "[", "r", "]"}], "-", RowBox[{ FractionBox["1", "2"], RowBox[{"Log", "[", RowBox[{"1", "-", SuperscriptBox["r", "2"]}], "]"}]}]}], " ", "==", RowBox[{"t", "+", "k"}]}], TraditionalForm], ",", " ", "r"}], "]"}], "]"}]}], "\[IndentingNewLine]", RowBox[{"Print", "[", RowBox[{ "\"\\"", ",", " ", RowBox[{"r", " ", "/.", " ", RowBox[{"solr", "[", RowBox[{"[", "2", "]"}], "]"}]}]}], "]"}]}], "Input", CellChangeTimes->{{3.6555398369369793`*^9, 3.6555398788380203`*^9}, { 3.655539970815979*^9, 3.655539979556457*^9}, {3.655540024793005*^9, 3.65554002963375*^9}, {3.6555402316609173`*^9, 3.655540275967064*^9}}, Background->RGBColor[0.87, 0.94, 1]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Poincare - Bendixon Theorem", "Section", CellChangeTimes->{{3.655527046278022*^9, 3.655527069759984*^9}, { 3.656156522936041*^9, 3.65615654423213*^9}}], Cell[TextData[{ "The literature on the existence and properties of limits cycles is very \ rich: \n\nPoincare - Bendixon Theorem \n", StyleBox["Suppose f and g have continuous partial derivatives. \na) Every \ closed trajectory must enclose at least one critical point. If it encloses \ exactly one critical point, then this cannot be a saddle point.\nb) If ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SubscriptBox["\[PartialD]", "x"], "f"}], "+", " ", FormBox[ RowBox[{ SubscriptBox["\[PartialD]", "y"], "g"}], TraditionalForm]}], TraditionalForm]], FontColor->GrayLevel[0]], StyleBox[" has the same sign in a disk D, then there can be no closed \ trajectory of the system lying entirely inside D.\nc) Suppose that U is a \ connected open subset that contains no critical point of the system. Let ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ OverscriptBox["U", "_"], TraditionalForm]], FontColor->GrayLevel[0]], StyleBox[" denote the set U together with its boundary. If the vector field \ in ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ OverscriptBox["U", "_"], TraditionalForm]], FontColor->GrayLevel[0]], StyleBox[" points towards the interior of U, then U contains a closed \ trajectory.\nd) Suppose that U is a connected open subset that contains no \ critical point of the system. Let ", FontColor->GrayLevel[0]], Cell[BoxData[ FormBox[ OverscriptBox["U", "_"], TraditionalForm]], FontColor->GrayLevel[0]], StyleBox[" denote the set U together with its boundary. If there exists some \ trajectory that never leaves the set U (is trapped inside U), then U must \ necessarily contain a closed trajectory.\ne) Every trajectory is attracted by \ a fixed point, or it goes to infinity, or it accumulates on a limit cycle. \n\ \n", FontColor->GrayLevel[0]], StyleBox["This theorem has no analogue in higher dimensions.", FontColor->RGBColor[1, 0, 0]], StyleBox[" In systems with phase space of dimension strictly greater than 2, \ more things can happen: trajectories may be attracted to complex geometrical \ objects (strange attractors), which leads to chaotical behavior.", FontColor->GrayLevel[0]] }], "Subsubsection", CellChangeTimes->{{3.6551179964948807`*^9, 3.6551180818253593`*^9}, { 3.6551181832439613`*^9, 3.6551184774457273`*^9}, {3.655118620031158*^9, 3.655118633581835*^9}, 3.6551187497871733`*^9, {3.655118985437303*^9, 3.6551192926482687`*^9}, {3.6551202580258627`*^9, 3.655120264717431*^9}, { 3.655524506412562*^9, 3.655524775587565*^9}, 3.6555409526351557`*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Nonlinear Equations with several variables : ", "Section", CellChangeTimes->{{3.655091701850492*^9, 3.6550917048336153`*^9}, 3.655105639643676*^9, {3.655108393211068*^9, 3.6551083967965918`*^9}, { 3.655111318115719*^9, 3.65511133189788*^9}, {3.655541240449644*^9, 3.655541244635766*^9}}], Cell["\<\ In 1963, Lorenz studied a very simple model of the atmosphere. This model \ exhibits chaotic behavior:\ \>", "Subsection", CellChangeTimes->{{3.655527563810534*^9, 3.655527573830823*^9}, { 3.6561565617468367`*^9, 3.6561565717497*^9}}], Cell[CellGroupData[{ Cell[TextData[ButtonBox["Lorenz equation", BaseStyle->"Hyperlink", ButtonData->{ URL["http://en.wikipedia.org/wiki/Lorenz_system"], None}, ButtonNote->"http://en.wikipedia.org/wiki/Lorenz_system"]], "Subsection", CellChangeTimes->{{3.622984898963868*^9, 3.622984903970689*^9}, { 3.6229849790147467`*^9, 3.622984979016396*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"tmax", "=", "20"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"sol", "=", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", "10"}], " ", RowBox[{"(", RowBox[{ RowBox[{"x", "[", "t", "]"}], "-", RowBox[{"y", "[", "t", "]"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"x", "[", "t", "]"}]}], " ", RowBox[{"z", "[", "t", "]"}]}], "+", RowBox[{"28", " ", RowBox[{"x", "[", "t", "]"}]}], "-", RowBox[{"y", "[", "t", "]"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], " ", RowBox[{"y", "[", "t", "]"}]}], "-", RowBox[{ FractionBox["8", "3"], " ", RowBox[{"z", "[", "t", "]"}]}]}]}], ",", RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "30"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "10"}], ",", RowBox[{ RowBox[{"z", "[", "0", "]"}], "\[Equal]", "40"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y", ",", "z"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"MaxSteps", "\[Rule]", "5000"}]}], "]"}]}], ";"}]}], "Input", FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[CellGroupData[{ Cell["\<\ The 3D vector field can be plotte using the command VectorPlot3D\ \>", "Subsubsection", CellChangeTimes->{3.6229928042057056`*^9}], Cell[BoxData[ RowBox[{"VectorPlot3D", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "10"}], " ", RowBox[{"(", RowBox[{"x", "-", "y"}], ")"}]}], ",", RowBox[{ RowBox[{ RowBox[{"-", "x"}], " ", "*", "z"}], "+", RowBox[{"28", " ", "x"}], "-", "y"}], ",", RowBox[{ RowBox[{"x", "*", " ", "y"}], "-", RowBox[{ FractionBox["8", "3"], " ", "z"}]}]}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", ",", " ", RowBox[{"-", "10"}], ",", "10"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"y", ",", " ", RowBox[{"-", "10"}], ",", "10"}], "}"}], ",", RowBox[{"{", RowBox[{"z", ",", RowBox[{"-", "10"}], ",", "10"}], "}"}], ",", " ", RowBox[{"VectorScale", "\[Rule]", RowBox[{"{", RowBox[{"Small", ",", "Automatic", ",", "None"}], "}"}]}]}], "]"}]], "Input", CellChangeTimes->{{3.622992219192762*^9, 3.62299226842152*^9}, { 3.6229923372961493`*^9, 3.622992363773654*^9}, {3.6229924305117826`*^9, 3.622992467444696*^9}, {3.622992573989715*^9, 3.622992574851925*^9}, { 3.622992604926777*^9, 3.6229926730442753`*^9}, {3.622992703559029*^9, 3.62299271231842*^9}, 3.62299274282318*^9}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "The solution can the be plotted using ", ButtonBox["ParametricPlot3D", BaseStyle->"Hyperlink", ButtonData->{ URL["http://reference.wolfram.com/language/ref/ParametricPlot3D.html"], None}, ButtonNote-> "http://reference.wolfram.com/language/ref/ParametricPlot3D.html"], " as follows:" }], "Subsubsection", CellChangeTimes->{{3.62298421233374*^9, 3.62298423236337*^9}, { 3.6229842685930643`*^9, 3.622984268594405*^9}, {3.6229922125746527`*^9, 3.622992215932777*^9}, {3.622992754747526*^9, 3.6229928144113092`*^9}}], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"x", ",", "y", ",", "z", ",", "t"}], "]"}], "\[IndentingNewLine]", RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}], ",", RowBox[{"z", "[", "t", "]"}]}], "}"}], "/.", "sol"}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "tmax"}], "}"}], ",", RowBox[{"PlotPoints", "\[Rule]", "3000"}], ",", RowBox[{"Axes", "\[Rule]", "False"}], ",", RowBox[{"PlotRange", "\[Rule]", "All"}]}], "]"}]}], "Input", CellChangeTimes->{{3.622984155751564*^9, 3.622984169512826*^9}, { 3.655541029690172*^9, 3.655541061279624*^9}, {3.655541190190794*^9, 3.655541190685874*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[{ RowBox[{"Clear", "[", RowBox[{"x", ",", "y", ",", "z", ",", "t"}], "]"}], "\[IndentingNewLine]", RowBox[{"Manipulate", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"ParametricPlot3D", "[", "\[IndentingNewLine]", RowBox[{ RowBox[{"Evaluate", "[", RowBox[{ StyleBox[ RowBox[{"{", RowBox[{ RowBox[{"x", "[", "t", "]"}], ",", RowBox[{"y", "[", "t", "]"}], ",", RowBox[{"z", "[", "t", "]"}]}], "}"}], Background->RGBColor[1, 0.9, 0.8]], "/.", RowBox[{"NDSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{"-", "10"}], " ", RowBox[{"(", RowBox[{ RowBox[{"x", "[", "t", "]"}], "-", RowBox[{"y", "[", "t", "]"}]}], ")"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"y", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"x", "[", "t", "]"}]}], " ", RowBox[{"z", "[", "t", "]"}]}], "+", RowBox[{"28", " ", RowBox[{"x", "[", "t", "]"}]}], "-", RowBox[{"y", "[", "t", "]"}]}]}], ",", RowBox[{ RowBox[{ RowBox[{"z", "'"}], "[", "t", "]"}], "\[Equal]", RowBox[{ RowBox[{ RowBox[{"x", "[", "t", "]"}], " ", RowBox[{"y", "[", "t", "]"}]}], "-", RowBox[{ FractionBox["8", "3"], " ", RowBox[{"z", "[", "t", "]"}]}]}]}], ",", RowBox[{ RowBox[{"x", "[", "0", "]"}], "\[Equal]", "30"}], ",", RowBox[{ RowBox[{"y", "[", "0", "]"}], "\[Equal]", "10"}], ",", RowBox[{ RowBox[{"z", "[", "0", "]"}], "\[Equal]", "40"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", "y", ",", "z"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "T"}], "}"}], ",", RowBox[{"MaxSteps", "\[Rule]", "5000"}]}], "]"}]}], "]"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", "T"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", "Red"}]}], "]"}], ",", "\[IndentingNewLine]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"T", ",", "2"}], "}"}], ",", "0.1", ",", " ", "20"}], "}"}], ",", RowBox[{"SynchronousUpdating", "\[Rule]", "False"}], ",", "\[IndentingNewLine]", RowBox[{"SaveDefinitions", "\[Rule]", "True"}]}], "]"}]}], "Input", CellChangeTimes->{{3.622985174051132*^9, 3.6229851763464622`*^9}, { 3.622985375092059*^9, 3.6229854838399973`*^9}, 3.622985522086733*^9, { 3.622985570544299*^9, 3.622985609552206*^9}, {3.622985823675292*^9, 3.6229858243077106`*^9}, 3.622985854980852*^9, {3.622985893260736*^9, 3.6229859000741243`*^9}, {3.622986043788746*^9, 3.6229860504771833`*^9}, { 3.622986113405224*^9, 3.6229861260291147`*^9}, {3.622996712633956*^9, 3.622996725728231*^9}, {3.655540995425254*^9, 3.6555410064218197`*^9}}, FontSize->16, Background->RGBColor[0.87, 0.94, 1]] }, Open ]] }, Open ]] }, Open ]] }, Open ]] }, WindowSize->{1280, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, FrontEndVersion->"10.2 for Mac OS X x86 (32-bit, 64-bit Kernel) (July 29, \ 2015)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 136, 1, 92, "Title"], Cell[CellGroupData[{ Cell[741, 27, 217, 3, 64, "Section"], Cell[961, 32, 2490, 64, 71, "Subsection"], Cell[3454, 98, 348, 5, 61, "Subsection"], Cell[3805, 105, 460, 9, 61, "Subsection"], Cell[4268, 116, 4135, 123, 71, "Subsection"], Cell[8406, 241, 530, 8, 36, "Subsection"] }, Open ]], Cell[CellGroupData[{ Cell[8973, 254, 100, 1, 64, "Section"], Cell[CellGroupData[{ Cell[9098, 259, 406, 7, 44, "Subsection"], Cell[9507, 268, 3129, 84, 273, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[12685, 358, 149, 2, 64, "Section"], Cell[CellGroupData[{ Cell[12859, 364, 2840, 72, 71, "Subsection"], Cell[15702, 438, 3720, 96, 331, "Input"], Cell[CellGroupData[{ Cell[19447, 538, 411, 6, 59, "Subsubsection"], Cell[19861, 546, 1597, 37, 69, "Input"], Cell[21461, 585, 1941, 49, 69, "Input"], Cell[23405, 636, 2356, 68, 109, "Input"], Cell[25764, 706, 966, 30, 72, "Input"] }, Open ]], Cell[26745, 739, 341, 7, 35, "Subsubsection"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[27135, 752, 94, 1, 64, "Section"], Cell[CellGroupData[{ Cell[27254, 757, 2805, 72, 71, "Subsection"], Cell[30062, 831, 2997, 82, 211, "Input"], Cell[33062, 915, 1030, 17, 131, "Subsubsection"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[34141, 938, 104, 1, 64, "Section"], Cell[CellGroupData[{ Cell[34270, 943, 172, 2, 35, "Subsubsection"], Cell[34445, 947, 517, 12, 28, "Input"], Cell[34965, 961, 128, 1, 30, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[35130, 967, 312, 6, 35, "Subsubsection"], Cell[35445, 975, 616, 15, 49, "Text"], Cell[CellGroupData[{ Cell[36086, 994, 797, 26, 69, "Input"], Cell[36886, 1022, 504, 15, 30, "Output"], Cell[37393, 1039, 506, 15, 30, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[37960, 1061, 240, 3, 64, "Section"], Cell[38203, 1066, 8190, 232, 139, "Text"], Cell[46396, 1300, 256, 5, 30, "Text"], Cell[46655, 1307, 1513, 49, 89, "Input"], Cell[48171, 1358, 4772, 136, 103, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[52980, 1499, 160, 2, 64, "Section"], Cell[CellGroupData[{ Cell[53165, 1505, 4049, 137, 490, "Subsubsection"], Cell[57217, 1644, 360, 12, 48, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[57614, 1661, 935, 28, 49, "Subsubsection"], Cell[58552, 1691, 981, 26, 84, "Input"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[59582, 1723, 160, 2, 64, "Section"], Cell[59745, 1727, 2620, 57, 354, "Subsubsection"] }, Open ]], Cell[CellGroupData[{ Cell[62402, 1789, 305, 4, 64, "Section"], Cell[62710, 1795, 247, 5, 44, "Subsection"], Cell[CellGroupData[{ Cell[62982, 1804, 335, 6, 36, "Subsection"], Cell[63320, 1812, 1718, 51, 128, "Input"], Cell[CellGroupData[{ Cell[65063, 1867, 141, 3, 35, "Subsubsection"], Cell[65207, 1872, 1291, 36, 106, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[66535, 1913, 556, 13, 35, "Subsubsection"], Cell[67094, 1928, 850, 21, 89, "Input"], Cell[67947, 1951, 3289, 81, 306, "Input"] }, Open ]] }, Open ]] }, Open ]] }, Open ]] } ] *) (* End of internal cache information *)