(************** Content-type: application/mathematica ************** Mathematica-Compatible Notebook This notebook can be used with any Mathematica-compatible application, such as Mathematica, MathReader or Publicon. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info@wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. *******************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 44132, 1826]*) (*NotebookOutlinePosition[ 45879, 1885]*) (* CellTagsIndexPosition[ 45621, 1874]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{Cell["Transformation Rules and Function Definitions ", \ "Title", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Index", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "This index gives a list of keywords that are associated with various cells \ in this Notebook. If you Command-Double-click one of the keywords below, ", StyleBox["Mathematica", FontSlant->"Italic"], " will find the cell associated with that keyword, select it, and display \ it in the center of your window." }], "Text", AspectRatioFixed->False, ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Assignments Clear Definition`function Definition`showing Transformation`Rule Value`removing \ \>", "SmallText", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Basic Transformation Rules and Function Definitions ", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Syntax (see pages 72, 113, 243 and 251)", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Transformation Rule", FontFamily->"Helvetica", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Transformation`Rule"], Cell[TextData[{ StyleBox["expr", FontSlant->"Italic"], " ", StyleBox[" /.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["lhs", FontSlant->"Italic"], " ", StyleBox["->", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rhs", FontSlant->"Italic"], " applies a transformation rule, trying rules once on each part of ", StyleBox["expr", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Assignments", FontFamily->"Helvetica", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Assignments"], Cell[TextData[{ StyleBox["x", FontSlant->"Italic"], " ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["value", FontSlant->"Italic"], " assigns a value for ", StyleBox["x", FontSlant->"Italic"], " which will always be used." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Removing a Defined Value", FontFamily->"Helvetica", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Value`removing"], Cell[TextData[{ StyleBox["x", FontSlant->"Italic"], " ", StyleBox["= .", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " removes any value defined for ", StyleBox["x", FontSlant->"Italic"], " ." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Function Definition", FontFamily->"Helvetica", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Definition`function"], Cell[TextData[{ StyleBox["f", FontSlant->"Italic"], " ", StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x ", FontSlant->"Italic"], "_", StyleBox["]:", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["expr", FontSlant->"Italic"], " defines the function ", StyleBox["f", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Showing Definition", FontFamily->"Helvetica", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Definition`showing"], Cell[TextData[{ StyleBox["?", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["f", FontSlant->"Italic"], " shows the definition of ", StyleBox["f", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[StyleBox["Clear", FontColor->GrayLevel[0]]], "Input", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Clear"], Cell[TextData[{ StyleBox["Clear[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["f", FontSlant->"Italic"], " ", StyleBox["]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " clears all definitions of ", StyleBox["f", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Basic Replacements", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["x + y /. x -> 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3 + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["x + y /. {x -> a, y -> b}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ a + b\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["x + y /. {{x -> 1, y -> 2}, {x -> 4, y -> 2}}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ {3, 6}\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Replacements Using Pattern Matching", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. x -> 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 1 + f[3] + f[y]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. f[x] -> p", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 1 + p + f[y]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. f[t_] -> t^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 1 + x + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Function Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["f[x_] := x^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["f[a+1]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 (1 + a)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["f[4]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 16\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["f[3x + x^2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 (3 x + x )\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Note on Function Definitions", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Probably the most powerful aspect of transformation rules in ", StyleBox["Mathematica", FontSlant->"Italic"], " is that they can involve not only literal expression, but also patterns. \ A pattern is an expression such as", StyleBox[" f[t_]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " which contains a blank (underscore). The blank can stand for any \ expression. Thus a transformation rule for ", StyleBox["f[t_]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " specifies how the function ", StyleBox["f", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " with any argument should be transformed. Notice that, in contrast, a \ transformation rule for", StyleBox[" f[x]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " without a blank, specifies only how the literal expression ", StyleBox["f[x]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " should be transformed, and does not, for example, say anything about the \ transformation of", StyleBox[" f[y]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], "." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "When you give a function definition such as", StyleBox[" f[t_]:=t^2", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], ", all you are doing is telling ", StyleBox["Mathematica", FontSlant->"Italic"], " to automatically apply the transformation rule", StyleBox[" f[t_]->t^2 ", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], "whenever possible." }], "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Function with Two Arguments", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["hump[x_, xmax_] := (x - xmax)^2 / xmax", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["2 + hump[x, 3.5]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 + 0.285714 (-3.5 + x)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Showing and Clearing a Function Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["func[ x_ ] := Sin[x] x^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["?func", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Global`func func[x_] := Sin[x]*x^2\ \>", "Print", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell["Clear[func]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["?func", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Global`func", "Info", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Replacing a Variable with a Number", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["1 + 2x /. x -> 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 7\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Assigning a Numerical Value to a Variable", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["x = 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["1 + 2x ", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 7\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Removing an Assigned Value ", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["x = 3 - a", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3 - a\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["(1 + x)^7", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 7 (4 - a)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell["x = .", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["(1 + x )^7", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 7 (1 + x)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell[" A Note on Assignments and Replacement Rules", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "The replacement operator", StyleBox[" /.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " allows you to apply transformation rules to a particular expression. \ Sometimes, however, you will want to define transformation rules that should \ always be applied. In this case you would use an assigment such as ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " 3. You should understand that explicit definitions such as ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " 3 have a global effect. On the other hand, a replacement such as ", StyleBox["expr", FontSlant->"Italic"], " ", StyleBox["/.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["->", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " 3 affects only the specific expression ", StyleBox["expr ", FontSlant->"Italic"], ". It is usually much easier to keep things straight if you avoid using \ explicit definitions except when necessary. Once you explicitly give a \ definition, such as ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " 3, then ", StyleBox["x", FontSlant->"Italic"], " will always be replaced by 3, and can no longer serve as a formal \ variable." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ " Probably the single most common mistake in using ", StyleBox["Mathematica", FontSlant->"Italic"], " is to make an assignment for a variable like ", StyleBox["x", FontSlant->"Italic"], " at one point in your session, and then later to use ", StyleBox["x", FontSlant->"Italic"], " having forgotten about the assignment you made. For this reason, it is \ good to be particularly careful about assigning values to variables with \ simple or common names such as ", StyleBox["x ", FontSlant->"Italic"], ", ", StyleBox["f ", FontSlant->"Italic"], ", etc. One way to avoid this problem is to make assignments only for \ variables with more explicit names, such as ", StyleBox["SpeedOfLight ", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], ". " }], "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Transformation Rules", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Syntax (see pages 72 and 243)", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["expr", FontSlant->"Italic"], StyleBox[" /.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["lhs", FontSlant->"Italic"], " ", StyleBox["->", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rhs", FontSlant->"Italic"], " applies a transformation rule, trying rules once on each part of ", StyleBox["expr", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["expr", FontSlant->"Italic"], StyleBox[" /.{", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["lhs1", FontSlant->"Italic"], " ", StyleBox["->", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rhs ", FontSlant->"Italic"], ", ", StyleBox["lhs2", FontSlant->"Italic"], " ", StyleBox["->", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rhs2 ", FontSlant->"Italic"], ", ...", StyleBox["}", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " tries a sequence of rules on each part of ", StyleBox["expr", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["expr", FontSlant->"Italic"], StyleBox[" /.{", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["rules1", FontSlant->"Italic"], ", ", StyleBox["rules2", FontSlant->"Italic"], ", ...", StyleBox["}", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " gives a list of the results from applying each of the ", StyleBox["rulesi", FontSlant->"Italic"], " to ", StyleBox["expr", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["expr", FontSlant->"Italic"], StyleBox[" //.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rules ", FontSlant->"Italic"], "tries ", StyleBox["rules ", FontSlant->"Italic"], " repeatedly until the result no longer changes." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Basic Replacements", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["x + y /. x -> 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3 + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["x + y /. {x -> a, y -> b}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ a + b\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["x + y /. {{x -> 1, y -> 2}, {x -> 4, y -> 2}}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ {3, 6}\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Replacements Using Pattern Matching", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. x -> 3", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 1 + f[3] + f[y]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. f[x] -> p", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 1 + p + f[y]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["1 + f[x] + f[y] /. f[t_] -> t^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 1 + x + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Naming the Replacement Rules", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["sinexp = Sin[2 x_] -> 2 Sin[x] Cos[x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ Sin[2 (x_)] -> 2 Cos[x] Sin[x]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Sin[2 (1 + x)^2] /. sinexp", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 2 Cos[(1 + x) ] Sin[(1 + x) ]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Single and Repeated Replacement", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Note that when you use the single replacement operator ", StyleBox["/.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " a result is returned as soon as a rule has been applied. Thus, the inner \ instance of ", StyleBox["h", FontSlant->"Italic"], " is not replaced." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["h[ x + h[y]] /. h[u_] -> u^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 (x + h[y])\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["h[ x + h[y]] //. h[u_] -> u^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 (x + y )\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Repeated Replacement", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "Note that when you use the repeated replacement operator ", StyleBox["//.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " the rules are tried repeatedly until the expression no longer changes." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["x^2 + y^6 /. {x -> 2 + a, a -> 3}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 6 (2 + a) + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["x^2 + y^6 //. {x -> 2 + a, a -> 3}", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 6 25 + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Note on Applying Transformation Rules", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "When you use expr ", StyleBox["/.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rules ", FontSlant->"Italic"], ", each rule is tried in turn on each part of expr. As soon as a rule \ applies, the appropriate transformation is made, and the resulting part \ returned. Sometimes you may need to go on applying rules over and over again, \ until the expression you are working on no longer changes.. You can do this \ using the repeated replacement operation expr ", StyleBox["//.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rules ", FontSlant->"Italic"], ". If you give a set of rules that is circular, then ", StyleBox["//.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " can keep getting different results forever. In practice, the maximum \ number of passes that ", StyleBox["//.", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " makes on a particular expression is determined by the setting for the \ option ", StyleBox["MaxIterations", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], ". For more information, see page 244." }], "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Function Definitions", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Syntax (see pages 113 and 251)", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["f", FontSlant->"Italic"], " ", StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["]:=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["expr", FontSlant->"Italic"], " defines a function that is evaluated each time it is called." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["f", FontSlant->"Italic"], " ", StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["]=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["expr", FontSlant->"Italic"], " defines a function which gives the value ", StyleBox["expr ", FontSlant->"Italic"], " for any particular value of ", StyleBox["x ", FontSlant->"Italic"], ". ", StyleBox["expr ", FontSlant->"Italic"], " is `evaluated when the assignment is made." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["f", FontSlant->"Italic"], StyleBox[" ", FontFamily->"Courier"], StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x", FontSlant->"Italic"], StyleBox["_", FontFamily->"Courier"], StyleBox[",", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["k", FontFamily->"Courier", FontSlant->"Italic"], StyleBox["_", FontFamily->"Courier"], StyleBox[":", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["kdef", FontSlant->"Italic"], StyleBox[" ", FontFamily->"Courier", FontSlant->"Italic"], StyleBox["]:=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["value", FontSlant->"Italic"], " gives a definition for a function whose second option is optional. When \ it is absent it is given the default value of ", StyleBox["kdef", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["?", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["f", FontSlant->"Italic"], " shows the definition of ", StyleBox["f", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ StyleBox["Clear[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["f", FontSlant->"Italic"], " ", StyleBox["]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " clears all definitions of ", StyleBox["f", FontSlant->"Italic"], "." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}, CellTags->"Clear"], Cell[TextData[{ StyleBox["f", FontSlant->"Italic"], " ", StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["]:=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["f", FontSlant->"Italic"], " ", StyleBox["[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["]=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["rhs", FontSlant->"Italic"], " defines a function which remembers values that it finds." }], "SmallText", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Function Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["f[x_] := x^2", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["f[a+1]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 (1 + a)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["f[4]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 16\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["f[3x + x^2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 (3 x + x )\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Function with Two Arguments", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["hump[x_, xmax_] := (x - xmax)^2 / xmax", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["2 + hump[x, 3.5]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 2 + 0.2857142857142857*(-3.5 + x)^2\ \>", "\<\ 2 2 + 0.285714 (-3.5 + x)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["List as an Argument", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[" This gives two ways of defining the same function.", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["g[list_] := Part[list, 1] ^ Part[list, 2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["h[{x_, y_}] := x^y", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["g[{3, a}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ a 3\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["h[{3, a}]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ a 3\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Function as a Procedure", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["exprod[n_] := Expand[ Product[ x + i, {i, 1, n}]]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["exprod[2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 2 + 3 x + x\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["exprod[3]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 3 6 + 11 x + 6 x + x\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Note on Functions as Procedures", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "In many kinds of calculations, you may find yourself typing the same input \ to ", StyleBox["Mathematica", FontSlant->"Italic"], " over and over again. You can often save yourself a lot of typing by \ defining a function that contains your input commands." }], "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Recursive Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["fac[n_] := n fac[n - 1]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["fac[1] := 1", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["fac[10]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3628800\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Definition with Conditions", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["This gives two ways of defining the same step function.", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["step[x_] := 1 /; x >= 0", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["step[x_] := -1 /; x < 0", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["sstep[x_ /; x >= 0] := 1", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["sstep[x_ /; x < 0] := -1", "Input", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Showing and Clearing a Function Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["Clear[func]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["func[ x_ ] := Sin[x] / x /; x != 0", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["func[0] = 1", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 1\ \>", "\<\ 1\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["?func", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Global`func func[0] = 1 func[x_] := Sin[x]/x /; x != 0\ \>", "Print", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell["Clear[func]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["?func", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["Global`func", "Print", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Parameter Checking ", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "The pattern ", StyleBox["n", FontSlant->"Italic"], "_", StyleBox["Integer", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " matches only integers." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ hilbert[n_Integer] := Table[1/(i + j - 1), {i, n}, {j, n}]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["hilbert[3]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 1 1 1 1 1 1 1 1 {{1, -, -}, {-, -, -}, {-, -, -}} 2 3 2 3 4 3 4 5\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["hilbert[3.5]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ hilbert[3.5]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Function with an Optional Argument", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ When only one argument is given this gives the usual sine function.\ \>", "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["sinpow[x_, n_:1] := Sin[x]^n", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["sinpow[Pi/3, 2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 3 - 4\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["sinpow[Pi/3]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ Sqrt[3] ------- 2\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Immediate and Delayed Definitions", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "When you execute ", StyleBox["ex", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], ", the Expand is performed, while ", StyleBox["iex", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " simply substitutes its argument into the already expanded form, giving a \ different answer." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["ex[x_] := Expand[(1 + x)^2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["iex[x_] = Expand[(1 + x)^2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 1 + 2 x + x\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["ex[y + 2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 9 + 6 y + y\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["iex[y + 2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 1 + 2 (2 + y) + (2 + y)\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["A Note on Immediate and Delayed Definitions", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "As you can see from the previous example, both", StyleBox[" =", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " and ", StyleBox[":=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " can be useful in defining functions, but they have different meanings, \ and you must be careful about which one to use in a particular case. One rule \ of thumb is the following. If you think of an assignment as giving the final \ \"value\" of an expression, use the ", StyleBox["=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " operator. If instead you think of the assignment as specifying a \ \"command\" for finding the value, use the ", StyleBox[":= ", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], "operator. When in doubt, it is usually better to use ", StyleBox[":=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " than ", StyleBox["= ", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], ". One exception is when you do a calculation, and get an answer in terms \ of a symbolic parameter. You often want to go on and find results for various \ specific values of ", StyleBox["x ", FontSlant->"Italic"], ". In this case it is convenient to use ", StyleBox["= ", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " to define a function whose argument is ", StyleBox["x ", FontSlant->"Italic"], ". This is illustrated in the next example" }], "Text", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["Using a Previous Calculation as a Function Definition", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["D[Log[Sin[x]]^2, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 Cot[x] Log[Sin[x]]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["dlog[x_] = %", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 Cot[x] Log[Sin[x]]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["dlog[2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 Cot[2] Log[Sin[2]]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["dlog[1 + a]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ \ \>", "\<\ 2 Cot[1 + a] Log[Sin[1 + a]]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Function That Remembers ValuesThat It Finds", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["f[x_] := f[x] = f[x - 1] + f[x - 2]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["f[0] = f[1] = 1", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 1\ \>", "\<\ 1\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["?f", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Global`f f[0] = 1 f[1] = 1 f[x_] := f[x] = f[x - 1] + f[x - 2]\ \>", "Print", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["f[5]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 8\ \>", "\<\ 8\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["?f", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ Global`f f[0] = 1 f[1] = 1 f[2] = 2 f[3] = 3 f[4] = 5 f[5] = 8 f[x_] := f[x] = f[x - 1] + f[x - 2]\ \>", "Print", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]]}, Open]], Cell[CellGroupData[{Cell["An Example: Defining Your Own Integration Function", "Section", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "From a mathematical point of view, the integration function is defined by \ a sequence of mathematical relations. By setting up transformation rules for \ patterns, you can implement these mathematical relations directly in ", StyleBox["Mathematica ", FontSlant->"Italic"], ". In the example below, a function called ", StyleBox["integrate", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " is defined by a sequence of transformation rules. The effect of each new \ rule is illustrated by evaluating an example. " }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["Implementing the Linearity", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ integrate[y_ + z_, x_] := integrate[y, x] + integrate[z, x]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["integrate[a x + b x^2 + 3, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ integrate[3, x] + integrate[a*x, x] + integrate[b*x^2, x]\ \>", "\<\ 2 integrate[3, x] + integrate[a x, x] + integrate[b x , x]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Pulling Out Independent Factors", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "The function ", StyleBox["FreeQ[", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["c", FontSlant->"Italic"], StyleBox[",", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["]", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " returns true if ", StyleBox["c", FontSlant->"Italic"], " is independent of ", StyleBox["x ", FontSlant->"Italic"], "." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ integrate[c_ y_, x_] := c integrate[y, x] /; FreeQ[c, x]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["integrate[a x + b x^2 + 3, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ integrate[3, x] + a*integrate[x, x] + b*integrate[x^2, x]\ \>", "\<\ 2 integrate[3, x] + a integrate[x, x] + b integrate[x , x]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Integral of a Constant", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["integrate[c_, x_] := c x /; FreeQ[c, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["integrate[a x + b x^2 + 3, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 3*x + a*integrate[x, x] + b*integrate[x^2, x]\ \>", "\<\ 2 3 x + a integrate[x, x] + b integrate[x , x]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Integral of a Power", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell[TextData[{ "By using the pattern ", StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["^", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["n", FontSlant->"Italic"], "_. rather than ", StyleBox["x", FontSlant->"Italic"], "_ ", StyleBox["^", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], StyleBox["n", FontSlant->"Italic"], "_ , we include the case of ", StyleBox["x", FontSlant->"Italic"], " = ", StyleBox["x", FontSlant->"Italic"], " ", StyleBox["^", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], "1. The expression ", StyleBox["n", FontSlant->"Italic"], " ", StyleBox["!=", FontFamily->"Courier", FontSize->12, FontWeight->"Bold"], " -1 means ", StyleBox["n ", FontSlant->"Italic"], " doesn't equal -1." }], "Text", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ integrate[x_^n_., x_] := x^(n+1)/(n+1) /; FreeQ[n, x] && n != -1\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["integrate[a x + b x^2 + 3, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ 3*x + (a*x^2)/2 + (b*x^3)/3\ \>", "\<\ 2 3 a x b x 3 x + ---- + ---- 2 3\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]], Cell[CellGroupData[{Cell["Integral of the Reciprocal of a Linear Function", "Subsubsection", ImageRegion->{{0, 1}, {0, 1}}], Cell["\<\ integrate[1/ (a_. x_ + b_.), x_] := Log[a x + b]/a /; FreeQ[{a, b}, x]\ \>", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[CellGroupData[{Cell["integrate[1/x, x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ Log[x]\ \>", "\<\ Log[x]\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]], Cell[CellGroupData[{Cell["integrate[ 1/ (2 p x - 1), x]", "Input", ImageRegion->{{0, 1}, {0, 1}}], Cell[OutputFormData["\<\ Log[-1 + 2*p*x]/(2*p)\ \>", "\<\ Log[-1 + 2 p x] --------------- 2 p\ \>"], "Output", ImageRegion->{{0, 1}, {0, 1}}]}, Open]]}, Open]]}, Open]]}, Open]] }, FrontEndVersion->"4.1 for Microsoft Windows", ScreenRectangle->{{0, 1024}, {0, 695}}, WindowToolbars->{}, CellGrouping->Manual, WindowSize->{499, 599}, WindowMargins->{{Automatic, 223}, {Automatic, 0}}, PrivateNotebookOptions->{"ColorPalette"->{RGBColor, -1}}, ShowCellLabel->True, ShowCellTags->False, RenderingOptions->{"ObjectDithering"->True, "RasterDithering"->False} ] (******************************************************************* 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->{ "Transformation`Rule"->{ Cell[2741, 86, 178, 4, 70, "Input", CellTags->"Transformation`Rule"]}, "Assignments"->{ Cell[3452, 118, 162, 4, 70, "Input", CellTags->"Assignments"]}, "Value`removing"->{ Cell[3980, 142, 178, 4, 70, "Input", CellTags->"Value`removing"]}, "Definition`function"->{ Cell[4455, 163, 178, 4, 70, "Input", CellTags->"Definition`function"]}, "Definition`showing"->{ Cell[5199, 199, 177, 4, 70, "Input", CellTags->"Definition`showing"]}, "Clear"->{ Cell[5657, 219, 123, 3, 70, "Input", CellTags->"Clear"], Cell[25995, 1063, 395, 18, 70, "SmallText", CellTags->"Clear"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Transformation`Rule", 44952, 1850}, {"Assignments", 45052, 1853}, {"Value`removing", 45148, 1856}, {"Definition`function", 45252, 1859}, {"Definition`showing", 45360, 1862}, {"Clear", 45454, 1865} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1727, 52, 98, 2, 70, "Title"], Cell[CellGroupData[{ Cell[1848, 56, 57, 1, 70, "Section"], Cell[1908, 59, 410, 9, 70, "Text"], Cell[2321, 70, 161, 8, 70, "SmallText"] }, Closed]], Cell[CellGroupData[{ Cell[2514, 80, 104, 1, 70, "Section"], Cell[CellGroupData[{ Cell[2641, 83, 97, 1, 70, "Subsubsection"], Cell[2741, 86, 178, 4, 70, "Input", CellTags->"Transformation`Rule"], Cell[2922, 92, 527, 24, 70, "SmallText"], Cell[3452, 118, 162, 4, 70, "Input", CellTags->"Assignments"], Cell[3617, 124, 360, 16, 70, "SmallText"], Cell[3980, 142, 178, 4, 70, "Input", CellTags->"Value`removing"], Cell[4161, 148, 291, 13, 70, "SmallText"], Cell[4455, 163, 178, 4, 70, "Input", CellTags->"Definition`function"], Cell[4636, 169, 560, 28, 70, "SmallText"], Cell[5199, 199, 177, 4, 70, "Input", CellTags->"Definition`showing"], Cell[5379, 205, 275, 12, 70, "SmallText"], Cell[5657, 219, 123, 3, 70, "Input", CellTags->"Clear"], Cell[5783, 224, 374, 17, 70, "SmallText"] }, Closed]], Cell[CellGroupData[{ Cell[6189, 243, 76, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[6288, 246, 65, 1, 70, "Input"], Cell[6356, 249, 92, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[6480, 256, 75, 1, 70, "Input"], Cell[6558, 259, 92, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[6682, 266, 95, 1, 70, "Input"], Cell[6780, 269, 93, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[6914, 276, 93, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[7030, 279, 75, 1, 70, "Input"], Cell[7108, 282, 102, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[7242, 289, 78, 1, 70, "Input"], Cell[7323, 292, 99, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[7454, 299, 81, 1, 70, "Input"], Cell[7538, 302, 109, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[7688, 310, 79, 1, 70, "Subsubsection"], Cell[7770, 313, 62, 1, 70, "Input"], Cell[CellGroupData[{ Cell[7855, 316, 56, 1, 70, "Input"], Cell[7914, 319, 103, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[8049, 327, 54, 1, 70, "Input"], Cell[8106, 330, 89, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[8227, 337, 61, 1, 70, "Input"], Cell[8291, 340, 109, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[8441, 348, 88, 1, 70, "Subsubsection"], Cell[8532, 351, 1256, 40, 70, "Text"], Cell[9791, 393, 468, 16, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[10291, 411, 85, 1, 70, "Subsubsection"], Cell[10379, 414, 88, 1, 70, "Input"], Cell[CellGroupData[{ Cell[10490, 417, 66, 1, 70, "Input"], Cell[10559, 420, 135, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[10735, 428, 100, 1, 70, "Subsubsection"], Cell[10838, 431, 74, 1, 70, "Input"], Cell[CellGroupData[{ Cell[10935, 434, 55, 1, 70, "Input"], Cell[10993, 437, 93, 5, 70, "Print"] }, Closed]], Cell[11098, 444, 61, 1, 70, "Input"], Cell[CellGroupData[{ Cell[11182, 447, 55, 1, 70, "Input"], Cell[11240, 450, 60, 1, 70, "Info"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[11341, 453, 92, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[11456, 456, 66, 1, 70, "Input"], Cell[11525, 459, 88, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[11654, 466, 99, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[11776, 469, 55, 1, 70, "Input"], Cell[11834, 472, 88, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[11954, 479, 57, 1, 70, "Input"], Cell[12014, 482, 88, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[12143, 489, 85, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[12251, 492, 59, 1, 70, "Input"], Cell[12313, 495, 92, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[12437, 502, 59, 1, 70, "Input"], Cell[12499, 505, 103, 6, 70, "Output"] }, Closed]], Cell[12614, 513, 55, 1, 70, "Input"], Cell[CellGroupData[{ Cell[12692, 516, 60, 1, 70, "Input"], Cell[12755, 519, 103, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[12899, 527, 102, 1, 70, "Subsubsection"], Cell[13004, 530, 1639, 59, 70, "Text"], Cell[14646, 591, 872, 26, 70, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[15559, 619, 72, 1, 70, "Section"], Cell[CellGroupData[{ Cell[15654, 622, 87, 1, 70, "Subsubsection"], Cell[15744, 625, 520, 23, 70, "SmallText"], Cell[16267, 650, 790, 38, 70, "SmallText"], Cell[17060, 690, 568, 25, 70, "SmallText"], Cell[17631, 717, 366, 15, 70, "SmallText"] }, Closed]], Cell[CellGroupData[{ Cell[18029, 734, 76, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[18128, 737, 65, 1, 70, "Input"], Cell[18196, 740, 92, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[18320, 747, 75, 1, 70, "Input"], Cell[18398, 750, 92, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[18522, 757, 95, 1, 70, "Input"], Cell[18620, 760, 93, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[18754, 767, 93, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[18870, 770, 75, 1, 70, "Input"], Cell[18948, 773, 102, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[19082, 780, 78, 1, 70, "Input"], Cell[19163, 783, 99, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[19294, 790, 81, 1, 70, "Input"], Cell[19378, 793, 109, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[19528, 801, 86, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[19637, 804, 87, 1, 70, "Input"], Cell[19727, 807, 117, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[19876, 814, 76, 1, 70, "Input"], Cell[19955, 817, 145, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[20141, 825, 89, 1, 70, "Subsubsection"], Cell[20233, 828, 369, 12, 70, "Text"], Cell[CellGroupData[{ Cell[20625, 842, 78, 1, 70, "Input"], Cell[20706, 845, 109, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[20847, 853, 79, 1, 70, "Input"], Cell[20929, 856, 105, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[21075, 864, 80, 1, 70, "Subsubsection"], Cell[21158, 867, 288, 8, 70, "Text"], Cell[CellGroupData[{ Cell[21469, 877, 83, 1, 70, "Input"], Cell[21555, 880, 113, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[21700, 888, 84, 1, 70, "Input"], Cell[21787, 891, 101, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[21929, 899, 97, 1, 70, "Subsubsection"], Cell[22029, 902, 1282, 40, 70, "Text"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[23352, 944, 72, 1, 70, "Section"], Cell[CellGroupData[{ Cell[23447, 947, 88, 1, 70, "Subsubsection"], Cell[23538, 950, 460, 20, 70, "SmallText"], Cell[24001, 972, 667, 29, 70, "SmallText"], Cell[24671, 1003, 1043, 44, 70, "SmallText"], Cell[25717, 1049, 275, 12, 70, "SmallText"], Cell[25995, 1063, 395, 18, 70, "SmallText", CellTags->"Clear"], Cell[26393, 1083, 734, 35, 70, "SmallText"] }, Closed]], Cell[CellGroupData[{ Cell[27159, 1120, 77, 1, 70, "Subsubsection"], Cell[27239, 1123, 62, 1, 70, "Input"], Cell[CellGroupData[{ Cell[27324, 1126, 56, 1, 70, "Input"], Cell[27383, 1129, 103, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[27518, 1137, 54, 1, 70, "Input"], Cell[27575, 1140, 89, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[27696, 1147, 61, 1, 70, "Input"], Cell[27760, 1150, 109, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[27910, 1158, 85, 1, 70, "Subsubsection"], Cell[27998, 1161, 88, 1, 70, "Input"], Cell[CellGroupData[{ Cell[28109, 1164, 66, 1, 70, "Input"], Cell[28178, 1167, 170, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[28389, 1175, 77, 1, 70, "Subsubsection"], Cell[28469, 1178, 100, 1, 70, "Text"], Cell[28572, 1181, 91, 1, 70, "Input"], Cell[28666, 1184, 68, 1, 70, "Input"], Cell[CellGroupData[{ Cell[28757, 1187, 59, 1, 70, "Input"], Cell[28819, 1190, 91, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[28942, 1198, 59, 1, 70, "Input"], Cell[29004, 1201, 91, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[29136, 1209, 81, 1, 70, "Subsubsection"], Cell[29220, 1212, 99, 1, 70, "Input"], Cell[CellGroupData[{ Cell[29342, 1215, 59, 1, 70, "Input"], Cell[29404, 1218, 111, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[29547, 1226, 59, 1, 70, "Input"], Cell[29609, 1229, 127, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[29777, 1237, 91, 1, 70, "Subsubsection"], Cell[29871, 1240, 329, 8, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[30232, 1250, 78, 1, 70, "Subsubsection"], Cell[30313, 1253, 73, 1, 70, "Input"], Cell[30389, 1256, 61, 1, 70, "Input"], Cell[CellGroupData[{ Cell[30473, 1259, 57, 1, 70, "Input"], Cell[30533, 1262, 94, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[30668, 1269, 84, 1, 70, "Subsubsection"], Cell[30755, 1272, 104, 1, 70, "Text"], Cell[30862, 1275, 73, 1, 70, "Input"], Cell[30938, 1278, 73, 1, 70, "Input"], Cell[31014, 1281, 74, 1, 70, "Input"], Cell[31091, 1284, 74, 1, 70, "Input"] }, Closed]], Cell[CellGroupData[{ Cell[31197, 1287, 100, 1, 70, "Subsubsection"], Cell[31300, 1290, 61, 1, 70, "Input"], Cell[31364, 1293, 84, 1, 70, "Input"], Cell[CellGroupData[{ Cell[31471, 1296, 61, 1, 70, "Input"], Cell[31535, 1299, 89, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[31656, 1306, 55, 1, 70, "Input"], Cell[31714, 1309, 115, 7, 70, "Print"] }, Closed]], Cell[31841, 1318, 61, 1, 70, "Input"], Cell[CellGroupData[{ Cell[31925, 1321, 55, 1, 70, "Input"], Cell[31983, 1324, 61, 1, 70, "Print"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[32085, 1327, 77, 1, 70, "Subsubsection"], Cell[32165, 1330, 247, 11, 70, "Text"], Cell[32415, 1343, 129, 4, 70, "Input"], Cell[CellGroupData[{ Cell[32567, 1349, 60, 1, 70, "Input"], Cell[32630, 1352, 184, 7, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[32846, 1361, 62, 1, 70, "Input"], Cell[32911, 1364, 99, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[33051, 1371, 92, 1, 70, "Subsubsection"], Cell[33146, 1374, 124, 3, 70, "Text"], Cell[33273, 1379, 78, 1, 70, "Input"], Cell[CellGroupData[{ Cell[33374, 1382, 65, 1, 70, "Input"], Cell[33442, 1385, 92, 7, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[33566, 1394, 62, 1, 70, "Input"], Cell[33631, 1397, 107, 7, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[33779, 1406, 91, 1, 70, "Subsubsection"], Cell[33873, 1409, 395, 14, 70, "Text"], Cell[34271, 1425, 77, 1, 70, "Input"], Cell[CellGroupData[{ Cell[34371, 1428, 77, 1, 70, "Input"], Cell[34451, 1431, 111, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[34594, 1439, 59, 1, 70, "Input"], Cell[34656, 1442, 111, 6, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[34799, 1450, 60, 1, 70, "Input"], Cell[34862, 1453, 135, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[35038, 1461, 101, 1, 70, "Subsubsection"], Cell[35142, 1464, 1610, 50, 70, "Text"] }, Closed]], Cell[CellGroupData[{ Cell[36784, 1516, 111, 1, 70, "Subsubsection"], Cell[CellGroupData[{ Cell[36918, 1519, 69, 1, 70, "Input"], Cell[36990, 1522, 107, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[37129, 1529, 62, 1, 70, "Input"], Cell[37194, 1532, 107, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[37333, 1539, 57, 1, 70, "Input"], Cell[37393, 1542, 107, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[37532, 1549, 61, 1, 70, "Input"], Cell[37596, 1552, 115, 5, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[37752, 1559, 101, 1, 70, "Subsubsection"], Cell[37856, 1562, 86, 1, 70, "Input"], Cell[CellGroupData[{ Cell[37965, 1565, 65, 1, 70, "Input"], Cell[38033, 1568, 89, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[38154, 1575, 52, 1, 70, "Input"], Cell[38209, 1578, 125, 9, 70, "Print"] }, Closed]], Cell[CellGroupData[{ Cell[38366, 1589, 54, 1, 70, "Input"], Cell[38423, 1592, 89, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[38544, 1599, 52, 1, 70, "Input"], Cell[38599, 1602, 169, 17, 70, "Print"] }, Closed]] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[38818, 1621, 102, 1, 70, "Section"], Cell[38923, 1624, 613, 14, 70, "Text"], Cell[CellGroupData[{ Cell[39559, 1640, 84, 1, 70, "Subsubsection"], Cell[39646, 1643, 135, 4, 70, "Input"], Cell[CellGroupData[{ Cell[39804, 1649, 79, 1, 70, "Input"], Cell[39886, 1652, 253, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[40180, 1660, 89, 1, 70, "Subsubsection"], Cell[40272, 1663, 580, 28, 70, "Text"], Cell[40855, 1693, 129, 4, 70, "Input"], Cell[CellGroupData[{ Cell[41007, 1699, 79, 1, 70, "Input"], Cell[41089, 1702, 253, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[41383, 1710, 80, 1, 70, "Subsubsection"], Cell[41466, 1713, 89, 1, 70, "Input"], Cell[CellGroupData[{ Cell[41578, 1716, 79, 1, 70, "Input"], Cell[41660, 1719, 217, 6, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[41918, 1727, 77, 1, 70, "Subsubsection"], Cell[41998, 1730, 930, 45, 70, "Text"], Cell[42931, 1777, 130, 4, 70, "Input"], Cell[CellGroupData[{ Cell[43084, 1783, 79, 1, 70, "Input"], Cell[43166, 1786, 182, 8, 70, "Output"] }, Closed]] }, Closed]], Cell[CellGroupData[{ Cell[43389, 1796, 105, 1, 70, "Subsubsection"], Cell[43497, 1799, 141, 4, 70, "Input"], Cell[CellGroupData[{ Cell[43661, 1805, 67, 1, 70, "Input"], Cell[43731, 1808, 99, 5, 70, "Output"] }, Closed]], Cell[CellGroupData[{ Cell[43862, 1815, 79, 1, 70, "Input"], Cell[43944, 1818, 149, 7, 70, "Output"] }, Closed]] }, Closed]] }, Closed]] }, Open ]] } ] *) (******************************************************************* End of Mathematica Notebook file. *******************************************************************)