(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing 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[ 13665, 454]*) (*NotebookOutlinePosition[ 15017, 496]*) (* CellTagsIndexPosition[ 14929, 490]*) (*WindowFrame->Normal*) Notebook[{ Cell[TextData[{ "MATH 257 Calculus III\t\t\t\t\t\t\t\tWeek of March 31, 2003\n", StyleBox["Lab 1: Warming up with Sequences", "Title"], "\n", StyleBox["Name 1\nName 2\nSection:", "Section"], "\n\nThe purpose of this lab is to get used to dealing with sequences in ", StyleBox["Mathematica", FontSlant->"Italic"], ". We'll practice \n\t(1) defining sequences, \n\t(2) graphing them, and \n\ \t(3) using ", StyleBox["Mathematica", FontSlant->"Italic"], " to compare rates of growth of some classic sequences.\n\n", StyleBox["The Rules: ", FontWeight->"Bold"], " \t\[Bullet] You'll work in PAIRS, handing in one assignment for the both \ of you. \n\t\t\[Bullet] At the end you'll \"hand in\" a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook for your lab report. You'll do this by uploading\n\t\t it into \ Blackboard's ", StyleBox["Digital Drop Box", FontWeight->"Bold"], " for this course. \n\n", StyleBox["First:", FontSize->18, FontWeight->"Bold"], " go to ", StyleBox["Blackboard", FontWeight->"Bold"], " using a web browser (http://www.blackboard.uc.edu), get into this class \ (CALC III LAB),\n \t go under ", StyleBox["Assignments", FontWeight->"Bold"], ", and get ", StyleBox["Lab 1", FontWeight->"Bold"], ". ", StyleBox["Download it to your OWN disk!", FontSlant->"Italic"], "\n \t You'll type your answers to the questions (in red) \ directly into the lab, then clean it up (delete exerything \n \t \ except the answers to your questions), and upload it to Blackboard's Digital \ Drop Box.\n\nHere we go now..." }], "Text"], Cell[CellGroupData[{ Cell[TextData[StyleBox["Next, Who Are You?", "Subtitle"]], "Text"], Cell[TextData[{ StyleBox["Question 1:", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" Have each person in your group tell me a little something about \ yourselves.", FontSize->14, FontColor->RGBColor[1, 0, 0]], " You might find it easier to type sentences and such in ", StyleBox["Mathematica", FontSlant->"Italic"], " by selecting the text-block handle over there on the right, and going to \ the menu Format-> Style and choosing Text.\n\tWhat should you tell me? What \ year are you? What's your major? How do you like math? Does ", StyleBox["Mathematica", FontSlant->"Italic"], " give you the heebie-jeebies or does it totally rock? (Or both?) Or tell \ me anything else that will help me remember who you are.\n\t(Write your \ response to this question in the below text block.)\n" }], "Text"] }, Open ]], Cell[BoxData[ \(\[IndentingNewLine]\)], "Input"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Defining and Graphing Sequences", "Subtitle"], "\nSuppose we want to examine the sequence", StyleBox[" ", FontSize->14, FontWeight->"Bold"], Cell[BoxData[ \(a\_n\)], FontSize->14, FontWeight->"Bold"], StyleBox[" = ", FontSize->14, FontWeight->"Bold"], Cell[BoxData[ \(\(3 n\^2\)\/\(Sin[n] + \ n\^2\)\)], FontSize->14, FontWeight->"Bold"], ". You do this in ", StyleBox["Mathematica", FontSlant->"Italic"], " by actually defining a function a[k_]. Type in and excucute the \ following\n" }], "Text", CellDingbat->None], Cell[BoxData[ \(\(\(\n\)\(a[n_] := \(3*n^2\)\/\(Sin[n] + n^2\)\)\)\)], "Input"], Cell[TextData[{ "Now you can get ", StyleBox["Mathematica", FontSlant->"Italic"], " to tell you what a[1] is or a[2], or whatever. Try it!" }], "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(a[2]\)], "Input"], Cell[BoxData[ \(12\/\(4 + Sin[2]\)\)], "Output"] }, Open ]], Cell[TextData[{ "Notice that this isn't very useful. If you want ", StyleBox["Mathematica", FontSlant->"Italic"], " to give you a decimal answer, use the numerical N[ ] command:" }], "Text"], Cell[BoxData[ \(N[a[2]]\)], "Input"], Cell["or", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(a[2] // N\)], "Input"], Cell[BoxData[ \(2.4443416148365484`\)], "Output"] }, Open ]], Cell[TextData[{ "But that's not much fun. It's much more interesting to make ", StyleBox["Mathematica", FontSlant->"Italic"], " plot the values of a[n] for you. Try this:\n" }], "Text"], Cell[BoxData[ \(ListPlot[Table[a[n], \ {n, 1, 20}]]\)], "Input"], Cell[TextData[{ "ListPlot and Table are great commands to use for visualizing the values of \ a sequence. Go ahead and try plotting ", Cell[BoxData[ \(TraditionalForm\`a\_k\)]], " from 1 to 50 or higher to see what happens. " }], "Text"], Cell[TextData[{ StyleBox["Question 2: ", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" From this graph, what do you think the sequence ", FontSize->14, FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ \(TraditionalForm\`a\_n\)], FontSize->14, FontColor->RGBColor[1, 0, 0]], StyleBox[" converges to? Why? Explain your reasoning in a complete \ sentence. ", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\)\)], "Input"], Cell[TextData[{ "Other things to try: \n\t\[Bullet] Notice how ListPlot sometimes ignores \ the first few terms of the sequence. It does this\n\t because it tries to \ make the plot look pretty. You can force it to show all the proper values\n\t\ by adding PlotRange->{{xmin, xmax},{ymin, ymax}} at the end of the ListPlot \ command.\n\t (For example,", StyleBox[" ListPlot[ blah blah , PlotRange->{{0,20},{0,4}}]", FontWeight->"Bold"], " or something like that.\n\t \n\t\[Bullet] You can also see what \ sequences do using the Limit command. Like, you can try \n\t Limit[a[n], \ n->Infinity] which should make ", StyleBox["Mathematica", FontSlant->"Italic"], " try to figure out what this limit is." }], "Text"], Cell[TextData[{ StyleBox["Question 3: ", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" Define the sequence", FontSize->14, FontColor->RGBColor[1, 0, 0]], StyleBox[" ", FontSize->14, FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], Cell[BoxData[ FormBox[ RowBox[{ StyleBox[\(b\_n\), "Input", FontSize->16], StyleBox["=", "Input", FontSize->16], StyleBox[\(\(\((\(-1\))\)^n\ *\ n\)\/\(n^3\ - \ Log[n]\)\), "Input", FontSize->16], " "}], TraditionalForm]], FontSize->14, FontWeight->"Bold", FontColor->RGBColor[1, 0, 0]], StyleBox[". Graph it using ListPlot. What does it go to as n-> Infinity?", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"] }, Open ]], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\)\)], "Input"], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["Comparing Sequence Rates of Growth", "Subtitle"], "\nThis is where we ask the question, \"which grows faster, ln(n) or n?\" \ and stuff like that." }], "Text"], Cell[TextData[{ StyleBox["Logarithmic Growth versus Polynomial Growth:", "Section"], StyleBox[" ", "Subsubsection"], "Try entering the following into ", StyleBox["Mathematica", FontSlant->"Italic"], ":" }], "Text", GeneratedCell->False, CellAutoOverwrite->False, CellTags->"Info3257680234-7589721"], Cell[BoxData[{ \(Clear[a, b]\), "\[IndentingNewLine]", \(a[n_] := Log[n]\), "\[IndentingNewLine]", \(b[n_] := n\), "\[IndentingNewLine]", \(ListPlot[Table[\ a[n]/b[n]\ , {n, 1, 100}], AspectRatio \[Rule] 1]\), "\[IndentingNewLine]", \(ListPlot[Table[\ a[n]/b[n], {n, 100, 200}], AspectRatio \[Rule] 1]\)}], "Input"], Cell[TextData[{ StyleBox["Question 4:", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" Describe, in your own words, what these graphs are showing you. \ From n=100 to n=200, how much does a[n] increase (roughly)? How much does \ b[n] increase? Try other ranges, like n=500 to 600 or n=1000 to 1100. What \ does this say about the rate of growth of a[n] compared to b[n]?", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\[IndentingNewLine]\)], "Input"], Cell[TextData[{ StyleBox["Polynomial Growth versus Exponential Growth:", "Section"], StyleBox[" ", "Subsubsection"], "Now try comparing ", Cell[BoxData[ FormBox[ RowBox[{ StyleBox[\(a\_n\), FontSize->14, FontWeight->"Bold"], "=", StyleBox[\(n\^5\), FontSize->14, FontWeight->"Bold"]}], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ StyleBox[\(b\_n = 2\^n\), FontSize->14, FontWeight->"Bold"], TraditionalForm]]], " :" }], "Text", GeneratedCell->False, CellAutoOverwrite->False, CellTags->"Info3257680234-7589721"], Cell[BoxData[{ \(Clear[a, b]\), "\[IndentingNewLine]", \(a[n_] := n^5\), "\[IndentingNewLine]", \(b[n_] := 2^n\), "\[IndentingNewLine]", \(ListPlot[Table[a[n]/b[n], {n, 1, 50}], \ AspectRatio \[Rule] 1]\)}], "Input"], Cell[TextData[{ StyleBox["Question 5:", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" How come this sequence isn't monotonic? Explain why. Try other \ ranges of n, like in the previous problem. Based on what you see, compare \ ploynomial growth to exponential growth.", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\[IndentingNewLine]\)], "Input"], Cell[TextData[{ StyleBox["Exponential Growth versus Factorial Growth:", "Section"], StyleBox[" \n", "Subsubsection"], "Now try comparing ", Cell[BoxData[ FormBox[ StyleBox[\(a\_n = 5\^n\), FontSize->14, FontWeight->"Bold"], TraditionalForm]]], " and ", Cell[BoxData[ FormBox[ StyleBox[\(b\_n = \(n!\)\), FontSize->14, FontWeight->"Bold"], TraditionalForm]]], " You do the ", StyleBox["Mathematica", FontSlant->"Italic"], " code yerself this time." }], "Text", GeneratedCell->False, CellAutoOverwrite->False, CellTags->"Info3257680234-7589721"], Cell[TextData[{ StyleBox["Question 6:", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" Make some graphs and explain, in words, how you compare \ exponential growth to factorial growth.", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\[IndentingNewLine]\)], "Input"], Cell[TextData[{ StyleBox["Factorial Growth versus Super-Exponential Growth:", "Section"], StyleBox[" \n", "Subsubsection"], "This time let ", Cell[BoxData[ \(TraditionalForm\`a\_n = \(n!\)\)], FontSize->14, FontWeight->"Bold"], " and ", Cell[BoxData[ \(TraditionalForm\`b\_n = n\^n\)], FontSize->14, FontWeight->"Bold"], "." }], "Text", GeneratedCell->False, CellAutoOverwrite->False, CellTags->"Info3257680234-7589721"], Cell[TextData[{ StyleBox["Question 7:", "Subsection", FontColor->RGBColor[1, 0, 0]], StyleBox[" How do you compare factorial growth with super-exponential \ growth?", FontSize->14, FontColor->RGBColor[1, 0, 0]] }], "Text"], Cell[BoxData[ \(\[IndentingNewLine]\)], "Input"] }, Open ]], Cell[TextData[{ StyleBox["Now that you're done, ", FontSize->18], "\n\t(1) \t", StyleBox["Clean up your work", FontWeight->"Bold"], " by deleting everything that's not needed. \n\t\tThere should only be the \ title, your names, section number, and the answers to your questions\n\t\t\ (with any needed explanations, graphs, etc.).\n\t(2) \tSave this to your \ disk.\n\t(3)\tGo back to Blackboard and upload your final lab report to the \ ", StyleBox["Digital Drop Box", FontWeight->"Bold"], ", located\n\t\tin the ", StyleBox["User Tools", FontWeight->"Bold"], " area." }], "Text"] }, FrontEndVersion->"4.1 for Macintosh", ScreenRectangle->{{0, 800}, {0, 580}}, WindowToolbars->"EditBar", CellGrouping->Manual, WindowSize->{689, 471}, WindowMargins->{{17, Automatic}, {Automatic, 40}}, PrintingCopies->1, PrintingPageRange->{1, Automatic}, MacintoshSystemPageSetup->"\<\ 00<0004/0B`000002mT8o?mooh<" ] (******************************************************************* 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->{ "Info3257680234-7589721"->{ Cell[8791, 287, 318, 10, 38, "Text", CellTags->"Info3257680234-7589721"], Cell[9983, 322, 656, 23, 38, "Text", CellTags->"Info3257680234-7589721"], Cell[11299, 367, 641, 22, 56, "Text", CellTags->"Info3257680234-7589721"], Cell[12268, 403, 468, 17, 56, "Text", CellTags->"Info3257680234-7589721"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Info3257680234-7589721", 14565, 477} } *) (*NotebookFileOutline Notebook[{ Cell[1705, 50, 1674, 44, 427, "Text"], Cell[CellGroupData[{ Cell[3404, 98, 66, 0, 42, "Text"], Cell[3473, 100, 848, 18, 134, "Text"] }, Open ]], Cell[4336, 121, 52, 1, 43, "Input"], Cell[CellGroupData[{ Cell[4413, 126, 614, 23, 100, "Text"], Cell[5030, 151, 83, 1, 62, "Input"], Cell[5116, 154, 162, 5, 32, "Text"], Cell[CellGroupData[{ Cell[5303, 163, 37, 1, 27, "Input"], Cell[5343, 166, 52, 1, 42, "Output"] }, Open ]], Cell[5410, 170, 201, 5, 32, "Text"], Cell[5614, 177, 40, 1, 27, "Input"], Cell[5657, 180, 18, 0, 30, "Text"], Cell[CellGroupData[{ Cell[5700, 184, 42, 1, 27, "Input"], Cell[5745, 187, 53, 1, 26, "Output"] }, Open ]], Cell[5813, 191, 197, 5, 48, "Text"], Cell[6013, 198, 68, 1, 27, "Input"], Cell[6084, 201, 251, 6, 46, "Text"], Cell[6338, 209, 461, 14, 52, "Text"], Cell[6802, 225, 83, 1, 59, "Input"], Cell[6888, 228, 743, 14, 146, "Text"], Cell[7634, 244, 842, 29, 60, "Text"] }, Open ]], Cell[8491, 276, 83, 1, 59, "Input"], Cell[CellGroupData[{ Cell[8599, 281, 189, 4, 58, "Text"], Cell[8791, 287, 318, 10, 38, "Text", CellTags->"Info3257680234-7589721"], Cell[9112, 299, 353, 7, 91, "Input"], Cell[9468, 308, 457, 9, 70, "Text"], Cell[9928, 319, 52, 1, 43, "Input"], Cell[9983, 322, 656, 23, 38, "Text", CellTags->"Info3257680234-7589721"], Cell[10642, 347, 242, 5, 75, "Input"], Cell[10887, 354, 354, 8, 52, "Text"], Cell[11244, 364, 52, 1, 43, "Input"], Cell[11299, 367, 641, 22, 56, "Text", CellTags->"Info3257680234-7589721"], Cell[11943, 391, 267, 7, 34, "Text"], Cell[12213, 400, 52, 1, 43, "Input"], Cell[12268, 403, 468, 17, 56, "Text", CellTags->"Info3257680234-7589721"], Cell[12739, 422, 238, 7, 34, "Text"], Cell[12980, 431, 52, 1, 43, "Input"] }, Open ]], Cell[13047, 435, 614, 17, 138, "Text"] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)