(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line of 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[ 5061, 156]*) (*NotebookOutlinePosition[ 5739, 180]*) (* CellTagsIndexPosition[ 5695, 176]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Direction Fields", "Subsection"], Cell["\<\ We will use the command PlotVectorField to plot direction fields. The equation y' = f(t,y) tells us that at the point (t,y) we want to plot a short line with slope f(t,y). The vector (1,f(t,y)) has slope f(t,y), so we simply plot the vector field (1,f(t,y)), (or i + f(t,y)j), \ \ \>", "Text", FontWeight->"Bold"], Cell[BoxData[ \(Needs["\"]\)], "Input"], Cell[CellGroupData[{ Cell["Example 1. y' = y + t", "Subsubsection"], Cell[BoxData[ \(\(PlotVectorField[{1, y + t}, {t, \(-3\), 5}, {y, \(-3\), 3}, \ Axes -> \ True, \n\tScaleFunction \[Rule] \((1&)\), Ticks \[Rule] None, Frame \[Rule] True, AspectRatio \[Rule] 1, \ PlotPoints\ -> \ 15]; \)\)], "Input"], Cell["\<\ It appears that y=-1-t is a solution to this Differential \ equation. Moreover, solutions y(t) that start above the line y = -1 - t tend to infinity as t increases, and solutions that start below the line tend to -infinity as t increases. As t decreases, we see that all solutions are asymptotic to the line y=-1-t. In particular, all solutions tend to infinity as t decreases. \t\t There is a way to find the solution of y'=y+t explicitly. Mathematica will do this for us if we use the command `DSolve'.\ \>", "Text", FontWeight->"Bold"], Cell[BoxData[ \(DSolve[\(y'\)[t] == y[t] + t, y[t], \ t]\)], "Input"], Cell[BoxData[{ FormBox[ \(That\ is, \ the\ general\ solution\ of\ the\ equation\ is\ y\ = \ \(-1\) - t + Ce\^t, \n where\ C\ is\ a\ constant\ that\ can\ be\ determined\ by\ specifying\ the\), TextForm], FormBox[ \(value\ of\ y\ at\ some\ particular\ t . \ \ We\ could\ now\ use\ this\ formula\ for\), TextForm], FormBox[ \(y\ to\ verify\ our\ above\ conclusions\ about\ the\ behavior\ of\ y\ as \ t\ goes\), TextForm], FormBox[ \(to\ plus\ or\ minus\ infinity . \ \ However, \ since\ my\ goal\ is\ to\ show\ off\), TextForm], FormBox[ RowBox[{ FormBox[\(the\ capabilities\ of\ Mathematica, \ I\ plot\ y \((t)\)\ for\), "TextForm"], " "}], TextForm], FormBox[ \(C\ = \ \(-3\), \ \(-2\), \ \(-1\), \ 0, \ 1, \ 2, \ 3\ \ \(instead . \)\), TextForm]}], "Text", FontWeight->"Bold"], Cell[BoxData[ \(Plot[ Evaluate[Table\ [\ \(-1\) - t\ + \ C\ \ Exp[t]\ , {C, \(-3\), 3, 1}]], \n\t\t{t, \(-3\), 5}, \ AspectRatio -> 1, \ PlotRange\ -> \ {\(-3\), 3}]\)], "Input"] }, Open ]], Cell["\<\ Here are some other examples to try. Use the above example as a \ model.\ \>", "Subsubsection"], Cell["Example 2. y' = y + 2 ", "Subsubsection"], Cell[BoxData[ \(TextForm\`Example\ 3. \ \ y'\ = \ e\^\(-t\) + \ y\)], "Subsubsection"], Cell["Example 4. y' = -y(3-y)", "Subsubsection"], Cell["Example 5. y' = t/y", "Subsubsection"], Cell[CellGroupData[{ Cell["\<\ Caution: If you execute a PlotVectorField command before you do \ the Needs command, either restart or execute the following commands.\ \>", "Subsubsection", Evaluatable->False, AspectRatioFixed->True], Cell[BoxData[{ \(Remove[PlotVectorField, ScaleFunction]\), \(Needs["\"]\)}], "Input", AspectRatioFixed->True] }, Open ]] }, Open ]] }, FrontEndVersion->"X 3.0", ScreenRectangle->{{0, 1280}, {0, 1024}}, ScreenStyleEnvironment->"Presentation", WindowSize->{717, 592}, WindowMargins->{{Automatic, 186}, {Automatic, 131}} ] (*********************************************************************** 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[1731, 51, 38, 0, 64, "Subsection"], Cell[1772, 53, 331, 7, 116, "Text"], Cell[2106, 62, 65, 1, 39, "Input"], Cell[CellGroupData[{ Cell[2196, 67, 46, 0, 56, "Subsubsection"], Cell[2245, 69, 258, 4, 111, "Input"], Cell[2506, 75, 560, 12, 236, "Text"], Cell[3069, 89, 73, 1, 39, "Input"], Cell[3145, 92, 926, 24, 180, "Text"], Cell[4074, 118, 204, 4, 63, "Input"] }, Open ]], Cell[4293, 125, 106, 3, 56, "Subsubsection"], Cell[4402, 130, 48, 0, 56, "Subsubsection"], Cell[4453, 132, 91, 1, 61, "Subsubsection"], Cell[4547, 135, 49, 0, 56, "Subsubsection"], Cell[4599, 137, 45, 0, 56, "Subsubsection"], Cell[CellGroupData[{ Cell[4669, 141, 219, 6, 75, "Subsubsection", Evaluatable->False], Cell[4891, 149, 142, 3, 63, "Input"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)