(* Content-type: application/vnd.wolfram.mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 10.2' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 158, 7] NotebookDataLength[ 41451, 1405] NotebookOptionsPosition[ 36063, 1212] NotebookOutlinePosition[ 36717, 1240] CellTagsIndexPosition[ 36648, 1235] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell["Solvers", "Section", CellChangeTimes->{{3.6532714060281*^9, 3.653271422207919*^9}}], Cell[CellGroupData[{ Cell[TextData[{ "Solve[expr, vars] - attempts to solve the system ", Cell[BoxData[ StyleBox["expr", "TI"]], "InlineFormula"], " of equations or inequalities for the variables ", Cell[BoxData[ StyleBox["vars", "TI"]], "InlineFormula"], ". " }], "Subsection", CellChangeTimes->{{3.699093332008349*^9, 3.69909337618499*^9}}], Cell["\<\ The solution returned by Solve[ ...] is a list of lists of transformation \ rules.\ \>", "Text", CellChangeTimes->{{3.6532782166196957`*^9, 3.653278279539693*^9}, { 3.653278352758054*^9, 3.6532783563180017`*^9}}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Solving equations", "Section", CellChangeTimes->{{3.6217822985115623`*^9, 3.621782302367054*^9}}], Cell[BoxData[ RowBox[{"Clear", "[", "x", "]"}]], "Input", CellChangeTimes->{{3.621782387488468*^9, 3.6217823893023167`*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[CellGroupData[{ Cell["\<\ Mathematica can solve various kinds of equations. For example set\ \>", "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"eqn", "=", " ", RowBox[{ RowBox[{ SuperscriptBox["x", "2"], "+", " ", RowBox[{"2", " ", "a", " ", "x"}], " ", "+", " ", "b"}], "\[Equal]", "0"}]}]], "Input", CellChangeTimes->{{3.6217832683954487`*^9, 3.621783282814507*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"b", "+", RowBox[{"2", " ", "a", " ", "x"}], "+", SuperscriptBox["x", "2"]}], "\[Equal]", "0"}]], "Output", CellChangeTimes->{3.699094054783287*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[TextData[{ "Note that the ", StyleBox["Set", "Input"], " operator (=) has lower precedence than the ", StyleBox["Equal", "Input"], " operator (==). To solve this equation for x you use the command" }], "Subsubsection"], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sol", "=", RowBox[{"Solve", "[", RowBox[{"eqn", ",", "x"}], "]"}]}]], "Input", FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.699094058200321*^9}] }, Open ]] }, Open ]], Cell["\<\ Note that the result is given as a list with two lists of rules. Each sublist \ represents a distinct solution. \ \>", "Subsubsection", CellChangeTimes->{{3.653280421298427*^9, 3.653280502481427*^9}, { 3.699094147265417*^9, 3.699094167922866*^9}}] }, Open ]], Cell[CellGroupData[{ Cell["Transformation rules", "Section", CellChangeTimes->{{3.653277991138185*^9, 3.653278011715685*^9}}], Cell[TextData[{ "The association ", Cell[BoxData[ RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}]], CellChangeTimes->{3.699094058200321*^9}], " is called a transformation rule. \nHow can we extract the useful value \ \[OpenCurlyDoubleQuote]", Cell[BoxData[ RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]], CellChangeTimes->{3.699094058200321*^9}], "\[CloseCurlyDoubleQuote] from the transformation rule?" }], "Text", CellChangeTimes->{{3.6532784793537493`*^9, 3.653278489928061*^9}, { 3.6532785217288923`*^9, 3.65327856365753*^9}, {3.65327867667358*^9, 3.6532787854438343`*^9}, {3.653280049645487*^9, 3.653280065089806*^9}, { 3.69909421234862*^9, 3.699094226121811*^9}}, FontWeight->"Bold"], Cell[BoxData["\"\\""], "Input", CellChangeTimes->{{3.653278823774549*^9, 3.6532788330195427`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}]], "Input", CellChangeTimes->{{3.653278801762801*^9, 3.653278806767186*^9}, { 3.699094248188088*^9, 3.699094250971879*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}], "}"}]], "Output", CellChangeTimes->{3.653278808211419*^9, 3.699094253123382*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}]], "Input", CellChangeTimes->{{3.6532788132836313`*^9, 3.6532788188290358`*^9}, { 3.699094257869775*^9, 3.6990942595884857`*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}]], "Output", CellChangeTimes->{3.653278819567788*^9, 3.699094260264058*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"sol", "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "1", "]"}], "]"}], "[", RowBox[{"[", "2", "]"}], "]"}]], "Input", CellChangeTimes->{{3.653278847150572*^9, 3.6532788546957607`*^9}, { 3.6990942657965937`*^9, 3.6990942691806393`*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]], "Output", CellChangeTimes->{3.6532788555747128`*^9, 3.6990942698877068`*^9}] }, Open ]], Cell[BoxData["\"\\""], "Input", CellChangeTimes->{{3.6532788734146023`*^9, 3.653278878958956*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Values", "[", "sol", "]"}]], "Input", CellChangeTimes->{{3.653278882792157*^9, 3.653278887108324*^9}, { 3.699094277903151*^9, 3.699094279639221*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.653278887632648*^9, 3.699094280185388*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Keys", "[", "sol", "]"}]], "Input", CellChangeTimes->{{3.653278896621059*^9, 3.653278899779723*^9}, { 3.6990942845512047`*^9, 3.699094286206173*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", "x", "}"}], ",", RowBox[{"{", "x", "}"}]}], "}"}]], "Output", CellChangeTimes->{3.653278900245861*^9, 3.699094286731814*^9}] }, Open ]], Cell[TextData[{ "We can get rid of one set of curly brackets by using the command ", StyleBox["Flatten[ ...]", FontWeight->"Bold"] }], "Text", CellChangeTimes->{{3.653280109099444*^9, 3.6532801412916193`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Flatten", "[", RowBox[{"Values", "[", "sol", "]"}], "]"}]], "Input", CellChangeTimes->{{3.653280151511426*^9, 3.653280161702321*^9}, { 3.699094296566921*^9, 3.699094298317114*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ",", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}]}], "}"}]], "Output", CellChangeTimes->{3.653280162227192*^9, 3.699094298900916*^9}] }, Open ]], Cell["\<\ However, we lost the connection between the name of the variables and the \ numeric solutions obtained.\ \>", "Text", CellChangeTimes->{{3.653279002379133*^9, 3.653279037331452*^9}}], Cell[CellGroupData[{ Cell["\<\ To verify that this is indeed a solution of the quadratic equation, we can \ substitute the solution back into the equation and simplify the result.\ \>", "Subsubsection", CellChangeTimes->{{3.653280421298427*^9, 3.653280502481427*^9}, { 3.699094147265417*^9, 3.699094172959156*^9}, 3.6990945000002813`*^9}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"eqn", " ", "/.", " ", "sol"}]], "Input", CellChangeTimes->{{3.621783208340652*^9, 3.621783248411018*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1], CellTags->"Reals"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"2", " ", "a", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}], "2"], "+", "b"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"2", " ", "a", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}], "2"], "+", "b"}], "\[Equal]", "0"}]}], "}"}]], "Output", CellChangeTimes->{3.653280516775996*^9}, CellTags->"Reals"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{"eqn", " ", "/.", " ", "sol"}], "]"}]], "Input", CellChangeTimes->{{3.653280525006497*^9, 3.653280536525285*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{"True", ",", "True"}], "}"}]], "Output", CellChangeTimes->{3.653280537729059*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ You can now also use the solutions for other computations. Suppose you want \ to evaluate some function f1 on the solution set:\ \>", "Subsubsection", CellChangeTimes->{{3.62178466136541*^9, 3.621784706020522*^9}, { 3.6532806196914062`*^9, 3.6532806255566587`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", "/.", " ", "sol"}]], "Input", CellChangeTimes->{{3.621784709997316*^9, 3.621784715711007*^9}, { 3.621784766449338*^9, 3.6217847698775597`*^9}, {3.6217856405564632`*^9, 3.621785650912077*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell["\<\ Short exercise: We know that sol contains the roots of the quadratic \ polynomial (given as a list of transformation rules) and we want to check \ (using transformation rules!) that the sum of the two roots is -2a and the \ product of the two roots is b. \ \>", "Text", CellChangeTimes->{{3.6217861514197197`*^9, 3.6217863075844593`*^9}, { 3.62178847207498*^9, 3.621788474906077*^9}}, FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Transformation rules & Replacement Operator \[OpenCurlyDoubleQuote]/.\ \[CloseCurlyDoubleQuote]", "Section", CellChangeTimes->{{3.621783547896185*^9, 3.62178355323166*^9}, { 3.621783660450876*^9, 3.621783665745611*^9}, {3.621783800213203*^9, 3.621783801547496*^9}, {3.6532780237695103`*^9, 3.653278044389243*^9}}], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["expr /. rule lhs->rhs", FontColor->GrayLevel[0]], " Applies a transformation rule lhs->rhs to expression expr\nThe \ replacement operator (pronounced \[OpenCurlyDoubleQuote]slash\[Hyphen]dot\ \[CloseCurlyDoubleQuote]) applies rules to expressions." }], "Subsubsection", CellChangeTimes->{{3.621783676113352*^9, 3.621783746115829*^9}, { 3.6217837890852003`*^9, 3.621783795585403*^9}, {3.65328023965064*^9, 3.653280247340149*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", "x", "]"}], " ", "/.", " ", RowBox[{"x", "\[Rule]", "4"}]}]], "Input", CellChangeTimes->{{3.6217838343828793`*^9, 3.621783843499956*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ If you give a list of rules, you get a list of results. Each rule will be \ tried once on each part of the expression.\ \>", "Subsubsection", CellChangeTimes->{ 3.6217840806810102`*^9, {3.621784395305792*^9, 3.6217844176266193`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", RowBox[{"x", "+", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "4"}], ",", " ", RowBox[{"y", "\[Rule]", "3"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.621783979444295*^9, 3.621783995191388*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", RowBox[{"x", "+", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "Pi"}], ",", " ", RowBox[{"y", "\[Rule]", RowBox[{"Pi", "/", "2"}]}]}], "}"}]}]], "Input", CellChangeTimes->{{3.62178391421644*^9, 3.62178396320317*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"x", "+", RowBox[{"x", "^", "2"}], "+", RowBox[{"y", "*", "x"}], "+", RowBox[{"x", "^", "3"}]}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{ RowBox[{"x", "^", "3"}], "\[Rule]", "x"}], ",", " ", RowBox[{"y", "\[Rule]", "x"}], ",", " ", RowBox[{"x", "\[Rule]", "20"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.6217842823890133`*^9, 3.6217843541142*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ If you give a list of lists of rules, you get a list of results.\ \>", "Subsubsection", CellChangeTimes->{3.6217840806810102`*^9}], Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", "x", "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", "\[Rule]", "0"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", "\[Rule]", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", "->", "2"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", "\[Rule]", "3"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"x", "\[Rule]", "4"}], "}"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.621784117825409*^9, 3.621784155126383*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{ RowBox[{"Sin", "[", RowBox[{"x", "+", "y"}], "]"}], " ", "/.", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "Pi"}], ",", " ", RowBox[{"y", "\[Rule]", RowBox[{"Pi", "/", "2"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{ RowBox[{"x", "\[Rule]", "4"}], ",", " ", RowBox[{"y", "\[Rule]", "3"}]}], "}"}]}], "}"}]}]], "Input", CellChangeTimes->{{3.62178391421644*^9, 3.62178396320317*^9}, { 3.653281790096572*^9, 3.6532817999815683`*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1]], Cell["\<\ Short exercise : Use the transformation rule to change the 0 - rows of a \ matrix like {{1,2,3}, {0,0,0}, {0,1,0}, {0,0,0}, {0,2,3}} with 1 - rows.\ \>", "Text", CellChangeTimes->{{3.621790491323886*^9, 3.621790577947461*^9}, { 3.621790735998361*^9, 3.621790788037401*^9}}, FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Back to the quadratic equation", "Section", CellChangeTimes->{{3.6217822985115623`*^9, 3.621782302367054*^9}, { 3.699094821577077*^9, 3.699094836521372*^9}}], Cell[CellGroupData[{ Cell["\<\ To verify that sol is indeed a solution of the quadratic equation eqn, we \ can substitute the solution back into the equation and simplify the result.\ \>", "Subsubsection", CellChangeTimes->{{3.653280421298427*^9, 3.653280502481427*^9}, { 3.699094784337408*^9, 3.6990948178358192`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"eqn", " ", "/.", " ", "sol"}]], "Input", CellChangeTimes->{{3.621783208340652*^9, 3.621783248411018*^9}}, FontSize->14, Background->RGBColor[0.87, 0.94, 1], CellTags->"Reals"], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{ RowBox[{ RowBox[{"2", " ", "a", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}], "2"], "+", "b"}], "\[Equal]", "0"}], ",", RowBox[{ RowBox[{ RowBox[{"2", " ", "a", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}], "+", SuperscriptBox[ RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}], "2"], "+", "b"}], "\[Equal]", "0"}]}], "}"}]], "Output", CellChangeTimes->{3.653280516775996*^9}, CellTags->"Reals"] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{"eqn", " ", "/.", " ", "sol"}], "]"}]], "Input", CellChangeTimes->{{3.653280525006497*^9, 3.653280536525285*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{"True", ",", "True"}], "}"}]], "Output", CellChangeTimes->{3.653280537729059*^9}] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["\<\ You can now also use the solutions for other computations. Suppose you want \ to evaluate some function f1 on the solution set:\ \>", "Subsubsection", CellChangeTimes->{{3.62178466136541*^9, 3.621784706020522*^9}, { 3.6532806196914062`*^9, 3.6532806255566587`*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"f1", "[", "x_", "]"}], ":=", RowBox[{"10", "x"}]}], "\[IndentingNewLine]", RowBox[{ RowBox[{"f1", "[", "x", "]"}], " ", "/.", " ", "sol"}]}], "Input", CellChangeTimes->{{3.621784709997316*^9, 3.621784715711007*^9}, { 3.621784766449338*^9, 3.6217847698775597`*^9}, {3.6217856405564632`*^9, 3.621785650912077*^9}, {3.699094843273223*^9, 3.699094872561757*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"10", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "-", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}], ",", RowBox[{"10", " ", RowBox[{"(", RowBox[{ RowBox[{"-", "a"}], "+", SqrtBox[ RowBox[{ SuperscriptBox["a", "2"], "-", "b"}]]}], ")"}]}]}], "}"}]], "Output", CellChangeTimes->{3.6990948755796328`*^9}] }, Open ]], Cell["\<\ Short exercise: We know that sol contains the roots of the quadratic \ polynomial (given as a list of transformation rules) and we want to check \ (using transformation rules!) that the sum of the two roots is -2a and the \ product of the two roots is b. \ \>", "Text", CellChangeTimes->{{3.6217861514197197`*^9, 3.6217863075844593`*^9}, { 3.62178847207498*^9, 3.621788474906077*^9}}, FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Numerical Solvers", "Section", CellChangeTimes->{{3.653281386032969*^9, 3.65328140136418*^9}, { 3.653282008530005*^9, 3.6532820119504433`*^9}}], Cell[CellGroupData[{ Cell[TextData[{ StyleBox["NSolve[expr, vars]", FontColor->GrayLevel[0]], " -- attempts to find numerical approximations to the solutions of the \ system expr of equations or inequalities for the variables vars.\n", StyleBox["NSolve[expr,vars,Reals]", FontColor->GrayLevel[0]], " -- finds solutions over the domain of real numbers." }], "Subsubsection", CellChangeTimes->{{3.6532820192217216`*^9, 3.653282049753263*^9}, { 3.6532820821418257`*^9, 3.653282117442484*^9}}], Cell["\<\ Example: Find the solutions of a polynomial equation of degree 5\ \>", "Text", CellChangeTimes->{{3.6532821969592533`*^9, 3.653282229112759*^9}, { 3.653282638550397*^9, 3.653282675039439*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Solve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "^", "5"}], "-", RowBox[{"2", " ", "x"}], "+", "3"}], "\[Equal]", "0"}], ",", "x"}], "]"}]], "Input", CellChangeTimes->{3.653282466558028*^9}, Background->RGBColor[1, 0.85, 0.85]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"Root", "[", RowBox[{ RowBox[{ RowBox[{"3", "-", RowBox[{"2", " ", "#1"}], "+", SuperscriptBox["#1", "5"]}], "&"}], ",", "1"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"Root", "[", RowBox[{ RowBox[{ RowBox[{"3", "-", RowBox[{"2", " ", "#1"}], "+", SuperscriptBox["#1", "5"]}], "&"}], ",", "2"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"Root", "[", RowBox[{ RowBox[{ RowBox[{"3", "-", RowBox[{"2", " ", "#1"}], "+", SuperscriptBox["#1", "5"]}], "&"}], ",", "3"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"Root", "[", RowBox[{ RowBox[{ RowBox[{"3", "-", RowBox[{"2", " ", "#1"}], "+", SuperscriptBox["#1", "5"]}], "&"}], ",", "4"}], "]"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"Root", "[", RowBox[{ RowBox[{ RowBox[{"3", "-", RowBox[{"2", " ", "#1"}], "+", SuperscriptBox["#1", "5"]}], "&"}], ",", "5"}], "]"}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.653282467682431*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "^", "5"}], "-", RowBox[{"2", " ", "x"}], "+", "3"}], "\[Equal]", "0"}], ",", "x"}], "]"}]], "Input", CellChangeTimes->{{3.653282409342605*^9, 3.65328240934354*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"-", "1.4236058485523315`"}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "0.24672925691056408`"}], "-", RowBox[{"1.3208163474502472`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{ RowBox[{"-", "0.24672925691056408`"}], "+", RowBox[{"1.3208163474502472`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"0.9585321811867297`", "\[VeryThinSpace]", "-", RowBox[{"0.4984277790318459`", " ", "\[ImaginaryI]"}]}]}], "}"}], ",", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"0.9585321811867297`", "\[VeryThinSpace]", "+", RowBox[{"0.4984277790318459`", " ", "\[ImaginaryI]"}]}]}], "}"}]}], "}"}]], "Output", CellChangeTimes->{3.653282411678335*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"NSolve", "[", RowBox[{ RowBox[{ RowBox[{ RowBox[{"x", "^", "5"}], "-", RowBox[{"2", " ", "x"}], "+", "3"}], "\[Equal]", "0"}], ",", "x", ",", "Reals"}], "]"}]], "Input", CellChangeTimes->{{3.653282426935668*^9, 3.65328242693651*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{"{", RowBox[{"x", "\[Rule]", RowBox[{"-", "1.4236058485523317`"}]}], "}"}], "}"}]], "Output", CellChangeTimes->{3.6532824288398733`*^9}] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell["Newton' s Method", "Section", CellChangeTimes->{{3.6532887620604563`*^9, 3.65328877435763*^9}}], Cell["\<\ Numeric solvers that are used for finding real roots usually implement \ Newton' s Method.\ \>", "Text", CellChangeTimes->{{3.653288714766087*^9, 3.653288784576352*^9}}], Cell["\<\ Newton' s Method is a method for finding successively better approximations \ to the roots (or zeroes) of a real - valued differentiable function f : [a,b] \ -> R. Suppose that f has a single root in the interval [a,b]. The idea of the \ method is as follows: one starts with an initial guess which is reasonably \ close to the true root, then the function is approximated by its tangent line \ (which can be computed using the tools of calculus), and one computes the \ x-intercept of this tangent line (which is easily done with elementary \ algebra). This x-intercept will typically be a better approximation to the \ function\[CloseCurlyQuote]s root than the original guess, and the method can \ be iterated.\ \>", "Text", CellChangeTimes->{{3.6532888612432547`*^9, 3.653288925901548*^9}, { 3.653288966758553*^9, 3.653288967626977*^9}, {3.653289559069366*^9, 3.653289576782452*^9}}], Cell[TextData[{ "Suppose we have some current approximation ", Cell[BoxData[ FormBox[ SubscriptBox["x", "n"], TraditionalForm]]], ". The equation of the tangent line to the curve y = \[Florin](x) at the \ point (", Cell[BoxData[ FormBox[ RowBox[{ RowBox[{ SubscriptBox["x", "n"], ",", RowBox[{"f", "(", SubscriptBox["x", "n"], ")"}]}], ")"}], TraditionalForm]]], " is \n", StyleBox["y = f \[CloseCurlyQuote](", FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], Cell[BoxData[ FormBox[ SubscriptBox["x", "n"], TraditionalForm]], FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], StyleBox[")(x-", FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], Cell[BoxData[ FormBox[ SubscriptBox["x", "n"], TraditionalForm]], FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], StyleBox[") + f(", FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], Cell[BoxData[ FormBox[ SubscriptBox["x", "n"], TraditionalForm]], FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], StyleBox[")", FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], StyleBox[".", FontColor->RGBColor[0.5, 0, 0.5]], " \nTo find the intersection point of the tangent line with the x-axis we \ set y=0 and solve for x. We get \n ", Cell[BoxData[ FormBox[ StyleBox[ RowBox[{ SubscriptBox["x", RowBox[{"n", "+", "1"}]], "=", RowBox[{ SubscriptBox["x", "n"], "-", FractionBox[ RowBox[{"f", "(", SubscriptBox["x", "n"], ")"}], RowBox[{ RowBox[{"f", " ", "'"}], RowBox[{"(", SubscriptBox["x", "n"], ")"}]}]]}]}], FontWeight->"Bold", FontColor->RGBColor[0.5, 0, 0.5]], TraditionalForm]], FontSize->18], ". We get a sequence of successive approximations ", Cell[BoxData[ FormBox[ RowBox[{ SubscriptBox["x", "1"], ",", RowBox[{"...", " ", SubscriptBox["x", "n"]}], ",", " ", SubscriptBox["x", RowBox[{ RowBox[{"n", "+", "1"}], ",", " ", "...", " "}]]}], TraditionalForm]]], " of the root of the function f, in the interval [a,b].\n The method will \ usually converge, provided this initial guess ", Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], " is close enough to the unknown zero, and that \[Florin]\[CloseCurlyQuote](", Cell[BoxData[ FormBox[ SubscriptBox["x", "1"], TraditionalForm]]], ") \[NotEqual]\[NonBreakingSpace]0 (i.e. the tangent line is not \ horizontal)." }], "Text", CellChangeTimes->{{3.6532890214353247`*^9, 3.653289104393558*^9}, { 3.653289148396768*^9, 3.6532893084816227`*^9}, {3.65328934928868*^9, 3.65328944842801*^9}, {3.6532894787710247`*^9, 3.653289546862822*^9}, { 3.653289614225389*^9, 3.653289623269253*^9}, 3.653289676608954*^9, 3.653289707149652*^9, {3.653289765763234*^9, 3.653289819900523*^9}, 3.699094937952154*^9}] }, Open ]], Cell[CellGroupData[{ Cell["Functions with no name (pure functions #) ", "Section", CellChangeTimes->{{3.653283371425057*^9, 3.653283403138588*^9}}], Cell[BoxData[ RowBox[{ StyleBox[ RowBox[{ RowBox[{"#", "^", "5"}], "&"}], FontSize->72], " "}]], "Input", CellChangeTimes->{{3.653283413652104*^9, 3.653283445363887*^9}, { 3.653283478332787*^9, 3.653283503608066*^9}}], Cell["\<\ When solving equations where solutions do not have any closed form, you may \ see these kind of functions returned by Mathematica. These are functions with \ no name, or pure functions.\ \>", "Text", CellChangeTimes->{{3.65328352688997*^9, 3.653283572773241*^9}, { 3.653283779615245*^9, 3.653283795694491*^9}}], Cell[TextData[{ StyleBox["#", FontSize->24, FontWeight->"Bold"], " represents the first variable (first argument) in a pure function \n", StyleBox["#n", FontSize->18, FontWeight->"Bold"], " represents the n^th variable (argument) in a pure function\n", StyleBox["& ", FontSize->18, FontWeight->"Bold"], "the", StyleBox[" ", FontSize->18, FontWeight->"Bold"], "ampersand", StyleBox[" ", FontSize->18, FontWeight->"Bold"], "marks the end of the pure function\n" }], "Text", CellChangeTimes->{{3.653283640374168*^9, 3.65328376093169*^9}, { 3.6532838060999603`*^9, 3.653283806804235*^9}, {3.6532838439501963`*^9, 3.653283862478939*^9}, {3.653284874367331*^9, 3.653284884438813*^9}, { 3.653285400582265*^9, 3.6532854091046343`*^9}, {3.653285444899293*^9, 3.653285450692525*^9}}], Cell[TextData[{ "The name of a function is irrelevant if you do not intend to refer to the \ function again, so the Wolfram language lets you define functions with no \ names. Pure functions in the Wolfram Language can take any number of \ arguments. The Wolfram Language allows you to avoid using explicit names for \ the arguments of pure functions, and instead to specify the arguments by \ giving \[OpenCurlyDoubleQuote]slot numbers\[CloseCurlyDoubleQuote] . In a \ Wolfram Language pure function, ", StyleBox["#n", FontSize->18, FontWeight->"Bold"], " stands for the nth argument you supply. ", StyleBox["#", FontSize->24, FontWeight->"Bold"], " stands for the first argument." }], "Text", CellChangeTimes->{{3.6532840086651087`*^9, 3.6532840086659727`*^9}, { 3.6532840678480787`*^9, 3.65328412399361*^9}, {3.653284802357524*^9, 3.653284830232297*^9}}], Cell[TextData[{ StyleBox["#^5 &", FontSize->24, FontWeight->"Bold"], " is simply the function that takes any number and raises it to power 5. \ We can use this function to compute 2^5 for example. \n#1+#2 & is a function \ that computes the sum of two numbers.\n" }], "Text", CellChangeTimes->{{3.653285125339138*^9, 3.653285129692787*^9}, { 3.6532854629021606`*^9, 3.653285656860194*^9}, {3.653285728226603*^9, 3.653285777004077*^9}}], Cell[CellGroupData[{ Cell[BoxData[ StyleBox[ RowBox[{ RowBox[{ RowBox[{"#", "^", "5"}], "&"}], "[", "2", "]"}], FontSize->24]], "Input", CellChangeTimes->{{3.653285104471334*^9, 3.653285114966028*^9}}, FontSize->8, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData["32"], "Output", CellChangeTimes->{{3.653285106526246*^9, 3.6532851158014727`*^9}}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"#1", "+", "#2"}], " ", "&"}], "[", RowBox[{"1", ",", "2"}], "]"}]], "Input", CellChangeTimes->{{3.653285785296151*^9, 3.65328579284405*^9}}, FontSize->24, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData["3"], "Output", CellChangeTimes->{3.653285794071349*^9}] }, Open ]], Cell[TextData[{ "Example : Sort the list ", StyleBox["L = {{1, 2}, {2, 5}, {1, 1}, {4, 8}, {3, 4}, {9,0}, {7,6}}", FontWeight->"Bold"], " in ascending order, according to the following criterion : ", StyleBox["{a, b} < {c, d} iff b < d", FontWeight->"Bold"] }], "Text", CellChangeTimes->{{3.653287187264121*^9, 3.653287381813142*^9}, { 3.653288058965016*^9, 3.653288072063058*^9}}], Cell[CellGroupData[{ Cell[BoxData[{ StyleBox[ RowBox[{ RowBox[{"L", " ", "=", " ", RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", " ", "2"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"2", ",", " ", "5"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"1", ",", " ", "1"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"4", ",", " ", "8"}], "}"}], ",", " ", RowBox[{"{", RowBox[{"3", ",", " ", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6"}], "}"}]}], "}"}]}], ";"}], FontWeight->"Bold"], "\[IndentingNewLine]", StyleBox[ RowBox[{"Sort", "[", "L", "]"}], FontWeight->"Bold"], "\[IndentingNewLine]", StyleBox[ RowBox[{"Sort", "[", RowBox[{"L", ",", "Greater"}], "]"}], FontWeight->"Bold"], "\[IndentingNewLine]", StyleBox[ RowBox[{"Sort", "[", RowBox[{"L", ",", " ", RowBox[{ RowBox[{ RowBox[{"#1", "[", RowBox[{"[", "2", "]"}], "]"}], "<", RowBox[{"#2", "[", RowBox[{"[", "2", "]"}], "]"}]}], "&"}]}], "]"}], FontWeight->"Bold"]}], "Input", CellChangeTimes->{{3.653287392445953*^9, 3.653287538650035*^9}}, Background->RGBColor[0.87, 0.94, 1]], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "0"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6532874059056063`*^9, 3.653287484626412*^9}, 3.653287539617854*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"9", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6532874059056063`*^9, 3.653287484626412*^9}, 3.653287539620311*^9}], Cell[BoxData[ RowBox[{"{", RowBox[{ RowBox[{"{", RowBox[{"9", ",", "0"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "1"}], "}"}], ",", RowBox[{"{", RowBox[{"1", ",", "2"}], "}"}], ",", RowBox[{"{", RowBox[{"3", ",", "4"}], "}"}], ",", RowBox[{"{", RowBox[{"2", ",", "5"}], "}"}], ",", RowBox[{"{", RowBox[{"7", ",", "6"}], "}"}], ",", RowBox[{"{", RowBox[{"4", ",", "8"}], "}"}]}], "}"}]], "Output", CellChangeTimes->{{3.6532874059056063`*^9, 3.653287484626412*^9}, 3.653287539621882*^9}] }, Open ]], Cell["\<\ Short Exercise : Sort a list of the form S = {{1, 1 \[Rule] 2}, {2, 2 \ \[Rule] 5}, {1, 1 \[Rule] 1}, {4, 4 \[Rule] 8}, {3, 3 \[Rule] 4}, {9, 9 \ \[Rule] 0}, {7, 7\[Rule] 6}} according to the following criterion: {a, a\ \[Rule]b} < {c, c\[Rule]d} iff b", "Text", CellChangeTimes->{{3.6532880111894073`*^9, 3.653288043112959*^9}, { 3.653288075609877*^9, 3.653288151517606*^9}, {3.65328830194485*^9, 3.6532884332415657`*^9}, {3.6990985317547197`*^9, 3.699098553030505*^9}, { 3.699098614538166*^9, 3.699098621969824*^9}}, FontWeight->"Bold", Background->RGBColor[1, 1, 0.85]] }, Open ]] }, WindowSize->{1280, 678}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, FrontEndVersion->"11.0 for Mac OS X x86 (32-bit, 64-bit Kernel) (September \ 21, 2016)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{ "Reals"->{ Cell[8930, 327, 203, 5, 50, "Input", CellTags->"Reals"], Cell[9136, 334, 1039, 38, 46, "Output", CellTags->"Reals"], Cell[16511, 575, 203, 5, 50, "Input", CellTags->"Reals"], Cell[16717, 582, 1039, 38, 46, "Output", CellTags->"Reals"]} } *) (*CellTagsIndex CellTagsIndex->{ {"Reals", 36368, 1223} } *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[580, 22, 90, 1, 64, "Section"], Cell[CellGroupData[{ Cell[695, 27, 331, 9, 45, "Subsection"], Cell[1029, 38, 225, 5, 30, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[1303, 49, 104, 1, 64, "Section"], Cell[1410, 52, 179, 4, 50, "Input"], Cell[CellGroupData[{ Cell[1614, 60, 98, 2, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[1737, 66, 321, 9, 50, "Input"], Cell[2061, 77, 191, 5, 32, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[2301, 88, 228, 6, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[2554, 98, 162, 5, 50, "Input"], Cell[2719, 105, 469, 17, 43, "Output"] }, Open ]] }, Open ]], Cell[3215, 126, 261, 6, 59, "Subsubsection"] }, Open ]], Cell[CellGroupData[{ Cell[3513, 137, 105, 1, 64, "Section"], Cell[3621, 140, 867, 25, 71, "Text"], Cell[4491, 167, 112, 1, 32, "Input"], Cell[CellGroupData[{ Cell[4628, 172, 232, 5, 48, "Input"], Cell[4863, 179, 255, 8, 43, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5155, 192, 290, 7, 48, "Input"], Cell[5448, 201, 227, 7, 40, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[5712, 213, 344, 9, 48, "Input"], Cell[6059, 224, 198, 6, 40, "Output"] }, Open ]], Cell[6272, 233, 113, 1, 32, "Input"], Cell[CellGroupData[{ Cell[6410, 238, 214, 4, 48, "Input"], Cell[6627, 244, 419, 15, 43, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[7083, 264, 214, 4, 48, "Input"], Cell[7300, 270, 185, 5, 32, "Output"] }, Open ]], Cell[7500, 278, 214, 5, 30, "Text"], Cell[CellGroupData[{ Cell[7739, 287, 248, 5, 48, "Input"], Cell[7990, 294, 361, 13, 43, "Output"] }, Open ]], Cell[8366, 310, 193, 4, 30, "Text"], Cell[CellGroupData[{ Cell[8584, 318, 321, 5, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[8930, 327, 203, 5, 50, "Input", CellTags->"Reals"], Cell[9136, 334, 1039, 38, 46, "Output", CellTags->"Reals"] }, Open ]], Cell[CellGroupData[{ Cell[10212, 377, 203, 4, 48, "Input"], Cell[10418, 383, 121, 3, 32, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[10588, 392, 278, 5, 35, "Subsubsection"], Cell[10869, 399, 297, 6, 48, "Input"], Cell[11169, 407, 453, 9, 65, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[11671, 422, 325, 4, 64, "Section"], Cell[CellGroupData[{ Cell[12021, 430, 469, 9, 59, "Subsubsection"], Cell[12493, 441, 240, 6, 50, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[12770, 452, 246, 5, 35, "Subsubsection"], Cell[13019, 459, 347, 10, 50, "Input"], Cell[13369, 471, 373, 11, 53, "Input"], Cell[13745, 484, 481, 14, 50, "Input"] }, Open ]], Cell[CellGroupData[{ Cell[14263, 503, 141, 3, 35, "Subsubsection"], Cell[14407, 508, 586, 17, 50, "Input"], Cell[14996, 527, 603, 18, 53, "Input"], Cell[15602, 547, 342, 7, 46, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[15993, 560, 166, 2, 64, "Section"], Cell[CellGroupData[{ Cell[16184, 566, 302, 5, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[16511, 575, 203, 5, 50, "Input", CellTags->"Reals"], Cell[16717, 582, 1039, 38, 46, "Output", CellTags->"Reals"] }, Open ]], Cell[CellGroupData[{ Cell[17793, 625, 203, 4, 48, "Input"], Cell[17999, 631, 121, 3, 32, "Output"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[18169, 640, 278, 5, 35, "Subsubsection"], Cell[CellGroupData[{ Cell[18472, 649, 445, 9, 70, "Input"], Cell[18920, 660, 461, 17, 46, "Output"] }, Open ]], Cell[19396, 680, 453, 9, 65, "Text"] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[19898, 695, 152, 2, 64, "Section"], Cell[CellGroupData[{ Cell[20075, 701, 479, 10, 83, "Subsubsection"], Cell[20557, 713, 206, 5, 49, "Text"], Cell[CellGroupData[{ Cell[20788, 722, 282, 9, 48, "Input"], Cell[21073, 733, 1369, 48, 35, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[22479, 786, 306, 9, 48, "Input"], Cell[22788, 797, 952, 25, 32, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[23777, 827, 321, 9, 48, "Input"], Cell[24101, 838, 185, 5, 32, "Output"] }, Open ]] }, Open ]] }, Open ]], Cell[CellGroupData[{ Cell[24347, 850, 102, 1, 64, "Section"], Cell[24452, 853, 180, 4, 30, "Text"], Cell[24635, 859, 902, 14, 87, "Text"], Cell[25540, 875, 2907, 91, 133, "Text"] }, Open ]], Cell[CellGroupData[{ Cell[28484, 971, 128, 1, 64, "Section"], Cell[28615, 974, 233, 7, 69, "Input"], Cell[28851, 983, 323, 6, 30, "Text"], Cell[29177, 991, 821, 26, 109, "Text"], Cell[30001, 1019, 877, 19, 80, "Text"], Cell[30881, 1040, 450, 10, 80, "Text"], Cell[CellGroupData[{ Cell[31356, 1054, 245, 8, 62, "Input"], Cell[31604, 1064, 97, 1, 32, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[31738, 1070, 244, 7, 62, "Input"], Cell[31985, 1079, 70, 1, 32, "Output"] }, Open ]], Cell[32070, 1083, 393, 9, 30, "Text"], Cell[CellGroupData[{ Cell[32488, 1096, 1256, 39, 112, "Input"], Cell[33747, 1137, 560, 18, 32, "Output"], Cell[34310, 1157, 560, 18, 32, "Output"], Cell[34873, 1177, 560, 18, 32, "Output"] }, Open ]], Cell[35448, 1198, 599, 11, 65, "Text"] }, Open ]] } ] *)