(************** Content-type: application/mathematica ************** CreatedBy='Mathematica 5.0' 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[ 66127, 2043]*) (*NotebookOutlinePosition[ 66804, 2066]*) (* CellTagsIndexPosition[ 66760, 2062]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["\<\ Math 113-01 Calculus I Mathematica Tutorial\ \>", "Title"], Cell["University of St. Thomas", "Subtitle"], Cell["\<\ Author: Patrick Van Fleet Last Revision: 17 September 2003\ \>", "Subsubtitle"], Cell[CellGroupData[{ Cell["Due Date", "Subsection"], Cell[TextData[{ "This lab is due at ", StyleBox["5:00 on September 26, 2003", FontWeight->"Bold"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Instructions", "Subsection"], Cell[TextData[{ "This notebook (term for a ", StyleBox["Mathematica", FontSlant->"Italic"], " document) is a tutorial for the software. Either alone or with a \ partner, ", StyleBox["work carefully through each major topic", FontWeight->"Bold"], ". The last topic is a set of exercises. Work these exercises in the \ space provided and write your answers in the space provided. Then follow the \ instructions in this Section for emailing me your answers.\n\nAcross from \ each major heading is a symbol ] with a triangle on the bottom. Double-click \ this symbol to open this part of the lab.\n" }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Magnification", "Subsection"], Cell[TextData[{ "If the text is too small for you to see (like it is for me!!), go to ", StyleBox["Format", FontWeight->"Bold"], " above. On the bottom is ", StyleBox["Magnification", FontWeight->"Bold"], " and you can make the text bigger." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Overview", "Section"], Cell[TextData[{ "Welcome to the ", StyleBox["Mathematica", FontSlant->"Italic"], " tutorial. It is our goal with this tutorial to:\n\n\t1) Introduce you to \ the software's capabilities.\n\t2) Help you understand how you can use it \ to augment your learning.\n\t3) Teach you the basic structure of a ", StyleBox["Mathematica", FontSlant->"Italic"], " notebook (working document).\n\t4) Describe the basic syntax you will \ need to learn in order to master the software.\n\t5) Illustrate how to use \ the Help browser and thereby learn and master new aspects of the software.\n\ \t6) Teach you how to build functions and use them to master mathematical \ concepts.\n\t7) Describe what is expected of you with regards to ", StyleBox["Mathematica", FontSlant->"Italic"], " in your calculus and other mathematics classes." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["What Exactly Is Mathematica?", "Section"], Cell[TextData[{ "Welcome to one of the most complete software programs that exists today in \ the world of mathematics. ", StyleBox["Mathematica", FontSlant->"Italic"], " was created by Stephen Wolfram (", ButtonBox["http://www.wolfram.com", ButtonData:>{ URL[ "http://www.wolfram.com"], None}, ButtonStyle->"Hyperlink"], "). The software has an incredible list of uses. People use ", StyleBox["Mathematica", FontSlant->"Italic"], " to\n\n1) Do basic arithmetic. Put your cursor ", StyleBox["anywhere", FontWeight->"Bold"], " in the cell below and push either ", StyleBox["Shift-Enter", FontWeight->"Bold"], " or the ", StyleBox["Enter", FontWeight->"Bold"], " key on the numeric keypad. It doesn't matter where you put your cursor \ in the cell!" }], "Text"], Cell[BoxData[{ \(1 + 4\), "\[IndentingNewLine]", \(2*5\), "\[IndentingNewLine]", \(1 - 5/3 + 7\), "\[IndentingNewLine]", \(5*\((2 - 4)\)^3\), "\[IndentingNewLine]", \(\)}], "Input"], Cell["2) More complex computations", "Text"], Cell[BoxData[ \(\(\(\[IndentingNewLine]\)\(N[Pi, 200]\ (*\ Compute\ \[Pi]\ to\ 200\ digits\ *) \[IndentingNewLine]\ \[IndentingNewLine] Sin[ .0003150010351]* E^2.0001010103016\[IndentingNewLine]\[IndentingNewLine] Sum[1/k, {k, 1, 100}]\ \ (*\ \ \(Add\ 1 + 1/2 + 1/3 + ... \) + 1/100\ *) \[IndentingNewLine] \)\)\)], "Input"], Cell["3) Do basic algebra operations:", "Text"], Cell[BoxData[{ \(Factor[x^2 - 9]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Expand[\((x^2 + 5*x + 1)\)*\((2*x - 1)\) + 4*x^3]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Expand[\((2*x + 1)\)^9]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Simplify[\((x + 1)\)*\((x + 2)\) + x + 1]\), "\[IndentingNewLine]", \(\)}], "Input"], Cell["4) Plot graphs of functions and surfaces: ", "Text"], Cell[BoxData[{ \(\(Plot[ Sin[x], {x, \(-2\)*Pi, 2*Pi}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[Sin[x], {x, \(-2\)*Pi, 2*Pi}, PlotStyle \[Rule] RGBColor[1, 1, 0], Ticks \[Rule] {{\(-2\)*Pi, \(-Pi\), Pi, 2*Pi}, {\(-1\), \(-1\)/2, 1/2, 1}}, Background \[Rule] RGBColor[0, 0, 0], PlotLabel -> "\"];\)\ \[IndentingNewLine]\), "\[IndentingNewLine]", \(<< Graphics`\), "\[IndentingNewLine]", \(\(ParametricPlot[{Sin[2*t] + Sin[5*t], Cos[2*t] + Cos[5*t]}, {t, 0, 2*Pi}, AspectRatio \[Rule] Automatic, PlotStyle \[Rule] RGBColor[1, 0, 0]];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(ParametricPlot3D[{Sin[s]*Cos[t], Sin[s]*Sin[t], 1 + Cos[s]}, {s, 0, Pi}, {t, 0, 2*Pi}, Ticks \[Rule] None];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot3D[Sin[x*y], {x, 0, 2*Pi}, {y, 0, 3*Pi/2}, PlotPoints \[Rule] 40, Ticks \[Rule] None, Mesh \[Rule] False];\)\), "\[IndentingNewLine]", \(\)}], "Input"], Cell["\<\ 4) Make animations: After you execute the cell below, pick one graph and \ double-click on it to animate.\ \>", "Text"], Cell[BoxData[ \(\(Table[ Plot[Sin[x - a], {x, 0, 4*Pi}, Ticks \[Rule] None, PlotStyle \[Rule] RGBColor[0, 0, 1]], {a, 0, 2*Pi - Pi/10, Pi/10}];\)\)], "Input"], Cell["\<\ After you execute the cell below, pick one graph and double-click on it to \ animate.\ \>", "Text"], Cell[BoxData[ \(\(SpinShow[ ParametricPlot3D[{s*Cos[t]*Sin[s], s*Cos[s]*Cos[t], \(-s\)*Sin[t]}, {s, 0, 2*Pi}, {t, 0, Pi}, Axes \[Rule] False, Boxed \[Rule] False], Frames \[Rule] 12, SpinRange \[Rule] {0, Pi}];\)\)], "Input"], Cell["6) Create functions and use them for computations:", "Text"], Cell[BoxData[{ \(\(f[x_] := x^2 + 5*x - 14;\)\), "\[IndentingNewLine]", \(f[0]\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] 0, x]\), "\[IndentingNewLine]", \(\(Plot[{f[x], f[x - 1], f[x - 2]}, {x, \(-8\), 5}];\)\), "\[IndentingNewLine]", \(\(Plot[{f[x], \(f'\)[x]}, {x, \(-8\), 5}];\)\), "\[IndentingNewLine]", \(Solve[\(f'\)[x] \[Equal] 0, x]\), "\[IndentingNewLine]", \(\(Print["\", \(-5\)/ 2, "\<,\>", f[\(-5\)/2], "\<).\>"];\)\)}], "Input"], Cell["6) \"Play\" functions!", "Text"], Cell[BoxData[ \(\(Play[Sin[2*Pi*400*t], {t, 0, 1}];\)\)], "Input"] }, Closed]], Cell[CellGroupData[{ Cell[TextData[{ "What Will We Do With ", StyleBox["Mathematica", FontSlant->"Italic"], "?" }], "Section"], Cell[TextData[{ "We will primarily use ", StyleBox["Mathematica", FontSlant->"Italic"], " to assist us in learning Calculus I. Towards this end, we'll want to ", "define", " and ", "plot", " functions, take derivatives, solve equations, find limits, and compute \ integrals. All of these commands are quite easy to master.\n\nDuring your \ Math 113 course, you will be asked to complete several labs. These labs will \ solidfy your understanding of calculus and improve your understanding of ", StyleBox["Mathematica", FontSlant->"Italic"], ". Later in this tutorial, I'll show you a problem I might use as a good \ lab problem.\n\nWe also hope that you see ", StyleBox["Mathematica", FontSlant->"Italic"], " as a great learning tool. Your instructor will often encourage you to \ fire up ", StyleBox["Mathematica", FontSlant->"Italic"], " when you come to class and use it to plot graphs or solve equations as \ your instructor works through concepts and examples in class. \n" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["How To Use This Document", "Section"], Cell[TextData[{ "To best utilize this document,", StyleBox[" carefully read the entire document and work through the \ examples as instructed", FontWeight->"Bold"], ". \n\nYou will be asked to work through a series of labs or projects \ in your mathematics courses where you utilize ", StyleBox["Mathematica", FontSlant->"Italic"], ". You will need to have a basic mastery of the software. This mastery is \ only acheived by using the software - simply put there are no shortcuts - \ you'll have to carefully work through notebooks to understand them. Also \ don't be afraid to play \"what-if\" games with various commands. You can't \ break anything and you just might teach yourself something" }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Notebooks and Cells", "Section"], Cell[TextData[{ "This window is called a notebook. In fact, most of the ", StyleBox["Mathematica", FontSlant->"Italic"], " documents we work with are notebooks. Simply put, it is a text file of \ commands, comments, tables or images that can easily be passed from one \ computer to another. In theory, the notebooks are platform independent so \ that you can create them on a Mac and open them later on a PC. When you save \ a notebook, the extension is .nb (just like the extension is .doc for Word \ documents).\n\nThe basic framework of a notebook is a cell. Look to the \ right of this window. The maroon lines indicate cell markers. Cells can be \ text (such as this), section titles, basic input commands, or output. ", StyleBox["Mathematica", FontSlant->"Italic"], " tries to group some cells together in a logical way. Notice that there \ are four \"sub-cells\" inside this section. Cells are a great way to \ organize your work and your instructor will often divide labs into cells for \ your convenience.\n\nIf you place your mouse where there is no cell, the \ cursor is horizontal. If you start typing here, you will be creating a basic \ input cell. Input cells are where you do mathematics. Sometimes, your \ instructor will give you a blank input cell or a command already typed in an \ input cell. You can type in more commands or execute the ones that are \ already there. \n\nLet's do a simple example. I would like to define the \ function f(x)=", Cell[BoxData[ \(TraditionalForm\`\(\(x\^2\)\(\ \)\(-\)\(\ \)\(3 x\)\(\ \)\(+\)\(\ \)\(2\)\(\ \)\)\)]], "and find the zeros of f(x). My input cell is below. All the commands I \ need are there. To get ", StyleBox["Mathematica", FontSlant->"Italic"], " to produce an answer, simply click your mouse ", StyleBox["anywhere", FontWeight->"Bold"], " in the cell and then type either Shift-Enter or the Enter by the keypad. \ \n\n", StyleBox["Important:", FontWeight->"Bold"], " If you simply type the non-keypad Enter, ", StyleBox["Mathematica", FontSlant->"Italic"], " will give you a new line where you can put more commands - it will not \ evaluate your existing commands." }], "Text"], Cell[BoxData[{ \(f[x_] := x^2 - 3*x + 2\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] 0, x]\)}], "Input"], Cell["\<\ If you want to delete a cell, simply click on the maroon line that defines \ that cell and push the delete key. Plots you produce take up a ton of disk \ space. Since you can always save your notebook and re-evaluate it later, \ it's always smart to delete plots you can easily recreate before you save \ your work.\ \>", "Text"], Cell[CellGroupData[{ Cell["Saving Notebooks", "Subsection"], Cell[TextData[{ "You will often have need to save your work. Since disk space on your U \ drive is limited, you want to make the notebook as small as possible. To do \ this, you can delete the output (you can always re-evaluate the notebook when \ you open it later). Output, particularly graphics, take up tons of space. \ To delete all output, go to ", StyleBox["Kernel", FontWeight->"Bold"], " on the main menu above and then ", StyleBox["Delete All Output", FontWeight->"Bold"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Opening Notebooks and Evaluating Them", "Subsection"], Cell[TextData[{ "A quick way to execute all cells once you've opened your notebook is to go \ to ", StyleBox["Kernel", FontWeight->"Bold"], " in the main menu above and choose ", StyleBox["Evaluation ", FontWeight->"Bold"], "and then choose", StyleBox[" Evaluate Notebook", FontWeight->"Bold"], "." }], "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Basic Arithmetic Operations", "Section"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " has the typical arithmetic operations: +, -, *, / denote plus, minus, \ times, and divide respectively. The ^ above the 6 is used to raise one value \ to another value.\n\nExecute the cell below to peform some basic arithmetic \ operations." }], "Text"], Cell[BoxData[{ \(3 + 5\), "\[IndentingNewLine]", \(2 - 7\), "\[IndentingNewLine]", \(3*6\), "\[IndentingNewLine]", \(5*\((2 - 4)\)\), "\[IndentingNewLine]", \(Pi^2\), "\[IndentingNewLine]", \(E^\((\(-1\))\)\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Some Observations:", "Section"], Cell[CellGroupData[{ Cell["Multiplication", "Subsection"], Cell[TextData[{ "The * is not the only thing ", StyleBox["Mathematica", FontSlant->"Italic"], " recognizes as a multiplication symbol. You can actually leave a space \ between two numbers and ", StyleBox["Mathematica", FontSlant->"Italic"], " will mulitply them when you execute the cell. I try to discourage using \ the space since it is hard to read and sometimes hard to recognize (due to \ letter/number structure). I try to always use the *. \n\nExecute the cell \ below to see two ways to multiply numbers." }], "Text"], Cell[BoxData[{ \(4*7\[IndentingNewLine]\), "\[IndentingNewLine]", \(4\ 7\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Symbolic Arithmetic", "Subsection"], Cell[TextData[{ " The last two computations above resulted in answers ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\^2\)]], " and ", Cell[BoxData[ \(TraditionalForm\`1\/e\)]], ". ", StyleBox["Mathematica", FontSlant->"Italic"], " will always give symbolic answers unless you ask for decimal \ approximations. There are two simple ways to obtain decimal approximations. \ The easiest is to just put a decimal point in the command somewhere. Execute \ the cell below to see what I mean:\n" }], "Text"], Cell[BoxData[{ \(Pi^2\[IndentingNewLine]\), "\[IndentingNewLine]", \(Pi^2. \)}], "Input"], Cell[TextData[{ "Another way to get numerical approximations is to use ", StyleBox["Mathematica", FontSlant->"Italic"], "'s N function. N takes whatever it is given and returns a decimal \ approximation. You can add a second input value (separated from the first by \ a comma) that says how many decimal places you want to see. \n\nExecute the \ cell below to see what I mean:" }], "Text"], Cell[BoxData[{ \(Pi^2\[IndentingNewLine]\), "\[IndentingNewLine]", \(N[Pi^2]\[IndentingNewLine]\), "\[IndentingNewLine]", \(N[Pi^2, 10]\[IndentingNewLine]\), "\[IndentingNewLine]", \(N[Pi^2, 100]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Parentheses ( ) , Brackets [ ] , and Braces { }.", "Subsection"], Cell[TextData[{ " This is an important issue in ", StyleBox["Mathematica", FontSlant->"Italic"], " and a true source of student frustration. In an algebra class, you \ probably used ( ), [ ], and { } to represent various algebraic expressions. \ The only ones you can use for algebraic expressions in ", StyleBox["Mathematica", FontSlant->"Italic"], " are the parentheses! The square brackets [ ] are used for functions (for \ example the N function above) and the braces { } are used for lists (see the \ plot commands above).\n\nIf you try to use [ ] in an algebraic expression, ", StyleBox["Mathematica", FontSlant->"Italic"], " thinks that part of the expression is actually input for a function and \ you'll get a strange error message. Similarly, if you use { } in an \ algebraic expression, ", StyleBox["Mathematica", FontSlant->"Italic"], " will think you're building a list and give you a weird answer or an \ answer enclosed in { } (this can cause lots of problems!). \n\nA common \ error for students is to use ( ) for functions. This is understandable since \ we use notation like f(x) in math all the time. But in ", StyleBox["Mathematica", FontSlant->"Italic"], ", you need to denote the same function as f[x]. If you give a command \ like N(Pi^2), ", StyleBox["Mathematica", FontSlant->"Italic"], " will think you are trying to perform some algebraic operation involving \ variable N (which is a built-in function!) and ", Cell[BoxData[ \(TraditionalForm\`\[Pi]\^2\)]], ".\n\nExecute the cells below to see some good and bad ", StyleBox["Mathematica", FontSlant->"Italic"], " code. Be prepared for some strange error messages!" }], "Text"], Cell[BoxData[ \(N \((Pi^2)\)\)], "Input"], Cell[BoxData[ \(3*\([2 - 6]\)\)], "Input"], Cell[BoxData[ \(2 + 3*{5 + 4}\)], "Input"], Cell[BoxData[ \(3 + N[1/7, 8]*\((3 - 6)\)\)], "Input"], Cell[TextData[{ "The first three commands are not good ", StyleBox["Mathematica", FontSlant->"Italic"], " commands while the last one is just fine." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Case Sensitiviy", "Subsection"], Cell[TextData[{ "Like some programs today, ", StyleBox["Mathematica", FontSlant->"Italic"], " is case sensitive. Simply put, that means that Sin, Log, N are \ interpreted as things completely different than sin, log, n.\n\nExecute the \ cell below:" }], "Text"], Cell[BoxData[{ \(\(\(Sin[Pi/2]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(\(\(sin[Pi/2]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(Sin[pi/2]\), "\[IndentingNewLine]", \(\)}], "Input"], Cell[TextData[{ "The first command above was fine - you get back exactly what you'd expect. \ The second command possibly gave you a spelling error message - this happens \ when ", StyleBox["Mathematica", FontSlant->"Italic"], " thinks you might have meant to type something other than what you did. \ It also just repeated the command. That's because ", StyleBox["Mathematica", FontSlant->"Italic"], " thinks you're trying to evaluate Pi/2 at some function called sin. Of \ course, it has no definition for sin, so it leaves it as is. The same thing \ happens in the third command. ", StyleBox["Mathematica", FontSlant->"Italic"], " has a valid function, but it has no idea about the value of pi." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["The arrow key \[RightArrow]", "Subsection"], Cell[TextData[{ "One of the biggest quirks in ", StyleBox["Mathematica", FontSlant->"Italic"], " is the arrow key \[RightArrow]. You can find it by going to File, \ Pallettes, Basic Typesetting, but that's a lot of work and I try to \ discourage people from using pallettes until they have a good understanding \ ", StyleBox["Mathematica", FontSlant->"Italic"], " syntax.\n\nWhat's more perplexing about \[RightArrow] is that you can \ create it without trying to create it! This is really frustrating when you \ re-open your notebook for later use and see the arrow in a cell but no key on \ your keyboard to type it.\n\nObserve the cell below - don't execute it! I'm \ trying to plot ", Cell[BoxData[ \(TraditionalForm\`x\^5\)]], "from 0 to 2 but restrict the range to 0 to 3. We'll do basic plotting \ later, but you should be able to understand the command so far. Note that \ I'm not done with the command. I've typed PlotRange followed by a - and then \ a >" }], "Text"], Cell[BoxData[ \(\(\(Plot\)\([\)\(x^5, {x, 0, 2}, \(\(PlotRange\)\(->\)\)\)\)\)], "Input"], Cell["\<\ In the blank cell below, retype the command exactly as I have it above. \ After you've done that, add the symbols {0,3}]\ \>", "Text"], Cell[BoxData[""], "Input"], Cell[TextData[{ "Did you see what happened?? The - > turned into the \[RightArrow] !! \ Something to remember when you use ", StyleBox["Mathematica", FontSlant->"Italic"], ". You can execute the cell and see a plot of the function." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ Brackets, Parentheses, and Braces That Are Purple\ \>", "Subsection"], Cell[TextData[{ "Look at my Plot command above. Do you notice that the [ is purple? That \ is because ", StyleBox["Mathematica", FontSlant->"Italic"], " is trying to tell you that you need a closing ]. Once you give it the \ closing ], the [ turns back to the normal color. The same goes for { } and ( \ ). This a wonderful debugging tool and before you execute any command \ involving parentheses, brackets, and braces, make sure none of them are \ purple!!" }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["The Semi-Colon ;", "Subsection"], Cell[TextData[{ "Another interesting quirk of ", StyleBox["Mathematica", FontSlant->"Italic"], " is the semi-colon. If you end a command with a semi-colon, ", StyleBox["Mathematica", FontSlant->"Italic"], " suppresses the output. At first, this might seem strange to you, but in \ many applications you'll find the semi-colon quite convenient.\n\nExecute the \ cell below to see how the semi-colon works." }], "Text"], Cell[BoxData[{ \(3 + 7\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(3 + 7;\)\)}], "Input"], Cell[TextData[{ "Here's a simple case of when you might want to use the semi-colon. I know \ we haven't introduced variables yet, but the example below has some. Suppose \ you wanted to convert a Fahrenheit temperature to Celcius. You might \ remember the formula is \n\nc = ", Cell[BoxData[ \(TraditionalForm\`\(\(5\/9\)\(*\)\)\)]], "( f - 32 )\n\nYou know what temperature you want to convert so you don't \ necessarily want to see it output. So you use a semi-colon to suppress it." }], "Text"], Cell[BoxData[{ \(\(f = 87;\)\), "\[IndentingNewLine]", \(c = N[\((5/9)\)*\((f - 32)\)]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["\<\ The Percent % and the Function Application //\ \>", "Subsection"], Cell[TextData[{ "The % and // are two commands I usually discourage when someone is first \ learning ", StyleBox["Mathematica", FontSlant->"Italic"], ". They are pretty handy, so when you get comfortable with the software, \ you might want to go back and experiment with them.\n\nThe % represents the \ last value you computed. It can be a real typing timesaver. Suppose you did \ some involved arithmetic computation and then realized that you wanted the \ numerical approximation. Instead of re-executing the cell and wrapping your \ computation in N[ ], you could use %. Execute the cell below to see how to \ use %." }], "Text"], Cell[BoxData[{ \(\((5 + 1/7 - E^2 + Sin[Pi/4])\)^2\[IndentingNewLine]\), "\[IndentingNewLine]", \(N[%]\)}], "Input"], Cell["\<\ The % can be really dangerous. Suppose you wanted to do the above \ calculation, assign it a variable name (say a), and then plot x^2 from 0 to \ a. This work is done in the cell below. Note that I've used the semi-colon \ to suppress the output of a.\ \>", "Text"], Cell[BoxData[{ \(\(a = \((5 + 1/7 - E^2 + Sin[Pi/4])\)^2;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(Plot[x^2, {x, 0, a}]\)}], "Input"], Cell[TextData[{ "Now you decide you want the numerical approximation to a. So you type \ N[%]. Do you see what's going to happen? The last output was the plot, so \ you're asking ", StyleBox["Mathematica", FontSlant->"Italic"], " to give a numerical approximation of a picture. Execute the cell below \ for a weird error message. The output of the plot was to tell you it was \ Graphics and N has absolutely no idea what to do with that! So use % \ carefully." }], "Text"], Cell[BoxData[ \(N[%]\)], "Input"], Cell["\<\ The // can be used as an alternative way to apply a function to a value. \ Execute the cell below to see how it works.\ \>", "Text"], Cell[BoxData[{ \(N[1/14]\[IndentingNewLine]\), "\[IndentingNewLine]", \(1/14\ // N\[IndentingNewLine]\), "\[IndentingNewLine]", \(Cos[Pi]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Pi\ // Sin\[IndentingNewLine]\), "\[IndentingNewLine]", \(\((x + 3)\)^5\ // Expand\[IndentingNewLine]\), "\[IndentingNewLine]", \(Expand[\((x + 3)\)^5]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Comments", "Subsection"], Cell[TextData[{ "Sometimes its handy to make a remark for yourself or someone else in a \ cell containing commands. You don't want ", StyleBox["Mathematica", FontSlant->"Italic"], " to evaluate it. Such a remark is called a comment. Anything surrounded \ by (* *) is ignored by ", StyleBox["Mathematica", FontSlant->"Italic"], " in an input cell. \n\nEvaluate the cell below." }], "Text"], Cell[BoxData[ \(\(\( (*\ If\ you\ don' t\ put\ the\ decimal\ after\ the\ number, \ mathematica\ will\ do\ the\ computation\ \(\(symbolically\)\(.\)\)\ \ \ *) \)\(\[IndentingNewLine]\)\(\[IndentingNewLine]\)\(1. /Pi\)\)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Mathematica Naming Convention", "Subsection"], Cell[TextData[{ "The last thing I'll mention in this section is theMathematicanaming \ convention.All functions,parameters,and reserved constants are named using \ capital letters. If ", StyleBox["Mathematica", FontSlant->"Italic"], " needs two or more words to name a function,it does so by capitalizing \ each word (no spaces between words). Some examples are \ Sin,Log,Plot,Integrate,ParametricPlot,PointSize,FindRoot,E,Pi." }], "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Algebraic Operations", "Section"], Cell[TextData[{ "We've done some algebra already so I'll cover algebraic operations with \ just a cell of examples. You can do some nice things with ", StyleBox["Mathematica", FontSlant->"Italic"], " and algebra. You can factor expressions, get common denominators, or \ split expressions apart.\n\nExecute the cell below to perform some algebraic \ operations." }], "Text"], Cell[BoxData[{ \(Apart[\((3*x + 1)\)/\((x^3 - x)\)]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Together[ x/\((x - 3)\)\ + \ 1/\((3*x + 6)\)]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Factor[Sin[x]*x^3 + Sin[x]*x^2 + Sin[x]]\)}], "Input"] }, Closed]], Cell[CellGroupData[{ Cell["Variables", "Section"], Cell[TextData[{ "We have used variables above and variables are an integral part of ", StyleBox["Mathematica", FontSlant->"Italic"], ". Be careful when using capital letters to name variables. As you might \ guess the assignment N=5 causes all kinds of problems since N is the decimal \ approximation function. \n\nVariables names can be any length you want - \ make sure they start with a letter in the alphabet. You can use numbers in \ your variable names - they just can't occupy the first position in the name.\n\ \nThe cell below contains some valid variable assignments. Note that I've \ used semi-colons on some of them" }], "Text"], Cell[BoxData[{ \(x = 9\[IndentingNewLine]\), "\[IndentingNewLine]", \(y = Pi^2 + 1\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(larry = 3;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(curly = 4;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(moe = larry^2 + curly^2\)}], "Input"], Cell[TextData[{ "Variables are really handy for many applications. Suppose you wanted to \ find values for ", Cell[BoxData[ \(TraditionalForm\`\@x\)]], ", 1/x, and 2x+5 for x=2,3,4,5,6 You are asked to find fifteen different \ values in all. You could type out every value:" }], "Text"], Cell[BoxData[{ \(Sqrt[2]\), "\[IndentingNewLine]", \(1/2\), "\[IndentingNewLine]", \(2*2 + 5\), "\[IndentingNewLine]", \(Sqrt[3]\), "\[IndentingNewLine]", \(1/3\), "\[IndentingNewLine]", \(2*3 + 5\), "\[IndentingNewLine]", \(Sqrt[4]\), "\[IndentingNewLine]", \(1/4\), "\[IndentingNewLine]", \(2*4 + 5\), "\[IndentingNewLine]", \(Sqrt[5]\), "\[IndentingNewLine]", \(1/5\), "\[IndentingNewLine]", \(2*5 + 5\), "\[IndentingNewLine]", \(Sqrt[6]\), "\[IndentingNewLine]", \(1/6\), "\[IndentingNewLine]", \(2*6 + 5\)}], "Input"], Cell["\<\ That's a lot of typing! Alternatively, you could use a variable assigment, \ say x=2, and then evaluate Sqrt[x], 1/x, 2*x+5. Then you could go back and \ change the value to x=3 and simply re-evaluate the cell.\ \>", "Text"], Cell[BoxData[{ \(\(x = 2;\)\), "\[IndentingNewLine]", \(Sqrt[x]\), "\[IndentingNewLine]", \(1/x\), "\[IndentingNewLine]", \(2*x + 5\)}], "Input"], Cell["\<\ Now go back and change x to 3 and re-evaluate the cell. Then do x=4, x=5, \ x=6.\ \>", "Text"], Cell[CellGroupData[{ Cell["Note", "Subsection"], Cell[TextData[{ "You need to be careful with variables. Suppose your next command in this \ notebook was to Expand[", Cell[BoxData[ \(TraditionalForm\`\((x + 1)\)\^2\)]], "]. You would the answer to be ", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "+2x+1. Execute the cell below to see that the answer is 49." }], "Text"], Cell[BoxData[ \(Expand[\((x + 1)\)^2]\)], "Input"], Cell[TextData[{ "The reason you get 49 is the last value of x was 6 in the previous cell. \ ", StyleBox["Mathematica", FontSlant->"Italic"], " doesn't forget!! \n\nYou can avoid this problem by clearing variable \ values when you no longer need them. ", StyleBox["Mathematica", FontSlant->"Italic"], " has a function for this called Clear." }], "Text"], Cell[BoxData[{ \(x\), "\[IndentingNewLine]", \(Clear[x]\), "\[IndentingNewLine]", \(Expand[\((x + 1)\)^2]\)}], "Input"], Cell["\<\ You can clear two variables at once or every variable if you so desire.\ \>", "Text"], Cell[BoxData[{ \(Clear[larry, curly]\ (*\ Clear\ values\ for\ these\ two\ variables\ *) \), \ "\[IndentingNewLine]", \(Clear["\<`*\>"]\ (*\ Clear\ all\ variable\ values\ *) \)}], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Built-In Functions", "Section"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " has a ton of built-in functions. Every function you would ever need in \ Calculus is included as well as functions for rendering graphics, playing \ sound files, or exporting output to different file formats. \n" }], "Text"], Cell[CellGroupData[{ Cell["Calculus-type functions", "Subsection"], Cell[TextData[{ "As I remarked earlier, all ", StyleBox["Mathematica", FontSlant->"Italic"], " functions begin with a capital letter. We've seen some before, but here \ are basic functions you will use in Math 113" }], "Text"], Cell[BoxData[{ \(Sin[x]\), "\[IndentingNewLine]", \(Cos[x]\), "\[IndentingNewLine]", \(Tan[x]\), "\[IndentingNewLine]", \(Sec[x]\), "\[IndentingNewLine]", \(Csc[x]\), "\[IndentingNewLine]", \(\(\(Cot[x]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(ArcSin[x]\), "\[IndentingNewLine]", \(ArcCos[x]\), "\[IndentingNewLine]", \(\(\(ArcTan[x]\)\(\[IndentingNewLine]\) \)\), "\[IndentingNewLine]", \(Exp[x]\ (*\ This\ is\ another\ way\ to\ write\ E^x\ *) \), "\[IndentingNewLine]", \(Log[3, x]\ \ (*\ The\ first\ number\ is\ the\ base\ of\ the\ log\ *) \), "\ \[IndentingNewLine]", \(Log[x]\ (*\ If\ you\ leave\ the\ base\ out, \ Mathematica\ uses\ E\ as\ the\ base\ *) \), "\[IndentingNewLine]", \(\)}], "Input"], Cell["\<\ Of course, you can do arithmetic on functions or compose functions. You can \ easily evaluate functions. Execute the cell below to see examples.\ \>", "Text"], Cell[BoxData[{ \(Sin[x]^2 + Cos[x]^2\[IndentingNewLine]\), "\[IndentingNewLine]", \(Sin[x]^2 + Cos[x]^2\ // Simplify\[IndentingNewLine]\), "\[IndentingNewLine]", \(Exp[Sin[x]]\[IndentingNewLine]\), "\[IndentingNewLine]", \(3^Log[3, fred]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Log[2, 1]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Tan[0]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Sin[ArcCos[1/2]]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Other functions", "Subsection"], Cell[TextData[{ StyleBox["Mathematica", FontSlant->"Italic"], " also has functions for solving equations, plotting functions, and \ integrating functions. These functions are Solve, Plot, and Integrate and \ we'll cover each of them later." }], "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Defining Your Own Functions", "Section"], Cell[TextData[{ "One of the best things to do in ", StyleBox["Mathematica", FontSlant->"Italic"], " is define your own functions. The procedure is really easy. I'll \ describe it by defining a function below. " }], "Text"], Cell[BoxData[ \(f[x_] := Sin[x]/x\)], "Input"], Cell[TextData[{ "\nNote that there is no output in the above cell.You're simply adding \ toMathematica's library of functions. Whenever ", StyleBox["Mathematica", FontSlant->"Italic"], " sees f[a], it returns the value Sin[a]/a. See the cell below for an \ illustration." }], "Text"], Cell[BoxData[{ \(f[a]\[IndentingNewLine]\), "\[IndentingNewLine]", \(f[Pi]\[IndentingNewLine]\), "\[IndentingNewLine]", \(f[cat]\)}], "Input"], Cell[CellGroupData[{ Cell["Observations", "Subsection"], Cell[TextData[{ "1) I can name functions just like I name variables. In this case I've \ cleverly named my function f.\n\n2) Just like all other functions, my input \ variable is wrapped in [ ]. \n\n3) I've picked my input variable name to be \ x and note that it is immediately followed by an underscore _. This tells ", StyleBox["Mathematica", FontSlant->"Italic"], " that x is an input variable and not to be confused with any value of x \ you might have previously used in your notebook.\n\n4) The colon that \ precedes the equals sign basically tells mathematica when to evaluate the \ right-hand side of f. For most applications, it's best to define functions \ using := rather than = so try to get in the habit of doing so.\n\n5) The \ right hand side can be an algebraic expression, built-in function or any \ combination thereof.\n\nFunctions can also have more than one input variable. \ Execute the cell below to see some functions I've defined." }], "Text"], Cell[BoxData[{ \(\(g[x_] := Sin[x^2 + 1];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(h[ x_] := \((x^2 + 3*x + 1)\)/\((2*x^2 + 1)\);\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(m[x_] := x^2;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(c[y_] := g[h[y]];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(t[x_, a_] := m[x - a];\)\)}], "Input"], Cell["\<\ The first three functions should be self-explanatory. The fourth function is \ a composition of g and h. Note I've used a different variable name - it's a \ dummy variable and the name makes no difference. The last function has two \ inputs. It has the traditional input variable x and also a translation \ variable a. Execute the cell below to see what we can do with these functions. This cell \ will take some time as the second command requires some nasty algebra.\ \>", "Text"], Cell[BoxData[{ \(m[3]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Simplify[c[y]]\[IndentingNewLine]\), "\[IndentingNewLine]", \(t[x, 4]\[IndentingNewLine]\), "\[IndentingNewLine]", \(t[x, \(-1\)]\[IndentingNewLine]\), "\[IndentingNewLine]", \(m[x]*g[x - 4]\[IndentingNewLine]\), "\[IndentingNewLine]", \(c[2]/m[12]\ // N\)}], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Plotting Functions", "Section"], Cell[TextData[{ "One of the most common uses students have for ", StyleBox["Mathematica", FontSlant->"Italic"], " is plotting functions. You can plot a single function or several \ functions. You can pick the plot range, specify tick marks, add a label and \ change colors. I'll show you how to do some basic plots and then add other \ features.\n\nIn its simplest form, ", StyleBox["Plot", FontWeight->"Bold"], " is a ", StyleBox["Mathematica", FontSlant->"Italic"], " function that needs two inputs. You must give plot a function or \ expression to plot and a ", StyleBox["list ", FontWeight->"Bold"], "that tells ", StyleBox["Mathematica", FontSlant->"Italic"], " the independent variable of the function/expression and a range on this \ variable. \n\nHere are some simple examples. Note that each plot command \ has a function or expression and then a list giving the independent variable \ information. These inputs are separated by commas." }], "Text"], Cell[BoxData[{ \(\(Plot[ x^3 - x^2 - x, {x, \(-3\), 2}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(f[x_] := Sin[x]/x;\)\), "\[IndentingNewLine]", \(\(Plot[ f[x], {x, \(-4\)*Pi, 4*Pi}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(a = 0;\)\), "\[IndentingNewLine]", \(\(b = 1;\)\), "\[IndentingNewLine]", \(\(Plot[ x*\((1 - x)\), {x, a, b}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[f[x - Pi/2] + 2, {x, \(-4\)*Pi, 4*Pi}];\)\)}], "Input"], Cell[CellGroupData[{ Cell["PlotRange", "Subsection"], Cell[TextData[{ " Notice in the second and fourth plot, it looks like the graph was chopped \ off. We can use", StyleBox[" PlotRange", FontWeight->"Bold"], " to vary the y-range of the graph. This becomes a third argument for ", StyleBox["Plot", FontWeight->"Bold"], ". Note the quirky arrow is included in this command. You can either give \ a range of numbers or use the word All to tell ", StyleBox["Mathematica", FontSlant->"Italic"], " to plot all possible values associates with the domain.\n" }], "Text"], Cell[BoxData[{ \(\(Plot[f[x], {x, \(-4\)*Pi, 4*Pi}, PlotRange \[Rule] {\(-1\), 1}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[f[x], {x, \(-4\)*Pi, 4*Pi}, PlotRange \[Rule] All];\)\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Ticks", "Subsection"], Cell[TextData[{ " Now we've got the y-range fixed. Can we do a better job with the \ tickmarks? The x-axis is really better marked using multiples of \[Pi] and \ the y-axis maybe could have fewer labels. We can add another argument to ", StyleBox["Plot ", FontWeight->"Bold"], "to handle tick marks. The command ", StyleBox["Ticks", FontWeight->"Bold"], " works much like PlotRange except it is a list with ", StyleBox["two inputs", FontWeight->"Bold"], ". \n\nThe basic form is Ticks\[RightArrow]{{xvalues}, {yvalues}}. Note \ that the xvalues are enclosed in { } and so are the yvalues. You can also \ use a constant like ", StyleBox["None", FontWeight->"Bold"], " to put no tick marks or ", StyleBox["Automatic", FontWeight->"Bold"], " to let ", StyleBox["Mathematica", FontSlant->"Italic"], " decide where to put tickmarks. \n\nHere are some examples. Note I've \ defined a function g and variables a and b (and suppressed them) to save some \ typing!", "\n" }], "Text"], Cell[BoxData[{ \(\(g[x_] := Sin[x]/x;\)\), "\[IndentingNewLine]", \(\(a = \(-4\)*Pi;\)\), "\[IndentingNewLine]", \(\(b = \(-a\);\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, {\(-1\)/2, 1/2, 1}}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, None}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {None, None}];\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {Automatic, {\(-1\)/2, 1/2, 1}}];\)\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Plot Label", "Subsection"], Cell[TextData[{ "It's easy to add a plot label to our graph. The command", StyleBox[" PlotLabel ", FontWeight->"Bold"], "is another argument we can add to ", StyleBox["Plot", FontWeight->"Bold"], ". ", StyleBox["PlotLabel ", FontWeight->"Bold"], "uses an arrow and the label is then in quotes." }], "Text"], Cell[BoxData[ \(\(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, {\(-1\)/2, 1/2, 1}}, PlotLabel -> "\"];\)\(\[IndentingNewLine]\) \)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Colors", "Subsection"], Cell[TextData[{ "The colors of our plot are rather boring. You can easily change the color \ of the graph and the color of the background of the plot. To do so, we need \ to understand the function ", StyleBox["RGBColor", FontWeight->"Bold"], ".\n\nRGBColor takes three inputs. Each input must be between 0 and 1. \ The first input is the amount of red you want (0 is none and 1 is max \ possible), the second and third values correspond to green and blue \ respectively. \n\nHere are some examples:\n\nRGBColor[0,0,0] - black\n\ RGBColor[1,0,0] - bright red\nRGBColor[1/4,0,0] -dark red\n\n\ RGBColor[1,0,1] -purple\nRGBColor[.75,.75,.75] - light gray\n\n\ RGBColor[0,0,1] - bright blue\nRGBColor[1,1,1] -white\n\nRGBColor is then \ the value of the ", StyleBox["PlotStyle ", FontWeight->"Bold"], "parameter. A typical use of ", StyleBox["PlotStyle", FontWeight->"Bold"], " would be ", StyleBox["PlotStyle\[RightArrow]RGBColor[1,0,0]", FontWeight->"Bold"], ". \n\nExecute the cells below to see the effects of ", StyleBox["PlotStyle", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[ \(\(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, {\(-1\)/2, 1/2, 1}}, PlotLabel -> "\", PlotStyle \[Rule] RGBColor[ .75, 0, 0]];\)\(\[IndentingNewLine]\) \)\)], "Input"], Cell["\<\ Here's how you can use variables to save some typing. Try different values \ for red,green,blue.\ \>", "Text"], Cell[BoxData[{ \(\(red = 1;\)\), "\[IndentingNewLine]", \(\(green = .5;\)\), "\[IndentingNewLine]", \(\(blue = .25;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, {\(-1\)/2, 1/2, 1}}, PlotLabel -> "\", PlotStyle \[Rule] RGBColor[red, green, blue]];\)\)}], "Input"], Cell[TextData[{ "\nTo change the plot background, use the ", StyleBox["Background", FontWeight->"Bold"], " directive with ", StyleBox["RGBColor", FontWeight->"Bold"], ".\n\nExecute the cell below to see the effects of the", StyleBox[" Background", FontWeight->"Bold"], " directive." }], "Text"], Cell[BoxData[ \(\(\(Plot[g[x], {x, a, b}, PlotRange \[Rule] All, Ticks \[Rule] {{\(-4\)*Pi, \(-3\)*Pi, \(-2\)*Pi, \(-Pi\), Pi, 2*Pi, 3*Pi, 4*Pi}, {\(-1\)/2, 1/2, 1}}, PlotLabel -> "\", PlotStyle \[Rule] RGBColor[1, 1, 1], Background \[Rule] RGBColor[0, 0, 1]];\)\(\[IndentingNewLine]\) \)\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Other Plot Options", "Subsection"], Cell["\<\ There are many more plot options. The cell below shows you all the \ options.\ \>", "Text"], Cell[BoxData[ \(Options[Plot]\)], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Plotting Multiple Functions", "Subsection"], Cell[TextData[{ "It is easy to plot multiply functions. In this case the first input of ", StyleBox["Plot", FontWeight->"Bold"], " becomes a", StyleBox[" list", FontWeight->"Bold"], " of functions/expressions. If you want multiple colors, you need then a \ ", StyleBox["list", FontWeight->"Bold"], " of", StyleBox[" RGBColor", FontWeight->"Bold"], "s. Remember, lists are enclosed by braces {}.\n\nHere's an example using \ the function t[x_,a_] from above. I'll redefine it in the cell below." }], "Text"], Cell[BoxData[{ \(\(t[x_, a_] := \((x - a)\)^2;\)\[IndentingNewLine]\[IndentingNewLine] (*\ The\ first\ graph\ is\ red\ and\ the\ second\ is\ blue\ *) \), "\ \[IndentingNewLine]", \(\(Plot[{t[x, 1], t[x, 3]}, {x, 0, 6}, PlotStyle \[Rule] {RGBColor[1, 0, 0], RGBColor[0, 0, 1]}]\ ;\)\[IndentingNewLine]\[IndentingNewLine] (*\ All\ three\ graphs\ are\ green\ *) \), "\[IndentingNewLine]", \(\(Plot[{t[x, 1], t[x, 3], t[x, 0]}, {x, \(-6\), 6}, PlotStyle \[Rule] RGBColor[0, 1, 0]]\ ;\)\[IndentingNewLine]\[IndentingNewLine] (*\ We\ can\ mix\ functions\ and\ expressions\ *) \), \ "\[IndentingNewLine]", \(\(Plot[{Log[x]*x^2, x^2 + 1/x + 1}, {x, 0, 3}, Background \[Rule] RGBColor[0, 0, 0]];\)\)}], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Solving Equations", "Section"], Cell[TextData[{ "Another useful feature of ", StyleBox["Mathematica", FontSlant->"Italic"], " is its ability to solve equations. The two functions we will use to \ solve equations are ", StyleBox["Solve", FontWeight->"Bold"], " and ", StyleBox["FindRoot", FontWeight->"Bold"], "." }], "Text"], Cell[CellGroupData[{ Cell["Solve and NSolve", "Subsection"], Cell[TextData[{ "Suppose I wanted to know when ", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "= 4x+5. I could use ", StyleBox["Solve", FontWeight->"Bold"], " to find the answer (hopefully, you can work this out by hand quicker than \ you can type it into ", StyleBox["Mathematica", FontSlant->"Italic"], "!!).\n\nIn the simplest case, ", StyleBox["Solve", FontWeight->"Bold"], " needs two inputs. The first is comparison of two functions and/or \ expressions and the second is the variable for which to solve. For ", StyleBox["Mathematica", FontSlant->"Italic"], ", equals sign = takes on two meanings. One is an assignment, such as x=3. \ The other is when we are comparing expressing to see if (or when) they are \ equal. To distinguish between the two, ", StyleBox["Mathematica", FontSlant->"Italic"], " uses = for assignments and == (two equals) for comparison. \n\nThe \ correct command for solving the equation is given in the cell below." }], "Text"], Cell[BoxData[ \(Solve[x^2 \[Equal] 4*x + 5, x]\)], "Input"], Cell["You can solve equations involving functions as well:", "Text"], Cell[BoxData[{ \(\(f[x_] := Sqrt[x];\)\), "\[IndentingNewLine]", \(\(g[x_] := 5 - x;\)\), "\[IndentingNewLine]", \(\(h[x_] := E^x*\((x^2 - 3*x + 1)\);\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] g[x], x]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[h[x] \[Equal] 0, x]\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[h[x] \[Equal] 0, x]\ // N\)}], "Input"], Cell[TextData[{ "If you want a numerical approximate to the solution, simply use ", StyleBox["NSolve", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[ \(NSolve[f[x] \[Equal] g[x], x]\)], "Input"], Cell[TextData[{ "Sometimes ", StyleBox["Solve", FontWeight->"Bold"], " will give you virtually unreadable answers. Then ", StyleBox["NSolve", FontWeight->"Bold"], " is really handy! ", StyleBox["Mathematica", FontSlant->"Italic"], " will grouse a bit as it tries to solve this equation, but eventually you \ should get an answer from both", StyleBox[" Solve", FontWeight->"Bold"], " and ", StyleBox["NSolve", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[{ \(\(f[x_] := Log[x];\)\), "\[IndentingNewLine]", \(\(g[x_] := 5 - x^2;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] g[x], x]\[IndentingNewLine]\), "\[IndentingNewLine]", \(NSolve[f[x] \[Equal] g[x], x]\)}], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["FindRoot", "Subsection"], Cell[TextData[{ "Another useful tool for solving equations is ", StyleBox["FindRoot", FontWeight->"Bold"], ". This command works much like ", StyleBox["Solve", FontWeight->"Bold"], ". The first argument of ", StyleBox["FindRoot", FontWeight->"Bold"], " is again a comparision of an expression or function while the second is a \ ", StyleBox["list", FontWeight->"Bold"], " that consists of the variable for which you are solving and an initial \ guess.\n\nHere is an example. The function f(x) = 9-", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], " has two solutions. They are x=3 and x= -3. If we make our initial guess \ near one of these answers, ", StyleBox["FindRoot ", FontWeight->"Bold"], "will return that solution. \n\nIn the cell below, we solve f(x)=0 using \ ", StyleBox["Solve", FontWeight->"Bold"], " and ", StyleBox["FindRoot", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[{ \(\(f[x_] := 9 - x^2;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] 0, x]\[IndentingNewLine]\), "\[IndentingNewLine]", \(FindRoot[f[x], {x, 2}]\[IndentingNewLine]\), "\[IndentingNewLine]", \(FindRoot[f[x], {x, \(-5\)}]\)}], "Input"], Cell[TextData[{ StyleBox["FindRoot", FontWeight->"Bold"], " is handy to use in conjunction with a plot. Here is an example problem \ where ", StyleBox["Solve", FontWeight->"Bold"], " has problems but if you use", StyleBox[" FindRoot", FontWeight->"Bold"], " and a ", StyleBox["Plot", FontWeight->"Bold"], ", you can easily find the root.\n\nIn the first cell we try ", StyleBox["Solve", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[{ \(\(f[x_] := x^5 - x^3 + x^2 - 2;\)\[IndentingNewLine]\), "\[IndentingNewLine]", \(Solve[f[x] \[Equal] 0, x]\)}], "Input"], Cell[TextData[{ "In the next two cells we plot the curve and use it to make an initial \ guess in ", StyleBox["FindRoot", FontWeight->"Bold"], "." }], "Text"], Cell[BoxData[ \(\(Plot[f[x], {x, \(-3\), 3}];\)\)], "Input"], Cell[BoxData[ \(FindRoot[f[x] \[Equal] 0, {x, 1.1}]\)], "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Using Help", "Section"], Cell[TextData[{ "The Help browser is really useful in ", StyleBox["Mathematica", FontSlant->"Italic"], ". To access Help, go to the main menu above and click on ", StyleBox["Help", FontWeight->"Bold"], " and then ", StyleBox["Help Browser", FontWeight->"Bold"], ". Type ", StyleBox["Plot", FontWeight->"Bold"], " in the space and in the third column you will see the ", StyleBox["Plot", FontWeight->"Bold"], " command. Personally, I find the help for the command a bit cryptic, but \ the ", StyleBox["Further Examples", FontWeight->"Bold"], " section contains real code that you can execute and alter!\n\nThere will \ be an exercise on help in the next section." }], "Text"] }, Closed]], Cell[CellGroupData[{ Cell["Exercises", "Section"], Cell[CellGroupData[{ Cell["Instructions", "Subsection"], Cell["Work each exercise below in the cell provided.", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Name(s)", "Subsection"], Cell["Remove this text and type your name(s) here.", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problems", "Subsection"], Cell[CellGroupData[{ Cell["Problem 1", "Subsubsection"], Cell["\<\ What is the 1000th digit of \[Pi]? Do the computation in the white cell \ below and then write the answer in the cell (text is in blue) below that.\ \>", "Text"], Cell[BoxData[""], "Input"], Cell[TextData[{ "\n", StyleBox["The 1000th digit of \[Pi] is: ", FontColor->RGBColor[0, 0, 1]] }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Problem 2", "Subsubsection"], Cell[TextData[{ "In the cell below, there are six ", StyleBox["Mathematica", FontSlant->"Italic"], " statements. I've recopied these statements in the next cell as well. \ The comment next to each command states what I'm trying to do.\n\nIn the \ second cell, fix all syntax mistakes (I did the first one for you) and \ execute the cell to see that your syntax is correct. Don't execute the first \ cell - it will crash!! \n\nIn order that I can see the corrections you have \ made in the second cell, highlight the correction with your mouse, go to ", StyleBox["Format", FontWeight->"Bold"], ", ", StyleBox["Text Color", FontWeight->"Bold"], ", ", StyleBox["Red", FontWeight->"Bold"], " to change the color of your correction.\nIn the cell that follows (the \ text is blue), explain what was wrong with each statement. If you make the \ right corrections, the second cell will work fine.\n" }], "Text"], Cell[BoxData[{ \(\(Plot[e^x, {x, 0, 1}];\)\ (*\ Plot\ the\ exponential\ function\ from\ 0\ to\ 1. \ *) \ \[IndentingNewLine]\), "\[IndentingNewLine]", \(\(7*\([5 - 3]\);\)\ \ \ (*\ multiply\ 7\ times\ the\ quantity\ 5 - 3\ *) \[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Solve[x^2 = 16, x];\)\ (*\ Solve\ the\ equation\ x\^2\ = \ 16. \ *) \[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[x^2, {x, o, 3}];\)\ \ (*\ Plot\ x\^2\ from\ 0\ to\ 3\ *) \[IndentingNewLine]\), "\ \[IndentingNewLine]", \(\(Plot[Cos \((x)\), {x, \(-pi\), pi}];\)\ (*\ Plot\ the\ cosine\ function\ from\ - \[Pi]\ to\ \[Pi]\ *) \ \[IndentingNewLine]\), "\[IndentingNewLine]", \(\(Plot[Sin[x]/x, {x, \(-Pi\), Pi}, Plot\ Range \[Rule] {\(-2\), 2}];\)\ \), "\[IndentingNewLine]", \( (*Plot\ the\ function\ \((it' s\ syntax\ is\ fine)\)\ from\ - \[Pi]\ to\ \[Pi]\ and\ set\ \ the\ plot\ range\ from\ - 2\ to\ 2\ *) \)}], "Input"], Cell[BoxData[ RowBox[{ RowBox[{"Plot", "[", RowBox[{ RowBox[{ StyleBox["E", FontColor->RGBColor[1, 0, 0]], "^", "x"}], ",", \({x, 0, 1}\)}], "]"}], ";", " ", \( (*\ Plot\ the\ exponential\ function\ from\ 0\ to\ 1. \ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(7*\([5 - 3]\)\), ";", " ", \( (*\ multiply\ 7\ times\ the\ quantity\ 5 - 3\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(Solve[x^2 = 16, x]\), ";", " ", \( (*\ Solve\ the\ equation\ x\^2\ = \ 16. \ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(Plot[x^2, {x, o, 3}]\), ";", " ", \( (*\ Plot\ x\^2\ from\ 0\ to\ 3\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(Plot[Cos \((x)\), {x, \(-pi\), pi}]\), ";", " ", \( (*\ Plot\ the\ cosine\ function\ from\ - \[Pi]\ to\ \[Pi]\ *) \), "\[IndentingNewLine]", "\[IndentingNewLine]", \(Plot[Sin[x]/x, {x, \(-Pi\), Pi}, Plot\ Range \[Rule] {\(-2\), 2}]\), ";", " ", "\[IndentingNewLine]", \( (*Plot\ the\ function\ \((it' s\ syntax\ is\ fine)\)\ from\ - \[Pi]\ to\ \[Pi]\ and\ set\ \ the\ plot\ range\ from\ - 2\ to\ 2\ *) \)}]], "Input"], Cell["\<\ Statement 1: The e should be capitalized. Statement 2: Statement 3: Statement 4: Statement 5: Statement 6: \ \>", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problem 3", "Subsubsection"], Cell[TextData[{ "Factor ", Cell[BoxData[ \(TraditionalForm\`x\^3\ - 9 x\^2\)]], "+23x-15 to find the roots. Use the white cell below to do the work. In \ the cell that follows (blue text), type the roots.\n" }], "Text"], Cell[BoxData[""], "Input"], Cell["The roots are ", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problem 4", "Subsubsection"], Cell[TextData[{ "What number multiplies ", Cell[BoxData[ \(TraditionalForm\`x\^3\)]], " if we expand ", Cell[BoxData[ \(TraditionalForm\`\((2 x - 1)\)\^8\)]], "? Do your computation in the white cell below and write your answer in \ the cell that follows (blue text)." }], "Text"], Cell[BoxData[""], "Input"], Cell["The number is ", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problem 5", "Subsubsection"], Cell[TextData[{ "Is 2", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "+3x-2 a common denominator we'd typically use to add ", Cell[BoxData[ \(TraditionalForm\`\(x + 3\)\/\(2 x - 1\)\ + \ x\/\(x + 2\)\)]], "? Do your computation in the white cell below and write your answer in \ the cell that follows (blue text)." }], "Text"], Cell[BoxData[""], "Input"], Cell[TextData[{ "Is 2", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "+3x-2 a common denominator we'd typically use for this problem? " }], "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problem 6", "Subsubsection"], Cell[TextData[{ "In the cell below, define the function f(x) = 2", Cell[BoxData[ \(TraditionalForm\`x\^3\)]], "-2", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "+1. Then:\n\ta) Find f(", Cell[BoxData[ \(TraditionalForm\`\@2\)]], ")\n\tb) Find f(", Cell[BoxData[ \(TraditionalForm\`\@2\)]], ") to 18 decimal places.\n\tc) Solve f(x)=0\n\td) Plot f(x) (in yellow!) \ from -2 to 2. Label the plot as \"A Cubic Function\"" }], "Text"], Cell[BoxData[""], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Problem 7", "Subsubsection"], Cell[TextData[{ "In the cell below, define the function f(x)=", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], " and use it to plot f(x-1), f(2x), and -f(3x+1)+2 from -5 to 5 in the same \ graph and make sure each graph is a different color." }], "Text"], Cell[BoxData[""], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Problem 8", "Subsubsection"], Cell[TextData[{ "In the cell below, use the Clear command to clear a,b,c,f, and x. Do you \ remember deriving the quadratic formula in an algebra class? ", StyleBox["Mathematica", FontSlant->"Italic"], " can do it too. We need to define a generic quadratic function, set it \ equal to zero, and solve for x. So after clearing the above variables, \ define the generic quadratic function f(x)=a", Cell[BoxData[ \(TraditionalForm\`x\^2\)]], "+bx+c. Then use the ", StyleBox["Solve", FontWeight->"Bold"], " command to \"re-discover\" the quadratic formula." }], "Text"], Cell[BoxData[""], "Input"] }, Open ]], Cell[CellGroupData[{ Cell["Problem 9", "Subsubsection"], Cell["\<\ In the cell below, plot sin(2x) and 2sin(x)cos(x) on the same graph from -2\ \[Pi] to 2\[Pi]. Pick a different color for each graph. Answer the question \ that follows (in blue).\ \>", "Text"], Cell[BoxData[""], "Input"], Cell["Why was there only one graph? ", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]], Cell[CellGroupData[{ Cell["Problem 10", "Subsubsection"], Cell[TextData[{ "Go to the ", StyleBox["Help Browser ", FontWeight->"Bold"], "and look up ", StyleBox["FindMinimum", FontWeight->"Bold"], ". Use what you learn in the browser to find the minimum value of f(x)=", Cell[BoxData[ \(TraditionalForm\`x\^3\)]], "-5x+1 for x from 0 to 5. You might want to use the Plot command first to \ help you with an initial guess. \n\nWrite minimum and the value for x that \ gives the minimum in the cell that follows (blue text)." }], "Text"], Cell[BoxData[{ \(\(f[x_] := x^3 - 5*x + 1;\)\), "\[IndentingNewLine]", \(\(Plot[f[x], {x, 0, 5}];\)\), "\[IndentingNewLine]", \(FindMinimum[f[x], {x, 1.1}]\)}], "Input"], Cell["\<\ The minimum value for f on [0,5] is This minimum occurs when x is \ \>", "Text", FontColor->RGBColor[0, 0, 1]] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell["Instructions for Emailing me your solutions.", "Subsection"], Cell["When you are ready to submit your lab, do the following:", "Text"], Cell[CellGroupData[{ Cell["Step 1", "Subsubsection"], Cell[TextData[{ "Go to ", StyleBox["Kernel", FontWeight->"Bold"], " above and chose ", StyleBox["Delete All Output", FontWeight->"Bold"], ". Answer yes when prompted." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 2", "Subsubsection"], Cell["\<\ Look to the right of the Exercises heading. Highlight the line that is \ second from the right. You should get a black bar from the Exercises header \ to the bottom of this notebook. \ \>", "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 3", "Subsubsection"], Cell[TextData[{ "Type ", StyleBox["Ctrl-C", FontWeight->"Bold"], " or go to ", StyleBox["Edit", FontWeight->"Bold"], " and choose ", StyleBox["Copy", FontWeight->"Bold"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 4", "Subsubsection"], Cell[TextData[{ "Type ", StyleBox["Ctrl-N", FontWeight->"Bold"], " or go to ", StyleBox["Edit", FontWeight->"Bold"], " and choose ", StyleBox["New", FontWeight->"Bold"], ". This will open a new blank notebook. " }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 5", "Subsubsection"], Cell[TextData[{ "Click inside this notebook and either type ", StyleBox["Ctrl-V", FontWeight->"Bold"], " or go to ", StyleBox["Edit", FontWeight->"Bold"], " and choose ", StyleBox["Paste", FontWeight->"Bold"], "." }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 6", "Subsubsection"], Cell[TextData[{ "Type ", StyleBox["Shift-Ctrl-S", FontWeight->"Bold"], " or go to", StyleBox[" File", FontWeight->"Bold"], " and choose ", StyleBox["Save As... \n\t\nIf you are on a PC, save the notebook to your \ U: drive (look under My Computer).", FontWeight->"Bold"], "\n\t\n", StyleBox["If you are on a Mac in OSS226 or OSS214", FontWeight->"Bold"], ", save the notebook to the Documents folder. If you're ready to email it \ to me, open up Internet Explorer, go to your email, and send it as an \ attachment. ", StyleBox["Move the file to the trash and empty the trash when you are \ finished!!", FontWeight->"Bold"], "\n\n", StyleBox["If you are on a Mac in OSS226 or OSS214 and want to save your \ notebook to your U: drive:\n", FontWeight->"Bold"], "Assuming you have the notebook in Documents, go to the Applications folder \ and choose Goliath. Enter as a URL https://mystorage.stthomas.edu/username \ (note the https), your username under name and your password under password. \ The contents of your U: drive will appear. Click on a folder or in a blank \ area and then choose Web and then Upload File. ", StyleBox["Now move the notebook still under Documents to the trash and \ empty the trash!!", FontWeight->"Bold"] }], "Text"] }, Open ]], Cell[CellGroupData[{ Cell["Step 7", "Subsubsection"], Cell["Mail this notebook to me as an attachment.", "Text"] }, Open ]] }, Closed]] }, Closed]] }, Open ]] }, FrontEndVersion->"5.0 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowSize->{1016, 668}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, StyleDefinitions -> "Report.nb" ] (******************************************************************* Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. *******************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1776, 53, 68, 3, 136, "Title"], Cell[1847, 58, 44, 0, 39, "Subtitle"], Cell[1894, 60, 89, 3, 50, "Subsubtitle"], Cell[CellGroupData[{ Cell[2008, 67, 30, 0, 41, "Subsection"], Cell[2041, 69, 124, 5, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[2202, 79, 34, 0, 41, "Subsection"], Cell[2239, 81, 630, 13, 97, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[2906, 99, 35, 0, 41, "Subsection"], Cell[2944, 101, 272, 8, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[3253, 114, 27, 0, 67, "Section"], Cell[3283, 116, 865, 17, 165, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[4185, 138, 47, 0, 41, "Section"], Cell[4235, 140, 827, 24, 97, "Text"], Cell[5065, 166, 205, 5, 115, "Input"], Cell[5273, 173, 44, 0, 29, "Text"], Cell[5320, 175, 365, 8, 155, "Input"], Cell[5688, 185, 47, 0, 29, "Text"], Cell[5738, 187, 365, 6, 175, "Input"], Cell[6106, 195, 58, 0, 29, "Text"], Cell[6167, 197, 1104, 20, 255, "Input"], Cell[7274, 219, 130, 3, 29, "Text"], Cell[7407, 224, 192, 4, 35, "Input"], Cell[7602, 230, 109, 3, 29, "Text"], Cell[7714, 235, 270, 5, 55, "Input"], Cell[7987, 242, 66, 0, 29, "Text"], Cell[8056, 244, 549, 9, 155, "Input"], Cell[8608, 255, 38, 0, 29, "Text"], Cell[8649, 257, 70, 1, 35, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[8756, 263, 115, 5, 41, "Section"], Cell[8874, 270, 1038, 24, 165, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[9949, 299, 43, 0, 41, "Section"], Cell[9995, 301, 739, 14, 97, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[10771, 320, 38, 0, 41, "Section"], Cell[10812, 322, 2242, 43, 267, "Text"], Cell[13057, 367, 116, 2, 55, "Input"], Cell[13176, 371, 341, 6, 46, "Text"], Cell[CellGroupData[{ Cell[13542, 381, 38, 0, 41, "Subsection"], Cell[13583, 383, 520, 12, 63, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[14140, 400, 59, 0, 41, "Subsection"], Cell[14202, 402, 336, 12, 29, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[14587, 420, 46, 0, 41, "Section"], Cell[14636, 422, 327, 7, 63, "Text"], Cell[14966, 431, 249, 6, 135, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[15252, 442, 37, 0, 41, "Section"], Cell[CellGroupData[{ Cell[15314, 446, 36, 0, 41, "Subsection"], Cell[15353, 448, 547, 12, 80, "Text"], Cell[15903, 462, 95, 2, 75, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[16035, 469, 41, 0, 41, "Subsection"], Cell[16079, 471, 530, 14, 67, "Text"], Cell[16612, 487, 98, 2, 75, "Input"], Cell[16713, 491, 402, 8, 80, "Text"], Cell[17118, 501, 228, 4, 155, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[17383, 510, 71, 0, 41, "Subsection"], Cell[17457, 512, 1732, 37, 199, "Text"], Cell[19192, 551, 45, 1, 35, "Input"], Cell[19240, 554, 46, 1, 35, "Input"], Cell[19289, 557, 46, 1, 35, "Input"], Cell[19338, 560, 58, 1, 35, "Input"], Cell[19399, 563, 170, 5, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[19606, 573, 37, 0, 41, "Subsection"], Cell[19646, 575, 272, 7, 63, "Text"], Cell[19921, 584, 236, 6, 135, "Input"], Cell[20160, 592, 742, 16, 80, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[20939, 613, 50, 0, 41, "Subsection"], Cell[20992, 615, 1009, 21, 148, "Text"], Cell[22004, 638, 93, 1, 35, "Input"], Cell[22100, 641, 145, 3, 29, "Text"], Cell[22248, 646, 26, 0, 35, "Input"], Cell[22277, 648, 257, 6, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[22571, 659, 79, 2, 41, "Subsection"], Cell[22653, 663, 486, 10, 63, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[23176, 678, 38, 0, 41, "Subsection"], Cell[23217, 680, 437, 10, 80, "Text"], Cell[23657, 692, 103, 2, 75, "Input"], Cell[23763, 696, 513, 9, 118, "Text"], Cell[24279, 707, 109, 2, 55, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[24425, 714, 75, 2, 41, "Subsection"], Cell[24503, 718, 647, 12, 97, "Text"], Cell[25153, 732, 136, 3, 75, "Input"], Cell[25292, 737, 278, 5, 46, "Text"], Cell[25573, 744, 165, 3, 75, "Input"], Cell[25741, 749, 488, 10, 63, "Text"], Cell[26232, 761, 37, 1, 35, "Input"], Cell[26272, 764, 143, 3, 29, "Text"], Cell[26418, 769, 382, 6, 235, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[26837, 780, 30, 0, 41, "Subsection"], Cell[26870, 782, 411, 10, 80, "Text"], Cell[27284, 794, 242, 3, 75, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[27563, 802, 51, 0, 41, "Subsection"], Cell[27617, 804, 451, 9, 46, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[28117, 819, 39, 0, 41, "Section"], Cell[28159, 821, 386, 8, 80, "Text"], Cell[28548, 831, 289, 6, 115, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[28874, 842, 28, 0, 41, "Section"], Cell[28905, 844, 655, 11, 131, "Text"], Cell[29563, 857, 315, 5, 195, "Input"], Cell[29881, 864, 301, 7, 47, "Text"], Cell[30185, 873, 596, 15, 315, "Input"], Cell[30784, 890, 236, 4, 46, "Text"], Cell[31023, 896, 164, 4, 95, "Input"], Cell[31190, 902, 105, 3, 29, "Text"], Cell[CellGroupData[{ Cell[31320, 909, 26, 0, 41, "Subsection"], Cell[31349, 911, 346, 9, 46, "Text"], Cell[31698, 922, 54, 1, 35, "Input"], Cell[31755, 925, 373, 10, 63, "Text"], Cell[32131, 937, 133, 3, 75, "Input"], Cell[32267, 942, 95, 2, 29, "Text"], Cell[32365, 946, 205, 4, 55, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[32619, 956, 37, 0, 41, "Section"], Cell[32659, 958, 298, 6, 63, "Text"], Cell[CellGroupData[{ Cell[32982, 968, 45, 0, 41, "Subsection"], Cell[33030, 970, 237, 6, 29, "Text"], Cell[33270, 978, 814, 19, 315, "Input"], Cell[34087, 999, 168, 3, 29, "Text"], Cell[34258, 1004, 468, 8, 275, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[34763, 1017, 37, 0, 41, "Subsection"], Cell[34803, 1019, 261, 6, 29, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[35113, 1031, 46, 0, 41, "Section"], Cell[35162, 1033, 235, 6, 29, "Text"], Cell[35400, 1041, 50, 1, 35, "Input"], Cell[35453, 1044, 295, 7, 63, "Text"], Cell[35751, 1053, 156, 3, 115, "Input"], Cell[CellGroupData[{ Cell[35932, 1060, 34, 0, 41, "Subsection"], Cell[35969, 1062, 984, 15, 233, "Text"], Cell[36956, 1079, 421, 8, 195, "Input"], Cell[37380, 1089, 498, 9, 80, "Text"], Cell[37881, 1100, 367, 6, 235, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[38297, 1112, 37, 0, 41, "Section"], Cell[38337, 1114, 1007, 24, 148, "Text"], Cell[39347, 1140, 558, 13, 215, "Input"], Cell[CellGroupData[{ Cell[39930, 1157, 31, 0, 41, "Subsection"], Cell[39964, 1159, 541, 13, 63, "Text"], Cell[40508, 1174, 247, 5, 75, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[40792, 1184, 27, 0, 41, "Subsection"], Cell[40822, 1186, 1035, 27, 148, "Text"], Cell[41860, 1215, 938, 16, 235, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[42835, 1236, 32, 0, 41, "Subsection"], Cell[42870, 1238, 335, 11, 29, "Text"], Cell[43208, 1251, 291, 5, 75, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[43536, 1261, 28, 0, 41, "Subsection"], Cell[43567, 1263, 1137, 26, 369, "Text"], Cell[44707, 1291, 340, 6, 75, "Input"], Cell[45050, 1299, 121, 3, 29, "Text"], Cell[45174, 1304, 481, 8, 135, "Input"], Cell[45658, 1314, 320, 11, 80, "Text"], Cell[45981, 1327, 384, 7, 75, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[46402, 1339, 40, 0, 41, "Subsection"], Cell[46445, 1341, 102, 3, 29, "Text"], Cell[46550, 1346, 46, 1, 35, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[46633, 1352, 49, 0, 41, "Subsection"], Cell[46685, 1354, 544, 16, 80, "Text"], Cell[47232, 1372, 819, 16, 215, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[48100, 1394, 36, 0, 41, "Section"], Cell[48139, 1396, 319, 12, 29, "Text"], Cell[CellGroupData[{ Cell[48483, 1412, 38, 0, 41, "Subsection"], Cell[48524, 1414, 1015, 25, 131, "Text"], Cell[49542, 1441, 63, 1, 35, "Input"], Cell[49608, 1444, 68, 0, 29, "Text"], Cell[49679, 1446, 455, 9, 195, "Input"], Cell[50137, 1457, 149, 5, 29, "Text"], Cell[50289, 1464, 62, 1, 35, "Input"], Cell[50354, 1467, 489, 18, 46, "Text"], Cell[50846, 1487, 280, 5, 135, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[51163, 1497, 30, 0, 41, "Subsection"], Cell[51196, 1499, 949, 30, 114, "Text"], Cell[52148, 1531, 289, 4, 155, "Input"], Cell[52440, 1537, 464, 17, 63, "Text"], Cell[52907, 1556, 155, 3, 75, "Input"], Cell[53065, 1561, 168, 6, 29, "Text"], Cell[53236, 1569, 64, 1, 35, "Input"], Cell[53303, 1572, 68, 1, 35, "Input"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[53420, 1579, 29, 0, 41, "Section"], Cell[53452, 1581, 727, 22, 80, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[54216, 1608, 28, 0, 41, "Section"], Cell[CellGroupData[{ Cell[54269, 1612, 34, 0, 41, "Subsection"], Cell[54306, 1614, 62, 0, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[54405, 1619, 29, 0, 41, "Subsection"], Cell[54437, 1621, 92, 1, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[54566, 1627, 30, 0, 41, "Subsection"], Cell[CellGroupData[{ Cell[54621, 1631, 34, 0, 31, "Subsubsection"], Cell[54658, 1633, 173, 3, 29, "Text"], Cell[54834, 1638, 26, 0, 35, "Input"], Cell[54863, 1640, 114, 4, 46, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[55014, 1649, 34, 0, 31, "Subsubsection"], Cell[55051, 1651, 941, 21, 131, "Text"], Cell[55995, 1674, 1027, 20, 255, "Input"], Cell[57025, 1696, 1273, 24, 255, "Input"], Cell[58301, 1722, 168, 8, 114, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[58506, 1735, 34, 0, 31, "Subsubsection"], Cell[58543, 1737, 235, 6, 46, "Text"], Cell[58781, 1745, 26, 0, 35, "Input"], Cell[58810, 1747, 62, 1, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[58909, 1753, 34, 0, 31, "Subsubsection"], Cell[58946, 1755, 304, 9, 29, "Text"], Cell[59253, 1766, 26, 0, 35, "Input"], Cell[59282, 1768, 62, 1, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[59381, 1774, 34, 0, 31, "Subsubsection"], Cell[59418, 1776, 350, 9, 34, "Text"], Cell[59771, 1787, 26, 0, 35, "Input"], Cell[59800, 1789, 189, 6, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[60026, 1800, 34, 0, 31, "Subsubsection"], Cell[60063, 1802, 473, 15, 99, "Text"], Cell[60539, 1819, 26, 0, 35, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[60602, 1824, 34, 0, 31, "Subsubsection"], Cell[60639, 1826, 262, 6, 29, "Text"], Cell[60904, 1834, 26, 0, 35, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[60967, 1839, 34, 0, 31, "Subsubsection"], Cell[61004, 1841, 599, 14, 63, "Text"], Cell[61606, 1857, 26, 0, 35, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[61669, 1862, 34, 0, 31, "Subsubsection"], Cell[61706, 1864, 204, 4, 29, "Text"], Cell[61913, 1870, 26, 0, 35, "Input"], Cell[61942, 1872, 78, 1, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[62057, 1878, 35, 0, 31, "Subsubsection"], Cell[62095, 1880, 507, 13, 80, "Text"], Cell[62605, 1895, 183, 3, 75, "Input"], Cell[62791, 1900, 123, 4, 46, "Text"] }, Open ]] }, Closed]], Cell[CellGroupData[{ Cell[62963, 1910, 66, 0, 25, "Subsection"], Cell[63032, 1912, 72, 0, 29, "Text"], Cell[CellGroupData[{ Cell[63129, 1916, 31, 0, 31, "Subsubsection"], Cell[63163, 1918, 198, 8, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[63398, 1931, 31, 0, 31, "Subsubsection"], Cell[63432, 1933, 210, 4, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[63679, 1942, 31, 0, 31, "Subsubsection"], Cell[63713, 1944, 212, 11, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[63962, 1960, 31, 0, 31, "Subsubsection"], Cell[63996, 1962, 251, 11, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[64284, 1978, 31, 0, 31, "Subsubsection"], Cell[64318, 1980, 251, 11, 29, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[64606, 1996, 31, 0, 31, "Subsubsection"], Cell[64640, 1998, 1306, 32, 199, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[65983, 2035, 31, 0, 31, "Subsubsection"], Cell[66017, 2037, 58, 0, 29, "Text"] }, Open ]] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)