(*********************************************************************** 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[ 4305, 140]*) (*NotebookOutlinePosition[ 4942, 163]*) (* CellTagsIndexPosition[ 4898, 159]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Solving and Checking Solutions", "Subtitle", CellDingbat->None, TextAlignment->Center], Cell[TextData[{ StyleBox["Mathematica", FontSize->14, FontWeight->"Bold", FontSlant->"Italic"], StyleBox[ " can take some of the drudgery out of solving differential\nequations. \ For instance, suppose we want to solve y' = 2y + sin t\nsubject to the \ initial condition y(", FontSize->14, FontWeight->"Bold"], StyleBox["\[Pi]", FontFamily->"Symbol", FontSize->14, FontWeight->"Bold"], StyleBox[ ") = 1. The appropriate integrating\nfactor for this differential equation \ is ", FontSize->14, FontWeight->"Bold"] }], "Text", CellDingbat->"\[FilledSmallSquare]", FontFamily->"Bold"], Cell[BoxData[ RowBox[{\(mu[t_]\), "=", " ", RowBox[{"Exp", "[", StyleBox[\(\[Integral]\_Pi\%t\(-2\)\[ThinSpace]\[DifferentialD]s\), ScriptLevel->0], StyleBox["]", ScriptLevel->0]}]}]], "Input"], Cell[TextData[StyleBox["We then compute that the solution is ", FontSize->14]], "Text", FontFamily->"Bold", FontWeight->"Bold"], Cell[BoxData[ RowBox[{\(y\ [t_]\), " ", "=", " ", RowBox[{"Simplify", "[", RowBox[{ RowBox[{"(", RowBox[{"1", "+", RowBox[{ StyleBox[\(\[Integral]\_Pi\%t\), ScriptLevel->0], RowBox[{\(mu[s]\), " ", \(Sin[s]\), " ", StyleBox[\(\[DifferentialD]s\), ScriptLevel->0]}]}]}], StyleBox[" ", ScriptLevel->0], StyleBox[")", ScriptLevel->0]}], StyleBox["/", ScriptLevel->0], StyleBox[\(mu[t]\), ScriptLevel->0]}], StyleBox["]", ScriptLevel->0]}]}]], "Input"], Cell[TextData[{ StyleBox[ "Of course, you would never do something silly like lose a minus sign or \ inadverdantly drop a \"2\" when computing the solution to an ODE.\nOn the \ other hand, you might be a bit suspicious of ", FontSize->14], StyleBox["Mathematica. ", FontSize->14, FontSlant->"Italic"], StyleBox["\nFortunately, you always have the option of making ", FontSize->14], StyleBox["Mathematica", FontSize->14, FontSlant->"Italic"], StyleBox[" check\nits solutions:", FontSize->14] }], "Text", CellDingbat->"\[FilledSmallSquare]", FontFamily->"Bold", FontWeight->"Bold"], Cell[BoxData[ \(Simplify[\[PartialD]\_t\ y[t]\ - \ 2\ y[t]\ - \ Sin[t]]\)], "Input"] }, Open ]] }, FrontEndVersion->"X 3.0", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{686, 591}, WindowMargins->{{Automatic, 89}, {Automatic, 121}} ] (*********************************************************************** 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, 96, 2, 64, "Subtitle"], Cell[1830, 55, 639, 22, 93, "Text"], Cell[2472, 79, 242, 6, 42, "Input"], Cell[2717, 87, 133, 3, 33, "Text"], Cell[2853, 92, 715, 21, 42, "Input"], Cell[3571, 115, 625, 19, 115, "Text"], Cell[4199, 136, 90, 1, 27, "Input"] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)