(*********************************************************************** 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[ 33045, 793]*) (*NotebookOutlinePosition[ 33819, 820]*) (* CellTagsIndexPosition[ 33775, 816]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Finite Volume Methods for Hyperbolic Problems.", "Title"], Cell["Problem 9.1", "Input", FormatType->TextForm], Cell[CellGroupData[{ Cell[BoxData[ \(tau = Series[Series[ Q[x, t + k] - Q[x, t] + \n\t\t \((k\/h)\) u[x] \((Q[x, t] - Q[x - h, t])\) + \t\t\t\t\t \((k\/\(2\ h\))\) \((\n\t\t\t\t\t\t\t u[x + h] \((1 - \(k\/h\) u[x + h])\) \((Q[x + h, t] - Q[x, t])\) - \n\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t u[x] \((1 - \(k\/h\) u[x])\) \((Q[x, t] - Q[x - h, t])\)\n \t\t\t\t\t)\), \n\t\t\t\t\t\t\t{k, 0, 3}\n\t\t\t\t\t\t\t\t], { h, 0, 3}]\)], "Input"], Cell[BoxData[ InterpretationBox[ RowBox[{ RowBox[{ RowBox[{"(", InterpretationBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{ SuperscriptBox["Q", TagBox[\((0, 1)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}], "+", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{\(-\(1\/2\)\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}]}]}], ")"}], " ", "h"}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{\(1\/2\), " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/2\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}]}], "+", RowBox[{\(1\/6\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((3, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}], " ", \(h\^2\)}], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{\(-\(1\/24\)\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((4, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{\(1\/6\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((3)\), Derivative], MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/4\), " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/6\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((3, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/12\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((4, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}]}]}], ")"}], " ", \(h\^3\)}], "+", InterpretationBox[\(O[h]\^4\), SeriesData[ h, 0, {}, 0, 4, 1]]}], SeriesData[ h, 0, { Plus[ Derivative[ 0, 1][ Q][ x, t], Times[ u[ x], Derivative[ 1, 0][ Q][ x, t]]], Plus[ Times[ Rational[ -1, 2], u[ x], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ u[ x], Derivative[ 2, 0][ Q][ x, t]]]]], Plus[ Times[ Rational[ 1, 2], Plus[ Times[ Rational[ 1, 2], Derivative[ 2][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Derivative[ 1][ u][ x], Derivative[ 2, 0][ Q][ x, t]]]], Times[ Rational[ 1, 6], u[ x], Derivative[ 3, 0][ Q][ x, t]]], Plus[ Times[ Rational[ -1, 24], u[ x], Derivative[ 4, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ Rational[ 1, 6], Derivative[ 3][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ 1, 4], Derivative[ 2][ u][ x], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ 1, 6], Derivative[ 1][ u][ x], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ 1, 12], u[ x], Derivative[ 4, 0][ Q][ x, t]]]]]}, 0, 4, 1]], ")"}], " ", "k"}], "+", RowBox[{ RowBox[{"(", InterpretationBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{\(1\/2\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((0, 2)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{\(-2\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(u[x]\^2\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}]}]}], ")"}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], "2"], "+", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}], " ", "h"}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{\(1\/3\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((3)\), Derivative], MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], "2"], "+", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/3\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((3, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/12\), " ", \(u[x]\^2\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((4, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}], " ", \(h\^2\)}], "+", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{"-", RowBox[{"(", RowBox[{ RowBox[{\(1\/4\), " ", SuperscriptBox[ RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}], "2"]}], "+", RowBox[{\(1\/3\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["u", TagBox[\((3)\), Derivative], MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{\(1\/12\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((4)\), Derivative], MultilineFunction->None], "[", "x", "]"}]}]}], ")"}]}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/2\), " ", RowBox[{"(", RowBox[{ RowBox[{ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}]}], "+", RowBox[{\(1\/3\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((3)\), Derivative], MultilineFunction->None], "[", "x", "]"}]}]}], ")"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/6\), " ", RowBox[{"(", RowBox[{ SuperscriptBox[ RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], "2"], "+", RowBox[{\(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[DoublePrime]", MultilineFunction->None], "[", "x", "]"}]}]}], ")"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((3, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}], "-", RowBox[{\(1\/12\), " ", \(u[x]\), " ", RowBox[{ SuperscriptBox["u", "\[Prime]", MultilineFunction->None], "[", "x", "]"}], " ", RowBox[{ SuperscriptBox["Q", TagBox[\((4, 0)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}]}]}], ")"}], " ", \(h\^3\)}], "+", InterpretationBox[\(O[h]\^4\), SeriesData[ h, 0, {}, 0, 4, 1]]}], SeriesData[ h, 0, { Plus[ Times[ Rational[ 1, 2], Derivative[ 0, 2][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ -2, u[ x], Derivative[ 1][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ -1, Power[ u[ x], 2], Derivative[ 2, 0][ Q][ x, t]]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ -1, u[ x], Derivative[ 1][ u][ x], Derivative[ 2, 0][ Q][ x, t]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 2][ u][ x]], Times[ Rational[ 1, 3], u[ x], Derivative[ 3][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ -1, 2], Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ -1, 3], u[ x], Derivative[ 1][ u][ x], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ -1, 12], Power[ u[ x], 2], Derivative[ 4, 0][ Q][ x, t]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Times[ Rational[ 1, 4], Power[ Derivative[ 2][ u][ x], 2]], Times[ Rational[ 1, 3], Derivative[ 1][ u][ x], Derivative[ 3][ u][ x]], Times[ Rational[ 1, 12], u[ x], Derivative[ 4][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ -1, 2], Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 2][ u][ x]], Times[ Rational[ 1, 3], u[ x], Derivative[ 3][ u][ x]]], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ -1, 6], Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ -1, 12], u[ x], Derivative[ 1][ u][ x], Derivative[ 4, 0][ Q][ x, t]]]]}, 0, 4, 1]], ")"}], " ", \(k\^2\)}], "+", RowBox[{\(1\/6\), " ", RowBox[{ SuperscriptBox["Q", TagBox[\((0, 3)\), Derivative], MultilineFunction->None], "[", \(x, t\), "]"}], " ", \(k\^3\)}], "+", InterpretationBox[\(O[k]\^4\), SeriesData[ k, 0, {}, 1, 4, 1]]}], SeriesData[ k, 0, { SeriesData[ h, 0, { Plus[ Derivative[ 0, 1][ Q][ x, t], Times[ u[ x], Derivative[ 1, 0][ Q][ x, t]]], Plus[ Times[ Rational[ -1, 2], u[ x], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ u[ x], Derivative[ 2, 0][ Q][ x, t]]]]], Plus[ Times[ Rational[ 1, 2], Plus[ Times[ Rational[ 1, 2], Derivative[ 2][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Derivative[ 1][ u][ x], Derivative[ 2, 0][ Q][ x, t]]]], Times[ Rational[ 1, 6], u[ x], Derivative[ 3, 0][ Q][ x, t]]], Plus[ Times[ Rational[ -1, 24], u[ x], Derivative[ 4, 0][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ Rational[ 1, 6], Derivative[ 3][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ 1, 4], Derivative[ 2][ u][ x], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ 1, 6], Derivative[ 1][ u][ x], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ 1, 12], u[ x], Derivative[ 4, 0][ Q][ x, t]]]]]}, 0, 4, 1], SeriesData[ h, 0, { Plus[ Times[ Rational[ 1, 2], Derivative[ 0, 2][ Q][ x, t]], Times[ Rational[ 1, 2], Plus[ Times[ -2, u[ x], Derivative[ 1][ u][ x], Derivative[ 1, 0][ Q][ x, t]], Times[ -1, Power[ u[ x], 2], Derivative[ 2, 0][ Q][ x, t]]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ -1, u[ x], Derivative[ 1][ u][ x], Derivative[ 2, 0][ Q][ x, t]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 2][ u][ x]], Times[ Rational[ 1, 3], u[ x], Derivative[ 3][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ -1, 2], Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ -1, 3], u[ x], Derivative[ 1][ u][ x], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ -1, 12], Power[ u[ x], 2], Derivative[ 4, 0][ Q][ x, t]]]], Times[ Rational[ 1, 2], Plus[ Times[ -1, Plus[ Times[ Rational[ 1, 4], Power[ Derivative[ 2][ u][ x], 2]], Times[ Rational[ 1, 3], Derivative[ 1][ u][ x], Derivative[ 3][ u][ x]], Times[ Rational[ 1, 12], u[ x], Derivative[ 4][ u][ x]]], Derivative[ 1, 0][ Q][ x, t]], Times[ Rational[ -1, 2], Plus[ Times[ Derivative[ 1][ u][ x], Derivative[ 2][ u][ x]], Times[ Rational[ 1, 3], u[ x], Derivative[ 3][ u][ x]]], Derivative[ 2, 0][ Q][ x, t]], Times[ Rational[ -1, 6], Plus[ Power[ Derivative[ 1][ u][ x], 2], Times[ u[ x], Derivative[ 2][ u][ x]]], Derivative[ 3, 0][ Q][ x, t]], Times[ Rational[ -1, 12], u[ x], Derivative[ 1][ u][ x], Derivative[ 4, 0][ Q][ x, t]]]]}, 0, 4, 1], Times[ Rational[ 1, 6], Derivative[ 0, 3][ Q][ x, t]]}, 1, 4, 1]]], "Output"] }, Open ]] }, Open ]] }, FrontEndVersion->"X 3.0", ScreenRectangle->{{0, 1280}, {0, 1024}}, WindowSize->{1188, 919}, WindowMargins->{{9, Automatic}, {3, Automatic}}, PrintingPageRange->{Automatic, Automatic}, PrintingOptions->{"PaperSize"->{612, 792}, "PaperOrientation"->"Portrait", "Magnification"->1} ] (*********************************************************************** 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, 63, 0, 102, "Title"], Cell[1797, 53, 52, 1, 28, "Input"], Cell[CellGroupData[{ Cell[1874, 58, 571, 12, 226, "Input"], Cell[2448, 72, 30569, 717, 317, "Output"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)