(*********************************************************************** 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[ 5311, 148]*) (*NotebookOutlinePosition[ 5948, 171]*) (* CellTagsIndexPosition[ 5904, 167]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Math 230, Spring 1999 Mathematica assignment 3 (due Monday, 3/1/99)\ \>", "Subsubtitle"], Cell["\<\ The following problems are taken from pages 101 to 107 of the \ Differential Equations with Mathematica book. In problems requiring the use \ of Euler's method, feel free to use my version of the EulerMethod command rather than the book's version. The main \ difference is that my method returns a function whereas the book's returns a \ table of values. You should also compare results obtained with Euler's \ method with results obtained using the Runge-Kutta method. \ \>", "Text"], Cell["Problem 1.", "Subsection"], Cell["Problem 4.", "Subsection"], Cell["Problem 12.", "Subsection"], Cell[CellGroupData[{ Cell["Problem 15.", "Subsection"], Cell[BoxData[ \(TextForm\`And\ finally, \ here' s\ a\ problem\ that\ doesn' t\ come\ from\ the\ \(book : \)\)], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Quadratic Version of Euler's Method", "Subsection"], Cell[BoxData[{ FormBox[ \(Euler' s\ method\ for\ approximating\ solutions\ of\), TextForm], FormBox[ RowBox[{" ", \(y' \((x)\)\ = \ f \((x, y)\), \ \ \ \ \ y \((x\_0)\)\ = \ y\_0\)}], TextForm], FormBox[ RowBox[{ \(works\ by\ assuming\ that\ y\ is\ approximately\ linear\ on\ small\ intervals . Describe\ a\ variation\ on\), " "}], TextForm], FormBox[ RowBox[{ RowBox[{ \(Euler'\), "s", " ", "method", " ", "that", " ", "works", " ", "by", " ", "assuming", " ", "that", " ", "y", " ", "is", " ", StyleBox["quadratic", FontSlant->"Italic"], StyleBox[" ", FontSlant->"Italic"], "on", " ", "small", " ", \(intervals . \ Implement\)}], " "}], TextForm], FormBox[ RowBox[{ "this", " ", "new", " ", "method", " ", "as", " ", "a", " ", "Mathematica", " ", "command", " ", "called", " ", RowBox[{ StyleBox["QuadMethod", FontWeight->"Bold"], ".", " ", "Use"}], " ", "my", " ", StyleBox["EulerMethod", FontWeight->"Bold"]}], TextForm], FormBox[ RowBox[{ RowBox[{ RowBox[{"and", " ", \((especially)\), " ", StyleBox["RKMethod", FontWeight->"Bold"], " ", "commands", " ", "as", " ", "models", " ", "for", " ", "syntax"}], ",", " ", \(etc . \ \ When\ you\ get\ your\)}], " "}], TextForm], FormBox[ RowBox[{ RowBox[{ RowBox[{ StyleBox["QuadMethod", FontWeight->"Bold"], " ", "command", " ", "working"}], ",", " ", \(try\ to\ answer\ the\ following\ questions\ by\ applying\ the \)}], " "}], TextForm], FormBox[ \(command\ in\ specific\ examples \((e . g . \ the\ y'\ = \ y, \ y \((0)\)\ = \ 1\ example; \ \ also\ try\ y'\ = \ 3 y/x, \n y \((1)\)\ = \ 1\ to\ check\ that\ your\ method\ works\ for\ non - autonomous\ ODE' s . \n\t\n\ \ \ \ \ \ \((a)\)\ How\ do\ local\ and\ global\ truncation\ errors\ depend\ on\ h?\ \ That\ is, \ are\ they\ about\ \n\t\ \ \ \ \ \ \ \ equal\ to\ Ch?\ to\ \(Ch\^2\)?\ \ etc . \n\t\t\n\ \ \ \ \ \ \((b)\)\ Does\ the\ new \ method\ work\ better\ or\ worse\ than\ Euler' s\ \ \ method?\ \ than\ the\ Runge - \n\t\ \ \ \ \ \ \ \ \ Kutta\ \(method?\)\ \)\), TextForm]}], "Text"] }, Open ]] }, Open ]] }, FrontEndVersion->"X 3.0", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{520, 600}, WindowMargins->{{Automatic, 346}, {86, Automatic}} ] (*********************************************************************** 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, 98, 4, 89, "Subsubtitle"], Cell[1832, 57, 498, 8, 122, "Text"], Cell[2333, 67, 32, 0, 45, "Subsection"], Cell[2368, 69, 32, 0, 45, "Subsection"], Cell[2403, 71, 33, 0, 45, "Subsection"], Cell[CellGroupData[{ Cell[2461, 75, 33, 0, 45, "Subsection"], Cell[2497, 77, 131, 3, 30, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[2665, 85, 57, 0, 45, "Subsection"], Cell[2725, 87, 2558, 57, 268, "Text"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)