(************** 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[ 8077, 266]*) (*NotebookOutlinePosition[ 8997, 297]*) (* CellTagsIndexPosition[ 8953, 293]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Systems of Nonlinear Differential Equations", "Title", Evaluatable->False, CellHorizontalScrolling->False, TextAlignment->Center], Cell[TextData[{ "Specific instructions are given in the first part of the lab.\nBoth an \ oral and a written report on this lab will be required.Summarize your results \ in a one-page write-up to which the printouts for your own problems are \ attached. You may work in pairs. Be sure to explain the meaning of each of \ your parameters.\nBe sure to clearly mark equilibria on your graphs that show \ both the vector field and the solutions. Select initial conditions near each \ point of equilibrium and use your graph to determine if they are stable or \ unstable.\nThen look at the eigenvalues corresponding to the linearization \ near your particular equilibrium point. See if they have anything to do with \ the stability of the equilibrium points. We will be focusing on this approach \ using the Jacobian right after the break. In the meantime, look up the term \ Jacobian in your calculus book or any other math book.\n", StyleBox["Note: You may substitute the problems suggested in this lab with \ a slightly different nonlinear model of your own or from the problems from \ your text. If you do this, just enter your own functions for \"rhs1\" and \ \"rhs2.\"", FontWeight->"Bold"] }], "Subsubtitle"], Cell[CellGroupData[{ Cell["\<\ Nonlinear Predator-Prey or Competing Species, or Symbiotic Relationship Model\ \ \>", "Subsection", Evaluatable->False], Cell[TextData[{ "Consider the model \tx' = (a1 -b1 x - c1 y)x\n\t\t\ty' = (-a2 - b2 y + c2 \ x)y\nwhere x represent one population and y the other population, and the \ constants are all positive. Think about the meaning of the parameters.\nIn \ what is to follow, you will be finding the points or equilibria, then solving \ the system numerically with ", StyleBox["Mathematica", FontSlant->"Italic"], ", then exploring the graphs.\nIndicate whether you think each equilibria \ is stable or unstable, based on the graphs." }], "Text", Evaluatable->False, FontFamily->"Times New Roman", FontSize->12, FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontColor->GrayLevel[0], Background->GrayLevel[1], FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}], Cell["\<\ Each group must select three sets of values for the constants that you feel \ would be appropriate to describe each of the three possible models. The \ values below are for illustrative purposes ONLY. Be sure to indicate whether \ you have a predator-prey, a competing species, or a symbiotic relationship. Try each out for different sets of initial conditions on different sides of \ equilibria.State your conclusions regarding the stability of each equilibria.\ \ \>", "Subsubtitle", Evaluatable->False, CellHorizontalScrolling->False, TextAlignment->Left] }, Closed]], Cell[CellGroupData[{ Cell["\<\ First find the equilibria by setting x' and y' equal to zero. Try different \ parameters.\ \>", "Subsection", Evaluatable->False], Cell[TextData[{ "rhs1:=(a1-b1 x[t]+c1 y[t])x[t]\nrhs2:=(a2-b2 y[t]+c2 x[t])y[t]\n\ Clear[a1,a2,b1,c1,c2,x,y]\na1=", StyleBox["1.5", FontColor->RGBColor[1, 0, 0]], ";\na2=", StyleBox[".6", FontColor->RGBColor[1, 0, 0]], ";\nb1=", StyleBox[".02", FontColor->RGBColor[1, 0, 0]], "; \nb2=", StyleBox[".01", FontColor->RGBColor[1, 0, 0]], ";\nc1=", StyleBox["-.01", FontColor->RGBColor[1, 0, 0]], ";\nc2=", StyleBox[".01", FontColor->RGBColor[1, 0, 0]], ";\nequil=NSolve[{rhs1==0,rhs2==0},{x[t],y[t]}]" }], "Input", PageWidth->Infinity] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Now solve this system numerically and show the phase-plane plot (x versus y) \ and the plots of x and y as functions of t. Look at this for different sets \ of initial conditions.\ \>", "Subsection", Evaluatable->False], Cell[TextData[{ "eq1:=x'[t]==rhs1\neq2:=y'[t]==rhs2\nsol=NDSolve[{eq1,eq2,x[0]==", StyleBox["100", FontColor->RGBColor[1, 0, 0]], ",y[0]==", StyleBox["200", FontColor->RGBColor[1, 0, 0]], "},\n\t\t\t{x[t],y[t]},{t,0,20}]" }], "Input", PageWidth->Infinity], Cell["\<\ x1=sol[[1,1,2]] y1=sol[[1,2,2]] Plot[{x1,y1},{t,0,20}, \tPlotStyle->{RGBColor[0,1,0],RGBColor[0,0,1]}] pp=ParametricPlot[{x1,y1},{t,0,20},PlotStyle->RGBColor[1,0,0]]\ \>", "Input", PageWidth->Infinity], Cell["\<\ Make some observations about what you see regarding the behavior and equilibria.\ \>", "Text", PageWidth->Infinity, Evaluatable->False, FontFamily->"Courier New", FontSize->14, FontWeight->"Plain", FontSlant->"Plain", FontTracking->"Plain", FontColor->RGBColor[1, 0, 0], Background->GrayLevel[1], FontVariations->{"Underline"->False, "Outline"->False, "Shadow"->False}] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Explore this system of differential equations by plotting the vector field \ and examining it together with the parametric plot you have just constructed.\ \ \>", "Subsection", Evaluatable->False], Cell["\<\ First you need to read in the package `Graphics`PlotField`. Remember that \ the single backhand quote here is in the upper left hand corner of your keyboard.\ \>", "Text", Evaluatable->False], Cell["<Infinity], Cell["\<\ pv=PlotVectorField[{rhs1,rhs2},{x[t],0,100},{y[t],0,200}, \tScaleFunction\[Rule](1&),DisplayFunction\[Rule]Identity]; Show[pp,pv];\ \>", "Input", PageWidth->Infinity, FontFamily->"Courier New", FontSize->12, FontWeight->"Bold", FontColor->GrayLevel[0], Background->GrayLevel[1]] }, Closed]], Cell[CellGroupData[{ Cell["\<\ Now examine the equilibrium analytically using the eigenvalues of the \ Jacobian matrix.\ \>", "Subsection", Evaluatable->False], Cell["\<\ MatrixForm[jacob={{D[rhs1,x[t]],D[rhs1,y[t]]},{D[rhs2,x[t]],D[rhs2,y[t]]}}] \ \ \>", "Input", PageWidth->Infinity], Cell["\<\ Print[MatrixForm[jacob1=jacob/.equil[[1]]], MatrixForm[jacob2=jacob/.equil[[2]]], MatrixForm[jacob3=jacob/.equil[[3]]], MatrixForm[jacob4=jacob/.equil[[4]]]]\ \>", "Input", PageWidth->Infinity], Cell["\<\ Eigenvalues[jacob1] Eigenvalues[jacob2] Eigenvalues[jacob3] Eigenvalues[jacob4] \ \>", "Input", PageWidth->Infinity] }, Closed]] }, Open ]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{704, 552}, WindowMargins->{{-12, Automatic}, {Automatic, 7}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (******************************************************************* 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, 141, 3, 170, "Title", Evaluatable->False], Cell[1871, 57, 1219, 18, 287, "Subsubtitle"], Cell[CellGroupData[{ Cell[3115, 79, 131, 4, 47, "Subsection", Evaluatable->False], Cell[3249, 85, 821, 21, 163, "Text", Evaluatable->False], Cell[4073, 108, 575, 11, 125, "Subsubtitle", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[4685, 124, 141, 4, 31, "Subsection", Evaluatable->False], Cell[4829, 130, 584, 22, 192, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[5450, 157, 231, 5, 50, "Subsection", Evaluatable->False], Cell[5684, 164, 275, 9, 84, "Input"], Cell[5962, 175, 214, 7, 102, "Input"], Cell[6179, 184, 404, 15, 72, "Text", Evaluatable->False] }, Closed]], Cell[CellGroupData[{ Cell[6620, 204, 208, 5, 50, "Subsection", Evaluatable->False], Cell[6831, 211, 204, 5, 52, "Text", Evaluatable->False], Cell[7038, 218, 61, 1, 30, "Input"], Cell[7102, 221, 300, 10, 82, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[7439, 236, 140, 4, 31, "Subsection", Evaluatable->False], Cell[7582, 242, 126, 4, 30, "Input"], Cell[7711, 248, 206, 6, 84, "Input"], Cell[7920, 256, 129, 6, 84, "Input"] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)