(* Content-type: application/mathematica *) (*** Wolfram Notebook File ***) (* http://www.wolfram.com/nb *) (* CreatedBy='Mathematica 7.0' *) (*CacheID: 234*) (* Internal cache information: NotebookFileLineBreakTest NotebookFileLineBreakTest NotebookDataPosition[ 145, 7] NotebookDataLength[ 15680, 513] NotebookOptionsPosition[ 14273, 463] NotebookOutlinePosition[ 14637, 479] CellTagsIndexPosition[ 14594, 476] WindowFrame->Normal*) (* Beginning of Notebook Content *) Notebook[{ Cell[CellGroupData[{ Cell[BoxData[{ RowBox[{ RowBox[{"expArg", "=", RowBox[{"Expand", "[", RowBox[{ FractionBox[ SuperscriptBox[ RowBox[{"(", RowBox[{"L", "-", "x"}], ")"}], "2"], SuperscriptBox["s1", "2"]], "-", RowBox[{"2", " ", "r", " ", FractionBox[ RowBox[{"(", RowBox[{"L", "-", "x"}], ")"}], "s1"], FractionBox["x", "s2"]}], "+", FractionBox[ SuperscriptBox["x", "2"], SuperscriptBox["s2", "2"]]}], "]"}]}], ";"}], "\[IndentingNewLine]", RowBox[{"Collect", "[", RowBox[{"expArg", ",", "x"}], "]"}]}], "Input", CellChangeTimes->{{3.4795670153201847`*^9, 3.479567078306576*^9}, { 3.479567162387745*^9, 3.4795671757788844`*^9}, {3.4795672384687915`*^9, 3.479567247000369*^9}, {3.4795673855525646`*^9, 3.4795673933966155`*^9}, { 3.4795674571859565`*^9, 3.479567461545499*^9}, {3.479567541329812*^9, 3.4795675712059593`*^9}, {3.4798061391142716`*^9, 3.4798061438487377`*^9}}], Cell[BoxData[ RowBox[{ FractionBox[ SuperscriptBox["L", "2"], SuperscriptBox["s1", "2"]], "+", RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"2", " ", "L"}], SuperscriptBox["s1", "2"]]}], "-", FractionBox[ RowBox[{"2", " ", "L", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], " ", "x"}], "+", RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], " ", SuperscriptBox["x", "2"]}]}]], "Output", CellChangeTimes->{{3.479567055290214*^9, 3.4795670788065915`*^9}, { 3.479567164700334*^9, 3.479567176075771*^9}, 3.4795672477503977`*^9, 3.4795673941310186`*^9, 3.479567461858011*^9, {3.479567543033003*^9, 3.4795675717216043`*^9}, 3.4798060731442547`*^9, 3.4798061443643723`*^9, 3.479810020497277*^9, 3.479810324692518*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{"(*", " ", RowBox[{ RowBox[{ "Since", " ", "we", " ", "ultimatly", " ", "want", " ", "to", " ", "complete", " ", "the", " ", "square"}], ",", " ", RowBox[{ "collect", " ", "the", " ", "leading", " ", "coefficient", " ", "of", " ", "x", " ", "and", " ", "call", " ", "it", " ", "a"}]}], " ", "*)"}], "\[IndentingNewLine]", RowBox[{ RowBox[{"a", "=", RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}]}], ";"}]}]], "Input", CellChangeTimes->{{3.479567621192254*^9, 3.479567623332961*^9}, { 3.479567701195326*^9, 3.4795677116488523`*^9}, {3.479806080378769*^9, 3.4798061319735093`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", " ", FractionBox[ FractionBox[ SuperscriptBox["L", "2"], SuperscriptBox["s1", "2"]], "a"], "]"}]], "Input", CellChangeTimes->{{3.4795676256299243`*^9, 3.479567638567921*^9}, { 3.479806222694001*^9, 3.4798062230221324`*^9}}], Cell[BoxData[ FractionBox[ RowBox[{ SuperscriptBox["L", "2"], " ", SuperscriptBox["s2", "2"]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]], "Output", CellChangeTimes->{3.4795676388648076`*^9, 3.479806224225281*^9, 3.4798103338490024`*^9}] }, Open ]], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", FractionBox[ RowBox[{ RowBox[{"(", RowBox[{ RowBox[{"-", FractionBox[ RowBox[{"2", " ", "L"}], SuperscriptBox["s1", "2"]]}], "-", FractionBox[ RowBox[{"2", " ", "L", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], " "}], "a"], "]"}]], "Input", CellChangeTimes->{{3.4795676403961163`*^9, 3.479567652818468*^9}, 3.4798062332254534`*^9}], Cell[BoxData[ RowBox[{"-", FractionBox[ RowBox[{"2", " ", "L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]}]], "Output", CellChangeTimes->{3.4795676531778574`*^9, 3.4798062339285917`*^9, 3.4798103351302853`*^9}] }, Open ]], Cell["We now have our exponent factored in the following form :", "Text", CellChangeTimes->{{3.479567764088366*^9, 3.479567775573182*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], RowBox[{"(", " ", RowBox[{ SuperscriptBox["x", "2"], "-", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"2", " ", "L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]], ")"}], "x"}]}], ")"}]}], "+", FractionBox[ SuperscriptBox["L", "2"], SuperscriptBox["s1", "2"]]}]], "Input", CellChangeTimes->{{3.4795677253837547`*^9, 3.4795677512441225`*^9}, { 3.479567842638257*^9, 3.479567858154478*^9}, {3.479806267616739*^9, 3.4798062899296675`*^9}, {3.4798100295599627`*^9, 3.479810059388851*^9}, 3.479810340302293*^9}], Cell["Lets complete the square of the term with respect to x : ", "Text", CellChangeTimes->{{3.4795677912612844`*^9, 3.479567794370779*^9}, { 3.4795678735769453`*^9, 3.4795678777021036`*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"c", "=", RowBox[{ FractionBox["1", "2"], RowBox[{"(", FractionBox[ RowBox[{"2", " ", "L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]], ")"}]}]}]], "Input", CellChangeTimes->{{3.4795678092932267`*^9, 3.479567818434203*^9}, 3.479806886724001*^9, {3.479806924396599*^9, 3.4798069283498*^9}}], Cell[BoxData[ FractionBox[ RowBox[{"L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]], "Output", CellChangeTimes->{3.479567820340526*^9, 3.479806888661538*^9, 3.479806929552948*^9, 3.479810052451174*^9, 3.4798103460993156`*^9}] }, Open ]], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], RowBox[{"(", " ", RowBox[{ SuperscriptBox["x", "2"], "-", RowBox[{ RowBox[{"(", FractionBox[ RowBox[{"2", " ", "L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]], ")"}], "x"}], "+", SuperscriptBox["c", "2"]}], ")"}]}], "+", FractionBox[ SuperscriptBox["L", "2"], SuperscriptBox["s1", "2"]], "-", RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], " ", SuperscriptBox["c", "2"]}]}]], "Input", CellChangeTimes->{{3.4798069116151037`*^9, 3.4798069538502893`*^9}, { 3.4798100742798576`*^9, 3.4798100865614223`*^9}, {3.4798103492087708`*^9, 3.479810354724537*^9}}], Cell["So we need to simplify the following expression", "Text", CellChangeTimes->{{3.4795679157973166`*^9, 3.479567925000795*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{ FractionBox[ SuperscriptBox["L", "2"], SuperscriptBox["s1", "2"]], "-", RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], " ", SuperscriptBox["c", "2"]}]}], "]"}]], "Input", CellChangeTimes->{{3.4795679379700427`*^9, 3.479567941407675*^9}, { 3.479568055052664*^9, 3.47956807005324*^9}, {3.4798069974136257`*^9, 3.4798070017418337`*^9}, 3.479810098905488*^9, 3.47981036344351*^9}], Cell[BoxData[ RowBox[{"-", FractionBox[ RowBox[{ SuperscriptBox["L", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["r", "2"]}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]}]], "Output", CellChangeTimes->{3.479807002476223*^9, 3.479810099608631*^9, 3.4798103645216627`*^9}] }, Open ]], Cell["to get", "Text", CellChangeTimes->{{3.4795679845030794`*^9, 3.479567985299985*^9}, 3.4795680310204906`*^9}], Cell[BoxData[ RowBox[{ RowBox[{ RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], SuperscriptBox[ RowBox[{"(", " ", RowBox[{"x", "-", RowBox[{"(", FractionBox[ RowBox[{"L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]], ")"}]}], ")"}], "2"]}], "-", FractionBox[ RowBox[{ SuperscriptBox["L", "2"], " ", RowBox[{"(", RowBox[{ RowBox[{"-", "1"}], "+", SuperscriptBox["r", "2"]}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]}]], "Input", CellChangeTimes->{{3.479807023414125*^9, 3.4798070518209205`*^9}, 3.4798101066088104`*^9, 3.4798103721156073`*^9}], Cell["Next we multiply by ", "Text", CellChangeTimes->{{3.479807103868795*^9, 3.479807107665743*^9}}], Cell[BoxData[ FractionBox["1", RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["r", "2"]}], ")"}]]], "Input", CellChangeTimes->{{3.479807110853304*^9, 3.47980712599422*^9}, { 3.4798103797408023`*^9, 3.479810384319044*^9}, 3.479810456836526*^9}], Cell["to get", "Text", CellChangeTimes->{{3.4798071295255375`*^9, 3.4798071311974444`*^9}}], Cell[BoxData[ RowBox[{ RowBox[{ FractionBox["1", RowBox[{"1", "-", SuperscriptBox["r", "2"]}]], RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}], SuperscriptBox[ RowBox[{"(", " ", RowBox[{"x", "-", RowBox[{"(", FractionBox[ RowBox[{"L", " ", "s2", " ", RowBox[{"(", RowBox[{ RowBox[{"r", " ", "s1"}], "+", "s2"}], ")"}]}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]], ")"}]}], ")"}], "2"]}], "+", FractionBox[ RowBox[{ SuperscriptBox["L", "2"], " "}], RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]}]], "Input", CellChangeTimes->{{3.479807144666453*^9, 3.4798071692294245`*^9}, { 3.4798103898348103`*^9, 3.479810391725484*^9}, 3.479810459508469*^9}], Cell["as part of the argument of the exponential", "Text", CellChangeTimes->{{3.4798105183537254`*^9, 3.479810554120266*^9}}], Cell[CellGroupData[{ Cell[BoxData[ RowBox[{"Simplify", "[", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], FractionBox["1", SuperscriptBox["s2", "2"]], FractionBox["1", RowBox[{"1", "-", SuperscriptBox["r", "2"]}]], FractionBox[ RowBox[{"(", RowBox[{"1", "-", SuperscriptBox["r", "2"]}], ")"}], RowBox[{"(", RowBox[{ FractionBox["1", SuperscriptBox["s1", "2"]], "+", FractionBox["1", SuperscriptBox["s2", "2"]], "+", FractionBox[ RowBox[{"2", " ", "r"}], RowBox[{"s1", " ", "s2"}]]}], ")"}]]}], "]"}]], "Input", CellChangeTimes->{{3.4798087172903967`*^9, 3.479808739525199*^9}, { 3.4798095517851524`*^9, 3.479809578207535*^9}, {3.4798106299347067`*^9, 3.4798106325285234`*^9}}], Cell[BoxData[ FractionBox["1", RowBox[{ SuperscriptBox["s1", "2"], "+", RowBox[{"2", " ", "r", " ", "s1", " ", "s2"}], "+", SuperscriptBox["s2", "2"]}]]], "Output", CellChangeTimes->{3.4798087397752037`*^9, 3.479809579051301*^9, 3.4798106333254185`*^9}] }, Open ]] }, WindowSize->{920, 750}, WindowMargins->{{0, Automatic}, {Automatic, 0}}, ShowSelection->True, FrontEndVersion->"7.0 for Microsoft Windows (32-bit) (February 18, 2009)", StyleDefinitions->"Default.nb" ] (* End of Notebook Content *) (* Internal cache information *) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[567, 22, 973, 24, 73, "Input"], Cell[1543, 48, 1031, 30, 51, "Output"] }, Open ]], Cell[2589, 81, 872, 24, 68, "Input"], Cell[CellGroupData[{ Cell[3486, 109, 281, 7, 59, "Input"], Cell[3770, 118, 346, 10, 51, "Output"] }, Open ]], Cell[CellGroupData[{ Cell[4153, 133, 449, 14, 57, "Input"], Cell[4605, 149, 421, 12, 48, "Output"] }, Open ]], Cell[5041, 164, 139, 1, 29, "Text"], Cell[5183, 167, 1085, 32, 51, "Input"], Cell[6271, 201, 194, 2, 29, "Text"], Cell[CellGroupData[{ Cell[6490, 207, 550, 15, 48, "Input"], Cell[7043, 224, 425, 11, 48, "Output"] }, Open ]], Cell[7483, 238, 1353, 43, 51, "Input"], Cell[8839, 283, 131, 1, 29, "Text"], Cell[CellGroupData[{ Cell[8995, 288, 677, 19, 51, "Input"], Cell[9675, 309, 443, 14, 52, "Output"] }, Open ]], Cell[10133, 326, 118, 2, 29, "Text"], Cell[10254, 330, 1163, 37, 52, "Input"], Cell[11420, 369, 102, 1, 29, "Text"], Cell[11525, 372, 259, 6, 52, "Input"], Cell[11787, 380, 92, 1, 29, "Text"], Cell[11882, 383, 1158, 36, 51, "Input"], Cell[13043, 421, 126, 1, 29, "Text"], Cell[CellGroupData[{ Cell[13194, 426, 788, 25, 62, "Input"], Cell[13985, 453, 272, 7, 48, "Output"] }, Open ]] } ] *) (* End of internal cache information *)