(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 6.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 37744, 1334] NotebookOptionsPosition[ 35358, 1266] NotebookOutlinePosition[ 35765, 1283] CellTagsIndexPosition[ 35722, 1280] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"Math", " ", "3411", " ", RowBox[{"(", RowBox[{"Fall", " ", "2009"}], ")"}]}], FontSize->24, FontVariations->{"Underline"->True}, FontColor->RGBColor[0, 0, 1]]}]], "Input", CellChangeTimes->{{3.401800323828125*^9, 3.401800324203125*^9}, { 3.4609176469375*^9, 3.460917647328125*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{ RowBox[{ "Here", " ", "are", " ", "a", " ", "few", " ", "examples", " ", "of", " ", "how", " ", "to", " ", "solve", " ", "recurrence", " ", "relations", " ", "and", " ", "a", " ", "class", " ", "of", " ", "discrete", " ", "dynamical", " ", "system"}], ",", " ", RowBox[{"using", " ", "mathematica"}]}], FontSize->16, FontVariations->{"Underline"->True}]}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], RowBox[{ StyleBox["It", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["is", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["always", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["a", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["good", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["habit", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["to", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["clear", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["out", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["any", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["parameters", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["or", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["junk", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["that", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["mathematica", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["has", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["been", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["running", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["on", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox["other", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], StyleBox[" ", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], RowBox[{ StyleBox["windows", FontWeight->"Plain", FontTracking->"Plain", FontVariations->{"CompatibilityType"->0, "Masked"->False, "Outline"->False, "RotationAngle"->0, "Shadow"->False, "StrikeThrough"->False, "Underline"->False}], ":"}]}]}], FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{"a", ",", "b", ",", "c"}], "]"}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{ "Then", " ", "type", " ", "in", " ", "the", " ", "commands", " ", "followed", " ", "by", " ", "Shift"}], "-", "Return"}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"Example", " ", "1"}], FontSize->18, FontVariations->{"Underline"->True}]}]], "Input", CellChangeTimes->{{3.464709399265625*^9, 3.464709402125*^9}}], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", "n", "]"}], "\[Equal]", RowBox[{ RowBox[{"a", "[", RowBox[{"n", "-", "1"}], "]"}], "+", RowBox[{"a", "[", RowBox[{"n", "-", "2"}], "]"}]}]}], ",", RowBox[{ RowBox[{"a", "[", "0", "]"}], "\[Equal]", RowBox[{"a", "[", "1", "]"}], "\[Equal]", "1"}]}], "}"}], ",", RowBox[{"a", "[", "n", "]"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{ "If", " ", "you", " ", "need", " ", "a", " ", "table", " ", "of", " ", "numerical", " ", "values"}], ",", " ", RowBox[{"use", " ", "Table"}], ",", " ", RowBox[{ "and", " ", "we", " ", "can", " ", "also", " ", "name", " ", "our", " ", RowBox[{"Table", ":"}]}]}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"P", "=", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"n", ",", " ", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"a", "[", "n", "]"}], "/.", "%"}], ")"}], "[", RowBox[{"[", "1", "]"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "10"}], "}"}]}], "]"}], "//", "Expand"}]}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{" ", RowBox[{ RowBox[{ "Since", " ", "we", " ", "named", " ", "our", " ", "Table", " ", "of", " ", "values", " ", "as", " ", "P"}], ",", " ", RowBox[{"we", " ", "can", " ", "now", " ", "plot", " ", RowBox[{"P", ":"}]}]}]}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\< a_n\>\""}], "}"}]}]}], " ", "]"}]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"Example", " ", "2"}], FontSize->18, FontVariations->{"Underline"->True}]}]], "Input", CellChangeTimes->{{3.464709486078125*^9, 3.464709499328125*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{"This", " ", "is", " ", "a", " ", "linear"}], ",", " ", RowBox[{ "homogeneous", " ", "recurrence", " ", "relation", " ", "with", " ", "variable", " ", RowBox[{"coefficients", "."}]}]}], FontSize->14, FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "\[Equal]", RowBox[{"a", "[", "1", "]"}], "\[Equal]", "2"}], ",", RowBox[{ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], " ", RowBox[{"(", RowBox[{"n", "+", "2"}], ")"}], " ", RowBox[{"a", "[", RowBox[{"n", "+", "2"}], "]"}]}], "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"n", "+", "1"}], ")"}], " ", RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}]}], "-", RowBox[{"3", " ", RowBox[{"a", "[", "n", "]"}]}]}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"a", "[", "n", "]"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"Example", " ", "3"}], FontSize->18, FontVariations->{"Underline"->True}]}]], "Input", CellChangeTimes->{{3.46470951015625*^9, 3.4647095205*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox[" ", FontSize->10], StyleBox[ RowBox[{ RowBox[{ "The", " ", "following", " ", "command", " ", "solves", " ", "a", " ", "pair", " ", "of", " ", "coupled", " ", RowBox[{"equations", ".", "Notice"}], " ", "that", " ", "it", " ", "is", " ", "possible", " ", "to", " ", "get", " ", "the", " ", "solution", " ", "in", " ", "pure\[Hyphen]function", " ", "form"}], ",", RowBox[{"by", " ", "specifying", RowBox[{ FormBox["{", TraditionalForm], RowBox[{ StyleBox["a", "TI"], StyleBox[",", "MR"], " ", StyleBox["b", "TI"]}], FormBox["}", TraditionalForm]}], "rather", " ", "than", RowBox[{ RowBox[{ FormBox["{", TraditionalForm], RowBox[{ RowBox[{ StyleBox["a", "TI"], StyleBox["[", "MR"], StyleBox["n", "TI"], StyleBox["]", "MR"]}], StyleBox[",", "MR"], " ", RowBox[{ StyleBox["b", "TI"], StyleBox["[", "MR"], StyleBox["n", "TI"], StyleBox["]", "MR"]}]}], FormBox["}", TraditionalForm]}], "."}]}]}], FontSize->12, FontWeight->"Plain"]}], FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "-", RowBox[{"3", " ", RowBox[{"b", "[", "n", "]"}]}], "-", RowBox[{"4", " ", RowBox[{"a", "[", "n", "]"}]}]}], "\[Equal]", "1"}], ",", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "+", RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "+", RowBox[{"b", "[", "n", "]"}]}], "\[Equal]", "n"}], ",", RowBox[{ RowBox[{"a", "[", "0", "]"}], "\[Equal]", RowBox[{"b", "[", "0", "]"}], "\[Equal]", "0"}]}], "}"}], ",", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"a", "[", "n", "]"}], ",", RowBox[{"b", "[", "n", "]"}]}], "}"}], "/.", "%"}], ")"}], "[", RowBox[{"[", "1", "]"}], "]"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "10"}], "}"}]}], "]"}], "//", "Expand"}], "\[IndentingNewLine]"}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "4"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.464709559828125*^9, 3.464709560234375*^9}}], Cell[BoxData[ StyleBox[ RowBox[{ StyleBox["RSolve", "MR", FontSize->10], StyleBox[" ", "MR", FontSize->10], StyleBox["can", FontSize->10], StyleBox[" ", FontSize->14], StyleBox["also", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["solve", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["nonlinear", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["equations", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["when", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["the", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["nonlinearity", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["comes", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["from", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["a", FontSize->14], StyleBox[" ", FontSize->14], StyleBox[ RowBox[{"convolution", ".", "The"}], FontSize->14], StyleBox[" ", FontSize->14], StyleBox["solution", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["to", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["this", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["recurrence", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["equation", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["is", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["the", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["sequence", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["of", FontSize->14], StyleBox[" ", FontSize->14], StyleBox["Catalan", FontSize->14], StyleBox[" ", FontSize->14], StyleBox[ RowBox[{"numbers", "."}], FontSize->14]}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"c", "[", RowBox[{"n", "+", "1"}], "]"}], "\[Equal]", RowBox[{"Sum", "[", RowBox[{ RowBox[{ RowBox[{"c", "[", "k", "]"}], " ", RowBox[{"c", "[", RowBox[{"n", "-", "k"}], "]"}]}], ",", RowBox[{"{", RowBox[{"k", ",", "0", ",", "n"}], "}"}]}], "]"}]}], ",", RowBox[{ RowBox[{"c", "[", "0", "]"}], "\[Equal]", "1"}]}], "}"}], ",", RowBox[{"c", "[", "n", "]"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"Example", " ", "5"}], FontSize->18, FontVariations->{"Underline"->True}]}]], "Input", CellChangeTimes->{{3.464709575421875*^9, 3.464709588359375*^9}}], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "-", RowBox[{"8", " ", RowBox[{"b", "[", "n", "]"}]}], "-", RowBox[{"7", " ", RowBox[{"a", "[", "n", "]"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "-", RowBox[{"6", RowBox[{"b", "[", "n", "]"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"a", "[", "0", "]"}], "\[Equal]", "2"}], ",", RowBox[{ RowBox[{"b", "[", "0", "]"}], "\[Equal]", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.4647095939375*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "6"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.464709608375*^9, 3.464709608828125*^9}}], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{ RowBox[{ "If", " ", "you", " ", "cannot", " ", "find", " ", "the", " ", "solution", " ", "in", " ", "closed", " ", "form"}], ",", " ", RowBox[{"as", " ", RowBox[{"in", ":"}]}]}], FontWeight->"Plain", FontSlant->"Italic"]}]], "Input"], Cell[BoxData[ RowBox[{"RSolve", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "-", RowBox[{"2", " ", RowBox[{"(", RowBox[{"b", "[", "n", "]"}], ")"}], "*", " ", RowBox[{"(", RowBox[{"a", "[", "n", "]"}], ")"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "-", RowBox[{"6", RowBox[{"b", "[", "n", "]"}]}]}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{"a", "[", "0", "]"}], "\[Equal]", "2"}], ",", RowBox[{ RowBox[{"b", "[", "0", "]"}], "\[Equal]", "3"}]}], "}"}], ",", RowBox[{"{", RowBox[{"a", ",", "b"}], "}"}], ",", "n"}], "]"}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{"then", ",", " ", RowBox[{ "you", " ", "need", " ", "a", " ", "table", " ", "of", " ", "several", " ", "values", " ", "of", " ", RowBox[{"a", "[", "n", "]"}], " ", "and", " ", RowBox[{"b", "[", "n", "]"}]}], ",", " ", RowBox[{"as", " ", RowBox[{"in", ":"}]}]}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "2.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "3.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{"2", "*", RowBox[{"a", "[", "n", "]"}], "*", RowBox[{"b", "[", "n", "]"}]}]}], ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{"6", "*", RowBox[{"b", "[", "n", "]"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "15"}], "}"}]}], "]"}], "//", "Expand"}], "//", "TableForm"}]}], "Input"], Cell[BoxData[ RowBox[{ StyleBox["\[IndentingNewLine]", FontSize->18, FontVariations->{"Underline"->True}], RowBox[{ StyleBox[ RowBox[{"Example", " ", "7"}], FontSize->18, FontVariations->{"Underline"->True}], "\[IndentingNewLine]", StyleBox[ RowBox[{ "We", " ", "could", " ", "also", " ", "name", " ", "our", " ", "Table", " ", "of", " ", "plots", " ", "as", " ", RowBox[{"P", ":"}]}], FontWeight->"Plain", FontSlant->"Italic"]}]}]], "Input", CellChangeTimes->{{3.464709708546875*^9, 3.46470972359375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "2.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "3.0"}], "\[IndentingNewLine]", RowBox[{"P", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{"0.15", "*", RowBox[{"a", "[", "n", "]"}], "*", RowBox[{"b", "[", "n", "]"}]}]}], ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{"0.9", "*", RowBox[{"b", "[", "n", "]"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "10"}], "}"}]}], "]"}]}], "\[IndentingNewLine]"}], "Input"], Cell[BoxData[ RowBox[{"\[IndentingNewLine]", StyleBox[ RowBox[{"or", " ", "Table", " ", "in", " ", "vertical", " ", RowBox[{"format", ":"}]}], FontWeight->"Plain", FontSlant->"Italic"]}]], "Input", CellChangeTimes->{{3.46470969315625*^9, 3.464709695734375*^9}, 3.464710170390625*^9}], Cell[BoxData[ RowBox[{"TableForm", "[", RowBox[{"%", ",", RowBox[{"TableHeadings", "->", RowBox[{"{", RowBox[{"Automatic", ",", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ StyleBox[ RowBox[{ "then", " ", "plot", " ", "P", " ", "as", " ", "a", " ", "list", " ", "of", " ", RowBox[{"points", ":"}]}], FontWeight->"Plain", FontSlant->"Italic"]], "Input"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", " ", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\\""}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.46471021409375*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "8"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.464710210765625*^9, 3.464710211125*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "5.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "8.0"}], "\[IndentingNewLine]", RowBox[{"P", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{"0.85", "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"0.8", "*", RowBox[{"b", "[", "n", "]"}]}]}]}], ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{ RowBox[{"-", "0.1"}], RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"0.9", "*", RowBox[{"b", "[", "n", "]"}]}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "30"}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\\""}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.464710236609375*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "9"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.464710255859375*^9, 3.464710256515625*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "5.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "2.0"}], "\[IndentingNewLine]", RowBox[{"P", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{"5", "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"2", "*", RowBox[{"b", "[", "n", "]"}]}], " ", "+", "1"}]}], ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{"6", "*", RowBox[{"b", "[", "n", "]"}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "20"}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", " ", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\\""}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.464710270265625*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "10"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.46471028046875*^9, 3.46471028084375*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "45.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "80.0"}], "\[IndentingNewLine]", RowBox[{"P", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{"0.5", "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"0.4", "*", RowBox[{"b", "[", "n", "]"}]}], " ", "+", "1"}]}], ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{ RowBox[{"-", "0.104"}], "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"1.1", "*", RowBox[{"b", "[", "n", "]"}]}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "20"}], "}"}]}], "]"}]}]}], "Input"], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", " ", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\\""}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData["\[IndentingNewLine]"], "Input", CellChangeTimes->{3.464710305578125*^9}], Cell[BoxData[ StyleBox[ RowBox[{"Example", " ", "11"}], FontSize->18, FontVariations->{"Underline"->True}]], "Input", CellChangeTimes->{{3.46471030834375*^9, 3.464710308421875*^9}}], Cell[BoxData[{ RowBox[{ RowBox[{"a", "[", "0", "]"}], "=", "45.0"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"b", "[", "0", "]"}], "=", "80.0"}], "\[IndentingNewLine]", RowBox[{"P", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"a", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{"0.75", "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{"0.8", "*", RowBox[{"b", "[", "n", "]"}]}]}]}], " ", ",", " ", RowBox[{ RowBox[{"b", "[", RowBox[{"n", "+", "1"}], "]"}], "=", RowBox[{ RowBox[{ RowBox[{"-", "0.2"}], "*", RowBox[{"a", "[", "n", "]"}]}], " ", "+", " ", RowBox[{".85", "*", RowBox[{"b", "[", "n", "]"}]}]}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"n", ",", "0", ",", "20"}], "}"}]}], "]"}]}]}], "Input"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"P", ",", " ", RowBox[{"PlotStyle", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02", "]"}]}], "}"}]}], ",", " ", RowBox[{"AxesLabel", " ", "\[Rule]", " ", RowBox[{"{", RowBox[{"\"\\"", ",", " ", "\"\\""}], "}"}]}]}], "]"}]], "Input"], Cell[BoxData[ TagBox[ RowBox[{"\[SkeletonIndicator]", "Graphics", "\[SkeletonIndicator]"}], False, Editable->False]], "Output"] }, Open ]] }, WindowSize->{847, 842}, WindowMargins->{{50, Automatic}, {Automatic, 29}}, PrintingCopies->1, PrintingPageRange->{Automatic, Automatic}, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 376, 10, 60, "Input"], Cell[924, 32, 474, 11, 101, "Input"], Cell[1401, 45, 11390, 425, 52, "Input"], Cell[12794, 472, 91, 2, 31, "Input"], Cell[12888, 476, 234, 7, 31, "Input"], Cell[13125, 485, 225, 6, 55, "Input"], Cell[13353, 493, 500, 15, 31, "Input"], Cell[13856, 510, 390, 11, 31, "Input"], Cell[14249, 523, 420, 14, 31, "Input"], Cell[14672, 539, 344, 10, 31, "Input"], Cell[15019, 551, 449, 12, 31, "Input"], Cell[15471, 565, 228, 6, 55, "Input"], Cell[15702, 573, 323, 10, 32, "Input"], Cell[16028, 585, 797, 24, 31, "Input"], Cell[16828, 611, 222, 6, 55, "Input"], Cell[17053, 619, 1318, 43, 72, "Input"], Cell[18374, 664, 797, 24, 31, "Input"], Cell[19174, 690, 461, 15, 52, "Input"], Cell[19638, 707, 189, 5, 38, "Input"], Cell[19830, 714, 2004, 100, 52, "Input"], Cell[21837, 816, 589, 18, 31, "Input"], Cell[22429, 836, 228, 6, 55, "Input"], Cell[22660, 844, 775, 24, 31, "Input"], Cell[23438, 870, 85, 1, 52, "Input"], Cell[23526, 873, 186, 5, 38, "Input"], Cell[23715, 880, 335, 10, 52, "Input"], Cell[24053, 892, 812, 25, 31, "Input"], Cell[24868, 919, 384, 11, 31, "Input"], Cell[25255, 932, 789, 24, 72, "Input"], Cell[26047, 958, 566, 17, 76, "Input"], Cell[26616, 977, 763, 23, 92, "Input"], Cell[27382, 1002, 306, 8, 52, "Input"], Cell[27691, 1012, 261, 8, 31, "Input"], Cell[27955, 1022, 210, 7, 31, "Input"], Cell[28168, 1031, 452, 12, 31, "Input"], Cell[28623, 1045, 86, 1, 52, "Input"], Cell[28712, 1048, 186, 5, 38, "Input"], Cell[28901, 1055, 924, 28, 72, "Input"], Cell[29828, 1085, 447, 12, 31, "Input"], Cell[30278, 1099, 87, 1, 52, "Input"], Cell[30368, 1102, 189, 5, 38, "Input"], Cell[30560, 1109, 806, 24, 72, "Input"], Cell[31369, 1135, 452, 12, 31, "Input"], Cell[31824, 1149, 87, 1, 52, "Input"], Cell[31914, 1152, 188, 5, 38, "Input"], Cell[32105, 1159, 947, 28, 72, "Input"], Cell[33055, 1189, 452, 12, 31, "Input"], Cell[33510, 1203, 87, 1, 52, "Input"], Cell[33600, 1206, 189, 5, 38, "Input"], Cell[33792, 1213, 936, 28, 72, "Input"], Cell[CellGroupData[{ Cell[34753, 1245, 452, 12, 31, "Input"], Cell[35208, 1259, 134, 4, 30, "Output"] }, Open ]] } ] *) (* End of internal cache information *)