(* 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[ 7534, 250] NotebookOptionsPosition[ 7001, 229] NotebookOutlinePosition[ 7439, 246] CellTagsIndexPosition[ 7396, 243] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell["Seeing Series", "Text", TextAlignment->Center, FontSize->36, FontColor->RGBColor[1, 0, 0]], Cell[CellGroupData[{ Cell["\<\ by Ruth Dover Illinois Mathematics and Science Academy\ \>", "Subsubtitle", CellChangeTimes->{{3.693436862168788*^9, 3.693436872079514*^9}}], Cell[TextData[{ "\tThis notebook is designed to help one see the pattern of convergence or \ divergence of a series. An example is shown below. You may edit the \ expression for ", Cell[BoxData[ SubscriptBox["a", "k"]]], ", the starting value for k, or the number of terms. Then execute the cell. \ (Other good suggestions for examples are ", Cell[BoxData[ RowBox[{ SubscriptBox["a", "k"], "=", RowBox[{"1", "/", "k"}]}]]], ", ", Cell[BoxData[ RowBox[{ RowBox[{ SubscriptBox["a", "k"], "=", RowBox[{"1", "/", SuperscriptBox["k", "2"]}]}], ",", " ", RowBox[{ RowBox[{"and", " ", SubscriptBox["a", "k"]}], "=", RowBox[{ RowBox[{"Sin", "[", "k", "]"}], "/", RowBox[{"k", "."}]}]}]}]]], ")" }], "Text", CellChangeTimes->{{3.693436953452721*^9, 3.693437062165588*^9}}], Cell[TextData[{ "\tSmall warning: Though the program functions, the graphics will not show \ clearly on a sequence which is clearly divergent such as ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["a", "k"], "=", SuperscriptBox[ RowBox[{"(", RowBox[{"-", "2"}], ")"}], "k"]}], TraditionalForm]]], ". Nevertheless, ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["a", "k"], "=", SuperscriptBox[ RowBox[{"(", RowBox[{"-", "1.1"}], ")"}], "k"]}], TraditionalForm]]], " will show nicely for a reasonable number of terms." }], "Text"], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"a", ",", " ", "k", ",", " ", "pl", ",", " ", "n"}], "]"}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"a", "[", "k_", "]"}], ":=", StyleBox[ FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"-", "1"}], ")"}], RowBox[{"k", "+", "1"}]], "k"], FontColor->RGBColor[1, 0, 1]]}], StyleBox[";", FontColor->RGBColor[1, 0, 1]]}], "\n", RowBox[{ RowBox[{ RowBox[{"kstart", "=", StyleBox["1", FontColor->RGBColor[1, 0, 1]]}], ";", " ", RowBox[{"terms", " ", "=", " ", StyleBox["15", FontColor->RGBColor[1, 0, 1]]}], StyleBox[";", FontColor->GrayLevel[0]]}], StyleBox["\[IndentingNewLine]", FontColor->GrayLevel[0]], RowBox[{"(*", RowBox[{ RowBox[{"Don", "'"}], "t", " ", "touch", " ", "the", " ", "stuff", " ", RowBox[{"below", "!"}]}], "*)"}]}], "\n", RowBox[{ RowBox[{"Clear", "[", "partsums", "]"}], ";", RowBox[{ RowBox[{"partsums", "[", "kstart", "]"}], "=", RowBox[{"a", "[", "kstart", "]"}]}], ";"}], "\n", RowBox[{ RowBox[{ RowBox[{"partsums", "[", "n_", "]"}], ":=", RowBox[{ RowBox[{"partsums", "[", RowBox[{"n", "-", "1"}], "]"}], "+", RowBox[{"a", "[", "n", "]"}]}]}], ";"}], "\n", RowBox[{ RowBox[{"snlist", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"N", "[", RowBox[{"partsums", "[", "k", "]"}], "]"}], ",", " ", RowBox[{"{", RowBox[{"k", ",", " ", "kstart", ",", " ", RowBox[{"terms", "-", "kstart", "+", "1"}]}], "}"}]}], "]"}]}], ";"}], "\n", RowBox[{ RowBox[{"snlistlong", "=", RowBox[{"Join", "[", RowBox[{ RowBox[{"{", "0", "}"}], ",", "snlist"}], "]"}]}], ";", RowBox[{ RowBox[{"mdpt", "[", "n_", "]"}], ":=", FractionBox[ RowBox[{ RowBox[{"snlistlong", "[", RowBox[{"[", "n", "]"}], "]"}], "+", RowBox[{"snlistlong", "[", RowBox[{"[", RowBox[{"n", "+", "1"}], "]"}], "]"}]}], "2"]}], ";", " ", RowBox[{ RowBox[{"rad", "[", "n_", "]"}], ":=", RowBox[{"Abs", "[", RowBox[{ RowBox[{"snlistlong", "[", RowBox[{"[", "n", "]"}], "]"}], "-", RowBox[{"mdpt", "[", "n", "]"}]}], "]"}]}], ";", RowBox[{"xmin", "=", RowBox[{"Min", "[", "snlistlong", "]"}]}], ";", " ", RowBox[{"xmax", "=", RowBox[{"Max", "[", "snlistlong", "]"}]}], ";", RowBox[{ RowBox[{"pl", "[", "n_", "]"}], ":=", RowBox[{"Graphics", "[", RowBox[{"{", RowBox[{ RowBox[{"Thickness", "[", ".006", "]"}], ",", " ", RowBox[{"Hue", "[", RowBox[{"n", "/", "terms"}], "]"}], ",", RowBox[{"Circle", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"mdpt", "[", "n", "]"}], ",", "0"}], "}"}], ",", RowBox[{"rad", "[", "n", "]"}], ",", RowBox[{"{", RowBox[{"0", ",", "\[Pi]"}], "}"}]}], "]"}]}], "}"}], "]"}]}], ";", RowBox[{ RowBox[{"plotpicture", "[", "k_", "]"}], ":=", RowBox[{"Show", "[", RowBox[{ RowBox[{"Table", "[", RowBox[{ RowBox[{"pl", "[", "i", "]"}], ",", " ", RowBox[{"{", RowBox[{"i", ",", " ", "1", ",", " ", "k"}], "}"}]}], "]"}], ",", RowBox[{"Axes", "\[Rule]", RowBox[{"{", RowBox[{"True", ",", " ", "False"}], "}"}]}], ",", RowBox[{"PlotRange", "->", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"xmin", ",", " ", "xmax"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"0", ",", RowBox[{"Abs", "[", RowBox[{"mdpt", "[", "1", "]"}], "]"}]}], " ", "}"}]}], "}"}]}], ",", RowBox[{"PlotLabel", "\[Rule]", RowBox[{"Style", "[", RowBox[{ RowBox[{"StringForm", "[", RowBox[{"\"\\"", ",", " ", "k", ",", RowBox[{"NumberForm", "[", RowBox[{ RowBox[{"snlist", "[", RowBox[{"[", "k", "]"}], "]"}], ",", " ", "4"}], "]"}]}], "]"}], ",", " ", RowBox[{"FontSize", "\[Rule]", "24"}]}], "]"}]}], ",", RowBox[{"AspectRatio", "->", FractionBox[ RowBox[{"1.5", RowBox[{"Abs", "[", RowBox[{"mdpt", "[", "1", "]"}], "]"}]}], RowBox[{"xmax", "-", "xmin"}]]}], ",", " ", RowBox[{"ImageSize", "\[Rule]", " ", "600"}]}], "]"}]}], ";", RowBox[{"Manipulate", "[", RowBox[{ RowBox[{"plotpicture", "[", "j", "]"}], ",", " ", RowBox[{"{", RowBox[{"j", ",", " ", "1", ",", " ", "terms", ",", " ", "1"}], "}"}]}], "]"}]}]}], "Input", CellChangeTimes->{{3.443054087564802*^9, 3.443054090996036*^9}, { 3.6934368820373363`*^9, 3.693436897798718*^9}}] }, Open ]] }, WindowSize->{764, 662}, WindowMargins->{{490, Automatic}, {Automatic, 23}}, PrivateNotebookOptions->{"VersionedStylesheet"->{"Default.nb"[8.] -> False}}, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (September \ 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[545, 20, 99, 3, 55, "Text"], Cell[CellGroupData[{ Cell[669, 27, 151, 4, 49, "Subsubtitle"], Cell[823, 33, 835, 27, 97, "Text"], Cell[1661, 62, 590, 19, 70, "Text"], Cell[2254, 83, 4731, 143, 459, "Input"] }, Open ]] } ] *)