(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 90298, 3191] NotebookOptionsPosition[ 79390, 2892] NotebookOutlinePosition[ 79945, 2913] CellTagsIndexPosition[ 79902, 2910] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[TextData[{ "An Overview of ", StyleBox["Mathematica", FontSlant->"Italic"] }], "Title", PageWidth->PaperWidth], Cell[CellGroupData[{ Cell["General Information", "Section", PageWidth->PaperWidth], Cell[TextData[{ "OBJECTIVE: Learn the basic features, characteristics, and language \ structure of ", StyleBox["Mathematica", FontSlant->"Italic"], ".\n\nThe working environment for ", StyleBox["Mathematica", FontSlant->"Italic"], " is called a notebook. This Overview is an example of a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook. Each notebook is divided into cells as indicated by the blue \ brackets on the right margin of the page. A cell that contains executable \ commands is called an input cell and has a small triangle at the upper end of \ the cell bracket. If you start to type in a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook, by default the program understands the typing as an executable \ command and so will open a new input cell. To type other kinds of cells, like \ the titles above or the text in this cell, for example, pull down the ", "Format", " menu at the top of the page and select Style.\n\nYou can type several \ commands in a single cell by separating the commands with semicolons and/or \ by pressing the return key (i.e., Enter on the QWERTY keypad). If a semicolon \ follows a command, its output is suppressed. If you wish to type a command in \ a new cell, you can press the down arrow key or mouse click a new cell. A new \ cell will start where a horizontal line appears across the notebook page.\n\n\ To execute a ", StyleBox["Mathematica", FontSlant->"Italic"], " command or group of commands in a cell, place the cursor anywhere in the \ cell containing the command(s) to be executed and click the left mouse \ button. Typing Shift-Enter on the QWERTY keyboard or pressing Enter on the \ numeric keypad executes the command(s) in the cell. All of the commands in a \ cell are executed in sequence from the first to the last.\n\nIn mathematical \ formulas, use of the times symbol (*) for multiplication is optional. \ However, if two or more symbol names are to be multiplied they must be \ separated by spaces so that ", StyleBox["Mathematica", FontSlant->"Italic"], " does not interpret the symbols together as a different symbol name. If a \ symbol pre-multiplies a constant, it must also be separated from the constant \ by a space for the same reason. \n\nThere are several palettes available for \ typing standard mathematical forms in commands and in text cells. These are \ found in the File (Palettes) pull-down menu. The BasicInput palette is one of \ the most useful.\n\nThe Help pull-down menu is extremely useful when using ", StyleBox["Mathematica", FontSlant->"Italic"], ". Formats for ", StyleBox["Mathematica", FontSlant->"Italic"], " commands are usually given with several examples that can be executed \ right in the Help window.\n\nIn the Introduction section of each module, \ there is a set of ", StyleBox["Technology Guidelines", FontWeight->"Bold"], " contained in a cell that is normally closed. Until you get used to ", StyleBox["Mathematica", FontSlant->"Italic"], ",", " you should open the cell and read the guidelines before continuing with \ the rest of the module. The following shows what the guidelines say." }], "Text", PageWidth->PaperWidth], Cell[CellGroupData[{ Cell["Technology Guidelines", "Subsection", PageWidth->PaperWidth, CellDingbat->"\[LightBulb]"], Cell[TextData[{ StyleBox["NOTE: ", CellFrame->True, Background->None], StyleBox["If you have just finished a module, restart ", CellFrame->True, FontSize->18, Background->None], StyleBox["Mathematica", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], StyleBox[" or ", CellFrame->True, FontSize->18, Background->None], StyleBox["Quit Kernel", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], StyleBox[" under the ", CellFrame->True, FontSize->18, Background->None], StyleBox["Evaluation ", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], StyleBox["pull-down menu before executing a new module.", CellFrame->True, FontSize->18, Background->None], StyleBox["\nTO OPEN CELLS, ", CellFrame->True, Background->None], StyleBox["click on the arrow to the left of the cell or put your cursor on \ the right cell bracket and double click. To open ", CellFrame->True, FontSize->18, Background->None], StyleBox["all", CellFrame->True, FontSize->18, FontWeight->"Bold", Background->None], StyleBox[" ", CellFrame->True, FontSize->18, Background->None], StyleBox["cells", CellFrame->True, FontSize->18, FontWeight->"Bold", Background->None], StyleBox[", highlight the bracket on the far right and select ", CellFrame->True, FontSize->18, Background->None], StyleBox["Grouping", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], StyleBox[" under the ", CellFrame->True, FontSize->18, Background->None], StyleBox["Cell", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], StyleBox[" pull-down menu and select ", CellFrame->True, FontSize->18, Background->None], StyleBox["Open All Subgroups.", CellFrame->True, FontSize->18, FontSlant->"Italic", Background->None], "\nTO STOP AN EXECUTION\n", StyleBox["Select the ", FontSize->18], StyleBox["Evaluation", FontSize->18, FontSlant->"Italic"], StyleBox[" pull-down menu and click on ", FontSize->18], StyleBox["Abort Evaluation.", FontSize->18, FontSlant->"Italic"], StyleBox["\n", FontSlant->"Italic"], "ORDER OF EXECUTION\n", StyleBox["Execute cells in the order given. Do not skip any Input cells \ within a given notebook.", FontSize->18], "\nSAVING NOTEBOOKS\n", StyleBox["You can save anytime to any directory you choose, and it is wise \ to save often. However, before you do your final save to reduce the size of \ your file, it is a good idea to delete all your output by selecting the ", FontSize->18], StyleBox["Delete All Output", FontSize->18, FontSlant->"Italic"], StyleBox[" selection under the ", FontSize->18], StyleBox["Cell", FontSize->18, FontSlant->"Italic"], StyleBox[" pull-down menu.", FontSize->18], "\nEXPERIENCING MAJOR PROBLEMS\n", StyleBox["Save if appropriate, then shut down ", FontSize->18], StyleBox["Mathematica", FontSize->18, FontSlant->"Italic"], StyleBox[" and start it up again.", FontSize->18] }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.445688545171875*^9, 3.445688642453125*^9}, { 3.445688796484375*^9, 3.44568884978125*^9}, 3.445688894875*^9, { 3.445688958265625*^9, 3.445689118078125*^9}, {3.44568916803125*^9, 3.44568917609375*^9}, {3.44587469140625*^9, 3.4458747175625*^9}}] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell["Built-In Commands", "Section", PageWidth->PaperWidth], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " commands consist of a word or a string of words followed immediately \ (i.e., no spaces) by a series of arguments enclosed in a pair of square \ brackets ", StyleBox["[ ]", FontWeight->"Bold"], ". The following are examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Sin", "[", RowBox[{"Pi", "/", "4"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Sqrt", "[", "16", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Abs", "[", "x", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ExpandNumerator", "[", RowBox[{ RowBox[{ RowBox[{"(", RowBox[{"a", "-", "b"}], ")"}], "^", "2"}], "/", RowBox[{ RowBox[{"(", RowBox[{"c", "+", "d"}], ")"}], "^", "3"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "2"}], ",", " ", "x"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Note that the symbol ", Cell[BoxData[ FormBox[ StyleBox["==", FontWeight->"Bold"], TraditionalForm]]], " (pronounced \"double equals\") is used to represent mathematical \ equality. This is necessary because the symbol ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " is reserved for making assignments to symbol names. (See the ", StyleBox["Assignment Commands", FontFamily->"Arial", FontWeight->"Bold"], " section later in this Overview.)" }], "Text", PageWidth->PaperWidth], Cell["\<\ Words in the command string typically begin with a single capital letter that \ is followed by lowercase letters. The command in the fourth example consists \ of two words. In most multiple-word commands, each word begins with a capital \ letter, and there are no spaces between the words. Also, there is no space \ between the word in the command string and the opening square bracket that \ begins the argument list.\ \>", "Text", PageWidth->PaperWidth], Cell[TextData[{ "In the first four preceding commands, the list of arguments contains only \ one item, whereas, in the ", StyleBox["Solve[ ] ", FontWeight->"Bold"], "command, the list of arguments contains two items, the equation to solve \ and the symbol that is to be isolated in the solution. When a command has \ more than one argument, they are separated by commas." }], "Text", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Lists ", "Section", PageWidth->PaperWidth], Cell[TextData[{ "Another important structure in ", StyleBox["Mathematica", FontSlant->"Italic"], " is the list. A list is any ordered array of things. In ", StyleBox["Mathematica", FontSlant->"Italic"], ", lists are enclosed in a pair of curly brackets ", StyleBox["{ }", FontWeight->"Bold"], ", ", "and the items in the list are separated by commas. The following are \ examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"{", RowBox[{"a", ",", "b", ",", "c", ",", "d"}], "}"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"{", RowBox[{"a", ",", RowBox[{"a", "^", "2"}], ",", RowBox[{"a", "^", "3"}], ",", RowBox[{"a", "^", "4"}]}], "}"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}]], "Input", PageWidth->PaperWidth], Cell["\<\ The last list consists of three items, and each of these items is a list of \ two items.\ \>", "Text", PageWidth->PaperWidth], Cell[TextData[{ "A list of lists can also be thought of as a matrix or an array. The ", StyleBox["MatrixForm[ ]", FontWeight->"Bold"], " command shows a list of lists in more standard matrix form." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"MatrixForm", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "3"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}]}], "}"}], "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ Each list inside the list is a row of the matrix. Note that while the MatrixForm of a list makes it more readable, this form \ won't work in calculations. For use in calculations, a list must be in the \ curly bracket { } form.\ \>", "Text", PageWidth->PaperWidth], Cell[TextData[{ "Another useful way to display and view the information in a list is with \ the ", StyleBox["TableForm[ ]", FontWeight->"Bold"], " command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"TableForm", "[", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "7", ",", "8", ",", "9", ",", "10"}], "}"}]}], "}"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Row and column labels can be added with a ", StyleBox["TableHeadings", FontWeight->"Bold"], " specification inside the ", StyleBox["TableForm[ ]", FontWeight->"Bold"], " command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"TableForm", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"6", ",", "7", ",", "8", ",", "9", ",", "10"}], "}"}]}], "}"}], ",", RowBox[{"TableHeadings", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}], ",", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", "\"\\"", ",", " ", "\"\\""}], "}"}]}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Like the ", StyleBox["MatrixForm", FontWeight->"Bold"], " of a list, the ", StyleBox["TableForm", FontWeight->"Bold"], " cannot be used in calculations. For use in calculations, a list must be in \ curly bracket { } form." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "Sometimes one or more of the arguments of a ", StyleBox["Mathematica", FontSlant->"Italic"], " command is a list. For example, the following ", StyleBox["Plot[ ]", FontWeight->"Bold"], " command has two arguments, the first is the function to plot, and the \ second is a list that specifies the domain for the graph." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"x", "^", "2"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["Table[ ] ", FontWeight->"Bold"], "command is very useful for generating a list when you know a formula for \ the elements in the list, as in the following examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"2", "*", "i"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{"2", ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "10"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "In the ", StyleBox["Table[ ] ", FontWeight->"Bold"], "command, the first argument is a function of the index variable. This \ function generates the elements in the list for the corresponding values of \ the index variable; the second argument is called an iterator. An iterator is \ a list that contains the symbol for the index variable, the beginning value, \ the ending value, and an optional increment or step size. If no value is \ specified for the increment, the default value is 1. Iterators are used in \ many other ", StyleBox["Mathematica", FontSlant->"Italic"], " commands." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "In the second example above, the index ", StyleBox["i", FontWeight->"Bold"], " is not used in the formula. You can use an alternate form for this second \ case, as shown in the next example. For the iterator, you simply specify the \ number of elements in the list." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{"2", ",", RowBox[{"{", "10", "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ You can generate lists of lists in a variety of ways. For example, the \ formula for the elements in the list can be a function of two indices.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"i", "*", "j"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"j", ",", RowBox[{"-", "2"}], ",", "2"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell["Or you can generate the same list like this.", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "2"}], "*", "i"}], ",", RowBox[{"-", "i"}], ",", "0", ",", "i", ",", RowBox[{"2", "*", "i"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["2-D Plots", "Section", PageWidth->PaperWidth], Cell[TextData[{ "There are numerous two-dimensional plot commands in ", StyleBox["Mathematica", FontSlant->"Italic"], " that we use to generate graphical displays of functions and data. \n\nThe ", StyleBox["Plot[ ]", FontWeight->"Bold"], " command is used to graph functions of the form ", Cell[BoxData[ FormBox[ RowBox[{"y", "=", RowBox[{"f", "(", "x", ")"}]}], TraditionalForm]]], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"x", "*", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"-", "4"}], "*", "Pi"}], ",", RowBox[{"4", "*", "Pi"}]}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The first argument of the ", StyleBox["Plot[ ] ", FontWeight->"Bold"], "command is the function to graph, and the second is a list that contains \ the independent variable, plus the left and right ends of the domain over \ which you wish to graph the function. These first two arguments are required, \ but, as you will see, you can add other specifications.\n\nNote that a \ semicolon (;) at the end of a ", StyleBox["Mathematica", FontSlant->"Italic"], " command normally suppresses display of the output from the command. In the \ first of the two commands that follow we omit the semicolon and in the second \ one we do not." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ SqrtBox["4"]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ SqrtBox["4"], ";"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "By default, ", StyleBox["Mathematica", FontSlant->"Italic"], " selects the range (vertical limits) for the graph. However, you can \ override this by specifying your own ", StyleBox["PlotRange", FontWeight->"Bold"], " as follows." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"x", " ", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"-", "4"}], " ", "\[Pi]"}], ",", RowBox[{"4", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"PlotRange", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "10"}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "You can format a graph by specifying a wide variety of options after the \ first two required arguments in the ", StyleBox["Plot[ ]", FontWeight->"Bold"], " command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"x", " ", RowBox[{"Sin", "[", "x", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{ RowBox[{"-", "4"}], " ", "\[Pi]"}], ",", RowBox[{"4", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"Thickness", "[", "0.01`", "]"}]}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["PlotStyle", FontWeight->"Bold"], " option is used to change the attributes of a graph, such as the color and \ line thickness, as shown in the preceding cell. If you want help in selecting \ a color, place the cursor where you want the ", StyleBox["RGBColor[ ]", FontWeight->"Bold"], " indicator, or highlight an existing indicator (like the one in the command \ above), and then pull down the Input menu and select Color-Selector. When you \ choose a color from the palette, the corresponding ", StyleBox["RGBColor[ ]", FontWeight->"Bold"], " indicator is inserted where you placed the cursor. The arguments of ", StyleBox["RGBColor[ ] ", FontWeight->"Bold"], "are three numbers that can each range from 0 to 1. The first number \ specifies the amount of red in the color, the second number the amount of \ green, and the third number the amount of blue. For example, ", StyleBox["RGBColor[1, 0, 0] ", FontWeight->"Bold"], "gives full red and no green or blue." }], "Text", PageWidth->PaperWidth], Cell["\<\ The following command plots three functions on the same graph; each curve is \ a different color, and the third one is thicker.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"Sin", "[", "x", "]"}], ",", RowBox[{"Sin", "[", RowBox[{"2", " ", "x"}], "]"}], ",", RowBox[{"Sin", "[", RowBox[{"3", " ", "x"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "\[Pi]"}], ",", "\[Pi]"}], "}"}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{"RGBColor", "[", RowBox[{"0", ",", "1", ",", "0"}], "]"}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"Thickness", "[", "0.01`", "]"}]}], "}"}]}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Note that inside the ", StyleBox["PlotStyle", FontWeight->"Bold"], " list, the attributes for each of the three graphs are specified in \ separate lists." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["ListPlot[ ] ", FontWeight->"Bold"], "command is used to plot a list of values." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"plotvalues", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"i", "^", "2"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "5"}], "}"}]}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"plotvalues", ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{ "\"\\"", ",", "\"\<\!\(\*SuperscriptBox[\(i\), \(2\)]\)\>\""}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"PointSize", "[", "0.02`", "]"}]}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth, CellChangeTimes->{{3.449069782265625*^9, 3.449069805046875*^9}}], Cell[TextData[{ "In the preceding example, the ", StyleBox["x", FontSlant->"Italic"], "-coordinate values of the plot points are taken to be 1, 2, . . . by \ default." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "You can also use the ", StyleBox["ListPlot[ ] ", FontWeight->"Bold"], "command to plot lists of values where both coordinates are specified." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"plotvalues", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"{", RowBox[{"i", ",", RowBox[{"Sin", "[", RowBox[{"200.", "*", "i"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"i", ",", "0", ",", "150"}], "}"}]}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ListPlot", "[", RowBox[{"plotvalues", ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"0", ",", "0", ",", "1"}], "]"}], ",", RowBox[{"PointSize", "[", "0.025`", "]"}]}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Just as you can in the ", StyleBox["Plot[ ] ", FontWeight->"Bold"], "command, you can specify formatting options in the ", StyleBox["ListPlot[ ]", FontWeight->"Bold"], " command, as shown in the preceding cell." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "There is one more two-dimensional plot command that you may find useful. It \ is ", StyleBox["ParametricPlot[ ]", FontWeight->"Bold"], ". You can use this command to plot curves that are specified in parametric \ form. For example, if the ", StyleBox["x", FontSlant->"Italic"], "-coordinates of the points on a curve are given by ", Cell[BoxData[ FormBox[ RowBox[{"x", "=", RowBox[{"t", " ", "cos", " ", StyleBox["t", FontSlant->"Italic"]}]}], TraditionalForm]]], " and the ", StyleBox["y", FontSlant->"Italic"], "-coordinates by ", Cell[BoxData[ FormBox[ RowBox[{"y", "=", RowBox[{"t", " ", "sin", " ", "t"}]}], TraditionalForm]]], ", then the curve can be graphed like this." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ParametricPlot", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"t", " ", RowBox[{"Cos", "[", "t", "]"}]}], ",", RowBox[{"t", " ", RowBox[{"Sin", "[", "t", "]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", "0", ",", RowBox[{"8", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"PlotStyle", "\[Rule]", RowBox[{"{", RowBox[{ RowBox[{"RGBColor", "[", RowBox[{"1", ",", "0", ",", "0"}], "]"}], ",", RowBox[{"Thickness", "[", "0.01`", "]"}]}], "}"}]}], ",", RowBox[{"AspectRatio", "\[Rule]", "1"}]}], "]"}]], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["3-D Plots", "Section", PageWidth->PaperWidth], Cell[TextData[{ "There are numerous ", StyleBox["Mathematica", FontSlant->"Italic"], " commands for plotting three-dimensional functions and data. In this \ section, we introduce two of them and in later modules we will introduce \ more.\n\nThe ", StyleBox["Plot3D[ ] ", FontWeight->"Bold"], "command is used to plot functions of two independent variables, that is, \ functions of the form ", Cell[BoxData[ FormBox[ RowBox[{"z", "=", RowBox[{"f", "(", RowBox[{"x", ",", "y"}], ")"}]}], TraditionalForm]]], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Plot3D", "[", RowBox[{ RowBox[{ RowBox[{"Sin", "[", "x", "]"}], "*", RowBox[{"Cos", "[", "y", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "Pi"}], ",", "Pi"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "Pi"}], ",", "Pi"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The first three arguments of the ", StyleBox["Plot3D[ ] ", FontWeight->"Bold"], "command are required They are: 1) the function to graph, 2) a list that \ specifies the first independent variable and its limits for the graph, and 3) \ a second list that specifies the second independent variable and its limits. \ As is the case with two-dimensional graphics, you can specify a number of \ formatting options after the first three arguments in the command.\n\nTo \ change the viewpoint for the graph, you can include a ", StyleBox["ViewPoint ", FontWeight->"Bold"], "indicator as an option in the ", StyleBox["Plot3D[ ]", FontWeight->"Bold"], " command or, as described below, you can \"grab\" the graph and rotate as \ desired. " }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449234718265625*^9, 3.449234750703125*^9}}], Cell[BoxData[ RowBox[{"Plot3D", "[", RowBox[{ RowBox[{ RowBox[{"Sin", "[", "x", "]"}], "*", RowBox[{"Cos", "[", "y", "]"}]}], ",", RowBox[{"{", RowBox[{"x", ",", RowBox[{"-", "Pi"}], ",", "Pi"}], "}"}], ",", RowBox[{"{", RowBox[{"y", ",", RowBox[{"-", "Pi"}], ",", "Pi"}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}], ",", RowBox[{"ViewPoint", "->", RowBox[{"{", RowBox[{"2.354", ",", " ", "2.427", ",", " ", "0.127"}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ If you want to see this graph from a different viewpoint, place the cursor \ anywhere in the graph, hold down the left mouse button and rotate as desired.\ \>", "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449069885015625*^9, 3.44906995809375*^9}}], Cell[TextData[{ "The second three-dimensional plot command is ", StyleBox["ParametricPlot3D[ ]", FontWeight->"Bold"], ". You can use this command to plot three-dimensional curves and surfaces \ that are specified in parametric form. For example, if the ", StyleBox["x", FontSlant->"Italic"], "-coordinates of the points on a curve are given by ", Cell[BoxData[ FormBox[ RowBox[{"x", "=", RowBox[{"t", " ", "cos", " ", StyleBox["t", FontSlant->"Italic"]}]}], TraditionalForm]]], ", the ", StyleBox["y", FontSlant->"Italic"], "-coordinates by ", Cell[BoxData[ FormBox[ RowBox[{"y", "=", RowBox[{"t", " ", "sin", " ", "t"}]}], TraditionalForm]]], ", and the ", StyleBox["z", FontSlant->"Italic"], "-coordinates by ", Cell[BoxData[ FormBox[ RowBox[{"z", "=", "t"}], TraditionalForm]]], ", then the curve can be graphed as follows." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ParametricPlot3D", "[", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"t", " ", RowBox[{"Cos", "[", "t", "]"}]}], ",", RowBox[{"t", " ", RowBox[{"Sin", "[", "t", "]"}]}], ",", "t"}], "}"}], ",", RowBox[{"{", RowBox[{"t", ",", RowBox[{ RowBox[{"-", "4"}], " ", "\[Pi]"}], ",", RowBox[{"4", " ", "\[Pi]"}]}], "}"}], ",", RowBox[{"AxesLabel", "\[Rule]", RowBox[{"{", RowBox[{"\"\\"", ",", "\"\\"", ",", "\"\\""}], "}"}]}]}], "]"}]], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Assignment Commands ", "Section", PageWidth->PaperWidth], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " has two assignment commands that are used to assign items (values, lists, \ commands, graphs, etc) to symbols for later use or reference. The first \ assignment command is the \"equals\" (", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], ") and the other is the \"colon-equals\" (", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], "). \n\nThe equals assignment evaluates the expression on the right side of \ the ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " sign and then assigns the result of the evaluation to the symbol on the \ left side of the ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " sign. The following are examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"x", "=", "2"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"y", "=", RowBox[{"x", "+", "2"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"z", "=", RowBox[{"y", "^", "3"}]}]], "Input", PageWidth->PaperWidth], Cell["\<\ You can check to see what has been assigned to a symbol by typing a question \ mark (?) followed by the symbol name.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "x"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "y"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "z"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The colon-equals does not evaluate the expression on the right side of the ", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], ". It simply assigns the unevaluated expression to the symbol name on the \ left side of the ", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], ". Whenever the symbol name is referred to later on in the session, ", StyleBox["Mathematica", FontSlant->"Italic"], " then evaluates the expression that was assigned to the symbol name. For \ this reason, the colon-equals is called a ", StyleBox["delayed assignment", FontSlant->"Italic"], ". The following are some examples. " }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"a", ":=", "2"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"b", ":=", RowBox[{"a", "+", "2"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"c", ":=", RowBox[{"b", "^", "3"}]}]], "Input", PageWidth->PaperWidth], Cell["\<\ Note that no output is displayed when you use the colon-equals assignment. If \ you check to see what has been assigned to these symbols, you see that the \ expressions are saved rather than the results of their evaluations.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "a"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "b"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "c"}]], "Input", PageWidth->PaperWidth], Cell["\<\ Now, if you use any of these symbols, the expression is evaluated and the \ result of the evaluation is used in place of the symbol. Here are some \ examples.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData["a"], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"3", "*", RowBox[{"b", "^", "2"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData["c"], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"w", "=", RowBox[{"a", "+", "b", "+", "c"}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["Clear[ ] ", FontWeight->"Bold"], "command removes assignments that you have made to symbols. " }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Clear", "[", "x", "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ If you check the symbol name, you see that after it is cleared it is treated \ as a symbol with no assignments.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "x"}]], "Input", PageWidth->PaperWidth], Cell["\<\ If you use the symbol in an expression it will be treated simply as a symbol \ with its name.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"x", "+", "2"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Note, however, that ", StyleBox["y", FontWeight->"Bold"], " is still ", StyleBox["4", FontWeight->"Bold"], ". This is because the ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " assignment was used to define ", StyleBox["y,", FontWeight->"Bold"], " and as a result the expression ", StyleBox["x+2", FontWeight->"Bold"], " was evaluated giving ", StyleBox["4", FontWeight->"Bold"], ", and this value was stored instead of the expression ", StyleBox["x+2", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData["y"], "Input", PageWidth->PaperWidth], Cell[TextData[{ "If you want to clear ", StyleBox["a", FontWeight->"Bold"], ", ", StyleBox["b", FontWeight->"Bold"], ", and ", StyleBox["c", FontWeight->"Bold"], ", ", "type the following command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{"a", ",", "b", ",", "c"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "a"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "b"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "c"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "It is extremely important to keep close track of the symbol names that you \ use in a ", StyleBox["Mathematica", FontSlant->"Italic"], " session. If you use a new symbol name in an expression or a command, and \ you are not absolutely sure that no assignments have been previously made to \ the symbol, you should first use the ", StyleBox["Clear[ ]", FontWeight->"Bold"], " command to erase all previous assignments to the new symbol name. Failure \ to do this can produce misleading and confusing results. There is more \ information about this in the ", StyleBox["Symbol Definitions and Pattern Matching ", FontWeight->"Bold"], "section later in this Overview.\n\nThere is another item that is related to \ the issue of symbol-name management. If you finish a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook or one of our modules and you wish to start another one, it is \ best to save your work and then shut down ", StyleBox["Mathematica", FontSlant->"Italic"], " and restart it before beginning the new module or notebook. This is \ because ", StyleBox["Mathematica", FontSlant->"Italic"], " retains any assignments that you have made to symbol names, even after you \ close a notebook or module, and carries these over to the new one with the \ potential for conflicts. Shutting down ", StyleBox["Mathematica", FontSlant->"Italic"], " before starting a new notebook or module ensures that all symbol names are \ free and clear." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Clear", "[", RowBox[{"a", ",", "b", ",", "c", ",", "x", ",", "y", ",", "z"}], "]"}]], "Input", CellChangeTimes->{{3.449070074609375*^9, 3.4490700835*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Special Packages", "Section", PageWidth->PaperWidth], Cell[TextData[{ "While there are many built-in", StyleBox[" ", FontSlant->"Italic"], "commands that are available for use as soon as you open a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook, there are many more specialized commands that are contained in \ packages. Many of the packages in older versions of ", StyleBox["Mathematica", FontSlant->"Italic"], " are now obsolete and the commands in those packages are now part of the \ kernel.\nTo see a list of ", StyleBox["Mathematica", FontSlant->"Italic"], " Packages, go to the Help Menu, select Function Navigator, and select \ Add-Ons and Packages at the bottom of the list. In multivariable calculus and \ in statistics, for example, there will be specialized commands that you will \ need. Loading the packages with the ", StyleBox["Needs[ ]", FontWeight->"Bold"], " or ", StyleBox["<<", FontWeight->"Bold"], " command will read new commands into computer memory. " }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449071252640625*^9, 3.449071339359375*^9}, { 3.449072920484375*^9, 3.449073243*^9}, {3.44923463725*^9, 3.44923463815625*^9}}] }, Closed]], Cell[CellGroupData[{ Cell["Making Your Own Commands", "Section", PageWidth->PaperWidth], Cell[TextData[{ "As a ", StyleBox["Mathematica", FontSlant->"Italic"], " user and programmer, you can design and construct your own commands. \n\n\ To avoid conflicts with built-in ", StyleBox["Mathematica", FontSlant->"Italic"], " commands, you should consistently begin the names of your commands with \ lowercase letters." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "To create a command, use an assignment statement (usually with the \ colon-equals, ", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], "). On the left of the ", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], ", place the name you want to use for your command, followed by a set of \ single square brackets ", StyleBox["[ ] ", FontWeight->"Bold"], "that enclose the list of arguments for the command. On the right of the ", Cell[BoxData[ FormBox[":=", TraditionalForm]], FontWeight->"Bold"], ", state the operations that your command is to perform on inputs that will \ be supplied for the arguments whenever the command is used. Suppose, for \ example, that you are going to use the function ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{ RowBox[{ StyleBox["x", FontSlant->"Plain"], "^", "2"}], "*", RowBox[{"Sin", "[", StyleBox["x", FontSlant->"Plain"], "]"}]}], FontWeight->"Bold"], TraditionalForm]]], " over and over again in a program. You may wish to create a new function \ and make it a user-defined ", StyleBox["Mathematica", FontSlant->"Italic"], " command, as illustrated by the following definition." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"myfunction", "[", "x_", "]"}], ":=", RowBox[{ RowBox[{"x", "^", "2"}], "*", RowBox[{"Sin", "[", "x", "]"}]}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The underscore _ after the ", StyleBox["x", FontWeight->"Bold"], " tells ", StyleBox["Mathematica", FontSlant->"Italic"], " that this is the definition of a new function rather than a call of an \ existing function. The underscore _ after the ", StyleBox["x", FontWeight->"Bold"], " also tells ", StyleBox["Mathematica", FontSlant->"Italic"], " that, in the expression on the right of the ", Cell[BoxData[ FormBox[ StyleBox[":=", FontWeight->"Bold"], TraditionalForm]]], ", ", StyleBox["x", FontWeight->"Bold"], " is a dummy, stand-in variable that will be replaced by real input in the \ argument list, whenever ", StyleBox["myfunction[ ] ", FontWeight->"Bold"], "is called. The following examples illustrate what ", StyleBox["Mathematica", FontSlant->"Italic"], " does with ", StyleBox["myfunction[ ]", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"myfunction", "[", "2", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"myfunction", "[", "2.0", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"myfunction", "[", "r", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"myfunction", "[", RowBox[{"a", "+", "b"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"myfunction", "[", RowBox[{"{", RowBox[{"2", ",", "4"}], "}"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The last example illustrates an important feature of most ", StyleBox["Mathematica", FontSlant->"Italic"], " commands: they are \"listable.\" This means that if you put in a list as \ an input to a command, ", StyleBox["Mathematica", FontSlant->"Italic"], " performs the command operation(s) on each of the elements in the list and \ returns a list of the results. This even works for simple operations like \ addition, multiplication, or raising a number to a power." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3"}], "}"}], "+", RowBox[{"{", RowBox[{"4", ",", "5", ",", "6"}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2", ",", "3", ",", "4"}], "}"}], "*", RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "2", ",", "3", ",", "5"}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "2"}], ",", "3", ",", "5", ",", "9"}], "}"}], "^", "2"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "You can design commands that perform more than one operation, typically \ using the ", StyleBox["Block[ ] ", FontWeight->"Bold"], "command to set them up. The ", StyleBox["Block[ ]", FontWeight->"Bold"], " command requires a minimum of two arguments. The first argument is a list \ of local symbols (sometimes it is empty), and the second is a series of \ commands that you want your command to execute whenever it is called or used. \ The following example generates a list of decaying numbers, plots the list, \ and returns the sequence as an output of the module. The input is the length \ of the sequence, ", StyleBox["n", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"buildplot", "[", "n_", "]"}], ":=", RowBox[{"Block", "[", RowBox[{ RowBox[{"{", RowBox[{"plotlist", ",", "pl1"}], "}"}], ",", "\n", RowBox[{ RowBox[{"plotlist", "=", RowBox[{"Table", "[", RowBox[{ RowBox[{"0.8", "^", RowBox[{"(", RowBox[{"i", "-", "1"}], ")"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "n"}], "}"}]}], "]"}]}], ";", "\n", RowBox[{"pl1", "=", RowBox[{"ListPlot", "[", RowBox[{"plotlist", ",", RowBox[{"PlotStyle", "->", RowBox[{"{", RowBox[{"PointSize", "[", "0.02", "]"}], "}"}]}]}], "]"}]}], ";", "\[IndentingNewLine]", RowBox[{"Return", "[", RowBox[{"{", RowBox[{"pl1", ",", "plotlist"}], "}"}], "]"}]}]}], "]"}]}]], "Input", PageWidth->PaperWidth, CellChangeTimes->{{3.449073336046875*^9, 3.449073425140625*^9}, { 3.449073469375*^9, 3.44907349471875*^9}, {3.44907352790625*^9, 3.449073530234375*^9}, {3.44907357328125*^9, 3.449073781296875*^9}, { 3.4490738499375*^9, 3.4490739338125*^9}, {3.449073966421875*^9, 3.44907400875*^9}, {3.44907407190625*^9, 3.4490741025*^9}, { 3.449074363421875*^9, 3.449074505875*^9}, {3.4490745404375*^9, 3.449074549359375*^9}, 3.44907458728125*^9, {3.44907462953125*^9, 3.449074771578125*^9}, {3.449074813359375*^9, 3.449074836734375*^9}}], Cell[TextData[{ "In ", StyleBox["buildplot[ ]", FontWeight->"Bold"], ", the list of local symbols contains the symbols ", StyleBox["plotlist ", FontWeight->"Bold"], "and", StyleBox[" pl1", FontWeight->"Bold"], ". Making a symbol local to a command means that any assignments you make to \ the symbol inside the block will not be available outside the block. If you \ type ", StyleBox["?plotlist", FontWeight->"Bold"], " after you execute the command, you will find that nothing has been \ assigned to this symbol. We will check it out below, after we execute the ", StyleBox["buildplot[ ]", FontWeight->"Bold"], " command." }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449074888453125*^9, 3.4490748951875*^9}}], Cell[TextData[{ "The series of commands forms the second argument of the ", StyleBox["Block[ ]", FontWeight->"Bold"], " command. Semicolons are used to separate the individual commands in the \ series of commands inside the block. " }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "You can execute the ", StyleBox["buildplot[ ]", FontWeight->"Bold"], " command by using its name and providing an input value for the argument." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"buildplot", "[", "25", "]"}]], "Input", PageWidth->PaperWidth, CellChangeTimes->{{3.44907459815625*^9, 3.449074619796875*^9}, { 3.44907496584375*^9, 3.449075022078125*^9}}], Cell[TextData[{ "To view either just the graph or just the list, we could apply the ", StyleBox["Part[ ] ", FontWeight->"Bold"], "command discussed in the next section." }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449075052609375*^9, 3.44907515190625*^9}, { 3.4490752646875*^9, 3.449075275125*^9}}], Cell[BoxData[{ RowBox[{"Part", "[", RowBox[{ RowBox[{"buildplot", "[", "25", "]"}], ",", "1"}], "]"}], "\[IndentingNewLine]", RowBox[{"Part", "[", RowBox[{ RowBox[{"buildplot", "[", "25", "]"}], ",", "2"}], "]"}]}], "Input", CellChangeTimes->{{3.44907503334375*^9, 3.449075040140625*^9}, { 3.449075095734375*^9, 3.449075111234375*^9}, {3.449075166453125*^9, 3.4490751710625*^9}}], Cell[TextData[{ "Now we check the symbol name ", StyleBox["plotlist", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "plotlist"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The list that was assigned to ", StyleBox["plotlist", FontWeight->"Bold"], " inside the block is not available in the global environment outside the \ block." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["Return[ plotlist ] ", FontWeight->"Bold"], "command inside the block returns the values stored in the local ", StyleBox["plotlist", FontWeight->"Bold"], " symbol. ", "If you want to save the output list of values for later use, you can assign \ it to a symbol name." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"decay", "=", RowBox[{"Part", "[", RowBox[{ RowBox[{"buildplot", "[", "25", "]"}], ",", "2"}], "]"}]}]], "Input", PageWidth->PaperWidth, CellChangeTimes->{3.449075320515625*^9}], Cell[TextData[{ "If you use the symbol name ", StyleBox["decay", FontWeight->"Bold"], ",", " you will get the list of numbers that the ", StyleBox["buildplot[ ]", FontWeight->"Bold"], " command returned as output." }], "Text", PageWidth->PaperWidth], Cell[BoxData["decay"], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Parts of Lists ", "Section", PageWidth->PaperWidth], Cell[TextData[{ "Curly brackets ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"{", " ", "}"}], FontWeight->"Bold"], TraditionalForm]]], " enclose the elements of a list, square brackets ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"[", " ", "]"}], FontWeight->"Bold"], TraditionalForm]]], " enclose the series of arguments in a ", StyleBox["Mathematica", FontSlant->"Italic"], " command, and regular parentheses ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"(", " ", ")"}], FontWeight->"Bold"], TraditionalForm]]], " are the symbols of inclusion for algebraic operations. \n\nThe ", StyleBox["Part[ , ]", FontWeight->"Bold"], " command or a pair of double square brackets ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"[", RowBox[{"[", " ", "]"}], "]"}], FontWeight->"Bold"], TraditionalForm]]], " is used to specify a part or element of a list. Consider the following \ examples. " }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449075387234375*^9, 3.4490754115625*^9}}], Cell[BoxData[ RowBox[{"odds", "=", RowBox[{"{", RowBox[{ "1", ",", "3", ",", "5", ",", "7", ",", "9", ",", "11", ",", "13", ",", "15"}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "To retrieve the third element of ", StyleBox["odds", FontWeight->"Bold"], ", use a part specification after the name of the list in either of the \ following formats. In these modules, we will generally use the pair of double \ bracket command." }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.449075456765625*^9, 3.4490755429375*^9}}], Cell[BoxData[{ RowBox[{"Part", "[", RowBox[{"odds", ",", "3"}], "]"}], "\[IndentingNewLine]", RowBox[{"odds", "[", RowBox[{"[", "3", "]"}], "]"}]}], "Input", PageWidth->PaperWidth, CellChangeTimes->{{3.449075433921875*^9, 3.449075441609375*^9}}], Cell[TextData[{ "For nested lists, that is, a list of lists, use multiple part \ specifications like ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{"[", RowBox[{"[", " ", RowBox[{"3", ",", " ", "2"}], " ", "]"}], "]"}], FontWeight->"Bold"], TraditionalForm]]], " to retrieve elements. The first part number points to an individual \ element in the outermost list, which may itself be a list. The second part \ number points to an element inside the inner list. The following examples \ illustrate this." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"oddeven", "=", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"5", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "10"}], "}"}]}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The following command retrieves the fourth list from ", StyleBox["oddeven", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"oddeven", "[", RowBox[{"[", "4", "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "To retrieve the second element of the third list in ", StyleBox["oddeven", FontWeight->"Bold"], ",", StyleBox[" ", FontWeight->"Bold"], "type:" }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"oddeven", "[", RowBox[{"[", RowBox[{"3", ",", "2"}], "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "In ", StyleBox["Mathematica", FontSlant->"Italic"], ", you can attach a part specification to just about anything. The reason \ for this is that almost every ", StyleBox["Mathematica", FontSlant->"Italic"], " entity (symbol, command, graphic, etc.) in its basic form consists of a \ list with a ", StyleBox["Head", FontWeight->"Bold"], " in front of it. To see the ", StyleBox["Head[ ", FontWeight->"Bold"], StyleBox["list ", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["]", FontWeight->"Bold"], " form of a ", StyleBox["Mathematica", FontSlant->"Italic"], " expression, use the ", StyleBox["FullForm[ ] ", FontWeight->"Bold"], "command. For example, consider the basic operation of addition. " }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"FullForm", "[", RowBox[{"a", "+", "b"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "This shows that the basic form for addition in ", StyleBox["Mathematica", FontSlant->"Italic"], " is a list of arguments (the addends) with the head ", StyleBox["Plus", FontWeight->"Bold"], ". The head specifies the operation that is to be performed on the \ arguments. " }], "Text", PageWidth->PaperWidth], Cell["Even lists have this form.", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"FullForm", "[", "odds", "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "In this case the head is the command, ", StyleBox["List", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "The ", StyleBox["Head[", FontWeight->"Bold"], StyleBox["list", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["]", FontWeight->"Bold"], " format is the standard form for just about every expression or command in ", StyleBox["Mathematica.", FontSlant->"Italic"], " Sometimes, as in the case of addition, the ", StyleBox["Head[", FontWeight->"Bold"], StyleBox["list", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["]", FontWeight->"Bold"], " form is hidden from the user. When you type the more conventional form of \ a command, like ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{ StyleBox["a", FontSlant->"Plain"], "+", StyleBox["b", FontSlant->"Plain"]}], FontWeight->"Bold"], TraditionalForm]]], ", ", StyleBox["Mathematica", FontSlant->"Italic"], " translates it to ", StyleBox["Plus[a, b]", FontWeight->"Bold"], ". You can type any ", StyleBox["Mathematica", FontSlant->"Italic"], " command in ", StyleBox["Head[", FontWeight->"Bold"], StyleBox["list", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["]", FontWeight->"Bold"], " form if you wish, but conventional math notation is often times more \ natural.\n\nBecause nearly all expressions and commands are in ", StyleBox["Head[", FontWeight->"Bold"], StyleBox["list", FontWeight->"Bold", FontSlant->"Italic"], StyleBox["]", FontWeight->"Bold"], " form, you can attach part specifications to just about any ", StyleBox["Mathematica ", FontSlant->"Italic"], "entity. Consider the following examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{"a", "+", "b"}], ")"}], "[", RowBox[{"[", "1", "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"3", "*", "a"}], "+", RowBox[{"2", "*", "b"}]}], ")"}], "[", RowBox[{"[", "2", "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"3", "*", "a"}], "+", RowBox[{"2", "*", "b"}]}], ")"}], "[", RowBox[{"[", RowBox[{"2", ",", "2"}], "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell["The subscript 0 retrieves the head of a command.", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"3", "*", "a"}], "+", RowBox[{"2", "*", "b"}]}], ")"}], "[", RowBox[{"[", "0", "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"3", "*", "a"}], "+", RowBox[{"2", "*", "b"}]}], ")"}], "[", RowBox[{"[", RowBox[{"2", ",", "0"}], "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"odds", "[", RowBox[{"[", "0", "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "If you are not sure how an element is embedded in a command, you can use ", StyleBox["FullForm[ ]", FontWeight->"Bold"], " to find out." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"FullForm", "[", RowBox[{"(", RowBox[{ RowBox[{"3", "*", "a"}], "+", RowBox[{"2", "*", "b"}]}], ")"}], "]"}]], "Input", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Rules and the Slash-Dot Command", "Section", PageWidth->PaperWidth], Cell[TextData[{ "Sometimes it is desirable to evaluate an expression in ", StyleBox["Mathematica", FontSlant->"Italic"], " by temporarily replacing the symbols in the expression with values or \ other symbols without permanently assigning the replacement values/symbols to \ the symbol names. This can be accomplished with the ", StyleBox["/.", FontWeight->"Bold"], " (pronounced slash-dot) command followed by a list of replacement rules. \ Note that the slash is a forward slash. The ", StyleBox["/. ", FontWeight->"Bold"], " is also called the ", StyleBox["ReplaceAll", FontWeight->"Bold"], " command. The following are examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"x", ",", "y", ",", "f"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"f", "=", RowBox[{ RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "^", "2"}]}]}]}], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"f", "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "1"}], ",", RowBox[{"y", "\[Rule]", "2"}]}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"f", "/.", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ",", RowBox[{"y", "\[Rule]", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], "}"}]}]], "Input", PageWidth->PaperWidth], Cell["\<\ You can accomplish the same thing with the following command.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"ReplaceAll", "[", RowBox[{"f", ",", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", RowBox[{"Sin", "[", "\[Theta]", "]"}]}], ",", RowBox[{"y", "\[Rule]", RowBox[{"Cos", "[", "\[Theta]", "]"}]}]}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The expressions ", StyleBox["x \[Rule]1", FontWeight->"Bold"], " and", StyleBox[" y\[Rule]2", FontWeight->"Bold"], " are rules. (You can find the arrow on the BasicInput palette or you can \ type a minus sign followed by a greater than sign.) Rules are different from \ assignments (", Cell[BoxData[ FormBox["=", TraditionalForm]]], ") in that they do not become definitions associated with the symbols ", StyleBox["x", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], ", as is the case with assignments. You can verify this by checking out the \ definitions that are associated with ", StyleBox["x", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "x"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "y"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The symbols ", StyleBox["x", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], " are clear. The symbol ", StyleBox["x", FontWeight->"Bold"], " was replaced with the number ", StyleBox["1,", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], " with ", StyleBox["2,", FontWeight->"Bold"], " in the evaluation of ", StyleBox["f", FontWeight->"Bold"], ", but the numbers were not permanently assigned to ", StyleBox["x", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], ". ", "In addition, the symbol definition of ", StyleBox["f", FontWeight->"Bold"], " is left unchanged." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "f"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "This is in contrast to evaluation of ", StyleBox["f ", FontWeight->"Bold"], "after", " values are assigned to the variables ", StyleBox["x ", FontWeight->"Bold"], "and ", StyleBox["y", FontWeight->"Bold"], ",", " as shown by the following commands." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"x", "=", "2"}], ";"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"y", "=", "2"}], ";"}]], "Input", PageWidth->PaperWidth], Cell[BoxData["f"], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "x"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "y"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "In this case, ", StyleBox["x", FontWeight->"Bold"], " is permanently assigned the value ", StyleBox["1", FontWeight->"Bold"], " and ", StyleBox["y", FontWeight->"Bold"], " the value ", StyleBox["2", FontWeight->"Bold"], ",", " that is, until we ", StyleBox["Clear[ x, y ]", FontWeight->"Bold"], ". The definition of ", StyleBox["f", FontWeight->"Bold"], " is still unchanged, however." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "f"}]], "Input", PageWidth->PaperWidth], Cell["Here is another example.", "Text", PageWidth->PaperWidth], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"x", ",", "y"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{"equations", "=", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "+", RowBox[{"2", "*", "y"}]}], "\[Equal]", "3"}], ",", RowBox[{ RowBox[{ RowBox[{"3", "*", "x"}], "+", RowBox[{"4", "*", "y"}]}], "\[Equal]", "2"}]}], "}"}]}]}], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Note that ", Cell[BoxData[ FormBox[ StyleBox["==", FontWeight->"Bold"], TraditionalForm]]], " is used in ", StyleBox["Mathematica", FontSlant->"Italic"], " to represent mathematical equality. This is necessary because the ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " symbol is reserved for assignments to symbol names (See the ", StyleBox["Assignment Commands", FontWeight->"Bold"], " section)." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"solution", "=", RowBox[{"Solve", "[", RowBox[{"equations", ",", RowBox[{"{", RowBox[{"x", ",", "y"}], "}"}]}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"equations", "/.", "solution"}]], "Input", PageWidth->PaperWidth], Cell["\<\ The last command verifies that the solutions found satisfy the two equations.\ \>", "Text", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Retrieving Output from Commands", "Section", PageWidth->PaperWidth], Cell[TextData[{ "If you type a ", StyleBox["Mathematica", FontSlant->"Italic"], " command, the output is usually displayed directly after the command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "1"}], ",", "x"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Note that ", Cell[BoxData[ FormBox[ StyleBox["==", FontWeight->"Bold"], TraditionalForm]]], " is used in ", StyleBox["Mathematica", FontSlant->"Italic"], " to represent mathematical equality. This is necessary because the ", Cell[BoxData[ FormBox[ StyleBox["=", FontWeight->"Bold"], TraditionalForm]]], " symbol is reserved for assignments to symbol names (See the ", StyleBox["Assignment Commands", FontWeight->"Bold"], " section).\n\nTyping a semicolon ( ; ) after the command will suppress \ printing the output." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "1"}], ",", "x"}], "]"}], ";"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "The semicolon is used for two purposes. One is to separate individual \ commands in a ", StyleBox["Block[ ]", FontWeight->"Bold"], " that includes a series of ", StyleBox["Mathematica", FontSlant->"Italic"], " commands, and the other is to suppress printing the output of any single \ command." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "To see the standard ", StyleBox["Mathematica", FontSlant->"Italic"], " format for the output of the ", StyleBox["Solve[ ]", FontWeight->"Bold"], ", you can assign the output to a new symbol name and use the ", StyleBox["FullForm[ ]", FontWeight->"Bold"], " command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"soln", "=", RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "1"}], ",", " ", "x"}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"FullForm", "[", "soln", "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ The solution is a list of two lists. In each of the inner lists, there is a \ rule, which is itself a list with two elements. The second element of each \ rule is a solution. Therefore, to retrieve the two solutions, you could type \ the following:\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"soln", "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"soln", "[", RowBox[{"[", RowBox[{"2", ",", "1", ",", "2"}], "]"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Once you know the ", StyleBox["FullForm", FontWeight->"Bold"], " of the output, you can subscript the command directly, as illustrated by \ the following examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"firstsoln", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "1"}], ",", "x"}], "]"}], "[", RowBox[{"[", RowBox[{"1", ",", "1", ",", "2"}], "]"}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"secondsoln", "=", RowBox[{ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{"x", "^", "2"}], "==", "1"}], ",", "x"}], "]"}], "[", RowBox[{"[", RowBox[{"2", ",", "1", ",", "2"}], "]"}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell["\<\ This latter approach is not as efficient as the one preceding it because it \ requires solving the equation twice whereas the first approach only solves it \ once.\ \>", "Text", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell["Symbol Definitions and Pattern Matching", "Section", PageWidth->PaperWidth], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " evaluates and simplifies expressions through a process of pattern \ matching. To understand how this works, suppose that you want to construct a ", StyleBox["Mathematica", FontSlant->"Italic"], " function called ", StyleBox["crazy[ ]", FontWeight->"Bold"], " that subtracts two numbers and then divides the result by their sum. You \ can do this with the following command." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"crazy", "[", RowBox[{"x_", ",", "y_"}], "]"}], ":=", RowBox[{ RowBox[{"(", RowBox[{"x", "-", "y"}], ")"}], "/", RowBox[{"(", RowBox[{"x", "+", "y"}], ")"}]}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Once you define this new function, ", StyleBox["Mathematica", FontSlant->"Italic"], " will match it with any command of the form ", StyleBox["crazy[item1, item2]", FontWeight->"Bold"], " and perform the designated operation on the two items. For example," }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"crazy", "[", RowBox[{"house", ",", "garage"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Now suppose that when both arguments are zero, you want the function ", StyleBox["crazy[ ]", FontWeight->"Bold"], " to return the value 1. You can do this by adding a new pattern definition \ to the description of ", StyleBox["crazy[ ]", FontWeight->"Bold"], " as follows:" }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"crazy", "[", RowBox[{"0", ",", "0"}], "]"}], "=", "1"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "If you ask ", StyleBox["Mathematica", FontSlant->"Italic"], " what it knows about ", StyleBox["crazy[ ]", FontWeight->"Bold"], ",", " it will tell you that it has recorded both of your definitions." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "crazy"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "From now on, whenever you use the symbol ", StyleBox["crazy", FontWeight->"Bold"], ", ", StyleBox["Mathematica", FontSlant->"Italic"], " will check all of the forms that have been assigned to the symbol ", StyleBox["crazy", FontWeight->"Bold"], ", starting with the more specific forms and proceeding to the more generic, \ until it finds a match. If it finds a match, it performs the operation that \ corresponds to the matched form of ", StyleBox["crazy", FontWeight->"Bold"], ". Note in the list above that ", StyleBox["crazy[0,0]", FontWeight->"Bold"], " is more specific than ", StyleBox["crazy[x_,y_]", FontWeight->"Bold"], "; it is therefore placed first in the list of forms associated with the \ symbol ", StyleBox["crazy", FontWeight->"Bold"], ". ", StyleBox["Mathematica", FontSlant->"Italic"], " simply begins at the top of its list of definitions for the symbol ", StyleBox["crazy", FontWeight->"Bold"], " and searches down the list until it finds the first match. If it does not \ find a match, then it treats the unrecognized form as a new symbol. The new \ symbol is not associated with an operation and, therefore, is left \ unevaluated. These features are illustrated by the following examples." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"crazy", "[", RowBox[{"0", ",", "0"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"crazy", "[", RowBox[{"r", ",", "s"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"crazy", "[", RowBox[{"x", ",", "y", ",", "z"}], "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ StyleBox["Mathematica", FontWeight->"Bold", FontSlant->"Italic"], StyleBox[" doesn't forget!", FontWeight->"Bold"], " To understand this, consider the following scenario. You assign values to ", StyleBox["p[1]", FontWeight->"Bold"], ", ", StyleBox["p[2]", FontWeight->"Bold"], ", etc. as follows:" }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"Do", "[", RowBox[{ RowBox[{ RowBox[{"p", "[", "i", "]"}], "=", RowBox[{"i", "^", "2"}]}], ",", RowBox[{"{", RowBox[{"i", ",", "1", ",", "5"}], "}"}]}], "]"}]], "Input", PageWidth->PaperWidth], Cell["You check the assignments by typing,", "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "p"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Later you decide to build a new function that takes an input value and \ cubes it. However, you forget that you already used the symbol ", StyleBox["p", FontWeight->"Bold"], " for other things and inadvertently call your new function ", StyleBox["p", FontWeight->"Bold"], ", which you define as follows:" }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{ RowBox[{"p", "[", "x_", "]"}], ":=", RowBox[{"x", "^", "3"}]}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Now you use your new function, ", StyleBox["p[x]", FontWeight->"Bold"], ", to calculate ", Cell[BoxData[ FormBox[ SuperscriptBox["2", "3"], TraditionalForm]]], "." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"p", "[", "2", "]"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "This is obviously not the output you expected. The problem is that ", StyleBox["Mathematica", FontSlant->"Italic"], " has remembered what you told it before. The form ", StyleBox["p[2]=4", FontWeight->"Bold"], " is a more specific definition than ", StyleBox["p[x_]=x^3", FontWeight->"Bold"], ", and so when you ask for ", StyleBox["p[2]", FontWeight->"Bold"], " the first match it finds is ", StyleBox["p[2] = 4", FontWeight->"Bold"], ". If you ask ", StyleBox["Mathematica", FontSlant->"Italic"], " what it knows about the symbol ", StyleBox["p", FontWeight->"Bold"], ", you will see the problem." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "p"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "If you were to open a new notebook or module without entirely quitting the \ kernel or closing ", StyleBox["Mathematica", FontSlant->"Italic"], ", it would still retain all of the previous definitions of ", StyleBox["p", FontWeight->"Bold"], "." }], "Text", PageWidth->PaperWidth, CellChangeTimes->{{3.4490757864375*^9, 3.44907580909375*^9}}], Cell[TextData[{ "Sometimes this can be very perplexing when you are working in ", StyleBox["Mathematica. ", FontSlant->"Italic"], "Consequently, it is extremely important to keep close track of the symbols \ you use, and when you are done with a symbol you should use the ", StyleBox["Clear[ ]", FontWeight->"Bold"], " command to erase its definitions. If you define a new function and it \ gives you unexpected or erroneous results, it is sometimes helpful to clear \ the function name, and then try to redefine it." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "It is good practice to clear the name of the new function before you define \ it. Put the ", StyleBox["Clear[ ] ", FontWeight->"Bold"], "command in the same cell as the function definition. For example," }], "Text", PageWidth->PaperWidth], Cell[BoxData[{ RowBox[{ RowBox[{ RowBox[{"Clear", "[", "p", "]"}], ";"}], " "}], "\n", RowBox[{ RowBox[{"p", "[", "x_", "]"}], ":=", RowBox[{"x", "^", "3"}]}]}], "Input", PageWidth->PaperWidth], Cell[TextData[{ "Now the function ", StyleBox["p", FontWeight->"Bold"], " should work correctly." }], "Text", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"p", "[", "2", "]"}]], "Input", PageWidth->PaperWidth], Cell["\<\ Another thing that can cause problems is defining a function using a symbol \ name with an argument and then later redefining the symbol without an \ argument before clearing the original definition. The following commands \ illustrate what can happen.\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[{ RowBox[{ RowBox[{"Clear", "[", RowBox[{"g", ",", "x"}], "]"}], ";"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"g", "[", "x_", "]"}], "=", SuperscriptBox["x", "2"]}]}], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"g", "=", RowBox[{"Sin", "[", RowBox[{"2", "x"}], "]"}]}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"g", "[", "2", "]"}]], "Input", PageWidth->PaperWidth], Cell[BoxData[ RowBox[{"?", "g"}]], "Input", PageWidth->PaperWidth], Cell[TextData[{ "For the symbol ", StyleBox["g[2]", FontWeight->"Bold"], ", the first match that is found is for ", StyleBox["g", FontWeight->"Bold"], " and this symbol is replaced with ", StyleBox["Sin[2x]", FontWeight->"Bold"], " giving the output, Sin[2x][2]." }], "Text", PageWidth->PaperWidth], Cell[TextData[{ "Once you understand how ", StyleBox["Mathematica", FontSlant->"Italic"], " evaluates expressions by pattern matching, you will find that this can be \ a very powerful tool. It is the basic process that ", StyleBox["Mathematica", FontSlant->"Italic"], " uses when it evaluates expressions." }], "Text", PageWidth->PaperWidth] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["\[MathematicaIcon] ", FontSize->18, FontWeight->"Bold", FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.792981, 0.777356, 0.144533]], StyleBox["About ", FontColor->RGBColor[0.500008, 0, 0.500008]], StyleBox["Mathematica", FontSlant->"Italic", FontColor->RGBColor[0.500008, 0, 0.500008]], " " }], "Section", PageWidth->PaperWidth, CellDingbat->None], Cell["\<\ Throughout the modules you will see hyperlink buttons that look like this:\ \>", "Text", PageWidth->PaperWidth], Cell[BoxData[ ButtonBox[ StyleBox[ RowBox[{ StyleBox["\[MathematicaIcon]", FontSize->18, FontVariations->{"CompatibilityType"->0}, FontColor->RGBColor[0.792981, 0.777356, 0.144533]], StyleBox[" ", FontSize->14, FontSlant->"Italic"], StyleBox["About", FontSize->14, FontColor->RGBColor[0.500008, 0, 0.500008]], StyleBox[" ", FontSize->14, FontSlant->"Italic"], StyleBox["Mathematica", FontSize->14, FontSlant->"Italic", FontColor->RGBColor[0.500008, 0, 0.500008]]}], FontWeight->"Bold"], BaseStyle->"Hyperlink"]], "Input", PageWidth->PaperWidth, Evaluatable->False], Cell[TextData[{ "Each of these buttons links to a text cell containing information about the \ ", StyleBox["Mathematica", FontSlant->"Italic"], " commands and formats that are being used nearby in the module. If you are \ interested in learning more about ", StyleBox["Mathematica", FontSlant->"Italic"], ", you can click the button to read the information in the text cell, or you \ can elect to skip over it so as not to interrupt the flow of the module. Each \ text cell has a Go Back link that takes you back to the location in the \ module where you clicked the button." }], "Text", PageWidth->PaperWidth] }, Closed]] }, Open ]] }, ScreenStyleEnvironment->"Presentation", WindowSize->{891, 683}, WindowMargins->{{-9, Automatic}, {Automatic, 6}}, PrintingCopies->1, PrintingPageRange->{6, 6}, ShowSelection->True, CellLabelAutoDelete->True, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->FrontEnd`FileName[{"Creative"}, "NaturalColor.nb", CharacterEncoding -> "WindowsANSI"] ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 120, 5, 201, "Title"], Cell[CellGroupData[{ Cell[712, 31, 62, 1, 130, "Section"], Cell[777, 34, 3196, 63, 2716, "Text"], Cell[CellGroupData[{ Cell[3998, 101, 97, 2, 63, "Subsection"], Cell[4098, 105, 3385, 129, 735, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7532, 240, 60, 1, 83, "Section"], Cell[7595, 243, 333, 10, 210, "Text"], Cell[7931, 255, 104, 3, 61, "Input"], Cell[8038, 260, 82, 2, 61, "Input"], Cell[8123, 264, 80, 2, 61, "Input"], Cell[8206, 268, 265, 9, 91, "Input"], Cell[8474, 279, 160, 5, 61, "Input"], Cell[8637, 286, 558, 18, 277, "Text"], Cell[9198, 306, 466, 8, 399, "Text"], Cell[9667, 316, 412, 9, 337, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[10116, 330, 49, 1, 83, "Section"], Cell[10168, 333, 431, 14, 243, "Text"], Cell[10602, 349, 116, 3, 61, "Input"], Cell[10721, 354, 188, 6, 61, "Input"], Cell[10912, 362, 253, 9, 61, "Input"], Cell[11168, 373, 136, 4, 111, "Text"], Cell[11307, 379, 238, 6, 145, "Text"], Cell[11548, 387, 297, 10, 91, "Input"], Cell[11848, 399, 277, 7, 271, "Text"], Cell[12128, 408, 197, 7, 113, "Text"], Cell[12328, 417, 299, 9, 120, "Input"], Cell[12630, 428, 241, 9, 115, "Text"], Cell[12874, 439, 671, 20, 236, "Input"], Cell[13548, 461, 284, 10, 147, "Text"], Cell[13835, 473, 379, 10, 242, "Text"], Cell[14217, 485, 208, 7, 61, "Input"], Cell[14428, 494, 240, 7, 145, "Text"], Cell[14671, 503, 188, 6, 61, "Input"], Cell[14862, 511, 165, 5, 61, "Input"], Cell[15030, 518, 649, 15, 498, "Text"], Cell[15682, 535, 324, 8, 241, "Text"], Cell[16009, 545, 130, 4, 61, "Input"], Cell[16142, 551, 191, 4, 143, "Text"], Cell[16336, 557, 278, 9, 61, "Input"], Cell[16617, 568, 84, 1, 79, "Text"], Cell[16704, 571, 338, 11, 91, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[17079, 587, 52, 1, 83, "Section"], Cell[17134, 590, 443, 14, 242, "Text"], Cell[17580, 606, 295, 10, 91, "Input"], Cell[17878, 618, 691, 15, 562, "Text"], Cell[18572, 635, 62, 2, 68, "Input"], Cell[18637, 639, 80, 3, 68, "Input"], Cell[18720, 644, 292, 10, 178, "Text"], Cell[19015, 656, 423, 14, 91, "Input"], Cell[19441, 672, 224, 7, 145, "Text"], Cell[19668, 681, 636, 19, 178, "Input"], Cell[20307, 702, 1053, 24, 729, "Text"], Cell[21363, 728, 175, 4, 143, "Text"], Cell[21541, 734, 910, 28, 236, "Input"], Cell[22454, 764, 212, 7, 113, "Text"], Cell[22669, 773, 154, 6, 81, "Text"], Cell[22826, 781, 224, 7, 91, "Input"], Cell[23053, 790, 555, 15, 187, "Input"], Cell[23611, 807, 208, 7, 112, "Text"], Cell[23822, 816, 199, 6, 113, "Text"], Cell[24024, 824, 317, 10, 120, "Input"], Cell[24344, 836, 451, 12, 178, "Input"], Cell[24798, 850, 273, 9, 147, "Text"], Cell[25074, 861, 779, 26, 339, "Text"], Cell[25856, 889, 757, 22, 265, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[26650, 916, 52, 1, 83, "Section"], Cell[26705, 919, 572, 18, 370, "Text"], Cell[27280, 939, 504, 16, 120, "Input"], Cell[27787, 957, 862, 19, 629, "Text"], Cell[28652, 978, 630, 19, 178, "Input"], Cell[29285, 999, 267, 5, 175, "Text"], Cell[29555, 1006, 923, 32, 372, "Text"], Cell[30481, 1040, 572, 18, 149, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[31090, 1063, 63, 1, 83, "Section"], Cell[31156, 1066, 914, 29, 472, "Text"], Cell[32073, 1097, 73, 2, 61, "Input"], Cell[32149, 1101, 96, 3, 61, "Input"], Cell[32248, 1106, 96, 3, 61, "Input"], Cell[32347, 1111, 164, 4, 143, "Text"], Cell[32514, 1117, 68, 2, 61, "Input"], Cell[32585, 1121, 68, 2, 61, "Input"], Cell[32656, 1125, 68, 2, 61, "Input"], Cell[32727, 1129, 744, 21, 405, "Text"], Cell[33474, 1152, 74, 2, 61, "Input"], Cell[33551, 1156, 97, 3, 61, "Input"], Cell[33651, 1161, 97, 3, 61, "Input"], Cell[33751, 1166, 272, 5, 239, "Text"], Cell[34026, 1173, 68, 2, 61, "Input"], Cell[34097, 1177, 68, 2, 61, "Input"], Cell[34168, 1181, 68, 2, 61, "Input"], Cell[34239, 1185, 206, 5, 175, "Text"], Cell[34448, 1192, 51, 1, 61, "Input"], Cell[34502, 1195, 96, 3, 61, "Input"], Cell[34601, 1200, 51, 1, 61, "Input"], Cell[34655, 1203, 106, 3, 61, "Input"], Cell[34764, 1208, 169, 6, 113, "Text"], Cell[34936, 1216, 82, 2, 61, "Input"], Cell[35021, 1220, 159, 4, 111, "Text"], Cell[35183, 1226, 68, 2, 61, "Input"], Cell[35254, 1230, 141, 4, 111, "Text"], Cell[35398, 1236, 73, 2, 61, "Input"], Cell[35474, 1240, 603, 26, 219, "Text"], Cell[36080, 1268, 51, 1, 61, "Input"], Cell[36134, 1271, 247, 13, 81, "Text"], Cell[36384, 1286, 115, 3, 61, "Input"], Cell[36502, 1291, 68, 2, 61, "Input"], Cell[36573, 1295, 68, 2, 61, "Input"], Cell[36644, 1299, 68, 2, 61, "Input"], Cell[36715, 1303, 1529, 35, 1178, "Text"], Cell[38247, 1340, 185, 4, 61, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[38469, 1349, 59, 1, 83, "Section"], Cell[38531, 1352, 1149, 29, 693, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[39717, 1386, 67, 1, 136, "Section"], Cell[39787, 1389, 370, 11, 273, "Text"], Cell[40160, 1402, 1316, 40, 634, "Text"], Cell[41479, 1444, 190, 6, 61, "Input"], Cell[41672, 1452, 926, 34, 411, "Text"], Cell[42601, 1488, 87, 2, 61, "Input"], Cell[42691, 1492, 89, 2, 61, "Input"], Cell[42783, 1496, 87, 2, 61, "Input"], Cell[42873, 1500, 110, 3, 61, "Input"], Cell[42986, 1505, 134, 4, 61, "Input"], Cell[43123, 1511, 530, 12, 402, "Text"], Cell[43656, 1525, 187, 6, 61, "Input"], Cell[43846, 1533, 227, 7, 61, "Input"], Cell[44076, 1542, 163, 6, 61, "Input"], Cell[44242, 1550, 717, 18, 533, "Text"], Cell[44962, 1570, 1427, 34, 265, "Input"], Cell[46392, 1606, 744, 22, 409, "Text"], Cell[47139, 1630, 273, 7, 209, "Text"], Cell[47415, 1639, 202, 6, 145, "Text"], Cell[47620, 1647, 200, 4, 61, "Input"], Cell[47823, 1653, 319, 8, 145, "Text"], Cell[48145, 1663, 403, 10, 91, "Input"], Cell[48551, 1675, 135, 6, 81, "Text"], Cell[48689, 1683, 75, 2, 61, "Input"], Cell[48767, 1687, 216, 7, 113, "Text"], Cell[48986, 1696, 346, 11, 211, "Text"], Cell[49335, 1709, 213, 6, 61, "Input"], Cell[49551, 1717, 260, 10, 147, "Text"], Cell[49814, 1729, 55, 1, 61, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[49906, 1735, 58, 1, 83, "Section"], Cell[49967, 1738, 1054, 36, 378, "Text"], Cell[51024, 1776, 195, 6, 61, "Input"], Cell[51222, 1784, 367, 9, 209, "Text"], Cell[51592, 1795, 256, 6, 91, "Input"], Cell[51851, 1803, 565, 15, 305, "Text"], Cell[52419, 1820, 412, 14, 91, "Input"], Cell[52834, 1836, 158, 6, 81, "Text"], Cell[52995, 1844, 107, 3, 61, "Input"], Cell[53105, 1849, 205, 9, 81, "Text"], Cell[53313, 1860, 131, 4, 61, "Input"], Cell[53447, 1866, 787, 28, 376, "Text"], Cell[54237, 1896, 108, 3, 61, "Input"], Cell[54348, 1901, 333, 10, 210, "Text"], Cell[54684, 1913, 66, 1, 47, "Text"], Cell[54753, 1916, 88, 2, 61, "Input"], Cell[54844, 1920, 140, 6, 81, "Text"], Cell[54987, 1928, 1625, 62, 638, "Text"], Cell[56615, 1992, 148, 5, 61, "Input"], Cell[56766, 1999, 198, 7, 61, "Input"], Cell[56967, 2008, 222, 8, 61, "Input"], Cell[57192, 2018, 88, 1, 79, "Text"], Cell[57283, 2021, 198, 7, 61, "Input"], Cell[57484, 2030, 222, 8, 61, "Input"], Cell[57709, 2040, 104, 3, 61, "Input"], Cell[57816, 2045, 194, 6, 113, "Text"], Cell[58013, 2053, 182, 6, 61, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[58232, 2064, 74, 1, 136, "Section"], Cell[58309, 2067, 686, 18, 470, "Text"], Cell[58998, 2087, 257, 8, 91, "Input"], Cell[59258, 2097, 183, 6, 61, "Input"], Cell[59444, 2105, 263, 8, 61, "Input"], Cell[59710, 2115, 109, 3, 79, "Text"], Cell[59822, 2120, 305, 9, 91, "Input"], Cell[60130, 2131, 767, 27, 373, "Text"], Cell[60900, 2160, 68, 2, 61, "Input"], Cell[60971, 2164, 68, 2, 61, "Input"], Cell[61042, 2168, 710, 34, 251, "Text"], Cell[61755, 2204, 68, 2, 61, "Input"], Cell[61826, 2208, 317, 14, 147, "Text"], Cell[62146, 2224, 91, 3, 61, "Input"], Cell[62240, 2229, 91, 3, 61, "Input"], Cell[62334, 2234, 51, 1, 61, "Input"], Cell[62388, 2237, 68, 2, 61, "Input"], Cell[62459, 2241, 68, 2, 61, "Input"], Cell[62530, 2245, 464, 22, 183, "Text"], Cell[62997, 2269, 68, 2, 61, "Input"], Cell[63068, 2273, 64, 1, 47, "Text"], Cell[63135, 2276, 428, 14, 120, "Input"], Cell[63566, 2292, 517, 19, 215, "Text"], Cell[64086, 2313, 195, 6, 91, "Input"], Cell[64284, 2321, 89, 2, 61, "Input"], Cell[64376, 2325, 125, 3, 111, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[64538, 2333, 74, 1, 136, "Section"], Cell[64615, 2336, 192, 6, 112, "Text"], Cell[64810, 2344, 155, 5, 61, "Input"], Cell[64968, 2351, 600, 20, 343, "Text"], Cell[65571, 2373, 176, 6, 61, "Input"], Cell[65750, 2381, 356, 11, 242, "Text"], Cell[66109, 2394, 332, 12, 182, "Text"], Cell[66444, 2408, 189, 6, 61, "Input"], Cell[66636, 2416, 88, 2, 61, "Input"], Cell[66727, 2420, 296, 6, 239, "Text"], Cell[67026, 2428, 138, 4, 61, "Input"], Cell[67167, 2434, 138, 4, 61, "Input"], Cell[67308, 2440, 222, 7, 145, "Text"], Cell[67533, 2449, 280, 9, 91, "Input"], Cell[67816, 2460, 281, 9, 91, "Input"], Cell[68100, 2471, 211, 5, 175, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[68348, 2481, 82, 1, 136, "Section"], Cell[68433, 2484, 486, 13, 307, "Text"], Cell[68922, 2499, 253, 9, 61, "Input"], Cell[69178, 2510, 317, 9, 212, "Text"], Cell[69498, 2521, 114, 3, 61, "Input"], Cell[69615, 2526, 335, 10, 211, "Text"], Cell[69953, 2538, 129, 4, 61, "Input"], Cell[70085, 2544, 261, 10, 114, "Text"], Cell[70349, 2556, 72, 2, 61, "Input"], Cell[70424, 2560, 1303, 36, 797, "Text"], Cell[71730, 2598, 105, 3, 61, "Input"], Cell[71838, 2603, 105, 3, 61, "Input"], Cell[71946, 2608, 115, 3, 61, "Input"], Cell[72064, 2613, 366, 14, 147, "Text"], Cell[72433, 2629, 240, 8, 61, "Input"], Cell[72676, 2639, 76, 1, 47, "Text"], Cell[72755, 2642, 68, 2, 61, "Input"], Cell[72826, 2646, 366, 10, 243, "Text"], Cell[73195, 2658, 126, 4, 61, "Input"], Cell[73324, 2664, 228, 10, 84, "Text"], Cell[73555, 2676, 78, 2, 61, "Input"], Cell[73636, 2680, 681, 24, 345, "Text"], Cell[74320, 2706, 68, 2, 61, "Input"], Cell[74391, 2710, 370, 11, 178, "Text"], Cell[74764, 2723, 562, 12, 434, "Text"], Cell[75329, 2737, 261, 7, 177, "Text"], Cell[75593, 2746, 207, 7, 91, "Input"], Cell[75803, 2755, 138, 6, 81, "Text"], Cell[75944, 2763, 78, 2, 61, "Input"], Cell[76025, 2767, 300, 6, 271, "Text"], Cell[76328, 2775, 229, 7, 92, "Input"], Cell[76560, 2784, 122, 4, 61, "Input"], Cell[76685, 2790, 78, 2, 61, "Input"], Cell[76766, 2794, 68, 2, 61, "Input"], Cell[76837, 2798, 312, 12, 149, "Text"], Cell[77152, 2812, 351, 10, 209, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[77540, 2827, 410, 14, 83, "Section"], Cell[77953, 2843, 122, 3, 79, "Text"], Cell[78078, 2848, 661, 24, 65, "Input", Evaluatable->False], Cell[78742, 2874, 620, 14, 433, "Text"] }, Closed]] }, Open ]] } ] *) (* End of internal cache information *)