(*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 4.0, MathReader 4.0, or any compatible application. 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[ 6183, 162]*) (*NotebookOutlinePosition[ 6825, 185]*) (* CellTagsIndexPosition[ 6781, 181]*) (*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["Problem 15.", "Subsection"], Cell[CellGroupData[{ Cell["Bonus: Quadratic Version of Euler's Method", "Subsection"], Cell[BoxData[{ FormBox[\(Euler' s\ method\ for\ approximating\ solutions\ of\), TextForm], "\n", FormBox[ RowBox[{ " ", \(y' \((x)\)\ = \ f \((x, y)\), \ \ \ \ \ y \((x\_0)\)\ = \ y\_0\)}], TextForm], "\n", FormBox[ RowBox[{\(works\ by\ assuming\ that\ y\ is\ approximately\ linear\ on\ \ small\ intervals . Describe\ a\ variation\ on\), " "}], TextForm], "\n", 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], "\n", FormBox[ RowBox[{ "this", " ", "new", " ", "method", " ", "as", " ", "a", " ", "Mathematica", " ", "command", " ", "called", " ", RowBox[{ StyleBox["QuadMethod", FontWeight->"Bold"], ".", " ", "Use"}], " ", "my", " ", StyleBox["EulerMethod", FontWeight->"Bold"]}], TextForm], "\n", FormBox[ RowBox[{ RowBox[{ RowBox[{"and", " ", \((especially)\), " ", StyleBox["RKMethod", FontWeight->"Bold"], " ", "commands", " ", "as", " ", "models", " ", "for", " ", "syntax"}], ",", " ", \(etc . \ \ When\ you\ get\ your\)}], " "}], TextForm], "\n", FormBox[ RowBox[{ RowBox[{ RowBox[{ StyleBox["QuadMethod", FontWeight->"Bold"], " ", "command", " ", "working"}], ",", " ", \(try\ to\ answer\ the\ following\ questions\ . \n\t\n\ \ \ \ \ \ \ \(\((a)\)\ How\ do\ local\ and\ global\ truncation\ errors\ depend\ on\ \ h?\ \ That\ is\)\), ",", " ", \(are\ they\ about\)}], " "}], TextForm], "\n", FormBox[ RowBox[{"\t ", RowBox[{\(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 ", RowBox[{ "Kutta", " ", \(method?\ \[IndentingNewLine]\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \nYou\), " ", "can", " ", "do", " ", "this", " ", "experimentally", " ", "by", " ", "applying", " ", "your", " ", StyleBox["QuadMethod", FontWeight->"Bold"], StyleBox[" ", FontWeight->"Bold"], "command", " ", "in", " ", "specific"}]}], " "}], TextForm], "\[IndentingNewLine]", FormBox[ RowBox[{\(examples \((e . g . \ the\ y'\ = \ y, \ y \((0)\)\ = \ 1\ example)\); \ \ also\ try\ y'\ = \ 3 y/x, \ with\ y \((1)\)\ = \ 1\ to\), " "}], TextForm], "\[IndentingNewLine]", FormBox[ RowBox[{\(check\ that\ your\ method\ works\ for\ non - autonomous\ ODE' s . \ \ You\ can\ also\ try\ to\), " "}], TextForm], "\[IndentingNewLine]", FormBox[ RowBox[{\(answer\ the\ questions\ \((especially\ the\ one\ about\ local\ \ error)\)\ from\ a\ more\ theoretical\), " "}], TextForm], "\[IndentingNewLine]", FormBox[\(\(standpoint\)\(.\)\), TextForm]}], "Text"] }, Open ]] }, Open ]] }, FrontEndVersion->"4.0 for X", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{717, 618}, WindowMargins->{{220, Automatic}, {Automatic, 151}} ] (*********************************************************************** 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[1739, 51, 98, 4, 89, "Subsubtitle"], Cell[1840, 57, 498, 8, 104, "Text"], Cell[2341, 67, 32, 0, 45, "Subsection"], Cell[2376, 69, 32, 0, 45, "Subsection"], Cell[2411, 71, 33, 0, 45, "Subsection"], Cell[2447, 73, 33, 0, 45, "Subsection"], Cell[CellGroupData[{ Cell[2505, 77, 65, 0, 45, "Subsection"], Cell[2573, 79, 3582, 79, 336, "Text"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)