(*********************************************************************** 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[ 11143, 375]*) (*NotebookOutlinePosition[ 12198, 411]*) (* CellTagsIndexPosition[ 12154, 407]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData["\n"], "Input", AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["Separable Differential Equations"], "Title", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "Steve Dunbar\n\nDepartment of Mathematics and Statistics\nUniversity of \ Nebraska-Lincoln\nLincoln, NE 68588-0323\nsdunbar@mathlab01.unl.edu\n\n\nFall \ Semester, 1993"], "Subtitle", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Covers Nagle & Saff, Section 2.2"], "Subsubtitle", Evaluatable->False, AspectRatioFixed->True], Cell[CellGroupData[{Cell[TextData["A Simple Example of Solution by Separation"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Solve the initial value problem\n\tdy t", Evaluatable->False, AspectRatioFixed->True], StyleBox["2", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox["\n\t--- = --------\n\t dt 1 + y", Evaluatable->False, AspectRatioFixed->True], StyleBox["5", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox[ "\nBy inspection, we can see that the differential equation is separable. \n\ \nThe idea is to force ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ " to set up and solve the equation by mimicing what we do on paper. This \ example is easy enough to do \"in our head\".", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["lhs = (1 + y[t]^5) y'[t]"], "Input", AspectRatioFixed->True], Cell[TextData["rhs = t^2"], "Input", AspectRatioFixed->True], Cell[TextData[ "implicitsoln = Integrate[lhs, t] == Integrate[rhs,t] + C"], "Input", AspectRatioFixed->True], Cell[TextData[ "Because the left side is a high degree polynomial in y, there is not much \ hope of explicitly solving for y. Nevertheless, we can look at the solution \ curves defined implicitly by the implicit solution."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "cp = ContourPlot[ y + y^6/6 - t^3/3, {t, -2,2}, {y,-2,2},\nContourShading-> \ False ]"], "Input", AspectRatioFixed->True], Cell[TextData[ "Note that we get a whole family of solution curves. Which solution curve \ we want is defined by an initial condition."], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "vf = PlotVectorField[ {1, t^2/(1 +y^5)}, {t,-2,2}, {y,-2,2},\nAxes-> True]"], "Input", AspectRatioFixed->True], Cell[TextData["Show[cp, vf]"], "Input", AspectRatioFixed->True]}, Open]], Cell[CellGroupData[{Cell[TextData["Another Example of Solution by Separation"], "Section", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[{ StyleBox["Solve the initial value problem\n\t(1 + t", Evaluatable->False, AspectRatioFixed->True], StyleBox["2) ", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox["(dy/dt) = t y", Evaluatable->False, AspectRatioFixed->True], StyleBox["3", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox["/(1 + t", Evaluatable->False, AspectRatioFixed->True], StyleBox["2", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox[")", Evaluatable->False, AspectRatioFixed->True], StyleBox["1/2", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox[ " with y(0) = 1.\nBy inspection, we can see that the differential \ equation is separable. \n\nThe idea is to force ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ " to set up and solve the equation by mimicing what we do on paper. Set up \ the differential equation with a name:", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Clear[ de, y, t, implicitsoln]"], "Input", AspectRatioFixed->True], Cell[TextData[ "de = Sqrt[1 + t^2] * D[y[t], t] == t*y[t]^3/Sqrt[1 + t^2]"], "Input", AspectRatioFixed->True], Cell[TextData[ "Divide through to put the equation in separated form:\nDo this in your head \ or on scratch paper, there is no convenient way to force \nMathemtica to do \ this operation!\n"], "Input", AspectRatioFixed->True], Cell[TextData["(1/y[t]^3) D[y[t],t] == t/(1 + t^2)"], "Input", AspectRatioFixed->True], Cell[TextData["lhs = Integrate[ y'[t]/y[t]^3, t]"], "Input", AspectRatioFixed->True], Cell[TextData["rhs = Integrate[t/(1 + t^2), t]"], "Input", AspectRatioFixed->True], Cell[TextData["implicitsoln = lhs == rhs + C"], "Input", AspectRatioFixed->True], Cell[TextData["Solve[ implicitsoln, y[t]]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "Note the presence of the Imaginary constant ( I = Sqrt[-1]) in here.\nThis \ occurs because ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[ " is formula-driven (not heurisitic) in solving for y[t].\n\nNote that \ there are two solution formulas. Which solution formula is chosen depends on \ the initital conditions.", Evaluatable->False, AspectRatioFixed->True] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["implicitsoln /. { t -> 0, y[t] -> 1}"], "Input", AspectRatioFixed->True], Cell[TextData["impsolnwithIC = implicitsoln /. { C -> -1/2}"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["/. is the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" symbol for evaluation. See the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" book page 74.", Evaluatable->False, AspectRatioFixed->True] }], "SmallText", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["Solve[ impsolnwithIC, y[t]]"], "Input", AspectRatioFixed->True], Cell[TextData["Plot[ 1/(Sqrt[ 1- Log[1+t^2]]), {t, -2,2}]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox["Why is ", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold"], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold", FontSlant->"Italic"], StyleBox[ " complaining with all of the error messages?\nWhat is the domain of the \ solution?", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold"] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["<True], Cell[TextData[{ StyleBox[ "The normal form for the differential equation is\n\tdy t y", Evaluatable->False, AspectRatioFixed->True], StyleBox["3", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox["\n\t---- = -----\n\t dt 1 + t", Evaluatable->False, AspectRatioFixed->True], StyleBox["2", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[ "PlotVectorField[ {1, t*y^3/(1 + t^2)}, {t,-2,2}, {y,-2,2},\nAxes-> True]"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "The normal form for the differential equation is\n\tdy t y", Evaluatable->False, AspectRatioFixed->True], StyleBox["3", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}], StyleBox["\n\t---- = -----\n\t dt 1 + t", Evaluatable->False, AspectRatioFixed->True], StyleBox["2", Evaluatable->False, AspectRatioFixed->True, FontVariations->{"CompatibilityType"->"Superscript"}] }], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData[StyleBox[ "Does the graph of the solution agree with what you guess from the direction \ fields?", Evaluatable->False, AspectRatioFixed->True, FontWeight->"Bold"]], "Text", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["?DSolve"], "Input", AspectRatioFixed->True], Cell[TextData[{ StyleBox[ "?Command is a way of getting information about a command. See the ", Evaluatable->False, AspectRatioFixed->True], StyleBox["Mathematica", Evaluatable->False, AspectRatioFixed->True, FontSlant->"Italic"], StyleBox[" book page 374.", Evaluatable->False, AspectRatioFixed->True] }], "SmallText", Evaluatable->False, AspectRatioFixed->True], Cell[TextData["DSolve[de, y[t],t]"], "Input", AspectRatioFixed->True]}, Open]]}, Open]] }, FrontEndVersion->"Macintosh 3.0", ScreenRectangle->{{0, 640}, {0, 460}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{520, 365}, WindowMargins->{{12, Automatic}, {30, Automatic}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False}, MacintoshSystemPageSetup->"\<\ AVU/IFiQKFD000000V7E<09QgO0000000OZ:d096/NP0AP1Y06`0I@1^0642HMD` 0V7N40000001nXZ`0TJaj000000000000000009QeC0000000000000000000000 00000000000000000000000000000000\>" ] (*********************************************************************** 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[1711, 51, 55, 1, 70, "Input"], Cell[CellGroupData[{ Cell[1789, 54, 107, 2, 70, "Title", Evaluatable->False], Cell[1899, 58, 247, 5, 70, "Subtitle", Evaluatable->False], Cell[2149, 65, 113, 2, 70, "Subsubtitle", Evaluatable->False], Cell[CellGroupData[{ Cell[2285, 69, 119, 2, 70, "Section", Evaluatable->False], Cell[2407, 73, 1016, 31, 70, "Text", Evaluatable->False], Cell[3426, 106, 77, 1, 70, "Input"], Cell[3506, 109, 62, 1, 70, "Input"], Cell[3571, 112, 110, 2, 70, "Input"], Cell[3684, 116, 281, 5, 70, "Text", Evaluatable->False], Cell[3968, 123, 140, 3, 70, "Input"], Cell[4111, 128, 195, 4, 70, "Text", Evaluatable->False], Cell[4309, 134, 131, 3, 70, "Input"], Cell[4443, 139, 65, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[4540, 142, 118, 2, 70, "Section", Evaluatable->False], Cell[4661, 146, 1405, 45, 70, "Text", Evaluatable->False], Cell[6069, 193, 83, 1, 70, "Input"], Cell[6155, 196, 111, 2, 70, "Input"], Cell[6269, 200, 228, 4, 70, "Input"], Cell[6500, 206, 88, 1, 70, "Input"], Cell[6591, 209, 86, 1, 70, "Input"], Cell[6680, 212, 84, 1, 70, "Input"], Cell[6767, 215, 82, 1, 70, "Input"], Cell[6852, 218, 79, 1, 70, "Input"], Cell[6934, 221, 588, 18, 70, "Text", Evaluatable->False], Cell[7525, 241, 89, 1, 70, "Input"], Cell[7617, 244, 97, 1, 70, "Input"], Cell[7717, 247, 548, 20, 70, "SmallText", Evaluatable->False], Cell[8268, 269, 80, 1, 70, "Input"], Cell[8351, 272, 95, 1, 70, "Input"], Cell[8449, 275, 479, 18, 70, "Text", Evaluatable->False], Cell[8931, 295, 74, 1, 70, "Input"], Cell[9008, 298, 596, 19, 70, "Text", Evaluatable->False], Cell[9607, 319, 129, 3, 70, "Input"], Cell[9739, 324, 596, 19, 70, "Text", Evaluatable->False], Cell[10338, 345, 240, 7, 70, "Text", Evaluatable->False], Cell[10581, 354, 60, 1, 70, "Input"], Cell[10644, 357, 404, 14, 70, "SmallText", Evaluatable->False], Cell[11051, 373, 71, 1, 70, "Input"] }, Closed]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)